[BioPython] Help on extracting title from description (Protein
file parsing)
Brad Chapman
chapmanb at uga.edu
Mon Nov 24 17:16:06 EST 2003
Hi Albert;
> Hello, I just got into Biopython and I hope someone can help me on
> this matter. I'm trying to compare the blast result of various proteins
> against each other by (hopefully) extracting the alignment.title (which
> can be done) and putting it side by side against description title
> and then the corresponding e-value.
I guess I'm not exactly sure what you want to do here. The
description title and the alignment title should be the same thing,
except that the description title is shortened to fit into the
description table. So from the start I don't think I understand what
you're trying to accomplish.
> However I am not able to extract the description.title by
> simply doing [print description.title] as biopython says that
> title argument is not defined but I can do it for [print
> alignment.title]. I am still trying to find out why.
You can get the title for all of the descriptions (as well as score
and e-value) with code of the following type:
for description in blast_record.descriptions:
print description.title, description.score, description.e
Similar to how you would get the information for alignments:
for alignment in blast_record.alignments:
print alignment.title, alignment.length
I don't know if this helps answer your questions. If you supply some
code or a better description of your problem I or someone else on
the list may be able to help more.
Hope this helps some.
Brad
More information about the BioPython
mailing list