view combineAnnotations.xml @ 0:7f3183988100 draft

"planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit cb903cd93f9378cfb5eeb68512a54178dcea7bbc-dirty"
author computational-metabolomics
date Wed, 27 Nov 2019 13:51:34 -0500
parents
children d4376a743f7b
line wrap: on
line source

<tool id="mspurity_combineannotations" name="msPurity.combineAnnotations" version="@TOOL_VERSION@+galaxy@GALAXY_TOOL_VERSION@">
    <description>Combine, score and rank metabolite annotation results</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements"/>
    <command detect_errors="exit_code"><![CDATA[
        Rscript '$__tool_directory__/combineAnnotations.R'
            --sm_resultPth='$sm_resultPth'
            --metfrag_resultPth='$metfrag_resultPth'
            --sirius_csi_resultPth='$sirius_csi_resultPth'
            --probmetab_resultPth='$probmetab_resultPth'
            --ms1_lookup_resultPth='$ms1_lookup_resultPth'

            #if $ms1_lookup_checkAdducts:
              --ms1_lookup_checkAdducts
            #end if

            --ms1_lookup_keepAdducts='$ms1_lookup_keepAdducts'
            --ms1_lookup_dbSource=$ms1_lookup_dbSource

            --sm_weight=$sm_weight
            --metfrag_weight=$metfrag_weight
            --sirius_csi_weight=$sirius_csi_weight
            --probmetab_weight=$probmetab_weight
            --ms1_lookup_weight=$ms1_lookup_weight
            --biosim_weight=$biosim_weight


            #if $create_new_database:
              --create_new_database
            #end if

            --compoundDbType=$compoundDbTypeCond.compoundDbType

            #if $compoundDbTypeCond.compoundDbType== 'sqlite'
              --compoundDbPth='$compoundDbTypeCond.compoundDbPth'
            #end if


    ]]></command>
    <inputs>


      <param argument="--sm_resultPth" type="data" label="Spectral matching result" format="sqlite"
               help="The SQLite database generated from msPurity.spectralMatching"/>
      <param argument="--metfrag_resultPth" type="data" label="Metfrag result" format="tsv,tabular"  optional="true"
               help="The result of the MetFrag analysis (requires a column indicating the XCMS group ID)"/>
      <param argument="--sirius_csi_resultPth" type="data" label="Sirius CSI:FingerID result" format="tsv,tabular"   optional="true"
             help="The result of the CSI:FingerID analysis (requires a column indicating the XCMS group ID)"/>
      <param argument="--probmetab_resultPth" type="data" label="Probmetab result" format="tsv,tabular"   optional="true"
               help="The result of the Probmetab analysis (requires a column indicating the XCMS group ID)"/>
      <param argument="--ms1_lookup_resultPth" type="data" label="MS1 Lookup result" format="tsv,tabular"   optional="true"
             help="The result of the a generic MS1 lookup annotation software (e.g. BEAMS can be used)"/>
      <param argument="--ms1_lookup_keepAdducts" type="text" label="MS1 lookup adducts to keep" optional="true"
             help="Provide a list of adducts that should be used from the MS1 lookup (e.g. [M+H]+, [M+Na]+"/>
      <param argument="--ms1_lookup_checkAdducts" type="boolean" label="MS1 lookup check adducts to CAMERA"
             help="Check if adducts match to those found in CAMERA (requires the database to have been created with CAMERA object"/>
      <param argument="--ms1_lookup_dbSource" type="select" label="MS1 lookup database source" help="Which database was used for the MS1 lookup" >
                <option value="hmdb" selected="true">hmdb</option>
                <option value="pubchem">pubchem</option>
                <option value="kegg">kegg</option>
      </param>
      <param argument="--sm_weight" type="float" min="0.0" max="1.0" value="0.3" label="Spectral matching weight" help="all weights need to sum to 1" />
      <param argument="--metfrag_weight" type="float" min="0.0" max="1.0" value="0.2" label="Metfrag weight" help="all weights need to sum to 1" />
      <param argument="--sirius_csi_weight" type="float" min="0.0" max="1.0" value="0.2" label="Sirius CSI:FingerID weight" help="all weights need to sum to 1" />
      <param argument="--probmetab_weight" type="float" min="0.0" max="1.0" value="0.0" label="Probmetab weight" help="all weights need to sum to 1" />
      <param argument="--ms1_lookup_weight" type="float" min="0.0" max="1.0" value="0.05" label="MS1 Lookup weight" help="all weights need to sum to 1" />
      <param argument="--biosim_weight" type="float" min="0.0" max="1.0" value="0.25" label="Biological similarity weight" help="all weights need to sum to 1" />
      <param argument="--create_new_database" type="boolean" checked="true" label="Create a new database for the results?"
               help="A copy will be made of the input SQLite spectral matching database and the results will be added to this copy.
                     When False, the input SQLite database will be updated the results. Use False
                     if you want to reduce storage space being used."/>

      <conditional name="compoundDbTypeCond">
            <param argument="--compoundDbType" type="select" label="compoundDbType" help="Database type for compound database to be used full database available on request - contact t.n.lawson@bham.ac.uk)." >
                <option value="sqlite" selected="true">SQLite</option>
                <option value="local_config"  >Locally configured MySQL, Postgres or SQLite database</option>
            </param>
            <when value="sqlite">
               <param argument="--compoundDbPth" type="data" label="SQLite compound database pth" format="sqlite" help=""/>
            </when>
            <when value="local_config">
            </when>
        </conditional>

    </inputs>
    <outputs>
        <data name="combined_annotations_sqlite" from_work_dir="combined_annotations.sqlite" format="sqlite" label="${tool.name} on ${on_string}: sqlite" />
        <data name="combined_annotations_tsv" from_work_dir="combined_annotations.tsv" format="tsv" label="${tool.name} on ${on_string}: tsv" />
    </outputs>
    <tests>
        <test>
            <param name="sm_resultPth" value="combinedAnnotation_input_spectralMatching.sqlite" />
            <param name="metfrag_resultPth" value="combineAnnotations_input_metfrag.tsv" />
            <param name="sirius_csi_resultPth" value="combineAnnotations_input_sirus_csifingerid.tsv" />
            <param name="probmetab_resultPth" value="combineAnnotations_input_probmetab.tsv" />
            <param name="beams_resultPth" value="combineAnnotations_input_beams.tsv" />
            <param name="compoundDbTypeCond|compoundDbPth" value="metab_compound_subset.sqlite" />
            <output name="combined_annotations_tsv" file="combineAnnotations_combined_annotations.tsv" ftype="tsv" />
            <output name="combined_annotations_sqlite" file="combineAnnotations_combined_annotations.sqlite" ftype="sqlite" compare="sim_size"/>
        </test>
    </tests>
    <help><![CDATA[
=============================================================
Combine annotation results
=============================================================
-----------
Description
-----------

Tool to combine the annotation results from msPurity spectral matching, MetFrag, Sirius CSI:FingerID and probmetab
based on weighted scores for each technique aligning each annotation by inchikey and XCMS grouped feature.

See Bioconductor documentation for more details, functions:
msPurity::combineAnnotation()

-----------
Outputs
-----------
* combined_annotation_sqlite
* combined_annotation_tsv

    ]]></help>

<expand macro="citations" />

</tool>