Repository 'msconvert'
hg clone https://toolshed.g2.bx.psu.edu/repos/galaxyp/msconvert

Changeset 14:3cf310697624 (2020-11-16)
Previous changeset 13:9b61227976d6 (2020-07-25) Next changeset 15:6153e8ada1ee (2020-11-30)
Commit message:
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msconvert commit 79157337a253a1c2fce2ad1739668c66b6c54df1"
modified:
msconvert.xml
msconvert_macros.xml
removed:
msconvert_macros.xml.orig
b
diff -r 9b61227976d6 -r 3cf310697624 msconvert.xml
--- a/msconvert.xml Sat Jul 25 18:13:58 2020 -0400
+++ b/msconvert.xml Mon Nov 16 17:25:12 2020 +0000
b
@@ -7,7 +7,7 @@
       <container type="docker">chambm/pwiz-skyline-i-agree-to-the-vendor-licenses:@FULL_VERSION@</container>
   </requirements>
   <expand macro="msconvertCommand" />
-  <inputs> 
+  <inputs>
       <param format="mzml,mzxml,mz5,mgf,ms2,thermo.raw,raw,wiff,wiff.tar,agilentbrukeryep.d.tar,agilentmasshunter.d.tar,brukerbaf.d.tar,brukertdf.d.tar,watersmasslynx.raw.tar" name="input" type="data" label="Input unrefined MS data" />
       <expand macro="msconvertInputParameters" />
   </inputs>
b
diff -r 9b61227976d6 -r 3cf310697624 msconvert_macros.xml
--- a/msconvert_macros.xml Sat Jul 25 18:13:58 2020 -0400
+++ b/msconvert_macros.xml Mon Nov 16 17:25:12 2020 +0000
[
b'@@ -1,7 +1,7 @@\n <macros>\n   <token name="@VERSION@">3.0.19052</token>\n   <token name="@FULL_VERSION@">@VERSION@-089e81090</token>\n-  \n+\n   <xml name="msconvertCommand">\n     <command detect_errors="exit_code">\n <![CDATA[\n@@ -39,32 +39,29 @@\n       ln -s \'$data_processing.precursor_refinement.input_ident\' \'$input_ident_name\' &&\n     #end if\n \n-    uid=`id -u` &&\n-    gid=`id -g` &&\n \n-    wine64_anyuser msconvert ${inputmask}\n+    CAN_SUDO=\\$(sudo -n -l 2> /dev/null; echo \\$?) &&\n+    if [ "\\$CAN_SUDO" -eq "0" ]; then\n+        uid=`id -u` &&\n+        gid=`id -g` &&    \n+        WINE="wine64_anyuser";\n+    else\n+        WINE="wine64" &&\n+        ## create a writable copy of wine prefix (since copying fails for some html\n+        ## stderr and exit code is swallowed)\n+        export WINEPREFIX=\\$(mktemp -d) &&\n+        (cp -a /wineprefix64/* \\$WINEPREFIX 2> /dev/null || true);\n+    fi\n+    &&\n+    \\$WINE msconvert ${inputmask}\n+\n     --outdir outputs\n     --${output_type}\n-\n-    #if $general_options.combineIonMobilitySpectra:\n-    --combineIonMobilitySpectra\n-    #end if\n-\n-    #if $general_options.simAsSpectra:\n-    --simAsSpectra\n-    #end if\n-\n-    #if $general_options.srmAsSpectra:\n-    --srmAsSpectra\n-    #end if\n-\n-    #if $general_options.acceptZeroLengthSpectra:\n-    --acceptZeroLengthSpectra\n-    #end if\n-\n-    #if $general_options.ignoreUnknownInstrumentError:\n-    --ignoreUnknownInstrumentError\n-    #end if\n+    $general_options.combineIonMobilitySpectra\n+    $general_options.simAsSpectra\n+    $general_options.srmAsSpectra\n+    $general_options.acceptZeroLengthSpectra\n+    $general_options.ignoreUnknownInstrumentError\n \n     #if $general_options.scan_summing.do_scan_summing:\n       --filter "scanSumming precursorTol=$general_options.scan_summing.precursorTol scanTimeTol=$general_options.scan_summing.scanTimeTol ionMobilityTol=$general_options.scan_summing.ionMobilityTol"\n@@ -181,8 +178,8 @@\n       #if str($filtering.analyzer) != "false"\n         --filter "analyzer $filtering.analyzer"\n       #end if\n-      \n-    ## OUTPUT ENCODING\n+\n+      ## OUTPUT ENCODING\n       #set $mz_encoding = str($settings.mz_encoding)\n       #set $intensity_encoding = str($settings.intensity_encoding)\n       #if $mz_encoding == $intensity_encoding\n@@ -217,14 +214,21 @@\n \n       #if $general_options.multi_run_output.do_multi_run_output == \'false\':\n         --outfile \'${os.path.splitext($basename)[0]}\'\n-        && sudo mv \'outputs/${os.path.splitext($basename)[0]}.${output_type}\' \'${output}\' && sudo chown \\$uid:\\$gid \'${output}\'\n+        && \n+        if [ "\\$CAN_SUDO" -eq "0" ]; then\n+            sudo chown \\$uid:\\$gid \'outputs/${os.path.splitext($basename)[0]}.${output_type}\' && \n+            sudo mv \'outputs/${os.path.splitext($basename)[0]}.${output_type}\' \'${output}\';\n+        else\n+          mv \'outputs/${os.path.splitext($basename)[0]}.${output_type}\' \'${output}\';\n+        fi\n       #else\n-        && sudo chown \\$uid:\\$gid \'outputs\' -R\n         && ls -la outputs/\n       #end if\n \n       #if $data_processing.precursor_refinement.use_mzrefinement\n-        && sudo mv \'$output_refinement_name\' \'$output_refinement\' && sudo chown \\$uid:\\$gid \'$output_refinement\'\n+      && if [ "\\$CAN_SUDO" -ne "0" ]; then\n+        mv \'$output_refinement_name\' \'$output_refinement\';\n+      fi\n       #end if\n ]]>\n     </command>\n@@ -243,7 +247,7 @@\n       <option value="ms2">ms2</option>\n     </param>\n \n-    <section name="data_processing" title="Data Processing Filters">  \n+    <section name="data_processing" title="Data Processing Filters">\n         <conditional name="peak_picking">\n             <param type="boolean" name="pick_peaks" label="Apply peak picking?" truevalue="true" falsevalue="false" />\n             <when value="false" />\n@@ -407,7 +411,7 @@\n \n \n     <section name="filtering" title="Scan Inclusion/Exclusion Filters">\n-      \n+\n       <param name="activation" type="select" label="Filter by Activation">\n         <option value="false" selected="true'..b'parate spectrum. When true, each retention time point will have a single merged scan. For Bruker TIMS spectra, the ion mobilities will be preserved in a separate binaryDataArray, and for TIMS PASEF MS2s, each precursor will be merged separately." />\n \n       <conditional name="scan_summing">\n         <param name="do_scan_summing" type="boolean" truevalue="true" falsevalue="false" label="Sum adjacent scans" help="Sums MS2 sub-scans whose precursors are similar in the m/z, scan time, and/or ion mobility dimensions. It is useful for some Waters DDA data and Bruker PASEF data, where sub-scans should be summed together to increase the SNR" />\n@@ -474,10 +478,10 @@\n         </when>\n       </conditional>\n \n-      <param argument="--simAsSpectra" type="boolean" label="SIM as Spectra" help="Write selected ion monitoring as spectra, not chromatograms" />\n-      <param argument="--srmAsSpectra" type="boolean" label="SRM as Spectra" help="Write selected reaction monitoring as spectra, not chromatograms" />\n-      <param argument="--acceptZeroLengthSpectra" type="boolean" label="Accept zero-length spectra" help="Some vendor readers have an efficient way of filtering out empty spectra, but it takes more time to open the file" />\n-      <param argument="--ignoreUnknownInstrumentError" type="boolean" label="Ignore unknown instrument error" help="If true, if an instrument cannot be determined from a vendor file, it will not be an error" />\n+      <param argument="--simAsSpectra" type="boolean" truevalue="--simAsSpectra" falsevalue="" label="SIM as Spectra" help="Write selected ion monitoring as spectra, not chromatograms" />\n+      <param argument="--srmAsSpectra" type="boolean" truevalue="--srmAsSpectra" falsevalue=""  label="SRM as Spectra" help="Write selected reaction monitoring as spectra, not chromatograms" />\n+      <param argument="--acceptZeroLengthSpectra" type="boolean" truevalue="--acceptZeroLengthSpectra" falsevalue=""  label="Accept zero-length spectra" help="Some vendor readers have an efficient way of filtering out empty spectra, but it takes more time to open the file" />\n+      <param argument="--ignoreUnknownInstrumentError" type="boolean" truevalue="--ignoreUnknownInstrumentError" falsevalue=""  label="Ignore unknown instrument error" help="If true, if an instrument cannot be determined from a vendor file, it will not be an error" />\n \n       <conditional name="multi_run_output">\n         <param name="do_multi_run_output" type="boolean" truevalue="true" falsevalue="false" label="Output multiple runs per file" help="Some input types can store multiple runs (samples) in a single file (e.g. WIFF). Each run must be written to a separate output file, so check this option if you want to output all runs for a file (each file will create a dataset collection)" />\n@@ -514,7 +518,7 @@\n       <param type="boolean" name="gzip_compression" label="Compress output file with gzip" truevalue="true" falsevalue="false" />\n     </section>\n   </xml>\n-  \n+\n   <xml name="msconvertOutput">\n     <outputs>\n       <data format="mzml" name="output" label="${($input.name[:-4] if $input.name.endswith(\'.tar\') else $input.name).rsplit(\'.\',1)[0]}.${output_type}" >\n@@ -646,7 +650,7 @@\n       <param name="pick_peaks" value="true" />\n       <param name="pick_peaks_algorithm" value="cwt" />\n       <param name="pick_peaks_ms_levels" value="1" />\n-      <output name="output" file="small-peakpicking-cwt-allMS.mzML" lines_diff="8" /> \n+      <output name="output" file="small-peakpicking-cwt-allMS.mzML" lines_diff="8" />\n     </test>\n     <test>\n       <param name="input" value="small-peakpicking-cwt-allMS.mzML" />\n@@ -736,7 +740,7 @@\n       <output name="output" file="Rpal_01-mzRefinement.mzML" compare="sim_size" delta="0" />\n       <output name="output_refinement" file="Rpal_01.pepXML.mzRefinement.tsv" />\n     </test>\n-    \n+\n     <test>\n       <param name="input" value="small-peakpicking-cwt-allMS.mzML" />\n       <param name="license_agreement" value="true" />\n'
b
diff -r 9b61227976d6 -r 3cf310697624 msconvert_macros.xml.orig
--- a/msconvert_macros.xml.orig Sat Jul 25 18:13:58 2020 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
b'@@ -1,897 +0,0 @@\n-<macros>\n-  <token name="@VERSION@">3.0.19052</token>\n-  <token name="@FULL_VERSION@">@VERSION@-089e81090</token>\n-  \n-  <xml name="msconvertCommand">\n-    <command detect_errors="exit_code">\n-<![CDATA[\n-    #import re\n-    #set $ext = $input.ext\n-\n-    ## sanitize display name for use as temp filename\n-    #set basename = $re.sub(r\'[^\\w\\.\\-\\+]\',\'_\',$input.element_identifier)\n-\n-    #if $ext == \'wiff\':\n-      ln -s \'${input.extra_files_path}/wiff\' \'${basename}.wiff\' &&\n-      ln -s \'${input.extra_files_path}/wiff_scan\' \'${basename}.wiff.scan\' &&\n-    #elif $ext.endswith(\'tar\'):\n-      ln -s \'$input\' \'${basename}\' &&\n-      tar xf \'${basename}\' &&\n-      #set basename = $os.path.splitext($basename)[0]\n-    #else\n-      ln -s \'$input\' \'${basename}\' &&\n-    #end if\n-    \n-    #if $data_processing.precursor_refinement.use_mzrefinement\n-      #set input_ident_name = ".".join((os.path.splitext($basename)[0], $data_processing.precursor_refinement.input_ident.ext))\n-      #set output_refinement_name = os.path.splitext($basename)[0] + \'.mzRefinement.tsv\'\n-      ln -s \'$data_processing.precursor_refinement.input_ident\' \'$input_ident_name\' &&\n-    #end if\n-\n-    uid=`id -u` &&\n-    gid=`id -g` &&\n-\n-    wine64_anyuser msconvert \'${basename}\'\n-    --outdir outputs\n-    --${output_type}\n-\n-    #if $general_options.combineIonMobilitySpectra:\n-    --combineIonMobilitySpectra\n-    #end if\n-\n-    #if $general_options.simAsSpectra:\n-    --simAsSpectra\n-    #end if\n-\n-    #if $general_options.srmAsSpectra:\n-    --srmAsSpectra\n-    #end if\n-\n-    #if $general_options.acceptZeroLengthSpectra:\n-    --acceptZeroLengthSpectra\n-    #end if\n-\n-    #if $general_options.ignoreUnknownInstrumentError:\n-    --ignoreUnknownInstrumentError\n-    #end if\n-\n-    #if $general_options.scan_summing.do_scan_summing:\n-      --filter "scanSumming precursorTol=$general_options.scan_summing.precursorTol scanTimeTol=$general_options.scan_summing.scanTimeTol ionMobilityTol=$general_options.scan_summing.ionMobilityTol"\n-    #end if\n-\n-    #if $general_options.multi_run_output.do_multi_run_output:\n-      #if len($general_options.multi_run_output.run_index_set) > 0\n-        --runIndexSet "\n-        #for $index in $general_options.multi_run_output.run_index_set\n-          [${index.from},${index.to}]\n-        #end for\n-        "\n-      #end if\n-    #else\n-      --runIndexSet $general_options.multi_run_output.runIndexSet\n-    #end if\n-\n-    ## Strip sourceFile location since it is meaningless on HPC systems and causes problems with functional tests\n-    --stripLocationFromSourceFiles\n-\n-    ## DATA PROCESSING FILTERS (NOTE: FOR VENDOR METHOD TO WORK, PEAK PICKING MUST BE THE FIRST FILTER!)\n-      #if $data_processing.peak_picking.pick_peaks\n-        --filter "peakPicking $data_processing.peak_picking.pick_peaks_algorithm msLevel=$data_processing.peak_picking.pick_peaks_ms_levels"\n-      #end if\n-\n-      #if $data_processing.precursor_refinement.use_mzrefinement\n-      --filter "mzRefiner $input_ident_name\n-        msLevels=$data_processing.precursor_refinement.precursor_refinement_ms_levels\n-        thresholdScore=$data_processing.precursor_refinement.thresholdScore\n-        thresholdValue=$data_processing.precursor_refinement.thresholdValue\n-        thresholdStep=$data_processing.precursor_refinement.thresholdStep\n-        maxSteps=$data_processing.precursor_refinement.thresholdMaxSteps assumeHighRes=1"\n-      #end if\n-\n-      #if str($data_processing.charge_state_calculation.charge_state_calculation_method) == "predictor"\n-      --filter "chargeStatePredictor\n-        overrideExistingCharge=$data_processing.charge_state_calculation.predictor_overrideExistingCharge\n-        minMultipleCharge=$data_processing.charge_state_calculation.minMultipleCharge\n-        maxMultipleCharge=$data_processing.charge_state_calculation.maxMultipleCharge\n-        singleChargeFractionTIC=$data_processing.charge_state_calculation.singleChargeFractionTIC\n-        maxKnownCharge='..b'param name="indices_1|to" value="10" />\n-      <param name="indices_2|from" value="13" />\n-      <param name="indices_2|to" value="15" />\n-      <param name="binary_compression" value="numpressLinearPic" />\n-      <output name="output" file="small-index-filter.mzML" lines_diff="32" />\n-    </test>\n-    <test>\n-      <param name="input" value="small-peakpicking-cwt-allMS.mzML" />\n-      <param name="license_agreement" value="true" />\n-      <param name="output_type" value="mzml" />\n-      <param name="strip_it" value="true" />\n-      <param name="binary_compression" value="numpressLinearPic" />\n-      <output name="output" file="small-strip-it.mzML" lines_diff="100" />\n-    </test>\n-    <test>\n-      <param name="input" value="small-peakpicking-cwt-allMS.mzML" />\n-      <param name="license_agreement" value="true" />\n-      <param name="output_type" value="mzml" />\n-      <param name="do_ms_level_filter" value="true" />\n-      <param name="ms_level_from" value="2" />\n-      <param name="ms_level_to" value="2" />\n-      <param name="binary_compression" value="numpressLinearPic" />\n-      <output name="output" file="small-ms-level-filter.mzML" lines_diff="86" />\n-    </test>\n-    <test>\n-      <param name="input" value="small-peakpicking-cwt-allMS.mzML" />\n-      <param name="license_agreement" value="true" />\n-      <param name="output_type" value="mzml" />\n-      <param name="polarity" value="positive" />\n-      <param name="binary_compression" value="numpressLinearPic" />\n-      <output name="output" file="small-polarity-filter.mzML" lines_diff="114" />\n-    </test>\n-    <test>\n-      <param name="input" value="small-peakpicking-cwt-allMS.mzML" />\n-      <param name="license_agreement" value="true" />\n-      <param name="output_type" value="mzml" />\n-      <param name="analyzer" value="IT" />\n-      <param name="binary_compression" value="numpressLinearPic" />\n-      <output name="output" file="small-analyzer-filter.mzML" lines_diff="100" />\n-    </test>\n-    <test>\n-      <param name="input" value="small-peakpicking-cwt-allMS.mzML" />\n-      <param name="license_agreement" value="true" />\n-      <param name="output_type" value="mzml" />\n-      <param name="scan_numbers_0|from" value="3" />\n-      <param name="scan_numbers_0|to" value="5" />\n-      <param name="scan_numbers_1|from" value="11" />\n-      <param name="scan_numbers_1|to" value="11" />\n-      <param name="scan_numbers_2|from" value="14" />\n-      <param name="scan_numbers_2|to" value="16" />\n-      <param name="binary_compression" value="numpressLinearPic" />\n-      <output name="output" file="small-index-filter.mzML" lines_diff="86"/> <!-- the scan numbers here produce the same output as the index test above -->\n-    </test>\n-    <!--<test>\n-      <param name="input" value="small.mzML" />\n-      <param name="output_type" value="mzml" />\n-      <param name="binary_compression" value="numpressLinearPic" />\n-      <output name="output" file="small-deisotope-poisson.mzML" />\n-    </test>-->\n-  </xml>\n-  <xml name="msconvert_help">\n-**What it does**\n-\n-Converts mass spectrometry (MS) files: proprietary MS vendor formats can be converted to open MS formats (mzML, mzXML, MGF, MS1/MS2) and open formats can be converted to other open formats. Additional options such as filtering and/or precursor recalculation are available.\n-\n-You can view the original documentation here_.\n-\n-.. _here: http://proteowizard.sourceforge.net/tools/msconvert.html\n-  </xml>\n-\n-  <xml name="citations">\n-    <citations>\n-        <citation type="doi">10.1093/bioinformatics/btn323</citation>\n-        <citation type="bibtex">@misc{toolsGalaxyP, author = {Chilton, J, Chambers MC, et al.}, title = {Galaxy Proteomics Tools}, publisher = {GitHub}, journal = {GitHub repository},\n-                                      year = {2015}, url = {https://github.com/galaxyproteomics/tools-galaxyp}}</citation> <!-- TODO: fix substitution of commit ", commit = {$sha1$}" -->\n-    </citations>\n-  </xml>\n-\n-</macros>\n'