Mercurial > repos > cpt > cpt_linear_genome_plot
changeset 3:b79e98299a78 draft
planemo upload commit b9287cffb7503159debac57d68917f5d337f0c9e-dirty
author | cpt |
---|---|
date | Fri, 28 Jun 2024 03:17:21 +0000 |
parents | b36bdd17d99a |
children | 318248986ee7 |
files | dna_features_viewer/biotools.py linear_genome_plot.xml local_requirements.txt |
diffstat | 3 files changed, 14 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/dna_features_viewer/biotools.py Fri Jun 28 02:21:43 2024 +0000 +++ b/dna_features_viewer/biotools.py Fri Jun 28 03:17:21 2024 +0000 @@ -34,9 +34,15 @@ return complement(sequence)[::-1] -aa_short_to_long_form_dict = { - _aa1: _aa3[0] + _aa3[1:].lower() for (_aa1, _aa3) in zip(aa1 + "*", aa3 + ["*"]) -} +if type(aa1) is str and type(aa3) is list: + aa_short_to_long_form_dict = { + _aa1: _aa3[0] + _aa3[1:].lower() for (_aa1, _aa3) in zip(aa1 + "*", aa3 + ["*"]) + } +else: + aa_short_to_long_form_dict = { + _aa1: _aa3[0] + _aa3[1:].lower() + for (_aa1, _aa3) in zip(aa1 + ("*",), aa3 + ("*",)) + } def translate(dna_sequence, long_form=False):
--- a/linear_genome_plot.xml Fri Jun 28 02:21:43 2024 +0000 +++ b/linear_genome_plot.xml Fri Jun 28 03:17:21 2024 +0000 @@ -3,8 +3,7 @@ <macros> <import>macros.xml</import> </macros> - <expand macro="requirements"> - </expand> + <expand macro="requirements"/> <command detect_errors="aggressive"><![CDATA[ python '$__tool_directory__/linear_genome_plot.py' '$input_file'