I have a file with numerous accession numbers (listid.txt) and would like to extract the whole line ORGANISM (in bold below) from a genbank file for each accession
LOCUS AB000106 1343 bp rRNA linear BCT 05-FEB-1999
DEFINITION Sphingomonas sp. 16S ribosomal RNA.
ACCESSION AB000106
VERSION AB000106.1 GI:1754587
KEYWORDS 16S rRNA.
SOURCE Sphingomonas sp. ORGANISM Sphingomonas sp. Bacteria; Proteobacteria; Alphaproteobacteria; Sphingomonadales; Sphingomonadaceae; Sphingomonas.
.....
does somebody have an idea of a script to do this (i'm a begginner in python) ? thanks in advance David
@David: What format is the genbank file in? I mean, do you have one file containing all the genbank records? Or do you have several genbank files? Also, do you have genbank files that are not in your listid.txt? What is the format of this txt file?