Skip to content

Commit

Permalink
Add data collection for input
Browse files Browse the repository at this point in the history
  • Loading branch information
RJMW committed Jun 6, 2018
1 parent 49deaae commit 8cfba52
Show file tree
Hide file tree
Showing 14 changed files with 16,337 additions and 398 deletions.
88 changes: 79 additions & 9 deletions galaxy/mzml2isa/mzml2isa.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,18 @@
<import>mzml2isa_macros.xml</import>
</macros>

<code file="ontology_search.py" />

<requirements>
<requirement type="package" version="0.4.24">mzml2isa</requirement>
</requirements>

<code file="ontology_search.py" />

<stdio>
<exit_code range="1:" />
</stdio>

<command interpreter="python"><![CDATA[
<command detect_errors="exit_code">
<![CDATA[
#set $s_submission_date = ""
#set $s_release_date = ""
#set $s_description = ""
Expand Down Expand Up @@ -123,8 +124,27 @@
#set $organism_part_iri = $exp_meta.organism_part_iri
#end if
#if $input.format == "data_collection"
mkdir "temp"
&&
cd "temp"
&&
#for $fn in $input.source
#if str( $fn ).endswith(".dat")
ln -s '$fn' '$fn.name'
&&
#end if
#end for
cd ..
&&
#end if
wrapper.py -inputzip "$inputzip"
python $__tool_directory__/wrapper.py
#if $input.format == "zip_file"
-inputzip "$input.source"
#else if $input.format == "data_collection"
-folder "temp"
#end if
-jsontxt "$jsontxt"
-html_file "$html_file"
-out_dir .
Expand Down Expand Up @@ -171,18 +191,37 @@
--organism_variant_iri "$organism_variant_iri"
--organism_part_text "$organism_part_text"
--organism_part_ref "$organism_part_ref"
--organism_part_iri "$organism_part_iri";
--organism_part_iri "$organism_part_iri";
ln -s ./"$name_of_study" study_dir;
cd study_dir;
zip isa.zip i_* a_* s_* && mv isa.zip "$ISA_zip";
]]>
]]>
</command>

<inputs>
<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" />
<param format="zip" name="inputzip" type="data" label="mzML zip file" help="A zipped folder of mzML files"/>

<conditional name="input">
<param name="format" type="select" label="Choose the source for the dataset" >
<option value="zip_file" selected="true">Zip file from your History containing a folder of *.mzML files</option>
<option value="data_collection">Data collection (*.mzML files)</option>
</param>
<when value="zip_file">
<param name="source" type="data" format="zip" label="Zip file from your History containing *.mzml files">
<validator type="empty_field" />
</param>
</when>
<when value="data_collection">
<param name="source" type="data_collection" format="mzml" label="Data collection of *.mzml" >
<validator type="empty_field" />
</param>
</when>
</conditional>

<!--<param format="zip" name="inputzip" type="data" label="mzML zip file" help="A zipped folder of mzML files"/>-->

<param optional="true" format="txt" name="jsontxt" type="data" label="Additional user Metadata in json" help="A user can add additional metadata directory through a json file"/>
<expand macro="studymacro"/>
<expand macro="investmacro"/>
Expand Down Expand Up @@ -211,13 +250,14 @@ this would require changing the out_dir for wrapper.py back to $html_file.extra_
<collection type="list" label="S Files" name="s_files">
<discover_datasets pattern="(?P&lt;designation&gt;s_.+)\.txt" directory="study_dir" format="tabular"/>
</collection>
<data name="i_file" format="tabular" label="I File" from_work_dir="study_dir/i_Investigation.txt" visible="true"/>
<data name="i_file" format="tabular" label="I File" from_work_dir="study_dir/i_Investigation.txt"/>
</outputs>

<tests>
<test>
<param name="name_of_study" value="test" />
<param name="inputzip" value="metabolomics_study.zip" ftype="zip" />
<param name="input|format" value="zip_file" />
<param name="input|source" value="metabolomics_study.zip" ftype="zip" />
<output name="html_file" value="metabolomics_study/test/index.html" />
<output name="i_file" value="metabolomics_study/test/i_Investigation.txt" />
<output_collection name="a_files" type="list" count="1">
Expand All @@ -235,6 +275,36 @@ this would require changing the out_dir for wrapper.py back to $html_file.extra_
</element>
</output_collection>
</test>
<test>
<param name="name_of_study" value="test_collection" />
<param name="input|format" value="data_collection" />
<param name="input|source" >
<collection type="list">
<element name="1_samp" value="1_samp.mzML" />
<element name="2_samp" value="2_samp.mzML" />
<element name="3_samp" value="3_samp.mzML" />
<element name="4_samp" value="4_samp.mzML" />
<element name="5_samp" value="5_samp.mzML" />
<element name="6_samp" value="6_samp.mzML" />
</collection>
</param >
<output name="html_file" value="metabolomics_study/test_collection/index.html" />
<output name="i_file" value="metabolomics_study/test_collection/i_Investigation.txt" />
<output_collection name="a_files" type="list" count="1">
<element name="a_test_collection_metabolite_profiling_mass_spectrometry">
<assert_contents>
<has_n_columns n="77" />
</assert_contents>
</element>
</output_collection>
<output_collection name="s_files" type="list" count="1">
<element name="s_test_collection">
<assert_contents>
<has_n_columns n="12" />
</assert_contents>
</element>
</output_collection>
</test>
</tests>
<help><![CDATA[
**Overview**
Expand Down
2,688 changes: 2,688 additions & 0 deletions galaxy/mzml2isa/test-data/1_samp.mzML

Large diffs are not rendered by default.

2,688 changes: 2,688 additions & 0 deletions galaxy/mzml2isa/test-data/2_samp.mzML

Large diffs are not rendered by default.

2,688 changes: 2,688 additions & 0 deletions galaxy/mzml2isa/test-data/3_samp.mzML

Large diffs are not rendered by default.

2,688 changes: 2,688 additions & 0 deletions galaxy/mzml2isa/test-data/4_samp.mzML

Large diffs are not rendered by default.

2,688 changes: 2,688 additions & 0 deletions galaxy/mzml2isa/test-data/5_samp.mzML

Large diffs are not rendered by default.

2,688 changes: 2,688 additions & 0 deletions galaxy/mzml2isa/test-data/6_samp.mzML

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
"Sample Name" "Protocol REF" "Parameter Value[Post Extraction]" "Parameter Value[Derivatization]" "Extract Name" "Protocol REF" "Parameter Value[Chromatography Instrument]" "Term Source REF" "Term Accession Number" "Parameter Value[Column model]" "Parameter Value[Column type]" "Labeled Extract Name" "Label" "Term Source REF" "Term Accession Number" "Protocol REF" "Parameter Value[Scan polarity]" "Parameter Value[Scan m/z range]" "Unit" "Term Source REF" "Term Accession Number" "Parameter Value[Instrument]" "Term Source REF" "Term Accession Number" "Parameter Value[Ion source]" "Term Source REF" "Term Accession Number" "Parameter Value[Mass analyzer]" "Term Source REF" "Term Accession Number" "Parameter Value[Inlet type]" "Term Source REF" "Term Accession Number" "Parameter Value[Detector]" "Term Source REF" "Term Accession Number" "Parameter Value[Detector mode]" "Term Source REF" "Term Accession Number" "Parameter Value[Native spectrum identifier format]" "Term Source REF" "Term Accession Number" "Parameter Value[Data file content]" "Term Source REF" "Term Accession Number" "Parameter Value[Data file checksum type]" "Term Source REF" "Term Accession Number" "Parameter Value[Raw data file format]" "Term Source REF" "Term Accession Number" "Parameter Value[Instrument manufacturer]" "Term Source REF" "Term Accession Number" "Parameter Value[Instrument serial number]" "Parameter Value[Instrument software]" "Term Source REF" "Term Accession Number" "Parameter Value[Number of scans]" "Parameter Value[Time range]" "Unit" "Term Source REF" "Term Accession Number" "MS Assay Name" "Raw Spectral Data File" "Protocol REF" "Normalization Name" "Derived Spectral Data File" "Protocol REF" "Parameter Value[Data Transformation software]" "Term Source REF" "Term Accession Number" "Parameter Value[Data Transformation software version]" "Data Transformation Name" "Term Source REF" "Term Accession Number" "Metabolite Assignment File"
"5_samp" "Extraction" "" "" "" "Chromatography" "" "" "" "" "" "" "" "" "" "Mass spectrometry" "positive scan" "140-2000" "m/z" "MS" "http://purl.obolibrary.org/obo/MS_1000040" "LTQ FT" "MS" "http://purl.obolibrary.org/obo/MS_1000448" "electrospray ionization" "MS" "http://purl.obolibrary.org/obo/MS_1000073" "radial ejection linear ion trap" "MS" "http://purl.obolibrary.org/obo/MS_1000083" "electrospray inlet" "MS" "http://purl.obolibrary.org/obo/MS_1000057" "electron multiplier" "MS" "http://purl.obolibrary.org/obo/MS_1000253" "" "" "" "Thermo nativeID format" "MS" "http://purl.obolibrary.org/obo/MS_1000768" "MSn spectrum" "MS" "http://purl.obolibrary.org/obo/MS_1000580" "SHA-1" "MS" "http://purl.obolibrary.org/obo/MS_1000569" "Thermo RAW file" "MS" "http://purl.obolibrary.org/obo/MS_1000563" "Thermo Fisher Scientific instrument model" "MS" "http://purl.obolibrary.org/obo/MS_1000483" "SN06061F" "Xcalibur" "MS" "http://purl.obolibrary.org/obo/MS_1000532" "48" "0.0049-0.4872" "minute" "UO" "http://purl.obolibrary.org/obo/UO_0000031" "5_samp" "" "Data transformation" "" "5_samp.mzML" "Metabolite identification" "ProteoWizard" "MS" "http://purl.obolibrary.org/obo/MS_1000615" "1.4.0" "Conversion to mzML" "MS" "http://purl.obolibrary.org/obo/MS_1000544" ""
"3_samp" "Extraction" "" "" "" "Chromatography" "" "" "" "" "" "" "" "" "" "Mass spectrometry" "positive scan" "140-2000" "m/z" "MS" "http://purl.obolibrary.org/obo/MS_1000040" "LTQ FT" "MS" "http://purl.obolibrary.org/obo/MS_1000448" "electrospray ionization" "MS" "http://purl.obolibrary.org/obo/MS_1000073" "radial ejection linear ion trap" "MS" "http://purl.obolibrary.org/obo/MS_1000083" "electrospray inlet" "MS" "http://purl.obolibrary.org/obo/MS_1000057" "electron multiplier" "MS" "http://purl.obolibrary.org/obo/MS_1000253" "" "" "" "Thermo nativeID format" "MS" "http://purl.obolibrary.org/obo/MS_1000768" "MSn spectrum" "MS" "http://purl.obolibrary.org/obo/MS_1000580" "SHA-1" "MS" "http://purl.obolibrary.org/obo/MS_1000569" "Thermo RAW file" "MS" "http://purl.obolibrary.org/obo/MS_1000563" "Thermo Fisher Scientific instrument model" "MS" "http://purl.obolibrary.org/obo/MS_1000483" "SN06061F" "Xcalibur" "MS" "http://purl.obolibrary.org/obo/MS_1000532" "48" "0.0049-0.4872" "minute" "UO" "http://purl.obolibrary.org/obo/UO_0000031" "3_samp" "" "Data transformation" "" "3_samp.mzML" "Metabolite identification" "ProteoWizard" "MS" "http://purl.obolibrary.org/obo/MS_1000615" "1.4.0" "Conversion to mzML" "MS" "http://purl.obolibrary.org/obo/MS_1000544" ""
"2_samp" "Extraction" "" "" "" "Chromatography" "" "" "" "" "" "" "" "" "" "Mass spectrometry" "positive scan" "140-2000" "m/z" "MS" "http://purl.obolibrary.org/obo/MS_1000040" "LTQ FT" "MS" "http://purl.obolibrary.org/obo/MS_1000448" "electrospray ionization" "MS" "http://purl.obolibrary.org/obo/MS_1000073" "radial ejection linear ion trap" "MS" "http://purl.obolibrary.org/obo/MS_1000083" "electrospray inlet" "MS" "http://purl.obolibrary.org/obo/MS_1000057" "electron multiplier" "MS" "http://purl.obolibrary.org/obo/MS_1000253" "" "" "" "Thermo nativeID format" "MS" "http://purl.obolibrary.org/obo/MS_1000768" "MSn spectrum" "MS" "http://purl.obolibrary.org/obo/MS_1000580" "SHA-1" "MS" "http://purl.obolibrary.org/obo/MS_1000569" "Thermo RAW file" "MS" "http://purl.obolibrary.org/obo/MS_1000563" "Thermo Fisher Scientific instrument model" "MS" "http://purl.obolibrary.org/obo/MS_1000483" "SN06061F" "Xcalibur" "MS" "http://purl.obolibrary.org/obo/MS_1000532" "48" "0.0049-0.4872" "minute" "UO" "http://purl.obolibrary.org/obo/UO_0000031" "2_samp" "" "Data transformation" "" "2_samp.mzML" "Metabolite identification" "ProteoWizard" "MS" "http://purl.obolibrary.org/obo/MS_1000615" "1.4.0" "Conversion to mzML" "MS" "http://purl.obolibrary.org/obo/MS_1000544" ""
"1_samp" "Extraction" "" "" "" "Chromatography" "" "" "" "" "" "" "" "" "" "Mass spectrometry" "positive scan" "140-2000" "m/z" "MS" "http://purl.obolibrary.org/obo/MS_1000040" "LTQ FT" "MS" "http://purl.obolibrary.org/obo/MS_1000448" "electrospray ionization" "MS" "http://purl.obolibrary.org/obo/MS_1000073" "radial ejection linear ion trap" "MS" "http://purl.obolibrary.org/obo/MS_1000083" "electrospray inlet" "MS" "http://purl.obolibrary.org/obo/MS_1000057" "electron multiplier" "MS" "http://purl.obolibrary.org/obo/MS_1000253" "" "" "" "Thermo nativeID format" "MS" "http://purl.obolibrary.org/obo/MS_1000768" "MSn spectrum" "MS" "http://purl.obolibrary.org/obo/MS_1000580" "SHA-1" "MS" "http://purl.obolibrary.org/obo/MS_1000569" "Thermo RAW file" "MS" "http://purl.obolibrary.org/obo/MS_1000563" "Thermo Fisher Scientific instrument model" "MS" "http://purl.obolibrary.org/obo/MS_1000483" "SN06061F" "Xcalibur" "MS" "http://purl.obolibrary.org/obo/MS_1000532" "48" "0.0049-0.4872" "minute" "UO" "http://purl.obolibrary.org/obo/UO_0000031" "1_samp" "" "Data transformation" "" "1_samp.mzML" "Metabolite identification" "ProteoWizard" "MS" "http://purl.obolibrary.org/obo/MS_1000615" "1.4.0" "Conversion to mzML" "MS" "http://purl.obolibrary.org/obo/MS_1000544" ""
"6_samp" "Extraction" "" "" "" "Chromatography" "" "" "" "" "" "" "" "" "" "Mass spectrometry" "positive scan" "140-2000" "m/z" "MS" "http://purl.obolibrary.org/obo/MS_1000040" "LTQ FT" "MS" "http://purl.obolibrary.org/obo/MS_1000448" "electrospray ionization" "MS" "http://purl.obolibrary.org/obo/MS_1000073" "radial ejection linear ion trap" "MS" "http://purl.obolibrary.org/obo/MS_1000083" "electrospray inlet" "MS" "http://purl.obolibrary.org/obo/MS_1000057" "electron multiplier" "MS" "http://purl.obolibrary.org/obo/MS_1000253" "" "" "" "Thermo nativeID format" "MS" "http://purl.obolibrary.org/obo/MS_1000768" "MSn spectrum" "MS" "http://purl.obolibrary.org/obo/MS_1000580" "SHA-1" "MS" "http://purl.obolibrary.org/obo/MS_1000569" "Thermo RAW file" "MS" "http://purl.obolibrary.org/obo/MS_1000563" "Thermo Fisher Scientific instrument model" "MS" "http://purl.obolibrary.org/obo/MS_1000483" "SN06061F" "Xcalibur" "MS" "http://purl.obolibrary.org/obo/MS_1000532" "48" "0.0049-0.4872" "minute" "UO" "http://purl.obolibrary.org/obo/UO_0000031" "6_samp" "" "Data transformation" "" "6_samp.mzML" "Metabolite identification" "ProteoWizard" "MS" "http://purl.obolibrary.org/obo/MS_1000615" "1.4.0" "Conversion to mzML" "MS" "http://purl.obolibrary.org/obo/MS_1000544" ""
"4_samp" "Extraction" "" "" "" "Chromatography" "" "" "" "" "" "" "" "" "" "Mass spectrometry" "positive scan" "140-2000" "m/z" "MS" "http://purl.obolibrary.org/obo/MS_1000040" "LTQ FT" "MS" "http://purl.obolibrary.org/obo/MS_1000448" "electrospray ionization" "MS" "http://purl.obolibrary.org/obo/MS_1000073" "radial ejection linear ion trap" "MS" "http://purl.obolibrary.org/obo/MS_1000083" "electrospray inlet" "MS" "http://purl.obolibrary.org/obo/MS_1000057" "electron multiplier" "MS" "http://purl.obolibrary.org/obo/MS_1000253" "" "" "" "Thermo nativeID format" "MS" "http://purl.obolibrary.org/obo/MS_1000768" "MSn spectrum" "MS" "http://purl.obolibrary.org/obo/MS_1000580" "SHA-1" "MS" "http://purl.obolibrary.org/obo/MS_1000569" "Thermo RAW file" "MS" "http://purl.obolibrary.org/obo/MS_1000563" "Thermo Fisher Scientific instrument model" "MS" "http://purl.obolibrary.org/obo/MS_1000483" "SN06061F" "Xcalibur" "MS" "http://purl.obolibrary.org/obo/MS_1000532" "48" "0.0049-0.4872" "minute" "UO" "http://purl.obolibrary.org/obo/UO_0000031" "4_samp" "" "Data transformation" "" "4_samp.mzML" "Metabolite identification" "ProteoWizard" "MS" "http://purl.obolibrary.org/obo/MS_1000615" "1.4.0" "Conversion to mzML" "MS" "http://purl.obolibrary.org/obo/MS_1000544" ""
Loading

0 comments on commit 8cfba52

Please sign in to comment.