[Biopython-dev] Genbank structured comments

Peter Cock p.j.a.cock at googlemail.com
Mon Sep 14 08:38:38 UTC 2015


On Sun, Sep 13, 2015 at 7:00 PM, Brian Osborne <bosborne11 at verizon.net> wrote:
> All,
>
> Code done, tests pass. I didn’t hear back about the dict of dict approach
> but it currently works as in this example:
>
>         record = SeqIO.read(path.join('GenBank', 'KF527485.gbk'),'genbank')
>
> self.assertEqual(record.annotations['structured_comment']['Assembly-Data']['Assembly
> Method'], 'Lasergene v. 10')

Sounds good :)

> However, I have a question. Will code using format() like this work, as
> versions of Python less than 2.6 might be used?
>
> re.search(r"([^#]+){}$".format(STRUCTURED_COMMENT_START), data)
>

Don't worry about Python 2.5 or older - we already dropped
support for them (and we should perhaps talk about phasing
our our Python 2.6 support now, another debate).

Peter



More information about the Biopython-dev mailing list