Does Biopython Seqio Parse 'Circular' Vs 'Linear' From Genbank Locus?
2
4
Entering edit mode
13.8 years ago

I really appreciate the (post martel) biopython parsing abilities of SeqIO.

Question: is the circular vs linear info from first line (LOCUS) tossed when parsing a genbank genome (complete sequence) file?

eg.

LOCUS NC_001337 11014 bp DNA circular BCT 18-JUL-2008

DEFINITION Methanothermobacter thermautotrophicus Z-245 plasmid pFZ1, complete sequence.

It seems strange, but I can't find it anywhere in the SeqRecord. Not a big deal of course because I can parse it myself, but curious why I can't find it. Maybe not always present?

biopython parsing genbank • 5.1k views
ADD COMMENT
0
Entering edit mode

OMG! I think you could be right! GenBank only stores genomic topology in the LOCUS line! I've just checked with a real sequence. No sign of LOCUS anywhere. It seems that write_first_line uses record.name, too! So, if SeqIO you gbfile you'll lose that informatio! WOW!

ADD REPLY
1
Entering edit mode
13.8 years ago

The GenBank specific record contains this information as residue_type:

from Bio.GenBank import RecordParser
parser = RecordParser()
gb_rec = parser.parse(open("sequence.gb"))
gb_rec.residue_type
'DNA     circular'

It would be nice if this were also available as an annotation of the more general SeqRecords from SeqIO. There has been some recent discussion and this just needs a push to get included in the next release. Your input on the best place to store it would definitely be appreciated:

http://bugzilla.open-bio.org/show_bug.cgi?id=2578

ADD COMMENT
0
Entering edit mode
9.3 years ago

SeqIO still loses it as of 2015 at least on my version. Another thing it does is make the version the same as the accession. I end up using this function:

def botchjob(filepath, acc, v):
    f = open(filepath, "rU")
    txt = f.read()
    txt=txt.replace("VERSION     "+acc, "VERSION     " + str(v)).replace("DNA              ", "DNA     circular ")
    f.close()
    open(filepath, "w").write(txt)
ADD COMMENT

Login before adding your answer.

Traffic: 2646 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6