diff QualityControl.xml @ 0:e2f683fcd6bd draft

"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
author galaxyp
date Wed, 09 Sep 2020 20:02:21 +0000
parents
children 2f08fa7ab72c
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/QualityControl.xml	Wed Sep 09 20:02:21 2020 +0000
@@ -0,0 +1,150 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!--This is a configuration file for the integration of a tools into Galaxy (https://galaxyproject.org/). This file was automatically generated using CTDConverter.-->
+<!--Proposed Tool Section: [Quality Control]-->
+<tool id="QualityControl" name="QualityControl" version="@TOOL_VERSION@+galaxy@GALAXY_VERSION@" profile="20.05">
+  <description>Computes various QC metrics from many possible input files (only the consensusXML is required). The more optional files you provide, the more metrics you get.</description>
+  <macros>
+    <token name="@EXECUTABLE@">QualityControl</token>
+    <import>macros.xml</import>
+    <import>macros_autotest.xml</import>
+    <import>macros_test.xml</import>
+  </macros>
+  <expand macro="requirements"/>
+  <expand macro="stdio"/>
+  <command detect_errors="exit_code"><![CDATA[@QUOTE_FOO@
+@EXT_FOO@
+#import re
+
+## Preprocessing
+mkdir in_cm &&
+ln -s '$in_cm' 'in_cm/${re.sub("[^\w\-_]", "_", $in_cm.element_identifier)}.$gxy2omsext($in_cm.ext)' &&
+#if $in_raw:
+  mkdir in_raw &&
+  ${ ' '.join(["ln -s '%s' 'in_raw/%s.%s' &&" % (_, re.sub('[^\w\-_]', '_', _.element_identifier), $gxy2omsext(_.ext)) for _ in $in_raw if _]) }
+#end if
+#if $in_postFDR:
+  mkdir in_postFDR &&
+  ${ ' '.join(["ln -s '%s' 'in_postFDR/%s.%s' &&" % (_, re.sub('[^\w\-_]', '_', _.element_identifier), $gxy2omsext(_.ext)) for _ in $in_postFDR if _]) }
+#end if
+mkdir out &&
+#if "out_cm_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
+  mkdir out_cm &&
+#end if
+#if "out_feat_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
+  mkdir out_feat &&
+#end if
+#if $in_contaminants:
+  mkdir in_contaminants &&
+  ln -s '$in_contaminants' 'in_contaminants/${re.sub("[^\w\-_]", "_", $in_contaminants.element_identifier)}.$gxy2omsext($in_contaminants.ext)' &&
+#end if
+#if $in_trafo:
+  mkdir in_trafo &&
+  ${ ' '.join(["ln -s '%s' 'in_trafo/%s.%s' &&" % (_, re.sub('[^\w\-_]', '_', _.element_identifier), $gxy2omsext(_.ext)) for _ in $in_trafo if _]) }
+#end if
+
+## Main program call
+
+set -o pipefail &&
+@EXECUTABLE@ -write_ctd ./ &&
+python3 '$__tool_directory__/fill_ctd.py' '@EXECUTABLE@.ctd' '$args_json' '$hardcoded_json' &&
+@EXECUTABLE@ -ini @EXECUTABLE@.ctd
+-in_cm
+'in_cm/${re.sub("[^\w\-_]", "_", $in_cm.element_identifier)}.$gxy2omsext($in_cm.ext)'
+#if $in_raw:
+  -in_raw
+  ${' '.join(["'in_raw/%s.%s'"%(re.sub('[^\w\-_]', '_', _.element_identifier), $gxy2omsext(_.ext)) for _ in $in_raw if _])}
+#end if
+#if $in_postFDR:
+  -in_postFDR
+  ${' '.join(["'in_postFDR/%s.%s'"%(re.sub('[^\w\-_]', '_', _.element_identifier), $gxy2omsext(_.ext)) for _ in $in_postFDR if _])}
+#end if
+-out
+'out/output.${gxy2omsext("mztab")}'
+#if "out_cm_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
+  -out_cm
+  'out_cm/output.${gxy2omsext("consensusxml")}'
+#end if
+#if "out_feat_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
+  -out_feat
+  ${' '.join(["'out_feat/%s.%s'"%(re.sub('[^\w\-_]', '_', _.element_identifier), $gxy2omsext("featurexml")) for _ in $in_postFDR if _])}
+#end if
+#if $in_contaminants:
+  -in_contaminants
+  'in_contaminants/${re.sub("[^\w\-_]", "_", $in_contaminants.element_identifier)}.$gxy2omsext($in_contaminants.ext)'
+#end if
+#if $in_trafo:
+  -in_trafo
+  ${' '.join(["'in_trafo/%s.%s'"%(re.sub('[^\w\-_]', '_', _.element_identifier), $gxy2omsext(_.ext)) for _ in $in_trafo if _])}
+#end if
+#if len(str($OPTIONAL_OUTPUTS).split(',')) == 0
+  | tee '$stdout'
+#end if
+
+## Postprocessing
+&& mv 'out/output.${gxy2omsext("mztab")}' '$out'
+#if "out_cm_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
+  && mv 'out_cm/output.${gxy2omsext("consensusxml")}' '$out_cm'
+#end if
+#if "out_feat_FLAG" in str($OPTIONAL_OUTPUTS).split(',')
+  ${' '.join(["&& mv -n 'in_postFDR/%(id)s.%(gext)s' 'out_feat/%(id)s'"%{"id": re.sub('[^\w\-_]', '_', _.element_identifier), "gext": $gxy2omsext("featurexml")} for _ in $out_feat if _])}
+#end if
+#if "ctd_out_FLAG" in $OPTIONAL_OUTPUTS
+  && mv '@EXECUTABLE@.ctd' '$ctd_out'
+#end if]]></command>
+  <configfiles>
+    <inputs name="args_json" data_style="paths"/>
+    <configfile name="hardcoded_json"><![CDATA[{"log": "log.txt", "threads": "\${GALAXY_SLOTS:-1}", "no_progress": true}]]></configfile>
+  </configfiles>
+  <inputs>
+    <param name="in_cm" argument="-in_cm" type="data" format="consensusxml" optional="false" label="ConsensusXML input, generated by FeatureLinke" help=" select consensusxml data sets(s)"/>
+    <param name="in_raw" argument="-in_raw" type="data" format="mzml" multiple="true" optional="true" label="MzML input (after InternalCalibration, if available)" help=" select mzml data sets(s)"/>
+    <param name="in_postFDR" argument="-in_postFDR" type="data" format="featurexml" multiple="true" optional="true" label="FeatureXMLs after FDR filtering" help=" select featurexml data sets(s)"/>
+    <param name="in_contaminants" argument="-in_contaminants" type="data" format="fasta" optional="true" label="Proteins considered contaminants" help=" select fasta data sets(s)"/>
+    <param name="in_trafo" argument="-in_trafo" type="data" format="trafoxml" multiple="true" optional="true" label="trafoXMLs from MapAligners" help=" select trafoxml data sets(s)"/>
+    <section name="FragmentMassError" title="Fragment Mass Error settings" help="" expanded="false">
+      <param name="unit" argument="-FragmentMassError:unit" display="radio" type="select" optional="false" label="Unit for mass tolerance" help="'auto' uses information from FeatureXML">
+        <option value="auto" selected="true">auto</option>
+        <option value="ppm">ppm</option>
+        <option value="da">da</option>
+        <expand macro="list_string_san"/>
+      </param>
+      <param name="tolerance" argument="-FragmentMassError:tolerance" type="float" optional="true" value="20.0" label="m/z search window for matching peaks in two spectra" help=""/>
+    </section>
+    <section name="MS2_id_rate" title="MS2 ID Rate settings" help="" expanded="false">
+      <param name="force_no_fdr" argument="-MS2_id_rate:force_no_fdr" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Forces the metric to run if FDR is missing (accepts all pep_ids as target hits)" help=""/>
+    </section>
+    <expand macro="adv_opts_macro">
+      <param name="force" argument="-force" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Overwrite tool specific checks" help=""/>
+      <param name="test" argument="-test" type="hidden" optional="true" value="False" label="Enables the test mode (needed for internal use only)" help="">
+        <expand macro="list_string_san"/>
+      </param>
+    </expand>
+    <param name="OPTIONAL_OUTPUTS" type="select" multiple="true" label="Optional outputs" optional="true">
+      <option value="out_cm_FLAG">out_cm (Forces the metric to run if FDR is missing (accepts all pep_ids as target hits))</option>
+      <option value="out_feat_FLAG">out_feat (Forces the metric to run if FDR is missing (accepts all pep_ids as target hits))</option>
+      <option value="ctd_out_FLAG">Output used ctd (ini) configuration file</option>
+    </param>
+  </inputs>
+  <outputs>
+    <data name="out" label="${tool.name} on ${on_string}: out" format="mztab"/>
+    <data name="out_cm" label="${tool.name} on ${on_string}: out_cm" format="consensusxml">
+      <filter>OPTIONAL_OUTPUTS is not None and "out_cm_FLAG" in OPTIONAL_OUTPUTS</filter>
+    </data>
+    <collection type="list" name="out_feat" label="${tool.name} on ${on_string}: out_feat">
+      <discover_datasets directory="out_feat" format="featurexml" pattern="__name__"/>
+      <filter>OPTIONAL_OUTPUTS is not None and "out_feat_FLAG" in OPTIONAL_OUTPUTS</filter>
+    </collection>
+    <data name="ctd_out" format="xml" label="${tool.name} on ${on_string}: ctd">
+      <filter>OPTIONAL_OUTPUTS is not None and "ctd_out_FLAG" in OPTIONAL_OUTPUTS</filter>
+    </data>
+  </outputs>
+  <tests>
+    <expand macro="autotest_QualityControl"/>
+    <expand macro="manutest_QualityControl"/>
+  </tests>
+  <help><![CDATA[Computes various QC metrics from many possible input files (only the consensusXML is required). The more optional files you provide, the more metrics you get.
+
+
+For more information, visit http://www.openms.de/documentation/TOPP_QualityControl.html]]></help>
+  <expand macro="references"/>
+</tool>