1 Aug 2008 11:41
[Bug 2561] New: SeqRecord format method to get a string in a given file format
<bugzilla-daemon <at> portal.open-bio.org>
2008-08-01 09:41:14 GMT
2008-08-01 09:41:14 GMT
http://bugzilla.open-bio.org/show_bug.cgi?id=2561 Summary: SeqRecord format method to get a string in a given file format Product: Biopython Version: Not Applicable Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Main Distribution AssignedTo: biopython-dev <at> biopython.org ReportedBy: biopython-bugzilla <at> maubp.freeserve.co.uk If you have a SeqRecord, it is sometimes useful to be be able to convert it into a FASTA format string, or indeed any suitable file format. Note that this only makes sense for file formats which support a single record, such as sequential formats like FASTA, GenBank, EMBL, SwissProt, ... See http://portal.open-bio.org/pipermail/biopython-dev/2008-June/003793.html PEP 3101 "Advanced String Formatting" describes a new __format__ method for objects wishing to support the new python format() function in Python 2.6 and 3.0, see http://www.python.org/dev/peps/pep-3101/ In the short term we could expose this functionality as a method named tostring(), to_string(), to_format() or some other suitable suggestion. Using tostring() would be consistent with the Bio.Seq.Seq and Bio.Seq.MutableSeq objects (although those do not take a format argument).(Continue reading)
RSS Feed