view create_sqlite_db.xml @ 28:be54f396ecfe draft default tip

planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 1800a3818988f21ef129e500818c9a087fce5875
author tomnl
date Wed, 18 Jul 2018 05:47:49 -0400
parents 0d59d313d3f8
children
line wrap: on
line source

<tool id="create_sqlite_db" name="create_sqlite_db" version="0.0.21">
    <description>
        Create SQLite database of an XCMS-CAMERA dataset
    </description>


    <macros>
        <import>macros.xml</import>
    </macros>

    <expand macro="requirements">
      
    </expand>


 <stdio>
        <exit_code range="1:" />
    </stdio>
    <command interpreter="Rscript"><![CDATA[
        create_sqlite_db.R
            --out_dir=.
            --xset_xa=$xset_xa
	    --pa=$pa
            --xcms_camera_option=$camera_xcms
            --cores=\${GALAXY_SLOTS:-4}
            #if $file_load_conditional.file_load_select=="yes"
                --mzML_files='
                #for $i in $file_load_conditional.input
                    $i,
                #end for
                '
                --galaxy_names='
                #for $i in $file_load_conditional.input
                    $i.name,
                #end for
                '
            #end if


            #if $metfrag_conditional.metfrag_select=="yes"
                --metfrag_result=$metfrag_result
            #end if

            #if $sirius_csifingerid_conditional.sirius_csifingerid_select=="yes"
                --sirius_csifingerid_result=$sirius_csifingerid_result
            #end if

            #if $probmetab_conditional.probmetab_select=="yes"
                --probmetab_result=$probmetab_result
            #end if

            #if $eic
                --eic
            #end if
            #if $raw_rt_columns
                --raw_rt_columns
            #end if
            #if $grp_peaklist_opt.grp_peaklist_opt=="yes"
                --grp_peaklist=$grp_peaklist
            #end if

    ]]></command>
    <inputs>


        <param type="data" name="xset_xa" label="xcmsSet or CAMERA object"
               help="Either xcmsSet object saved as 'xset' or CAMERA 'xa' object in an RData file. Please
                     specify which to use below" format="rdata.xcms.raw,rdata.xcms.group,rdata.xcms.retcor,rdata.xcms.fillpeaks,rdata.camera.quick,rdata.camera.positive,rdata.camera.negative,rdata"/>
        <expand macro="camera_xcms" />

        <param type="data" name="pa" label="purityA object (frag4feature output)" format="rdata"
               help="purityA object saved as 'pa' in a RData file (output from frag4feature)"/>

	<param name="eic" type="boolean" label="Include EIC data?"
               help="The Extracted Ion Chromatogram can be calculated for each peak and stored in
                     the database. Note, this will take considerable time for large datasets and
                     the resulting SQLite database can be large"/>
	
	<param name="raw_rt_columns" type="boolean" label="Use user defined Raw RT columns?"
               help="Only use if the track_rt_raw tool has been used"/>


        <expand macro="grp_peaklist" />


        <expand macro="fileload" />
        <conditional name="metfrag_conditional">
                <param name="metfrag_select" type="select" label="Include MetFrag results?">
                    <option value="no" >no</option>
                    <option value="yes" >yes</option>
                </param>
                <when value="no">
                </when>
                <when value="yes">
                    <param type="data" name="metfrag_result" label="MetFrag result" format="tsv,tabular"
                               help="MetFrag result from corresponding dataset"/>
                </when>
        </conditional>

        <conditional name="sirius_csifingerid_conditional">
                <param name="sirius_csifingerid_select" type="select" label="Include Sirius CSI-FingerID results?">
                    <option value="no" >no</option>
                    <option value="yes" >yes</option>
                </param>
                <when value="no">
                </when>
                <when value="yes">
                    <param type="data" name="sirius_csifingerid_result" label="Sirius CSI-FingerID result" format="tsv,tabular"
                    help="Sirius CSI-FingerID result from corresponding dataset"/>
                </when>
        </conditional>


        <conditional name="probmetab_conditional">
                <param name="probmetab_select" type="select" label="Include ProbMetab results?">
                    <option value="no" >no</option>
                    <option value="yes" >yes</option>
                </param>
                <when value="no">
                </when>
                <when value="yes">
                    <param type="data" name="probmetab_result" label="ProbMetab result" format="tsv,tabular"
                    help="ProbMetab result from corresponding dataset"/>
                </when>
        </conditional>
        
    </inputs>
    <outputs>
        <data name="lcms_data_sqlite" format="sqlite" label="${tool.name} on ${on_string}: LC-MS(/MS) data SQLite db"
              from_work_dir="lcms_data.sqlite" />
        <data name="cpeakgroup_msms" format="tsv" label="${tool.name} on ${on_string}: c-peak-group-msms"
              from_work_dir="cpeakgroup_msms.tsv" />

    </outputs>
    <tests>
        <test>
            <conditional name="file_load_conditional">
                <param name="file_load_select" value="yes"/>
                <param name="input" >
                    <collection type="list">
                        <element name="LCMS_1.mzML" value="LCMS_1.mzML"/>
                        <element name="LCMS_2.mzML" value="LCMS_2.mzML"/>
                        <element name="LCMSMS_1.mzML" value="LCMSMS_1.mzML"/>
                        <element name="LCMSMS_2.mzML" value="LCMSMS_2.mzML"/>
                    </collection>
                </param>
            </conditional>
	    <param name="camera_xcms" value="xcms"/>
            <param name="xset_xa" value="LCMS_1_LCMS_2_LCMSMS_1_LCMSMS_2.xset.group.rdata"/>
            <param name="pa" value="frag4feature.rdata"/>
           
            <output name="cpeakgroup_msms" value="cpeakgroup_msms.tsv" >
            
                 
            </output>
        </test>
    </tests>
    
    <help><![CDATA[
=============================================================
Create SQLite database for LC-MS(/MS) dataset
=============================================================
Create an SQLite database for the msPurity and XCMS (CAMERA) outputs. The SQLite database created can 
be used as input to the spectral_matching tool. 

Please note that getting the extracted ion chromatograms can take a long time if the dataset has a large number of files and peaks.

-----------
Output
-----------
* lcms_sqlite: An SQLite database of the LC-MS(/MS) data (including fragmentation scans)
* cpeakgroup_msms: A csv file for all grouped features that have associated fragmentation spectra

    ]]></help>
<expand macro="citations" />
</tool>