Mercurial > repos > iuc > semibin_train
comparison train.xml @ 0:fe0ba89f385f draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/semibin commit aa9bfb2fb62547ee8bac34f0de5b3beaa0bfd1a4
| author | iuc |
|---|---|
| date | Fri, 14 Oct 2022 22:07:50 +0000 |
| parents | |
| children | f9f3d70127c2 |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:fe0ba89f385f |
|---|---|
| 1 <tool id="semibin_train" name="SemiBin: Train" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@"> | |
| 2 <description> | |
| 3 the semi-supervised deep learning model | |
| 4 </description> | |
| 5 <macros> | |
| 6 <import>macros.xml</import> | |
| 7 </macros> | |
| 8 <expand macro="biotools"/> | |
| 9 <expand macro="requirements"/> | |
| 10 <expand macro="version"/> | |
| 11 <command detect_errors="exit_code"><![CDATA[ | |
| 12 #import re | |
| 13 #if $mode.select == 'single' | |
| 14 #if $mode.input_fasta.ext.endswith(".gz") | |
| 15 gunzip -c '$mode.input_fasta' > 'contigs.fasta' && | |
| 16 #else | |
| 17 ln -s '$mode.input_fasta' 'contigs.fasta' && | |
| 18 #end if | |
| 19 #else | |
| 20 #for $e in $mode.input_fasta | |
| 21 #set $identifier = re.sub('[^\s\w\-\\.]', '_', str($e.element_identifier)) | |
| 22 #if $e.ext.endswith(".gz") | |
| 23 gunzip -c '$e' > '${identifier}.fasta' && | |
| 24 #else | |
| 25 ln -s '$e' '${identifier}.fasta' && | |
| 26 #end if | |
| 27 #end for | |
| 28 #end if | |
| 29 SemiBin train | |
| 30 --mode '$mode.select' | |
| 31 #if $mode.select == 'single' | |
| 32 --input-fasta 'contigs.fasta' | |
| 33 --data '$mode.data' | |
| 34 --data-split '$mode.data_split' | |
| 35 --cannot-link '$mode.cannot_link' | |
| 36 #else | |
| 37 #for $e in $mode.input_fasta | |
| 38 --input-fasta '${e.element_identifier}.fasta' | |
| 39 #end for | |
| 40 #for $e in $mode.data | |
| 41 --data '$e' | |
| 42 #end for | |
| 43 #for $e in $mode.data_split | |
| 44 --data-split '$e' | |
| 45 #end for | |
| 46 #for $e in $mode.cannot_link | |
| 47 --cannot-link '$e' | |
| 48 #end for | |
| 49 #end if | |
| 50 --output 'output' | |
| 51 --threads \${GALAXY_SLOTS:-1} | |
| 52 --epoches $epoches | |
| 53 --batch-size $batch_size | |
| 54 --random-seed $random_seed | |
| 55 #if $min_len.method == 'min-len' | |
| 56 --min-len $min_len.min_len | |
| 57 #else if $min_len.method == 'ratio' | |
| 58 --ratio $min_len.ratio | |
| 59 #end if | |
| 60 --orf-finder '$orf_finder' | |
| 61 ]]></command> | |
| 62 <inputs> | |
| 63 <conditional name="mode"> | |
| 64 <param argument="select" type="select" label="Mode to train the models"> | |
| 65 <option value="single" selected="true">From one sample</option> | |
| 66 <option value="several">From multiple samples (train model across several samples can get better pre-trained model for single-sample binning)</option> | |
| 67 </param> | |
| 68 <when value="single"> | |
| 69 <param argument="--input-fasta" type="data" format="fasta,fasta.gz" label="Contig sequences"/> | |
| 70 <param argument="--data" type="data" format="csv" label="Train data"/> | |
| 71 <param argument="--data-split" type="data" format="csv" label="Split train data"/> | |
| 72 <param argument="--cannot-link" type="data" format="txt" label="Cannot-link constraints"/> | |
| 73 </when> | |
| 74 <when value="several"> | |
| 75 <param argument="--input-fasta" type="data" multiple="true" format="fasta,fasta.gz" label="Contig sequences"/> | |
| 76 <param argument="--data" type="data" format="csv" multiple="true" label="Train data"/> | |
| 77 <param argument="--data-split" type="data" format="csv" multiple="true" label="Split train data"/> | |
| 78 <param argument="--cannot-link" type="data" format="txt" multiple="true" label="Cannot-link constraints"/> | |
| 79 </when> | |
| 80 </conditional> | |
| 81 <expand macro="min_len"/> | |
| 82 <expand macro="orf-finder"/> | |
| 83 <expand macro="random-seed"/> | |
| 84 <expand macro="epoches"/> | |
| 85 <expand macro="batch-size"/> | |
| 86 </inputs> | |
| 87 <outputs> | |
| 88 <expand macro="train_output"/> | |
| 89 </outputs> | |
| 90 <tests> | |
| 91 <test expect_num_outputs="1"> | |
| 92 <conditional name="mode"> | |
| 93 <param name="select" value="single"/> | |
| 94 <param name="input_fasta" ftype="fasta" value="input_single.fasta"/> | |
| 95 <param name="data" ftype="csv" value="data.csv"/> | |
| 96 <param name="data_split" ftype="csv" value="data_split.csv"/> | |
| 97 <param name="cannot_link" ftype="txt" value="cannot.txt"/> | |
| 98 </conditional> | |
| 99 <conditional name="min_len"> | |
| 100 <param name="method" value="min-len"/> | |
| 101 <param name="min_len" value="2500" /> | |
| 102 </conditional> | |
| 103 <param name="orf_finder" value="prodigal"/> | |
| 104 <param name="random-seed" value="0"/> | |
| 105 <param name="epoches" value="1"/> | |
| 106 <param name="batch_size" value="2048"/> | |
| 107 <output name="model" ftype="h5"> | |
| 108 <assert_contents> | |
| 109 <has_size value="3119000" delta="1000" /> | |
| 110 </assert_contents> | |
| 111 </output> | |
| 112 </test> | |
| 113 <test expect_num_outputs="1"> | |
| 114 <conditional name="mode"> | |
| 115 <param name="select" value="several"/> | |
| 116 <param name="input_fasta" ftype="fasta" value="input_single.fasta,input_single_2.fasta,input_single_3.fasta"/> | |
| 117 <param name="data" ftype="csv" value="data.csv,data.csv,data.csv"/> | |
| 118 <param name="data_split" ftype="csv" value="data_split.csv,data_split.csv,data_split.csv"/> | |
| 119 <param name="cannot_link" ftype="txt" value="cannot.txt,cannot.txt,cannot.txt"/> | |
| 120 </conditional> | |
| 121 <conditional name="min_len"> | |
| 122 <param name="method" value="ratio"/> | |
| 123 <param name="ratio" value="0.05" /> | |
| 124 </conditional> | |
| 125 <param name="orf_finder" value="prodigal"/> | |
| 126 <param name="random-seed" value="0"/> | |
| 127 <param name="epoches" value="20"/> | |
| 128 <param name="batch_size" value="2048"/> | |
| 129 <output name="model" ftype="h5"> | |
| 130 <assert_contents> | |
| 131 <has_size value="3119000" delta="1000" /> | |
| 132 </assert_contents> | |
| 133 </output> | |
| 134 </test> | |
| 135 </tests> | |
| 136 <help><![CDATA[ | |
| 137 @HELP_HEADER@ | |
| 138 | |
| 139 This tool trains the semi-supervised deep learning model | |
| 140 | |
| 141 Inputs | |
| 142 ====== | |
| 143 | |
| 144 @HELP_INPUT_FASTA@ | |
| 145 @HELP_CANNOT@ | |
| 146 @HELP_DATA@ | |
| 147 | |
| 148 Outputs | |
| 149 ======= | |
| 150 | |
| 151 @HELP_MODEL@ | |
| 152 ]]></help> | |
| 153 <expand macro="citations"/> | |
| 154 </tool> |
