Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Section #8

Merged
merged 3 commits into from
Apr 7, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
tool_test_output.html
tool_test_output.json
143 changes: 82 additions & 61 deletions galaxy/probmetab/ProbMetab.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,25 @@

#end if

#if $option_toexclude.option == "show":
toexclude $option_toexclude.toexclude
## Extraction of CAMERA annotation [get.annot]
allowMiss $getannot.allowMiss
#if $getannot.option_toexclude.option == "show":
toexclude $getannot.option_toexclude.toexclude
#end if
allowMiss $allowMiss
html $html
kegg_db $kegg_db
ppm_tol $ppm_tol
opt $opt
corths $corths
corprob $corprob
pcorprob $pcorprob
prob $prob

## Database matching [create.reactionM]
kegg_db $db.kegg_db
ppm_tol $db.ppm_tol

## Probability calculations matrix export [export.class.table]
prob $export.prob
html $export.html

## Calculate the correlations and partial correlations and cross reference then with reactions [reac2cor]
opt $reac2cor.opt
corprob $reac2cor.corprob
pcorprob $reac2cor.pcorprob
corths $reac2cor.corths

@COMMAND_LOG_EXIT@

Expand Down Expand Up @@ -80,6 +87,7 @@
</when>
</conditional>
-->
<expand macro="input_file_load"/>
</when>
<!-- Two acquisition modes-->
<when value="two">
Expand Down Expand Up @@ -111,77 +119,88 @@
-->
</when>
</conditional>
<expand macro="input_file_load" polarity="Positive"/>
<expand macro="input_file_load" polarity="Negative"/>
</when>
</conditional>

<param name="allowMiss" type="boolean" checked="true" truevalue="TRUE" falsevalue="FALSE" label="Retrieves peaks with no eviendence of adduct or isotope" help=" [allowMiss] (ionAnnot function) Logical, annotate also the peaks as single charged molecules [M+/-H]." />
<conditional name="option_toexclude">
<param name="option" type="select" label="Exclude samples" >
<option value="show">show</option>
<option value="hide" selected="true">hide</option>
</param>
<when value="show">
<param name="toexclude" type="text" value="blank,medium,QC" label="samples to be excluded of peak counting to non-annotated peak selection." help="" />
</when>
<when value="hide" />
</conditional>
<!--
<conditional name="useIso_options">
<param name="option" type="select" label="Calculates the relative isotopic abundance ratio (Carbon 13)" >
<option value="show">Yes</option>
<option value="hide" selected="true">No</option>
<section name="getannot" title="Extraction of CAMERA annotation [get.annot]">
<param name="allowMiss" type="boolean" checked="true" truevalue="TRUE" falsevalue="FALSE" label="Retrieves peaks with no eviendence of adduct or isotope" help=" [allowMiss] (ionAnnot function) Logical, annotate also the peaks as single charged molecules [M+/-H]." />
<conditional name="option_toexclude">
<param name="option" type="select" label="Exclude samples" >
<option value="show">show</option>
<option value="hide" selected="true">hide</option>
</param>
<when value="show">
<param name="toexclude" type="text" value="blank,medium,QC" label="Samples to be excluded of peak counting to non-annotated peak selection." help="[toexclude]" />
</when>
<when value="hide" />
</conditional>
</section>

<section name="db" title="Database matching [create.reactionM]">
<param name="kegg_db" type="text" size="40" label="Search on KEGG database or multiple organisms " help="Search on all KEGG organisms or multiple organisms (id1,id2,id3,...).By default,the value is KEGG which means searching on all KEGG organism. The list of KEGG IDs are available at http://rest.kegg.jp/list/organism" value="KEGG" >
<validator type="empty_field"/>
</param>
<when value="show">
<param name="var" type="select" label="var (incorporate.isotopes)" help="1 to use standard mean/sd estimators to carbon number prediction, 2 for median/mad estimators." >
<option value="1">1</option>
<option value="2" selected="true">2</option>
<param name="ppm_tol" type="integer" value="8" label="Parts per million mass tolerance allowed in the mass search" help="[ppm.tol]" />
<!--
<conditional name="useIso_options">
<param name="option" type="select" label="Calculates the relative isotopic abundance ratio (Carbon 13)" >
<option value="show">Yes</option>
<option value="hide" selected="true">No</option>
</param>
</when>
</conditional>
-->
<param name="html" type="boolean" checked="true" truevalue="TRUE" falsevalue="FALSE" label="Logical, check if you want to generate a HTML ProbMetab report" help=" [html] (export.class.table function).This parameter uses the raw data to plot EICs and may be time consuming." />
<when value="show">
<param name="var" type="select" label="var (incorporate.isotopes)" help="1 to use standard mean/sd estimators to carbon number prediction, 2 for median/mad estimators." >
<option value="1">1</option>
<option value="2" selected="true">2</option>
</param>
</when>
</conditional>
-->
</section>

<param name="kegg_db" type="text" size="40" label="Search on KEGG database or multiple organisms " help="Search on all KEGG organisms or multiple organisms (id1,id2,id3,...).By default,the value is KEGG which means searching on all KEGG organism. The list of KEGG IDs are available at http://rest.kegg.jp/list/organism" value="KEGG" >
<validator type="empty_field"/>
</param>
<param name="ppm_tol" type="integer" value="8" label="Parts per million mass tolerance allowed in the mass search" help="[ppm.tol] (create.reactionMfunction) " />
<section name="export" title="Probability calculations matrix export [export.class.table]">
<param name="prob" type="select" label=" Calculation of the probability to attribute a mass to a compound" help="[prob] Default is 'count'. See the tool help for more details." >
<option value="count" selected="true">Count</option>
<option value="mean">Mean</option>
</param>

<param name="html" type="boolean" checked="true" truevalue="TRUE" falsevalue="FALSE" label="Logical, check if you want to generate a HTML ProbMetab report" help="[html] This parameter uses the raw data to plot EICs and may be time consuming." />
</section>

<param name="opt" type="select" label="Correlation option" help="[opt] (reac2cor function) cor for correlation, and pcor for partial correlation." >
<option value="cor" selected="true">cor</option>
<option value="pcor">pcor</option>
</param>
<section name="reac2cor" title="Calculate the correlations and partial correlations and cross reference then with reactions [reac2cor]">
<param name="opt" type="select" label="Correlation option" help="[opt] cor for correlation, and pcor for partial correlation." >
<option value="cor" selected="true">cor</option>
<option value="pcor">pcor</option>
</param>

<param name="corprob" type="float" value="0.8" label="Probability that the correlation is considered significant" help="[corprob] (reac2cor function) " />
<param name="corprob" type="float" value="0.8" label="Probability that the correlation is considered significant" help="[corprob]" />

<param name="pcorprob" type="float" value="0.8" label="Probability that the partial correlation is considered significant." help="[pcorprob](reac2cor function)" />
<param name="corths" type="float" value="0.75" label="Correlation intensity threshold" help="[corths] (reac2cor function)" />
<param name="pcorprob" type="float" value="0.8" label="Probability that the partial correlation is considered significant." help="[pcorprob]" />
<param name="corths" type="float" value="0.75" label="Correlation intensity threshold" help="[corths]" />
</section>

<param name="prob" type="select" label=" Calculation of the probability to attribute a mass to a compound" help="[prob] (export.class.table function). Default is 'count'. See the tool help for more details." >
<option value="count" selected="true">Count</option>
<option value="mean">Mean</option>
</param>
<!--
<param name="organismId" type="text" size="40" value="NULL" label="organismIdorganismId" help="(create.pathway.node.attributes function) KEGG organism id (http://www.kegg.jp/kegg/catalog/org_list.html) to filter possible pathways for known pathways for that organism. Only works for KEGG database for now. Default is NULL (all KEGG organisms).
" />
<section name="cytoscape" title="CytoScape options">
<param name="organismId" type="text" size="40" value="NULL" label="organismIdorganismId" help="(create.pathway.node.attributes function) KEGG organism id (http://www.kegg.jp/kegg/catalog/org_list.html) to filter possible pathways for known pathways for that organism. Only works for KEGG database for now. Default is NULL (all KEGG organisms).
" />
</section>
-->

<expand macro="input_file_load"/>
<expand macro="input_file_load" polarity="Positive"/>
<expand macro="input_file_load" polarity="Negative"/>
</inputs>

<outputs>
<!-- <data name="output_image" format="rdata" from_work_dir="probmetab.RData" label="Probmetab.RData" /> -->
<data name="html_output" format="html" from_work_dir="AnalysisExample.html" label="Probmetab.Analysis_Report_html" >
<filter>(html)</filter>
<filter>(export['html'])</filter>
</data>
<data name="tsv_output" format="tabular" from_work_dir="Analysis_Report.tsv" label="Probmetab.CytoScape_output_Attribute_List.tsv" />
<data name="eics" format="zip" from_work_dir="Analysis_Report.zip" label="Probmetab.Analysis_Report_EICs_plots.zip" >
<filter>(html)</filter>
<filter>(export['html'])</filter>
</data>
<data name="sif_output" format="tabular" from_work_dir="sif.tsv" label="Probmetab.CytoScape_output.sif" />
<data name="variableMetadata" format="tabular" from_work_dir="variableMetadata.tsv" label="variableMetadata.tsv" >
<filter>(drop_new-file_path['mode'] == 'one')</filter>
<filter>(acquisition_options['mode'] == 'one')</filter>
</data>

<data name="CombineMolIon" format="tabular" from_work_dir="CombineMolIon.tsv" label="CombineMolIon.tsv" >
Expand All @@ -202,7 +221,7 @@
<param name="mode" value="one" />
<param name="image" value="faahOK.xset.group.retcor.group.fillPeaks.annotate.negative.Rdata" />
</conditional>
<param name="html" value="FALSE" />
<expand macro="test_commun"/>
<expand macro="test_file_load_zip"/>
<assert_stdout>
<has_text text="Step 1... determine cutoff point" />
Expand All @@ -216,7 +235,7 @@
<param name="mode" value="one" />
<param name="image" value="faahOK-single.xset.merged.group.retcor.group.fillPeaks.annotate.negative.Rdata" />
</conditional>
<param name="html" value="FALSE" />
<expand macro="test_commun"/>
<expand macro="test_file_load_single"/>
<assert_stdout>
<has_text text="Step 1... determine cutoff point" />
Expand Down Expand Up @@ -407,7 +426,9 @@ Probmetab.CytoScape_output.sif
Changelog/News
--------------

**Version 1.1.0 - 15/02/2017**
**Version 1.1.0 - 06/04/2017**

- IMPROVEMENT: add some sections within to separate the different parts of the process

- IMPROVEMENT: Probmetab is now compatible with merged individual data from xcms.xcmsSet

Expand Down
66 changes: 35 additions & 31 deletions galaxy/probmetab/macros.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,32 +27,30 @@
<!-- raw file load for planemo test -->
<token name="@COMMAND_FILE_LOAD_NEUTRAL@">
#if $file_load_section_selected.file_load_conditional.file_load_select == "yes":
#if $file_load_section_selected.file_load_conditional.inputs.input == "zip_file":
zipfile$polarity '$file_load_section_selected.file_load_conditional.inputs.zip_file'
#if $file_load_section_selected.file_load_conditional.input[0].is_of_type("mzxml") or $file_load_section_selected.file_load_conditional.input[0].is_of_type("mzml") or $file_load_section_selected.file_load_conditional.input[0].is_of_type("mzdata") or $file_load_section_selected.file_load_conditional.input[0].is_of_type("netcdf"):
#set singlefile_galaxyPath = ','.join( [ str( $single_file ) for $single_file in $file_load_section_selected.file_load_conditional.input ] )
#set singlefile_sampleName = ','.join( [ str( $single_file.name ) for $single_file in $file_load_section_selected.file_load_conditional.input ] )
singlefile_galaxyPath$polarity '$singlefile_galaxyPath' singlefile_sampleName$polarity '$singlefile_sampleName'
#else
#set singlefile_galaxyPath = ','.join( [ str( $single_file ) for $single_file in $file_load_section_selected.file_load_conditional.inputs.single_file ] )
#set singlefile_sampleName = ','.join( [ str( $single_file.name ) for $single_file in $file_load_section_selected.file_load_conditional.inputs.single_file ] )

singlefile_galaxyPath$polarity '$singlefile_galaxyPath'
singlefile_sampleName$polarity '$singlefile_sampleName'
zipfile$polarity '$file_load_section_selected.file_load_conditional.input'
#end if
#end if
</token>

<token name="@COMMAND_FILE_LOAD_ONE@">
#set file_load_section_selected = $file_load_section
#set file_load_section_selected = $acquisition_options.file_load_section
#set polarity=""
@COMMAND_FILE_LOAD_NEUTRAL@
</token>

<token name="@COMMAND_FILE_LOAD_POSITIVE@">
#set file_load_section_selected = $file_load_sectionPositive
#set file_load_section_selected = $acquisition_options.file_load_sectionPositive
#set polarity="Positive"
@COMMAND_FILE_LOAD_NEUTRAL@
</token>

<token name="@COMMAND_FILE_LOAD_NEGATIVE@">
#set file_load_section_selected = $file_load_sectionNegative
#set file_load_section_selected = $acquisition_options.file_load_sectionNegative
#set polarity="Negative"
@COMMAND_FILE_LOAD_NEUTRAL@
</token>
Expand All @@ -67,31 +65,40 @@
<when value="no">
</when>
<when value="yes">
<conditional name="inputs">
<param name="input" type="select" label="Choose your inputs method" >
<option value="zip_file" selected="true">Zip file from your history containing your chromatograms</option>
<option value="single_file">A mzXML or netCDF file from your history</option>
</param>
<when value="zip_file">
<param name="zip_file" type="data" format="no_unzip.zip,zip" label="Zip file" />
</when>
<when value="single_file">
<param name="single_file" type="data" format="mzxml,netcdf" label="Single file" multiple="true"/>
</when>
</conditional>
<param name="input" type="data" format="mzxml,mzml,mzdata,netcdf,no_unzip.zip,zip" multiple="true" label="File(s) from your history containing your chromatograms" help="Single file mode for the format: mzxml, mzml, mzdata and netcdf. Zip file mode for the format: no_unzip.zip, zip. See the help section below." />
</when>
</conditional>
</section>
</xml>

<xml name="test_commun">
<section name="getannot">
<param name="allowMiss" value="TRUE" />
<conditional name="option_toexclude">
<param name="option" value="hide" />
</conditional>
</section>
<section name="db">
<param name="kegg_db" value="KEGG" />
<param name="ppm_tol" value="8" />
</section>
<section name="export">
<param name="prob" value="count" />
<param name="html" value="FALSE" />
</section>
<section name="reac2cor">
<param name="opt" value="cor" />
<param name="corprob" value="0.8" />
<param name="pcorprob" value="0.8" />
<param name="corths" value="0.75" />
</section>
</xml>

<xml name="test_file_load_zip">
<section name="file_load_section">
<conditional name="file_load_conditional">
<param name="file_load_select" value="yes" />
<conditional name="inputs">
<param name="input" value="zip_file" />
<param name="zip_file" value="faahKO_reduce.zip" ftype="zip" />
</conditional>
<param name="input" value="faahKO_reduce.zip" ftype="zip" />
</conditional>
</section>
</xml>
Expand All @@ -100,10 +107,7 @@
<section name="file_load_section@POLARITY@">
<conditional name="file_load_conditional">
<param name="file_load_select" value="yes" />
<conditional name="inputs">
<param name="input" value="single_file" />
<param name="single_file" value="wt15.CDF,ko16.CDF,ko15.CDF,wt16.CDF" ftype="netcdf" />
</conditional>
<param name="input" value="wt15.CDF,ko16.CDF,ko15.CDF,wt16.CDF" ftype="netcdf" />
</conditional>
</section>
</xml>
Expand All @@ -118,7 +122,7 @@

.. class:: infomark

**Galaxy integration** Misharl Monsoor [email protected] ABIMS TEAM, Station biologique de Roscoff.
**Galaxy integration** Misharl Monsoor [email protected] (and Gildas Le Corguillé) from ABIMS TEAM, Station biologique de Roscoff.

| Contact [email protected] for any questions or concerns about the Galaxy implementation of this tool.

Expand Down