Mercurial > repos > immuneml > immuneml_tools
comparison immuneml_train_ml_model.xml @ 0:629e7e403e19 draft
"planemo upload commit 2fed2858d4044a3897a93a5604223d1d183ceac0-dirty"
author | immuneml |
---|---|
date | Thu, 01 Jul 2021 11:36:43 +0000 |
parents | |
children | ed3932e6d616 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:629e7e403e19 |
---|---|
1 <tool id="immuneml_train_ml_model" name="Train machine learning models" version="@VERSION@.0"> | |
2 <description></description> | |
3 <macros> | |
4 <import>prod_macros.xml</import> | |
5 </macros> | |
6 <expand macro="requirements" /> | |
7 <command><![CDATA[ | |
8 | |
9 #if $iml_input | |
10 cp -r ${iml_input.extra_files_path}/result/* . && | |
11 (mv repertoires/* . &>/dev/null || :) && | |
12 rm -rf repertoires && | |
13 #end if | |
14 | |
15 #set $input_orig_names = [] | |
16 #if $data_input | |
17 #for $input in $data_input | |
18 #set input_orig_names += [str($input.element_identifier)] | |
19 ([ -e ./"$input.element_identifier" ] && echo "File '$input.element_identifier' already exists in the input folder, skipping." || ln -s $input "$input.element_identifier") && | |
20 #end for# | |
21 #end if | |
22 | |
23 cp "$yaml_input" yaml_copy && | |
24 immune-ml ./yaml_copy ${html_outfile.files_path} --tool GalaxyTrainMLModel && | |
25 mv ${html_outfile.files_path}/index.html ${html_outfile} && | |
26 mv ${html_outfile.files_path}/exported_models/*.zip ${optimal_model} && | |
27 mv ${html_outfile.files_path}/immuneML_output.zip $archive | |
28 ]]> | |
29 </command> | |
30 <inputs> | |
31 <param name="yaml_input" type="data" format="txt" label="YAML specification" multiple="false"/> | |
32 <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."/> | |
33 <param name="iml_input" type="data" format="iml_dataset" label="Dataset input" optional="true" help="This field accepts an ImmuneML dataset, as created by the Create Dataset tool."/> | |
34 </inputs> | |
35 <outputs> | |
36 <data format="zip" name="optimal_model" label="optimal_ml_settings.zip"/> | |
37 <data format="zip" name="archive" label="Archive: ML model training"/> | |
38 <data format="html" name="html_outfile" label="Summary: ML model training"/> | |
39 </outputs> | |
40 | |
41 | |
42 <help> | |
43 <![CDATA[ | |
44 | |
45 This tool can be used to run hyperparameter optimization over several different ML settings, | |
46 which include ML models and their parameters, encodings and preprocessing steps. Nested cross-validation is used to identify the optimal combination of ML settings. | |
47 | |
48 This is a YAML-based Galaxy tool, if you prefer a button-based interface that assumes less ML knowledge, | |
49 see `Train immune receptor classifiers (easy interface) <https://galaxy.immuneml.uio.no/root?tool_id=immuneml_train_classifiers>`_ and | |
50 `Train immune repertoire classifiers (easy interface) <https://galaxy.immuneml.uio.no/root?tool_id=novice_immuneml_interface>`_. | |
51 | |
52 For more details on how to train ML models in Galaxy, see `the documentation <https://docs.immuneml.uio.no/galaxy/galaxy_train_ml_models.html>`_. | |
53 | |
54 **Tool output** | |
55 | |
56 This Galaxy tool will produce the following history elements: | |
57 | |
58 - Summary: ML model training: a HTML page that allows you to browse through all results, including prediction accuracies on | |
59 the various data splits and report results. | |
60 | |
61 - Archive: ML model training: a .zip file containing the complete output folder as it was produced by immuneML. This folder | |
62 contains the output of the TrainMLModel instruction including all trained models and their predictions, and report results. | |
63 Furthermore, the folder contains the complete YAML specification file for the immuneML run, the HTML output and a log file. | |
64 | |
65 - optimal_ml_settings.zip: a .zip file containing the raw files for the optimal trained ML settings (ML model, encoding, and | |
66 optionally preprocessing steps). This .zip file can subsequently be used as an input when `applying previously trained ML models to a new AIRR dataset in Galaxy <https://docs.immuneml.uio.no/galaxy/galaxy_apply_ml_models.html>`_. | |
67 | |
68 ]]> | |
69 | |
70 </help> | |
71 | |
72 </tool> |