comparison lotus2.xml @ 8:0fddee8b1f7e draft

"planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/master/tools/lotus2 commit bdade08328554140c46dd473081787773644c11c"
author earlhaminst
date Tue, 08 Jun 2021 02:17:42 +0000
parents 692832801d70
children 82ff4f47436a
comparison
equal deleted inserted replaced
7:692832801d70 8:0fddee8b1f7e
39 </requirements> 39 </requirements>
40 <version_command>lotus2 --version</version_command> 40 <version_command>lotus2 --version</version_command>
41 <command detect_errors="exit_code"><![CDATA[ 41 <command detect_errors="exit_code"><![CDATA[
42 #import os.path 42 #import os.path
43 #import re 43 #import re
44 #def symlink_basename($f): 44 #def symlink_basename($f, $f_ext):
45 #set $fn = re.sub('[^\w\-_.]', '_', $f.element_identifier) 45 #set $fn = re.sub('[^\w\-_.]', '_', $f.element_identifier)
46 #if $fn.endswith('.gz'): 46 #if $fn.endswith('.gz'):
47 #set $fn = $fn[:-3] 47 #set $fn = $fn[:-3]
48 #end if 48 #end if
49 #if $f.ext.startswith('fastqsanger'): 49 #if $f_ext.startswith('fastq'):
50 #set $exts_to_drop = ('.fq', '.fastq', '.fastqsanger') 50 #set $exts_to_drop = ('.fq', '.fastq', '.fastqsanger')
51 #elif $f.ext.startswith('fasta'): 51 #elif $f_ext.startswith('fasta'):
52 #set $exts_to_drop = ('.fa', '.fasta', '.fna') 52 #set $exts_to_drop = ('.fa', '.fasta', '.fna')
53 #else 53 #else
54 #set $exts_to_drop = [] 54 #set $exts_to_drop = []
55 #end if 55 #end if
56 #for $ext in $exts_to_drop: 56 #for $ext in $exts_to_drop:
65 mkdir input 65 mkdir input
66 && 66 &&
67 #if $inputs.paired_or_single == 'single': 67 #if $inputs.paired_or_single == 'single':
68 #for $f in $inputs.input: 68 #for $f in $inputs.input:
69 #set $ext = $f.ext.replace('sanger', '') 69 #set $ext = $f.ext.replace('sanger', '')
70 ln -s '$f' 'input/${symlink_basename(f)}.${ext}' && 70 ln -s '$f' 'input/${symlink_basename($f, $ext)}.${ext}' &&
71 #end for 71 #end for
72 #elif $inputs.paired_or_single == 'paired': 72 #elif $inputs.paired_or_single == 'paired':
73 #for i, f in enumerate($inputs.left_input): 73 #for i, f in enumerate($inputs.left_input):
74 #set ext = $f.ext.replace('sanger', '') 74 #set ext = $f.ext.replace('sanger', '')
75 ln -s '$f' 'input/input${i}.1.${ext}' && 75 ln -s '$f' 'input/input${i}.1.${ext}' &&
79 ln -s '$f' 'input/input${i}.2.${ext}' && 79 ln -s '$f' 'input/input${i}.2.${ext}' &&
80 #end for 80 #end for
81 #else: 81 #else:
82 #for $f in $inputs.pair_input: 82 #for $f in $inputs.pair_input:
83 #set $ext = $f.forward.ext.replace('sanger', '') 83 #set $ext = $f.forward.ext.replace('sanger', '')
84 ln -s '$f.forward' 'input/${symlink_basename(f)}.1.${ext}' && 84 ln -s '$f.forward' 'input/${symlink_basename($f, $ext)}.1.${ext}' &&
85 #set $ext = $f.reverse.ext.replace('sanger', '') 85 #set $ext = $f.reverse.ext.replace('sanger', '')
86 ln -s '$f.reverse' 'input/${symlink_basename(f)}.2.${ext}' && 86 ln -s '$f.reverse' 'input/${symlink_basename($f, $ext)}.2.${ext}' &&
87 #end for 87 #end for
88 #end if 88 #end if
89 89
90 #if $tax_args.aligner_cond.taxAligner not in ('0', '3') and $tax_args.aligner_cond.refDB_cond.refDB == 'history': 90 #if $tax_args.aligner_cond.taxAligner not in ('0', '3') and $tax_args.aligner_cond.refDB_cond.refDB == 'history':
91 #set $ref_fasta_symlink = $symlink_basename($tax_args.aligner_cond.refDB_cond.ref_fasta) + '.' + $tax_args.aligner_cond.refDB_cond.ref_fasta.ext 91 #set $ext = $tax_args.aligner_cond.refDB_cond.ref_fasta.ext
92 #set $ref_fasta_symlink = $symlink_basename($tax_args.aligner_cond.refDB_cond.ref_fasta, $ext) + '.' + $ext
92 ln -s '$tax_args.aligner_cond.refDB_cond.ref_fasta' '$ref_fasta_symlink' && 93 ln -s '$tax_args.aligner_cond.refDB_cond.ref_fasta' '$ref_fasta_symlink' &&
93 #end if 94 #end if
94 95
95 #if not $map: 96 #if not $map:
96 lotus2 -create_map mapping.txt -i input/ && 97 lotus2 -create_map mapping.txt -i input/ &&
184 exit \$EXIT_VALUE 185 exit \$EXIT_VALUE
185 ]]></command> 186 ]]></command>
186 187
187 <inputs> 188 <inputs>
188 <conditional name="inputs"> 189 <conditional name="inputs">
189 <param name="paired_or_single" type="select" label="Paired or Single-end data?"> 190 <param name="paired_or_single" type="select" label="Single- or Paired-end data?">
190 <option value="single" selected="true">Single-end</option> 191 <option value="single" selected="true">Single-end</option>
191 <option value="paired_collection">Paired-end collection</option> 192 <option value="paired_collection">Paired-end list</option>
192 </param> 193 </param>
193 <when value="single"> 194 <when value="single">
194 <param name="input" type="data" format="fastqsanger,fastqsanger.gz" multiple="true" label="Single-end reads" /> 195 <param name="input" type="data" format="fastqsanger,fastqsanger.gz" multiple="true" label="Single-end reads" />
195 </when> 196 </when>
196 <!-- 197 <!--
299 <option value="SSU">SSU small subunit (16S/18S)</option> 300 <option value="SSU">SSU small subunit (16S/18S)</option>
300 <option value="ITS">ITS internal transcribed spacer</option> 301 <option value="ITS">ITS internal transcribed spacer</option>
301 <option value="ITS1">ITS1</option> 302 <option value="ITS1">ITS1</option>
302 <option value="ITS2">ITS2</option> 303 <option value="ITS2">ITS2</option>
303 </param> 304 </param>
305 <when value="" />
306 <when value="LSU" />
307 <when value="SSU" />
304 <when value="ITS"> 308 <when value="ITS">
305 <expand macro="ITSx_macro" /> 309 <expand macro="ITSx_macro" />
306 </when> 310 </when>
307 <when value="ITS1"> 311 <when value="ITS1">
308 <expand macro="ITSx_macro" /> 312 <expand macro="ITSx_macro" />
346 <output name="otu" file="OTU.txt" compare="sim_size" /> 350 <output name="otu" file="OTU.txt" compare="sim_size" />
347 <output name="otu_fna" file="OTU.fna" compare="sim_size" /> 351 <output name="otu_fna" file="OTU.fna" compare="sim_size" />
348 <output name="mapping" file="mapping.txt" /> 352 <output name="mapping" file="mapping.txt" />
349 </test> 353 </test>
350 <test> 354 <test>
351 <param name="paired_or_single" value="single"/> 355 <param name="paired_or_single" value="paired_collection"/>
352 <param name="input" value="Anh_sample1.fastq.gz,Anh_sample2.fastq.gz" ftype="fastqsanger.gz"/> 356 <param name="pair_input">
353 <param name="mapping" value="mapping.txt" /> 357 <collection type="list:paired">
358 <element name="Anh_sample">
359 <collection type="paired">
360 <element name="forward" value="Anh_sample1.fastq.gz" ftype="fastqsanger.gz" />
361 <element name="reverse" value="Anh_sample2.fastq.gz" ftype="fastqsanger.gz" />
362 </collection>
363 </element>
364 </collection>
365 </param>
366 <param name="mapping" value="mapping_paired.txt" />
354 <param name="platform" value="454" /> 367 <param name="platform" value="454" />
355 <param name="clustering" value="3" /> 368 <param name="clustering" value="3" />
356 <output name="otu" file="OTU.txt" compare="sim_size" /> 369 <output name="otu" file="OTU_paired.txt" compare="sim_size" />
357 <output name="otu_fna" file="OTU.fna" compare="sim_size" /> 370 <output name="otu_fna" file="OTU_paired.fna" compare="sim_size" />
358 </test> 371 </test>
359 </tests> 372 </tests>
360 373
361 <help><![CDATA[ 374 <help><![CDATA[
362 If you have separate FASTA and quality files, these can be combined in a FASTQ file using the "Combine FASTA and QUAL into FASTQ" tool. 375 If you have separate FASTA and quality files, these can be combined in a FASTQ file using the "Combine FASTA and QUAL into FASTQ" tool.