view immuneml_yaml.xml @ 18:697c2b98a466 draft

"planemo upload commit baf8a7b46ce256e676d2c14b18ab58ee6f5b3cca-dirty"
author immuneml
date Thu, 17 Mar 2022 16:38:38 +0000
parents cd57c1c66f8b
children
line wrap: on
line source

<tool id="immune_ml" name="Run immuneML with any YAML specification" version="@VERSION@.0">
  <description></description>
    <macros>
        <import>prod_macros.xml</import>
    </macros>
    <expand macro="requirements" />
  <command><![CDATA[

      #if $iml_input
         cp -r ${iml_input.extra_files_path}/result/* . &&
	 (mv repertoires/* . &>/dev/null || :) &&
	 rm -rf repertoires &&
      #end if

      #set $input_orig_names = []
      #if $data_input
          #for $input in $data_input
             #set input_orig_names += [str($input.element_identifier)]
             ([ -e ./"$input.element_identifier" ] && echo "File '$input.element_identifier' already exists in the input folder, skipping." || ln -s $input "$input.element_identifier") &&
          #end for#
      #end if

      cp "$yaml_input" yaml_copy &&
      immune-ml ./yaml_copy ${html_outfile.files_path} --tool GalaxyYamlTool &&
      mv ${html_outfile.files_path}/index.html ${html_outfile} && 
      mv ${html_outfile.files_path}/immuneML_output.zip $archive

      ]]>
  </command>
  <inputs>
      <param name="iml_input" type="data"  format="immuneml_receptors" label="immuneML dataset" optional="true" help="This field accepts ImmuneML datasets, as created by the Create Dataset tool."/>
      <param name="yaml_input" type="data" format="txt" label="YAML specification" multiple="false"/>
      <param name="data_input" type="data" multiple="true" label="Additional files" optional="true" help="This field should include individual repertoire files, metadata files, receptor data and others."/>
  </inputs>
    <outputs>
        <data format="zip" name="archive" label="Archive: immuneML Analysis"/>
        <data format="html" name="html_outfile" label="Summary: immuneML analysis"/>
    </outputs>


      <help><![CDATA[


        This Galaxy tool can be used to run any possible YAML-based immuneML analysis in Galaxy.

        It is typically recommended to use the analysis-specific Galaxy tools for
        `creating datasets <root?tool_id=immune_ml_dataset>`_,
        `simulating synthetic data <root?tool_id=immuneml_simulate_dataset>`_,
        `implanting synthetic immune signals <root?tool_id=immuneml_simulation>`_ or
        `training <root?tool_id=immuneml_train_ml_model>`_ ML models instead of this tool.
        These other tools are able to export the relevant output files to Galaxy history elements.

        However, when you want to run the `ExploratoryAnalysis <https://docs.immuneml.uio.no/latest/specification.html#exploratoryanalysis>`_ instruction,
        or other analyses that do not have a corresponding Galaxy tool, this generic tool can be used.

        For the exhaustive documentation of this tool and an example YAML specification for exploratory analysis, see the tutorial `How to run any AIRR ML analysis in Galaxy <https://docs.immuneml.uio.no/latest/galaxy/galaxy_general_yaml.html>`_.


        **Tool output**

        This Galaxy tool will produce the following history elements:

        - Summary: immuneML analysis: a HTML page that allows you to browse through all results.

        - ImmuneML Analysis Archive: a .zip file containing the complete output folder as it was produced by immuneML. This folder
          contains the output of the instruction that was used, including all raw data files.
          Furthermore, the folder contains the complete YAML specification file for the immuneML run, the HTML output and a log file.


    ]]>
    </help>

</tool>