Mercurial > repos > tomnl > mzml2isa
comparison mzml2isa.xml @ 3:d5d7aa6e73ed draft default tip
planemo upload for repository https://github.com/ISA-tools/mzml2isa commit 16f55e636c7d9c2be748cb8212184164e57e4b95
| author | tomnl |
|---|---|
| date | Wed, 07 Dec 2022 17:31:23 +0000 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 2:b7d807308ab5 | 3:d5d7aa6e73ed |
|---|---|
| 1 <tool id="mzml2isa" name="mzml2isa" version="1.1.1+galaxy1"> | |
| 2 <description>Parser to get meta information from mzML files and create an ISA-Tab structure</description> | |
| 3 <requirements> | |
| 4 <requirement type="package">zip</requirement> | |
| 5 <requirement type="package" version="1.1.1">mzml2isa</requirement> | |
| 6 </requirements> | |
| 7 <stdio> | |
| 8 <exit_code range="1:" /> | |
| 9 </stdio> | |
| 10 <command detect_errors="exit_code"> | |
| 11 <![CDATA[ | |
| 12 | |
| 13 #if $input.format == "data_collection" | |
| 14 mkdir "temp" | |
| 15 && | |
| 16 cd "temp" | |
| 17 && | |
| 18 #for $fn in $input.source | |
| 19 #if str( $fn ).endswith(".dat") | |
| 20 ln -s '$fn' '$fn.name' | |
| 21 && | |
| 22 #end if | |
| 23 #end for | |
| 24 cd .. | |
| 25 && | |
| 26 #end if | |
| 27 | |
| 28 #if $metadata | |
| 29 ln -s '$metadata' 'metadata.json' && | |
| 30 #end if | |
| 31 | |
| 32 mzml2isa -s $name_of_study -o . -i | |
| 33 | |
| 34 #if $input.format == "zip_file" | |
| 35 "zip://$input.source" | |
| 36 #else if $input.format == "tar_file" | |
| 37 "tar://$input.source" | |
| 38 #else if $input.format == "data_collection" | |
| 39 "temp" | |
| 40 #end if | |
| 41 | |
| 42 #if $metadata | |
| 43 -m "metadata.json" | |
| 44 #end if | |
| 45 | |
| 46 && zip isa.zip i_* a_* s_* && mv isa.zip "$ISA_zip"; | |
| 47 ]]> | |
| 48 </command> | |
| 49 <inputs> | |
| 50 <param name="name_of_study" type="text" label="Name study" help="This should not contain any spaces as the name will be used a prefix for ISA-tab file names" /> | |
| 51 <conditional name="input"> | |
| 52 <param name="format" type="select" label="Choose the source for the dataset (zip, tar or data collection)" > | |
| 53 <option value="zip_file" selected="true">Zip file from your History containing a folder of *.mzML files</option> | |
| 54 <option value="tar_file">TAR file from your history containing a folder of *.mzML files</option> | |
| 55 <option value="data_collection">Data collection (*.mzML files)</option> | |
| 56 </param> | |
| 57 <when value="zip_file"> | |
| 58 <param name="source" type="data" format="zip" label="Zip file from your History containing *.mzml files"> | |
| 59 </param> | |
| 60 </when> | |
| 61 <when value="tar_file"> | |
| 62 <param name="source" type="data" format="tar" label="TAR file from your History containing *.mzml files"/> | |
| 63 </when> | |
| 64 <when value="data_collection"> | |
| 65 <param name="source" type="data_collection" format="mzml" label="Data collection of *.mzml" > | |
| 66 </param> | |
| 67 </when> | |
| 68 </conditional> | |
| 69 <param optional="true" format="json" name="metadata" type="data" label="Additional user Metadata in json" help="A user can add additional metadata directory through a json file"/> | |
| 70 </inputs> | |
| 71 <outputs> | |
| 72 <data name="ISA_zip" format="zip" label="ISA Zip file"/> | |
| 73 <collection type="list" label="Assay files" name="a_files"> | |
| 74 <discover_datasets pattern="(?P<designation>a_.+)\.txt" directory="." format="tabular"/> | |
| 75 </collection> | |
| 76 <collection type="list" label="Study files" name="s_files"> | |
| 77 <discover_datasets pattern="(?P<designation>s_.+)\.txt" directory="." format="tabular"/> | |
| 78 </collection> | |
| 79 <data name="i_file" format="tabular" label="Investigation file" from_work_dir="i_Investigation.txt"/> | |
| 80 </outputs> | |
| 81 <tests> | |
| 82 <test> | |
| 83 <param name="name_of_study" value="test" /> | |
| 84 <param name="input|format" value="zip_file" /> | |
| 85 <param name="input|source" value="metabolomics_study.zip" ftype="zip" /> | |
| 86 <output name="i_file" value="i_Investigation.txt" /> | |
| 87 <output_collection name="a_files" type="list" count="1"> | |
| 88 <element name="a_test_metabolite_profiling_mass_spectrometry"> | |
| 89 <assert_contents> | |
| 90 <has_n_columns n="80" /> | |
| 91 </assert_contents> | |
| 92 </element> | |
| 93 </output_collection> | |
| 94 <output_collection name="s_files" type="list" count="1"> | |
| 95 <element name="s_test"> | |
| 96 <assert_contents> | |
| 97 <has_n_columns n="12" /> | |
| 98 </assert_contents> | |
| 99 </element> | |
| 100 </output_collection> | |
| 101 </test> | |
| 102 <test> | |
| 103 <param name="name_of_study" value="test" /> | |
| 104 <param name="input|format" value="data_collection" /> | |
| 105 <param name="input|source" > | |
| 106 <collection type="list"> | |
| 107 <element name="1_samp" value="1_samp.mzML" /> | |
| 108 <element name="2_samp" value="2_samp.mzML" /> | |
| 109 <element name="3_samp" value="3_samp.mzML" /> | |
| 110 <element name="4_samp" value="4_samp.mzML" /> | |
| 111 <element name="5_samp" value="5_samp.mzML" /> | |
| 112 <element name="6_samp" value="6_samp.mzML" /> | |
| 113 </collection> | |
| 114 </param > | |
| 115 <output name="i_file" value="i_Investigation.txt" /> | |
| 116 <output_collection name="a_files" type="list" count="1"> | |
| 117 <element name="a_test_metabolite_profiling_mass_spectrometry"> | |
| 118 <assert_contents> | |
| 119 <has_n_columns n="80" /> | |
| 120 </assert_contents> | |
| 121 </element> | |
| 122 </output_collection> | |
| 123 <output_collection name="s_files" type="list" count="1"> | |
| 124 <element name="s_test"> | |
| 125 <assert_contents> | |
| 126 <has_n_columns n="12" /> | |
| 127 </assert_contents> | |
| 128 </element> | |
| 129 </output_collection> | |
| 130 </test> | |
| 131 </tests> | |
| 132 <help><![CDATA[ | |
| 133 **Overview** | |
| 134 A program to automatically generate ISA-Tab metadata files from metabolomics raw XML (mzML and imzML) data files. | |
| 135 | |
| 136 Additional meta-information not found within the mzML file can be added through a JSON file. | |
| 137 However, it is recommended that the mzML2ISA tool is used to create a semi-completed ISA-Tab file structure | |
| 138 that is further annotated using ISAcreator https://github.com/ISA-tools/ISAcreator or via the ISA-API. | |
| 139 | |
| 140 .. image::mzml2isa.png | |
| 141 ]]></help> | |
| 142 <citations> | |
| 143 <citation type="doi">10.1002/0471250953.bi1413s53</citation> | |
| 144 <citation type="doi">10.1007/s11306-015-0879-3</citation> | |
| 145 <citation type="doi">10.1038/ng.1054</citation> | |
| 146 </citations> | |
| 147 </tool> |
