view isoplot.xml @ 0:8b54f922377a draft

"planemo upload for repository https://github.com/llegregam/Isoplot/tree/main commit 091a7a9b697ca1638cdc3fc13003f0cb4430e06e"
author workflow4metabolomics
date Fri, 03 Sep 2021 08:01:12 +0000
parents
children dd3e046a72ad
line wrap: on
line source

<tool id='isoplot' name='Isoplot: Generate plots from isocor output' version='1.3.0+galaxy0' profile='20.01'>
    <requirements>
        <requirement type='package' version='1.3.0'>isoplot</requirement>
    </requirements>
    <command><![CDATA[
         isoplot '$datafile' 'galaxy' '$format' --value '$value' --template '$template_file' $SP.barplot $SP.meaned_barplot 
         $SP.static_heatmap $SP.static_clustermap $IP.interactive_barplot $IP.interactive_meanplot $IP.interactive_heatmap
#if $unstack:
    -s
#end if
#if $verbosity:
    -v
#end if
#if $annotation:
    -a
#end if
-g -z '$plots_output' > $data_output 2> '$log_output'
    ]]></command>
    <inputs>
        <param name='datafile' type='data' format='csv, tabular' multiple='true' label='Upload data that has been corrected by Isocor (.tsv format)' />
        <param name='template_file' type='data' format='csv, xlsx' multiple='true' label='Upload template file containing plot metadata (.xlsx format)' argument='--template'/>
        <!--param name='run_name' type='text' label='Run name' /-->
        <param name='format' type='select' label='Plot format'>
            <option value='pdf'>pdf</option>
            <option value='jpeg'>jpeg</option>
            <option value='png'>png</option>
            <option value='svg'>svg</option>
            <option value='html'>html</option>
        </param>
        <param name='value' type='select' label='Data to plot' >
            <option value='corrected_area'>Corrected Area</option>
            <option value='isotopologue_fraction'>Isotopologue Fraction</option>
            <option value='mean_enrichment'>Mean Enrichment</option>
        </param>
        <section name='SP' title='Select static plots to generate'>
            <param type='boolean' argument='--barplot' label='Flag to generate barplots' truevalue='-bp' falsevalue=''/>
            <param type='boolean' argument='--meaned_barplot' label='Flag to generate meaned barplots' truevalue='-mb' falsevalue=''/>
            <!--<param type='boolean' name='generate_areaplot' label='Flag to generate stacked area plots'
                   argument='-sa' optional='true'/>/-->
            <param type='boolean' argument='--static_heatmap' label='Flag to generate heatmap' truevalue='-hm' falsevalue=''/>
            <param type='boolean' argument='--static_clustermap' label='Flag to generate clustermap' truevalue='-cm' falsevalue=''/>
        </section>
        <section name='IP' title='Select interactive plots to generate'>
            <param type='boolean' argument='--interactive_barplot' label='Flag to generate barplots' truevalue='-IB' falsevalue=''/>
            <param type='boolean' argument='--interactive_meanplot' label='Flag to generate meaned barplots' truevalue='-IM' falsevalue=''/>
           <!-- <param type='boolean' name='generate_areaplot' label='Flag to generate stacked area plots' argument='-IS'
                   optional='true'/>-->
            <param type='boolean' argument='--interactive_heatmap' label='Flag to generate heatmap' truevalue='-HM' falsevalue=''/>
        </section>
        <param type='boolean' name='unstack' label='Flag to unstack bars in barplots' truevalue='-s' falsevalue=''/>
        <param type='boolean' name='verbosity' label='Flag to get debug information' truevalue='-v' falsevalue=''/>
        <param type='boolean' name='annotation' label='Flag to add annotations on the maps' truevalue='-a' falsevalue=''/>
    </inputs>
    
    <outputs>
        <data name='data_output' format='csv' label='Formatted data used for plotting' />
        <data name='plots_output' format='zip' label='Resulting plots' />
        <data name='log_output' format='txt' label='Run Info' />
    </outputs>
    
    <tests>
        <test>
    	  <param name='datafile' value='input_data.csv' />
    	  <param name='template_file' value='input_template.xlsx'/>
    	  <param name='format' value='pdf' />
    	  <param name='value' value='isotopologue_fraction' />
    	  <section name='SP' >
    	   <param name='barplot' value='true' />
    	  </section>
    	  <section name='IP' >
    	   <param name='interactive_barplot' value='true' />
    	  </section>
          <output name='data_output' file='data_out.csv'/>
          <output name='plots_output'>
            <assert_contents>
                <has_size value='2852573' delta='1000' />
            </assert_contents>
            </output>
    	  <output name='log_output'>
            <assert_contents>
                <has_text text='- isoplot_log.main.cli_process - INFO - Plots created. Run is terminated' />
            </assert_contents>
          </output>
        </test>
    </tests>  
    
    <help><![CDATA[

.. class:: warningmark

 We strongly encourage you to read the `documentation <https://isoplot.readthedocs.io/en/latest/>`_ before using Isoplot.

Isoplot2: Plotting isotopic labelling MS data
=============================================

**Positional arguments:**

  input_path		Path to datafile
  run_name              Name of the current run
  format                Format of generated file

**optional arguments:**
  -h, --help            show this help message and exit
  --value		Choices: "corrected_area", "isotopologue_fraction", "mean_enrichment". Select values to plot. This option can be given multiple times

  -m METABOLITE         Metabolite(s) to plot. For all, type in 'all'                        
  -c CONDITION          Condition(s) to plot. For all, type in 'all'
  -t TIME               Time(s) to plot. For all, type in 'all'
  -tp, --template TEMPLATE_PATH     Path to template file

  -sa, --stacked_areaplot  Create static stacked areaplot
  -bp, --barplot           Create static barplot
  -mb, --meaned_barplot    Create static barplot with meaned replicates

  -IB, --interactive_barplot		Create interactive stacked barplot
  -IM, --interactive_stacked_meanplot		Create interactive stacked barplot with meaned replicates
  -IS, --interactive_areaplot		Create interactive stacked areaplot
  -hm, --static_heatmap		Create a static heatmap using mean enrichment data
  -cm, --static_clustermap		Create a static heatmap with clustering using mean enrichment data
  -HM, --interactive_heatmap		Create interactive heatmap using mean enrichment data

  -s, --stack           Add option if barplots should be unstacked
  -v, --verbose         Turns logger to debug mode
  -a, --annot           Add option if annotations should be added on maps

    ]]></help>
    <citations>
        <citation type='bibtex'>
    @misc{githubisoplot,
      author = {Le Gregam, Loic},
      year = {2021},
      title = {isoplot},
      publisher = {GitHub},
      journal = {GitHub repository},
      url = {https://github.com/llegregam},
    }</citation>
        </citations>
    </tool>