[BioPython] BLAST results and more title information
Leighton Pritchard
lpritc at scri.sari.ac.uk
Thu Sep 23 11:22:35 EDT 2004
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Aaron,
With your BLAST record as b_results, what you're looking for is probably
in the b_record.alignments list. Each alignment in b_record.alignments
has the full version of the title that is truncated in the summary lines
you describe. For example (untested code):
|>> b_results = NCBIWWW.qblast('blastp', 'nr', f_record, format_type="text")
|>> len(b_results.alignments) # Number of alignments made
|>> descriptions = [alignment.title for alignment in
b_results.alignments] # Get a list of all descriptions
|>> for alignment in b_results.alignments: # Print descriptions, one
per line
... print alignment.title
might be what you need.
L.
Aaron Zschau wrote:
| I'm trying to figure out how to get the full description line from my
| blast search results
|
|
| I run the following command, where f_record contains a protein string:
|
| b_results = NCBIWWW.qblast('blastp', 'nr', f_record, format_type="text")
|
| and get a blast file containing the following lines (full file also
| attached)
|
|
| emb|CAA70306.1| hypoxia-inducible factor one alpha [Mus musculus]
| 1311 0.0
| gb|AAC52730.1| hypoxia-inducible factor 1 alpha
| 1305 0.0
| ref|NP_077335.1| hypoxia inducible factor 1, alpha subunit [Ratt...
| 1305 0.0
| emb|CAA70701.1| hypoxia-inducible factor 1 [Rattus norvegicus] >...
| 1305 0.0
| sp|Q61221|HIFA_MOUSE Hypoxia-inducible factor 1 alpha (HIF-1 alp...
| 1302 0.0
| ref|NP_034561.1| hypoxia inducible factor 1, alpha subunit [Mus ...
| 1300 0.0
| gb|AAH26139.1| Hypoxia inducible factor 1, alpha subunit [Mus mu...
| 1296 0.0
| emb|CAA70305.1| hypoxia-inducible factor one alpha [Mus musculus]
| 1291 0.0
|
|
| Is there an easy way to get more information out of the title
| information instead of being cut off (e.g. getting the full line instead
| of "hypoxia inducible factor 1, alpha subunit [Mus ... " since some
| results have longer title lines and sometimes push the species info out
| of view.
|
| thanks,
|
| Aaron Zschau
|
|
|
|
|
| ------------------------------------------------------------------------
|
| _______________________________________________
| BioPython mailing list - BioPython at biopython.org
| http://biopython.org/mailman/listinfo/biopython
- --
Dr Leighton Pritchard AMRSC
D104, PPI, Scottish Crop Research Institute
Invergowrie, Dundee, DD2 5DA, Scotland, UK
E: lpritc at scri.sari.ac.uk
W: http://bioinf.scri.sari.ac.uk/lp/index.shtml
T: +44 (0)1382 532761 ext.2405 F: +44 (0)1382 568578
PGP key FEFC205C: GPG key E58BA41B: http://www.keyserver.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFBUuo7L1gZ+OWLpBsRAr8iAJ4mgCLgzVJqSkm/+K1lCHcGF+yz1gCfbPTw
RGdqMjGT1KPlV+A6ebFpxTA=
=214n
-----END PGP SIGNATURE-----
More information about the BioPython
mailing list