Hi !
I'm new in Bioinformatics, and my question may be basic to you all, but I could not find a solution on the internet....
Genom of my bacteria was sequenced and annotated a few times and I need to make a table with old and new gene names so:
The thing I want to do is to extract from all gene features locus tag and old local tag, I wrote simple lines:
from Bio import SeqIO
record = SeqIO.read('My_genome.gb', 'genbank')
for feature in record.features:
if feature.type == 'gene':
print ('Locus tag:', feature.qualifiers['locus_tag'])
print ('Old Locus tag:', feature.qualifiers['old_locus_tag'])
but the problem is that sometimes, there is a new gene in My_genome and it has no old locus tag... and it stops.
What would you advise me to do, so I can obtain all of them listed?
Thank you all in advance!
Thank you very much ! It works:)