Skip to content

Commit

Permalink
Fix metageneannotator bio.tools (#745)
Browse files Browse the repository at this point in the history
* Fix metageneannotator bio.tools

* Fix linting

* Try to fix python linting

---------

Co-authored-by: Björn Grüning <[email protected]>
  • Loading branch information
bebatut and bgruening authored Mar 18, 2024
1 parent c810d2e commit f66aa9a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 13 deletions.
1 change: 1 addition & 0 deletions tools/metagene_annotator/.shed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ name: metagene_annotator
owner: galaxyp
remote_repository_url: https://github.com/galaxyproteomics/tools-galaxyp/tree/master/metagene_annotator
type: unrestricted
homepage_url: http://metagene.nig.ac.jp/
6 changes: 3 additions & 3 deletions tools/metagene_annotator/convert_mga.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def __main__():
'complete/partial', 'gene score', 'used model',
'rbs start', 'rbs end', 'rbs score']))

gc_rbs_pat = '# gc = (-?[0-9]*[.]?[0-9]+), rbs = (-?[0-9]*[.]?[0-9]+)'
gc_rbs_pat = '# gc = (-?[0-9]*[.]?[0-9]+), rbs = (-?[0-9]*[.]?[0-9]+)'
seq_count = 0
gene_count = 0
for i, line in enumerate(input_rdr):
Expand All @@ -46,12 +46,12 @@ def __main__():
try:
m = re.match(gc_rbs_pat, line.strip())
seq_gc, seq_rbs = m.groups()
except:
except ValueError:
seq_gc = seq_rbs = ''
elif line.startswith('# self:'):
seq_type = re.sub('# self:', '', line.rstrip())
elif line.startswith('# '):
seq_name = re.sub('# (\S+).*$', '\\1', line.rstrip())
seq_name = re.sub(r'# (\S+).*$', '\\1', line.rstrip())
seq_count += 1
else:
fields = line.split('\t')
Expand Down
22 changes: 12 additions & 10 deletions tools/metagene_annotator/metagene_annotator.xml
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
<tool id="metagene_annotator" name="MetaGeneAnnotator" version="1.0.0">
<tool id="metagene_annotator" name="MetaGeneAnnotator" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@">
<description>gene-finding program for prokaryote and phage (used by sixgill)</description>
<macros>
<token name="@TOOL_VERSION@">1.0</token>
<token name="@VERSION_SUFFIX@">1</token>
</macros>
<xrefs>
<xref type="bio.tools">metageneannotator</xref>
</xrefs>
<requirements>
<requirement type="package">metagene_annotator</requirement>
<requirement type="package">python</requirement>
<requirement type="package" version="@TOOL_VERSION@">metagene_annotator</requirement>
<requirement type="package" version="3.10">python</requirement>
</requirements>
<xml name="biotools">
<xrefs>
<xref type="bio.tools">metageneannotator</xref>
</xrefs>
</xml>
<command detect_errors="exit_code"><![CDATA[
#set $output_list = str($output_formats).split(',')
touch mga_output
Expand Down Expand Up @@ -55,7 +57,7 @@
</data>
</outputs>
<tests>
<test>
<test expect_num_outputs="1">
<param name="inputs" value="metasequences.fasta" ftype="fasta"/>
<param name="multiple_species" value="True"/>
<param name="output_formats" value="txt"/>
Expand All @@ -66,7 +68,7 @@
</assert_contents>
</output>
</test>
<test>
<test expect_num_outputs="1">
<param name="inputs" value="metasequences.fasta" ftype="fasta"/>
<param name="multiple_species" value="False"/>
<param name="output_formats" value="txt"/>
Expand Down

0 comments on commit f66aa9a

Please sign in to comment.