Skip to content

Commit b2e3dd2

Browse files
authored
Add Galaxy wrapper for motus map_snv (#1796)
* Added map snv * Fix map_snv. Modified version and profile in merge and profile * Updated macros.xml * Updated .shed.yml
1 parent c432e35 commit b2e3dd2

File tree

5 files changed

+121
-4
lines changed

5 files changed

+121
-4
lines changed

tools/motus/.shed.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ long_description:
66
mOTUs is a tool designed for profiling the abundance of microbial taxa in metagenomic datasets.
77
It can identify and quantify microbial taxa in samples, providing valuable insights into microbial community composition.
88
The tool works by analyzing metagenomic reads, offering high-resolution taxonomic profiling, and is particularly useful for microbial ecology studies and microbiome research.
9-
remote_repository_url: https://github.com/bgruening/galaxytools/tree/master/tools/mOTUs
9+
remote_repository_url: https://github.com/bgruening/galaxytools/tree/master/tools/motus
1010
categories:
1111
- Metagenomics

tools/motus/macros.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
</xrefs>
1212
</xml>
1313
<token name="@TOOL_VERSION@">3.1.0</token>
14-
<token name="@VERSION_SUFFIX@">galaxy0</token>
14+
<token name="@PROFILE@">21.05</token>
15+
<token name="@VERSION_SUFFIX@">0</token>
1516
<token name="@COMPATIBLE_MOTUSDB_VERSION@">3.1.0</token>
1617
<xml name="citations">
1718
<citations>

tools/motus/motus_map_snv.xml

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
<tool id="motus_map_snv" name="Map SNV" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
2+
<description>Map reads to the marker gene database for SNV calling</description>
3+
<macros>
4+
<import>macros.xml</import>
5+
</macros>
6+
<expand macro="biotools"/>
7+
<expand macro="requirements"/>
8+
<command detect_errors="exit_code"><![CDATA[
9+
10+
#if $db.db_source == 'cached'
11+
#set $DATABASE_DIR=$db.db_cached.fields.path
12+
#else
13+
#set $database_path = $db.database
14+
mkdir database_dir &&
15+
tar -xvf '$database_path' -C database_dir/ &&
16+
#set $DATABASE_DIR = 'database_dir/db_mOTU' ##the actual DB folder in the archive called db_mOTU
17+
#end if
18+
echo "Database Directory:" $DATABASE_DIR &&
19+
20+
21+
motus map_snv
22+
23+
#if $inputs.reads_type.selector == 'paired'
24+
-f '${inputs.reads_type.forward_reads}'
25+
-r '${inputs.reads_type.reverse_reads}'
26+
#elif $inputs.reads_type.selector == 'single'
27+
-s '${inputs.reads_type.unpaired_reads}'
28+
#end if
29+
-db '$DATABASE_DIR'
30+
-l $algorithm_advanced_options.minimum_alignment_len
31+
-v $algorithm_advanced_options.verbosity_level_selection
32+
-o '$bam_output'
33+
34+
]]></command>
35+
<inputs>
36+
37+
<section name="inputs" title="Inputs" expanded="true">
38+
<conditional name="reads_type">
39+
<param name="selector" type="select" format="fastq,fastq.gz" label="Choose input file(s)">
40+
<option value="paired">Paired-end</option>
41+
<option value="single" selected="true">Single</option>
42+
</param>
43+
<when value="paired">
44+
<param name="forward_reads" type="data" format="fastq,fastq.gz" label="Forward reads" help="-f Input file(s) for reads in forward orientation, fastq(.gz)-formatted"/>
45+
<param name="reverse_reads" type="data" format="fastq,fastq.gz" label="Reverse reads" help="-r Input file(s) for reads in reverse orientation, fastq(.gz)-formatted"/>
46+
</when>
47+
<when value="single">
48+
<param name="unpaired_reads" type="data" format="fastq,fastq.gz" label="Single reads" help="-s input file(s) for single reads, fastq(.gz)-formatted"/>
49+
</when>
50+
</conditional>
51+
52+
<conditional name="db">
53+
<param name="db_source" type="select" label="mOTUs Database">
54+
<option value="cached" selected="True">Use a pre-installed database</option>
55+
<option value="history">Use a database from history</option>
56+
</param>
57+
<when value="cached">
58+
<param name="db_cached" type="select" label="A pre-installed mOTUs databese" help="no pre-installed mOTUs databases are avalable yet">
59+
<options from_data_table="motus_db_versioned">
60+
<filter type="sort_by" column="1"/>
61+
<validator type="no_options" message="No compatible motus database is available"/>
62+
</options>
63+
</param>
64+
</when>
65+
<when value="history">
66+
<param name="database" type="data" format="tar" label="Database from history" help="Custom database or other version of mOTUs database from link: https://zenodo.org/records/5140350"/>
67+
</when>
68+
</conditional>
69+
</section>
70+
<section name="algorithm_advanced_options" title="Advanced Options" expanded="true">
71+
<param argument="-v" name="verbosity_level_selection" type="select" label="verbosity level" help="-v verbosity level">
72+
<option value="1">error</option>
73+
<option value="2">warning</option>
74+
<option value="3" selected="True">message default</option>
75+
<option value="4">debugging</option>
76+
</param>
77+
78+
<param argument="-l" name="minimum_alignment_len" type="integer" value="75" optional="true" label="Minimum Alignment Length (bp)" help="Specify the desired minimum alignment length in base pairs. Default value is 75bp."/>
79+
</section>
80+
81+
</inputs>
82+
<outputs>
83+
<data name="bam_output" format="bam" label="${tool.name} on ${on_string}: mapped reads"/>
84+
</outputs>
85+
<tests>
86+
<test expect_num_outputs="1">
87+
88+
<section name="inputs">
89+
90+
<conditional name="reads_type">
91+
<param name="selector" value="single"/>
92+
<param name="unpaired_reads" ftype="fastq.gz" value="test1_single.fastq"/>
93+
</conditional>
94+
95+
<conditional name="db">
96+
<param name="db_source" value="history"/>
97+
<param name="database" location="https://zenodo.org/record/7778108/files/db_mOTU_v3.1.0.tar.gz"/>
98+
</conditional>
99+
</section>
100+
<output name="bam_output" ftype="bam">
101+
<assert_contents>
102+
<has_size value="7133479" delta="1000"/>
103+
</assert_contents>
104+
</output>
105+
</test>
106+
107+
</tests>
108+
<help><![CDATA[
109+
What it does
110+
============
111+
112+
The mOTUs Map SNV tool maps metagenomic reads to the marker gene database for single nucleotide variant (SNV) calling.
113+
This is the first step in the mOTUs SNV analysis pipeline, preparing read alignments for subsequent variant detection with 'snv_call'.
114+
]]></help>
115+
<expand macro="citations"/>
116+
</tool>

tools/motus/motus_merge.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<tool id="mereg_mOTUs_tables" name="Merge" version="@TOOL_VERSION@+galaxy0" profile="21.05">
1+
<tool id="mereg_mOTUs_tables" name="Merge" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
22
<description>Merge mOTUs aboundance or count tables</description>
33
<macros>
44
<import>macros.xml</import>

tools/motus/motus_profiler.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<tool id="motus_profiler" name="mOTUs_profiler" version="@TOOL_VERSION@+galaxy0" profile="21.05">
1+
<tool id="motus_profiler" name="mOTUs_profiler" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
22
<description>performs taxonomic profiling of metagenomics and metatrancriptomics samples</description>
33
<macros>
44
<import>macros.xml</import>

0 commit comments

Comments
 (0)