[BioRuby] How to get organism name from a fasta file?

Kristen revalia at gmail.com
Mon Oct 15 06:29:56 UTC 2007


Hello,

I have many entries that look familiar to this in one big fasta file:

>Gene:IGI00206306|PYRAB16740 Proteome:37|P_abyssi_Orsay ProteinIDs:CAB50578
Product:Q9UY34|N-terminal acetyltransferase
atggaagacatcctcgaaaacaaaggcgaagtcaagaagaaaattccgatttccttgata
actataaggagtgcaaaactgtttgatattccctatattatgaggatagagcaggcatcg


I would like to retrieve the part that says "Proteome:37|P_abyssi_Orsay",
but not sure how to do this.   The tutorial shows how to loop through all
the entries in the fasta file, but this doesnt help me.
Is there an easy way to retrieve this information from a fasta object?
Or is there a way to output the definition info of the first fasta entry?
Maybe something like:
ff = Bio::FlatFile.new(Bio::FastaFormat, ARGF)
puts ff[1].definiton

Thanks in advance,
Kristen



More information about the BioRuby mailing list