Mercurial > repos > brinkmanlab > biopython_convert
view bioperl_compat.py @ 5:1c71c770bfd4 draft default tip
planemo upload for repository https://github.com/brinkmanlab/galaxy-tools/tree/master/biopython-convert commit cae3bd2f937dee563791707ffb4aab8fe5b7e13b
author | brinkmanlab |
---|---|
date | Wed, 27 Jul 2022 19:49:20 +0000 |
parents | a5cb5e374399 |
children |
line wrap: on
line source
#!/usr/bin/env python import sys from biopython_convert import get_args, convert from Bio.SeqIO.InsdcIO import _InsdcWriter, EmblWriter import Bio # Quote anticodon qualifiers _InsdcWriter.FTQUAL_NO_QUOTE = tuple(v for v in _InsdcWriter.FTQUAL_NO_QUOTE if v not in ['anticodon', 'transl_except']) if Bio.__version__ == "1.78": # TODO monkeypatch until https://github.com/biopython/biopython/pull/3476 _write_the_first_lines_orig = EmblWriter._write_the_first_lines def _write_the_first_lines(self, record): orig_type = record.annotations.get("molecule_type") record.annotations["molecule_type"] = orig_type.upper() ret = _write_the_first_lines_orig(self, record) record.annotations["molecule_type"] = orig_type return ret EmblWriter._write_the_first_lines = _write_the_first_lines if __name__ == '__main__': convert(*get_args(sys.argv[1:]))