Mercurial > repos > iuc > semibin_train
comparison train.xml @ 3:be96c5251f2d draft default tip
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/semibin commit 2c08a2e49a2844efe92340c5a9e9c8323e4a33d6
| author | iuc |
|---|---|
| date | Tue, 28 Oct 2025 08:17:27 +0000 |
| parents | 35c4a1990ba2 |
| children |
comparison
equal
deleted
inserted
replaced
| 2:35c4a1990ba2 | 3:be96c5251f2d |
|---|---|
| 9 <expand macro="requirements"/> | 9 <expand macro="requirements"/> |
| 10 <expand macro="version"/> | 10 <expand macro="version"/> |
| 11 <command detect_errors="exit_code"><![CDATA[ | 11 <command detect_errors="exit_code"><![CDATA[ |
| 12 #import re | 12 #import re |
| 13 #if $mode.select == 'single' | 13 #if $mode.select == 'single' |
| 14 #if $mode.input_fasta.ext.endswith(".gz") | 14 ln -s '$mode.input_fasta' 'contigs.$input_fasta.ext' && |
| 15 gunzip -c '$mode.input_fasta' > 'contigs.fasta' && | |
| 16 #else | |
| 17 ln -s '$mode.input_fasta' 'contigs.fasta' && | |
| 18 #end if | |
| 19 #else | 15 #else |
| 20 #for $e in $mode.input_fasta | 16 #for $e in $mode.input_fasta |
| 21 #set $identifier = re.sub('[^\s\w\-\\.]', '_', str($e.element_identifier)) | 17 #set $identifier = re.sub('[^\s\w\-]', '_', str($e.element_identifier)) |
| 22 #if $e.ext.endswith(".gz") | 18 ln -s '$e' '${identifier}.$e.ext' && |
| 23 gunzip -c '$e' > '${identifier}.fasta' && | |
| 24 #else | |
| 25 ln -s '$e' '${identifier}.fasta' && | |
| 26 #end if | |
| 27 #end for | 19 #end for |
| 28 #end if | 20 #end if |
| 29 SemiBin2 train_semi | 21 SemiBin2 train_semi |
| 30 #if $mode.select == 'single' | 22 #if $mode.select == 'single' |
| 31 --input-fasta 'contigs.fasta' | 23 --input-fasta 'contigs.$input_fasta.ext' |
| 32 --data '$mode.data' | 24 --data '$mode.data' |
| 33 --data-split '$mode.data_split' | 25 --data-split '$mode.data_split' |
| 34 --cannot-link '$mode.cannot_link' | 26 --cannot-link '$mode.cannot_link' |
| 35 #else | 27 #else |
| 36 --train-from-many | 28 --train-from-many |
| 29 --input-fasta | |
| 37 #for $e in $mode.input_fasta | 30 #for $e in $mode.input_fasta |
| 38 --input-fasta '${e.element_identifier}.fasta' | 31 #set $identifier = re.sub('[^\s\w\-]', '_', str($e.element_identifier)) |
| 32 '${identifier}.$e.ext' | |
| 39 #end for | 33 #end for |
| 34 --data | |
| 40 #for $e in $mode.data | 35 #for $e in $mode.data |
| 41 --data '$e' | 36 '$e' |
| 42 #end for | 37 #end for |
| 38 --data-split | |
| 43 #for $e in $mode.data_split | 39 #for $e in $mode.data_split |
| 44 --data-split '$e' | 40 '$e' |
| 45 #end for | 41 #end for |
| 42 --cannot-link | |
| 46 #for $e in $mode.cannot_link | 43 #for $e in $mode.cannot_link |
| 47 --cannot-link '$e' | 44 '$e' |
| 48 #end for | 45 #end for |
| 49 #end if | 46 #end if |
| 50 --output 'output' | 47 --output 'output' |
| 51 --threads \${GALAXY_SLOTS:-1} | 48 --threads \${GALAXY_SLOTS:-1} |
| 52 --epoches $epoches | 49 --epoches $epoches |
| 64 <param argument="select" type="select" label="Mode to train the models"> | 61 <param argument="select" type="select" label="Mode to train the models"> |
| 65 <option value="single" selected="true">From one sample</option> | 62 <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> | 63 <option value="several">From multiple samples (train model across several samples can get better pre-trained model for single-sample binning)</option> |
| 67 </param> | 64 </param> |
| 68 <when value="single"> | 65 <when value="single"> |
| 69 <param argument="--input-fasta" type="data" format="fasta,fasta.gz" label="Contig sequences"/> | 66 <param argument="--input-fasta" type="data" format="fasta,fasta.gz,fasta.bz2" label="Contig sequences"/> |
| 70 <param argument="--data" type="data" format="csv" label="Train data"/> | 67 <param argument="--data" type="data" format="csv" label="Train data"/> |
| 71 <param argument="--data-split" type="data" format="csv" label="Split train data"/> | 68 <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"/> | 69 <param argument="--cannot-link" type="data" format="txt" label="Cannot-link constraints"/> |
| 73 </when> | 70 </when> |
| 74 <when value="several"> | 71 <when value="several"> |
| 75 <param argument="--input-fasta" type="data" multiple="true" format="fasta,fasta.gz" label="Contig sequences"/> | 72 <param argument="--input-fasta" type="data" multiple="true" format="fasta,fasta.gz,fasta.bz2" label="Contig sequences"/> |
| 76 <param argument="--data" type="data" format="csv" multiple="true" label="Train data"/> | 73 <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"/> | 74 <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"/> | 75 <param argument="--cannot-link" type="data" format="txt" multiple="true" label="Cannot-link constraints"/> |
| 79 </when> | 76 </when> |
| 80 </conditional> | 77 </conditional> |
| 90 <tests> | 87 <tests> |
| 91 <test expect_num_outputs="1"> | 88 <test expect_num_outputs="1"> |
| 92 <conditional name="mode"> | 89 <conditional name="mode"> |
| 93 <param name="select" value="single"/> | 90 <param name="select" value="single"/> |
| 94 <param name="input_fasta" ftype="fasta" value="input_single.fasta"/> | 91 <param name="input_fasta" ftype="fasta" value="input_single.fasta"/> |
| 92 <param name="data" ftype="csv" value="data.csv"/> | |
| 93 <param name="data_split" ftype="csv" value="data_split.csv"/> | |
| 94 <param name="cannot_link" ftype="txt" value="cannot.txt"/> | |
| 95 </conditional> | |
| 96 <conditional name="min_len"> | |
| 97 <param name="method" value="min-len"/> | |
| 98 <param name="min_len" value="2500" /> | |
| 99 </conditional> | |
| 100 <param name="orf_finder" value="prodigal"/> | |
| 101 <param name="random_seed" value="0"/> | |
| 102 <param name="epoches" value="1"/> | |
| 103 <param name="batch_size" value="2048"/> | |
| 104 <output name="model" ftype="h5"> | |
| 105 <assert_contents> | |
| 106 <has_size value="3119000" delta="2000" /> | |
| 107 </assert_contents> | |
| 108 </output> | |
| 109 </test> | |
| 110 <test expect_num_outputs="1"> | |
| 111 <conditional name="mode"> | |
| 112 <param name="select" value="single"/> | |
| 113 <param name="input_fasta" ftype="fasta.bz2" value="input_single.fasta.bz2"/> | |
| 114 <param name="data" ftype="csv" value="data.csv"/> | |
| 115 <param name="data_split" ftype="csv" value="data_split.csv"/> | |
| 116 <param name="cannot_link" ftype="txt" value="cannot.txt"/> | |
| 117 </conditional> | |
| 118 <conditional name="min_len"> | |
| 119 <param name="method" value="min-len"/> | |
| 120 <param name="min_len" value="2500" /> | |
| 121 </conditional> | |
| 122 <param name="orf_finder" value="prodigal"/> | |
| 123 <param name="random_seed" value="0"/> | |
| 124 <param name="epoches" value="1"/> | |
| 125 <param name="batch_size" value="2048"/> | |
| 126 <output name="model" ftype="h5"> | |
| 127 <assert_contents> | |
| 128 <has_size value="3119000" delta="2000" /> | |
| 129 </assert_contents> | |
| 130 </output> | |
| 131 </test> | |
| 132 <test expect_num_outputs="1"> | |
| 133 <conditional name="mode"> | |
| 134 <param name="select" value="single"/> | |
| 135 <param name="input_fasta" ftype="fasta.gz" value="input_single.fasta.gz"/> | |
| 95 <param name="data" ftype="csv" value="data.csv"/> | 136 <param name="data" ftype="csv" value="data.csv"/> |
| 96 <param name="data_split" ftype="csv" value="data_split.csv"/> | 137 <param name="data_split" ftype="csv" value="data_split.csv"/> |
| 97 <param name="cannot_link" ftype="txt" value="cannot.txt"/> | 138 <param name="cannot_link" ftype="txt" value="cannot.txt"/> |
| 98 </conditional> | 139 </conditional> |
| 99 <conditional name="min_len"> | 140 <conditional name="min_len"> |
