This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Where in the source code for SeqIO.write() does the function write the IDs and annotations to a new genbank file?

When I write custom annotations to my working genbank object in the form of

genbankObject.annoations["new key"]= "new value"

I can't get it to print out when I go to write it. SeqIO.write(genbankObject, outfile, genbank) just refuses to put in those new fields. It works when I switch it to "accession" of "source", but I need to add information like "reference" bases, and there's just no instance of that in the source code anywhere.

I want to dive into the source code to figure out why.

python seqio biopython

1 answer

http://biopython.org/wiki/SourceCode

http://biopython.org/wiki/Download

Note the Github link, for SeqIO: https://github.com/biopython/biopython/tree/master/Bio/SeqIO

I've tried. Where is it specifically?

I can't find any instance of "annotation" "accession", or "reference" anywhere. Am I looking at the wrong code?

The SeqIO code (if it's anything like bioperl) iteratively returns a sequence record object (SeqRecord). May want to look for that?

I'm not sure if I'm looking at it correctly. I've skimmed through it. No luck, I'm not good enough at parsing the source to know what I'm looking for, hence why I'm asking for help

Log in to answer this question.