[BioPython] SeqRecord to Genbank: use SeqIO?

Cedar McKay cmckay at u.washington.edu
Tue Aug 5 22:47:53 UTC 2008


On Aug 5, 2008, at 2:52 PM, Peter wrote:
> Right - because in Biopython 1.47, Bio.SeqIO don't support GenBank
> output (as I had tried to make clear).  Earlier this week I committed
> very preliminary support for writing GenBank files with Bio.SeqIO to
> CVS.  Please add yourself as a CC on Bug 2294 if you want to be kept
> apprised of this.
> http://bugzilla.open-bio.org/show_bug.cgi?id=2294
>
Aha! I see. The following is on the SeqIO wiki page (http://www.biopython.org/wiki/SeqIO 
):

"If you supply the sequences as a SeqRecord iterator, then for  
sequential file formats like Fasta or GenBank, the records can be  
written one by one"

I think I wrongly thought this implied that Genbank Records can be  
written. But I see now that isn't the case, and the "Fasta or GenBank"  
files it references must be the input files that are parsed, not the  
format of the output.  I'm looking forward to this functionality.

> Would it help if the error message for this situation was a little
> more precise?  e.g. Rather than "Unknown format 'xxx'", perhaps
> "Writing 'xxx' format is not supported yet, only reading it".
>
I think your new suggested message is more clear, but the existing one  
is clear enough. I simply thought there was a problem because I had it  
in my mind that genbank writing was now supported.


> If you have any preference on the precise function name, please add a
> comment on Bug 2561.
> http://bugzilla.open-bio.org/show_bug.cgi?id=2561

I have no particular preference.


Thanks again for the help.
cedar




More information about the Biopython mailing list