Mercurial > repos > thanhlv > seqsero2
comparison seqsero2.xml @ 0:93ef4c70ce5f draft default tip
"planemo upload for repository https://github.com/quadram-institute-bioscience/galaxy-tools/tree/master/tools/seqsero2 commit 8b41cf1161ac0f0836f5597167911596b0cfa27e-dirty"
| author | thanhlv |
|---|---|
| date | Fri, 12 Nov 2021 14:56:56 +0000 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:93ef4c70ce5f |
|---|---|
| 1 <tool id="seqsero2" name="SeqSero2" version="@VERSION@+galaxy0"> | |
| 2 <description> Salmonella serotype prediction</description> | |
| 3 <macros> | |
| 4 <token name="@VERSION@">1.2.1</token> | |
| 5 </macros> | |
| 6 <requirements> | |
| 7 <requirement type="package" version="@VERSION@">seqsero2</requirement> | |
| 8 </requirements> | |
| 9 <version_command>SeqSero2_package.py -v</version_command> | |
| 10 <command detect_errors="exit_code"><![CDATA[ | |
| 11 #import re | |
| 12 #set $seqsero_input = '' | |
| 13 #set $seqsero_t_value = '' | |
| 14 #if $inputs.input_type == 'paired': | |
| 15 #if $inputs.R1.is_of_type('fastqsanger', 'fastq'): | |
| 16 #set $ext = 'fastq' | |
| 17 #elif $inputs.R1.is_of_type('fastqsanger.gz'): | |
| 18 #set $ext = 'fastq.gz' | |
| 19 #elif $inputs.R1.is_of_type('fastq'): | |
| 20 #set $ext = 'fastq' | |
| 21 #elif $inputs.R1.is_of_type('fastq.gz'): | |
| 22 #set $ext = 'fastq.gz' | |
| 23 #elif $inputs.R1.is_of_type('fasta.gz'): | |
| 24 #set $ext = 'fasta.gz' | |
| 25 #elif $inputs.R1.is_of_type('fasta'): | |
| 26 #set $ext = 'fasta' | |
| 27 #end if | |
| 28 #set $safename_R1 = re.sub('[^\w\-_\.]', '_', $inputs.R1.element_identifier) | |
| 29 #set $safename_R2 = re.sub('[^\w\-_\.]', '_', $inputs.R2.element_identifier) | |
| 30 ln -fs '$inputs.R1' $safename_R1.$ext && | |
| 31 ln -fs '$inputs.R2' $safename_R2.$ext && | |
| 32 #set $seqsero_input = $safename_R1 + '.' + $ext + ' ' + $safename_R2 + '.' + $ext | |
| 33 #set $seqsero_t_value = '2' | |
| 34 #elif $inputs.input_type == 'collection': | |
| 35 #for $input in $inputs.input_collection | |
| 36 #if $input.forward.is_of_type('fastqsanger', 'fastq'): | |
| 37 #set $ext = 'fastq' | |
| 38 #elif $input.forward.is_of_type('fastqsanger.gz'): | |
| 39 #set $ext = 'fastq.gz' | |
| 40 #elif $input.forward.is_of_type('fastq'): | |
| 41 #set $ext = 'fastq' | |
| 42 #elif $input.forward.is_of_type('fastq.gz'): | |
| 43 #set $ext = 'fastq.gz' | |
| 44 #elif $input.forward.is_of_type('fasta.gz'): | |
| 45 #set $ext = 'fasta.gz' | |
| 46 #elif $input.forward.is_of_type('fasta'): | |
| 47 #set $ext = 'fasta' | |
| 48 #end if | |
| 49 #set $safename_fwd = re.sub('[^\w\-_\.]', '_', $input.forward.element_identifier) | |
| 50 ln -fs '$input.forward' $safename_fwd.$ext && | |
| 51 #set $safename_rvs = re.sub('[^\w\-_\.]', '_', $input.reverse.element_identifier) | |
| 52 ln -fs '$input.reverse' $safename_rvs.$ext && | |
| 53 #set $seqsero_input = $safename_fwd+ '.' + $ext + ' ' + $safename_rvs + '.' + $ext | |
| 54 #set $seqsero_t_value = '2' | |
| 55 #end for | |
| 56 #elif $inputs.input_type == 'assembly': | |
| 57 #if $inputs.contigs.is_of_type('fasta.gz'): | |
| 58 #set $ext = 'fasta.gz' | |
| 59 #elif $inputs.contigs.is_of_type('fasta'): | |
| 60 #set $ext = 'fasta' | |
| 61 #end if | |
| 62 #set $safename_seq = re.sub('[^\w\-_\.]', '_', $contigs.element_identifier) | |
| 63 ln -fs '$contigs' $safename_seq.$ext && | |
| 64 #set $seqsero_input = $safename_seq + '.' + $ext | |
| 65 #set $seqsero_t_value = '4' | |
| 66 #elif $inputs.input_type == 'single': | |
| 67 #if $inputs.single.is_of_type('fastqsanger', 'fastq'): | |
| 68 #set $ext = 'fastq' | |
| 69 #elif $inputs.single.is_of_type('fastqsanger.gz'): | |
| 70 #set $ext = 'fastq.gz' | |
| 71 #elif $inputs.single.is_of_type('fastq'): | |
| 72 #set $ext = 'fastq' | |
| 73 #elif $inputs.single.is_of_type('fastq.gz'): | |
| 74 #set $ext = 'fastq.gz' | |
| 75 #elif $inputs.single.is_of_type('fasta.gz'): | |
| 76 #set $ext = 'fasta.gz' | |
| 77 #elif $inputs.single.is_of_type('fasta'): | |
| 78 #set $ext = 'fasta' | |
| 79 #end if | |
| 80 #set $safename_seq = re.sub('[^\w\-_\.]', '_', $single.element_identifier) | |
| 81 ln -fs '$single' $safename_seq.$ext && | |
| 82 #set $seqsero_input = $safename_seq + '.' + $ext | |
| 83 #set $seqsero_t_value = '3' | |
| 84 #elif $inputs.input_type == 'nanopore': | |
| 85 #if $inputs.nanopore.is_of_type('fastqsanger', 'fastq'): | |
| 86 #set $ext = 'fastq' | |
| 87 #elif $inputs.nanopore.is_of_type('fastqsanger.gz'): | |
| 88 #set $ext = 'fastq.gz' | |
| 89 #elif $inputs.nanopore.is_of_type('fastq'): | |
| 90 #set $ext = 'fastq' | |
| 91 #elif $inputs.nanopore.is_of_type('fastq.gz'): | |
| 92 #set $ext = 'fastq.gz' | |
| 93 #elif $inputs.nanopore.is_of_type('fasta.gz'): | |
| 94 #set $ext = 'fasta.gz' | |
| 95 #elif $inputs.nanopore.is_of_type('fasta'): | |
| 96 #set $ext = 'fasta' | |
| 97 #end if | |
| 98 #set $safename_seq = re.sub('[^\w\-_\.]', '_', $nanopore.element_identifier) | |
| 99 ln -fs '$nanopore' $safename_seq.$ext && | |
| 100 #set $seqsero_input = $safename_seq + '.' + $ext | |
| 101 #set $seqsero_t_value = '5' | |
| 102 #end if | |
| 103 | |
| 104 SeqSero2_package.py | |
| 105 -m $workflow | |
| 106 -t $seqsero_t_value | |
| 107 -i $seqsero_input | |
| 108 -p \${GALAXY_SLOTS:-4} | |
| 109 -d output | |
| 110 ]]> </command> | |
| 111 <inputs> | |
| 112 <conditional name="inputs"> | |
| 113 <param name="input_type" type="select" label="Input type" help="Select 'paired end' reads or 'sequence' for genomes/contigs"> | |
| 114 <option value="paired">Paired End</option> | |
| 115 <option value="collection">Collection</option> | |
| 116 <option value="assembly">Contigs</option> | |
| 117 <option value="single">Interleaved</option> | |
| 118 <option value="nanopore">Nanopore reads</option> | |
| 119 </param> | |
| 120 <when value="paired"> | |
| 121 <param name="R1" type="data" format="fastqsanger,fastqsanger.gz" label="Forward reads (R1)" help="The file of forward reads in FASTQ format"/> | |
| 122 <param name="R2" type="data" format="fastqsanger,fastqsanger.gz" label="Reverse reads (R2)" help="The file of reverse reads in FASTQ format"/> | |
| 123 </when> | |
| 124 <when value="collection"> | |
| 125 <param name="input_collection" format="fastqsanger" type="data_collection" collection_type="list:paired" label="Paired collection"/> | |
| 126 </when> | |
| 127 <when value="single"> | |
| 128 <param name="single" type="data" format="fastqsanger,fastqsanger.gz" multiple="false" label="Interleaved" /> | |
| 129 </when> | |
| 130 <when value="nanopore"> | |
| 131 <param name="nanopore" type="data" format="fastqsanger,fastqsanger.gz" multiple="false" label="Nanopore reads" /> | |
| 132 </when> | |
| 133 <when value="assembly"> | |
| 134 <param name="contigs" type="data" format="fasta" multiple="false" label="Contigs/genomes" /> | |
| 135 </when> | |
| 136 </conditional> | |
| 137 <param label="Workflow" type="select" name="workflow"> | |
| 138 <option value="a">allele</option> | |
| 139 <option value="k" selected="true">k-mer</option> | |
| 140 </param> | |
| 141 </inputs> | |
| 142 <outputs> | |
| 143 <data name="results" format="tabular" label="${tool.name} on ${on_string} Results" from_work_dir="output/SeqSero_result.tsv"/> | |
| 144 <data name="log" format="txt" label="${tool.name} on ${on_string} Log" from_work_dir="output/SeqSero_log.txt"/> | |
| 145 | |
| 146 </outputs> | |
| 147 <tests> | |
| 148 <test> | |
| 149 <param name="input_type" value="assembly" /> | |
| 150 <param name="contigs" value="CP009102.1.fasta" ftype="fasta" /> | |
| 151 <output name="results"> | |
| 152 <assert_contents> | |
| 153 <has_text text="Salmonella enterica subspecies enterica (subspecies I)" /> | |
| 154 <has_text text="Typhimurium" /> | |
| 155 </assert_contents> | |
| 156 </output> | |
| 157 </test> | |
| 158 <!-- TODO: Test for fastq files --> | |
| 159 </tests> | |
| 160 <help><![CDATA[ | |
| 161 | |
| 162 **Usage: SeqSero2_package.py** | |
| 163 | |
| 164 -m <string> (which workflow to apply, 'a'(raw reads allele micro-assembly), 'k'(raw reads and genome assembly k-mer), default=a) | |
| 165 | |
| 166 -t <string> (input data type, '1' for interleaved paired-end reads, '2' for separated paired-end reads, '3' for single reads, '4' for genome assembly, '5' for nanopore reads (fasta/fastq)) | |
| 167 | |
| 168 -i <file> (/path/to/input/file) | |
| 169 | |
| 170 -p <int> (number of threads for allele mode, if p >4, only 4 threads will be used for assembly since the amount of extracted reads is small, default=1) | |
| 171 | |
| 172 -b <string> (algorithms for bwa mapping for allele mode; 'mem' for mem, 'sam' for samse/sampe; default=mem; optional; for now we only optimized for default "mem" mode) | |
| 173 | |
| 174 -d <string> (output directory name) | |
| 175 | |
| 176 -c <flag> (if '-c' was flagged, SeqSero2 will only output serotype prediction without the directory containing log files) | |
| 177 | |
| 178 -n <string> (optional, to specify a sample name in the report output) | |
| 179 | |
| 180 -s <flag> (if '-s' was flagged, SeqSero2 will not output header in `SeqSero_result.tsv`) | |
| 181 | |
| 182 --check <flag> (use '--check' flag to check the required dependencies) | |
| 183 | |
| 184 -v, --version (show program's version number and exit) | |
| 185 | |
| 186 ----- | |
| 187 | |
| 188 _`Document`: https://github.com/denglab/SeqSero2 | |
| 189 | |
| 190 ]]></help> | |
| 191 <citations> | |
| 192 <citation type="bibtex"> | |
| 193 @misc{zhang_yin_jones_zhang_deathrage_dinsmore_fitzgeral_fields_deng_2015, title={Salmonella serotype determination utilizing high-throughput genome sequencing data.}, journal={J Clin Microbiol}, publisher={ASM}, author={Zhang S, Yin Y, Jones MB, Zhang Z, Deatherage Kaiser BL, Dinsmore BA, Fitzgerald C, Fields PI, Deng X.}, year={2015}, month={Max}, url={http://http://jcm.asm.org/content/early/2015/03/05/JCM.00323-15}}, | |
| 194 }</citation> | |
| 195 <citation type="bibtex"> | |
| 196 @misc{cfsan_biostatistics_group_2017, title={CFSAN Biostatistics Group fork of SeqSero2}, url={https://github.com/CFSAN-Biostatistics/SeqSero2.git}}, | |
| 197 </citation> | |
| 198 </citations> | |
| 199 | |
| 200 </tool> |
