[Biopython] Planning Biopython 1.72

Peter Cock p.j.a.cock at googlemail.com
Thu Jun 14 09:57:35 UTC 2018


Thanks Martin,

See: https://github.com/biopython/biopython/issues/1686

Peter

On Tue, Jun 12, 2018 at 11:25 PM, Peter Cock <p.j.a.cock at googlemail.com> wrote:
> Hi Martin,
>
> Can you open an issue on this please.
>
> My feeling is a strong negative one - filenames are fragile.
> However, when given a filename and we own the handle
> and can therefore seek or reopen it as needed, I would
> be more neutral on sniffing the filetype instead. If we are
> going to do it, we should do it centrally for Bio.SeqIO,
> Bio.AlignIO and Bio.SearchIO in one place - but I don't
> want to rush that given my intended time frame for getting
> Biopython 1.72 out before GCC BOSC 2018.
>
> Thanks,
>
> Peter
>
> On Tue, Jun 12, 2018 at 6:04 PM, Martin Mokrejs
> <mmokrejs at fold.natur.cuni.cz> wrote:
>> Hi,
>>   I just realized that SearchIO does not automatically
>> detect compressed files on its input using file extension.
>> Could .gz, .bz2 be supported?
>>
>>>>> for record in SearchIO.parse('blah.xml.gz', 'blast-xml'):
>> ...     print record.id
>> ...
>> Traceback (most recent call last):
>>   File "<stdin>", line 1, in <module>
>>   File "/usr/lib64/python2.7/site-packages/Bio/SearchIO/__init__.py", line 312, in parse
>>     generator = iterator(source_file, **kwargs)
>>   File "/usr/lib64/python2.7/site-packages/Bio/SearchIO/BlastIO/blast_xml.py", line 211, in __init__
>>     self._meta, self._fallback = self._parse_preamble()
>>   File "/usr/lib64/python2.7/site-packages/Bio/SearchIO/BlastIO/blast_xml.py", line 225, in _parse_preamble
>>     for event, elem in self.xml_iter:
>>   File "<string>", line 91, in next
>> cElementTree.ParseError: not well-formed (invalid token): line 1, column 0
>>>>>
>>
>> Martin


More information about the Biopython mailing list