diff MT_for_MQ.xml @ 0:16608175f23b draft

planemo upload
author pravs
date Thu, 18 Jun 2020 01:59:27 -0400
parents
children 08a3a156c13e
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MT_for_MQ.xml	Thu Jun 18 01:59:27 2020 -0400
@@ -0,0 +1,94 @@
+<tool id="mt_for_mq" name="MT_for_MQ" version="1.0">
+    <description>Tool to prepare outputs from ASaiM for Metaquantome</description>
+    <requirements>
+        <requirement type="package" version="1.2.1">r-tidyverse</requirement>
+        <requirement type="package" version="1.3.1">r-readr</requirement>
+    </requirements>
+    <command detect_errors="exit_code"><![CDATA[
+
+#if $options.mode == "f" or $options.mode == "ft":
+    Rscript '$__tool_directory__/MT_for_iMQ.R' '$options.input_files' '$options.mode' $options.ontology $mq_output
+#elif $options.mode == "t":
+    mkdir in_dir
+    #for $input in $options.input_files:
+        && cp '$input' 'in_dir/${input.name.rsplit('.',1)[0]}'
+    #end for
+    && Rscript '$__tool_directory__/MT_for_iMQ.R' in_dir t NA $mq_output
+#end if
+
+    ]]>
+    </command>
+    
+    <inputs>
+        <conditional name="options">
+            <param type="select" display="radio" name="mode" label="Mode">
+                <option value="f">Functional</option>
+                <option value="t" selected="true">Taxonomic</option>
+                <option value="ft">Functional-Taxonomic</option>
+            </param>
+            <when value="t">
+                <param name="ontology" type="hidden" value="NA" />
+                <param type="data" name="input_files" format="tsv,tabular,txt" label="Files from ASaiM for all samples (named after sample)" multiple="true" />
+            </when>
+            <when value="f">
+                <param type="select" name="ontology" label="GO namespace" multiple="true" optional="false">
+                    <option value="molecular_function">molecular function</option>
+                    <option value="biological_process">biological proces</option>
+                    <option value="cellular_component">cellular component</option>
+                </param>
+                <param type="data" name="input_files" format="tsv,tabular,txt" label="File from HIUMAnN2 renormalize function" />
+            </when>
+            <when value="ft">
+                <param type="select" name="ontology" label="GO namespace" multiple="true" optional="false">
+                    <option value="molecular_function">molecular function</option>
+                    <option value="biological_process">biological proces</option>
+                    <option value="cellular_component">cellular component</option>
+                </param>
+                <param type="data" name="input_files" format="tsv,tabular,txt" label="File from HIUMAnN2 renormalize function" />
+            </when>
+        </conditional>
+    </inputs>
+    
+    <outputs>
+        <data name="mq_output" format="tabular" label="mq_${options.mode}_input.tabular"/>
+    </outputs>
+    
+    
+    <tests>
+        <test>
+            <param name="input_files" value="T4A.tsv,T4B.tsv,T4C.tsv,T7A.tsv,T7B.tsv,T7C.tsv" ftype="tsv"/>
+            <param name="mode" value="f"/>
+            <param name="ontology" value="molecular_function,biological_process"/>
+            <output name="mq_output" file="mq_input.tabular">
+                <assert_contents>
+                    <has_text text="namespace"/>
+                </assert_contents>
+            </output>
+        </test>
+    </tests>
+    
+    
+    
+    <help><![CDATA[
+
+**MT2MQ**: Metatranscriptomics to Metaquantome
+
+MT2MQ is a tool to prepare metatrascriptomic results for further analysis with MetaQuantome, which currently only supports metaproteomic data.
+This tool takes in tabular files with taxonomic or functional results acquired from metatranscriptomic data. If taxonomic, the data should be the genus-level MetaPhlan results. If functional, the data should be the gene families output from HUMAnN2. Each sample and replicate should be contained in a single file, which must be named as the sample is.
+
+**Outputs**:
+
+MT2MQ produces a single tabular output, formatted to be used as input for Metaquantome.
+
+    ]]></help>
+    
+    <citations>
+        <citation type="bibtex">
+            @misc{MT_for_MQ, 
+            author={Crane, Marie},
+            year={2020},
+            title={ASaiM to MetaQuantome}
+            }
+        </citation>
+    </citations>
+</tool>
\ No newline at end of file