[Biopython-dev] [Bug 2826] New: when creating a de-novo SeqRecord, the dbxrefs are not written by SeqIO.write
bugzilla-daemon at portal.open-bio.org
bugzilla-daemon at portal.open-bio.org
Mon May 11 16:00:29 EDT 2009
http://bugzilla.open-bio.org/show_bug.cgi?id=2826
Summary: when creating a de-novo SeqRecord, the dbxrefs are not
written by SeqIO.write
Product: Biopython
Version: 1.49
Platform: All
OS/Version: Linux
Status: NEW
Severity: minor
Priority: P2
Component: Main Distribution
AssignedTo: biopython-dev at biopython.org
ReportedBy: david.wyllie at ndm.ox.ac.uk
Hi
when creating a SeqRecord de novo, the dbxrefs are not written by SeqIO.write.
Is this the intended behaviour?
here is an example:
# example script
from Bio.Seq import Seq
from Bio import SeqIO
from Bio.SeqRecord import SeqRecord
from Bio.Alphabet import generic_protein
# list to hold output records
outlist=[]
# ofh is the output file handle
ofh = open("/home/dwyllie/temporary.gbk","w")
# example of de novo creation of SeqRecord object from url:
# http://biopython.org/DIST/docs/api/Bio.SeqRecord.SeqRecord-class.html
rec = SeqRecord(Seq("MASRGVNKVILVGNLGQDPEVRYMPNGGAVANITLATSESWRDKAT",
generic_protein), \
id="NP_418483.1", name="b4059",
description="ssDNA-binding protein", \
dbxrefs=["ASAP:13298", "GI:16131885",
"GeneID:948570"])
print rec
outlist.append(rec)
count = SeqIO.write(outlist, ofh, "genbank")
ofh.close()
# end of script
OUTPUT:
ID: NP_418483.1
Name: b4059
Description: ssDNA-binding protein
Database cross-references: ASAP:13298, GI:16131885, GeneID:948570
Number of features: 0
Seq('MASRGVNKVILVGNLGQDPEVRYMPNGGAVANITLATSESWRDKAT', ProteinAlphabet())
Contents of temporary.gbk:
LOCUS b4059 46 bp UNK 01-JAN-1980
DEFINITION ssDNA-binding protein
ACCESSION NP_418483
VERSION NP_418483.1
KEYWORDS .
SOURCE .
ORGANISM .
.
FEATURES Location/Qualifiers
ORIGIN
1 MASRGVNKVI LVGNLGQDPE VRYMPNGGAV ANITLATSES WRDKAT
//
--
Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the Biopython-dev
mailing list