comparison qiime2/qiime_dada2_denoise-paired.xml @ 6:de4c22a52df4 draft

Fixes
author florianbegusch
date Tue, 13 Aug 2019 07:46:48 -0400
parents 370e0b6e9826
children f190567fe3f6
comparison
equal deleted inserted replaced
5:a025a4a89e07 6:de4c22a52df4
3 <description> - Denoise and dereplicate paired-end sequences</description> 3 <description> - Denoise and dereplicate paired-end sequences</description>
4 <requirements> 4 <requirements>
5 <requirement type="package" version="2019.4">qiime2</requirement> 5 <requirement type="package" version="2019.4">qiime2</requirement>
6 </requirements> 6 </requirements>
7 <command><![CDATA[ 7 <command><![CDATA[
8
9 #def parse_file(file):
10 #import csv
11 #set $read = csv.reader(open($file, "r"))
12 #set $qc = 0
13 #for l in $read:
14 #if "50%" in l:
15 #set $num = 0.0
16 #for i in l[1:]:
17 #if float(i) <= 25.0
18 #set $num = i
19 #set $qc = l.index($num) - 1
20 #break
21 #end if
22 #end for
23 #end if
24 #end for
25 #return $qc
26 #end def
27
28 #def find_QC(file):
29 #set $f_file_path=str(file).split(".dat")[0] + '_files/forward-seven-number-summaries.csv'
30 #set $r_file_path=str(file).split(".dat")[0] + '_files/reverse-seven-number-summaries.csv'
31 #set $qc_f = $parse_file($f_file_path)
32 #set $qc_r = $parse_file($r_file_path)
33 #return $qc_f, $qc_r
34 #end def
35
36 #def find_adapters(mapping_fp):
37 #import csv
38 #set $forward = 0
39 #set $reversed = 0
40 #set $reader = csv.reader(open(str(mapping_fp)), delimiter='\t')
41 #for row in $reader:
42 #if "#" not in str(row[0]):
43 #set $forward = len(row[2])
44 #set $reversed = len(row[3])
45 #break
46 #end if
47 #end for
48 #return int($forward), int($reversed)
49 #end def
50
51 #if str($mapping_fp) != 'None' and (int($ptrimleftf) == -1 or int($ptrimleftr) == -1):
52 #set $both_adapters = $find_adapters($mapping_fp)
53 #set $ptrimleftf=$both_adapters[0]
54 #set $ptrimleftr=$both_adapters[1]
55 #end if
56
57 #if str($sum_fp) != 'None' and (int($ptrunclenf) == -1 or int($ptrunclenr) == -1):
58 #set $both_qc = $find_QC($sum_fp)
59 #set $ptrunclenf=$both_qc[0]
60 #set $ptrunclenr=$both_qc[1]
61 #end if
62
63
8 qiime dada2 denoise-paired 64 qiime dada2 denoise-paired
9 65
10 --i-demultiplexed-seqs=$idemultiplexedseqs 66 --i-demultiplexed-seqs=$idemultiplexedseqs
11 --p-trunc-len-f="$ptrunclenf" 67
12 --p-trunc-len-r="$ptrunclenr" 68
13 #if $ptrimleftf: 69 #if str($ptrunclenf):
70 --p-trunc-len-f="$ptrunclenf"
71 #end if
72
73 #if str($ptrunclenf):
74 --p-trunc-len-r="$ptrunclenr"
75 #end if
76
77 #if str($ptrimleftf):
14 --p-trim-left-f=$ptrimleftf 78 --p-trim-left-f=$ptrimleftf
15 #end if 79 #end if
16 80
17 #if $ptrimleftr: 81 #if str($ptrimleftr):
18 --p-trim-left-r=$ptrimleftr 82 --p-trim-left-r=$ptrimleftr
19 #end if 83 #end if
20 84
21 #if $pmaxee: 85 #if str($pmaxee):
22 --p-max-ee=$pmaxee 86 --p-max-ee=$pmaxee
23 #end if 87 #end if
24 88
25 #if $ptruncq: 89 #if str($ptruncq):
26 --p-trunc-q=$ptruncq 90 --p-trunc-q=$ptruncq
27 #end if 91 #end if
28 92
29 #if str($pchimeramethod) != 'None': 93 #if str($pchimeramethod) != 'None':
30 --p-chimera-method=$pchimeramethod 94 --p-chimera-method=$pchimeramethod
31 #end if 95 #end if
32 96
33 #if $pminfoldparentoverabundance: 97 #if str($pminfoldparentoverabundance):
34 --p-min-fold-parent-over-abundance=$pminfoldparentoverabundance 98 --p-min-fold-parent-over-abundance=$pminfoldparentoverabundance
35 #end if 99 #end if
36 100
37 #set $pnthreads = '${GALAXY_SLOTS:-4}' 101 #set $pnthreads = '${GALAXY_SLOTS:-4}'
38 102
39 #if str($pnthreads): 103 #if str($pnthreads):
40 --p-n-threads="$pnthreads" 104 --p-n-threads="$pnthreads"
41 #end if 105 #end if
42 106
43 107
44 #if $pnreadslearn: 108 #if str($pnreadslearn):
45 --p-n-reads-learn=$pnreadslearn 109 --p-n-reads-learn=$pnreadslearn
46 #end if 110 #end if
47 111
48 #if $pnohashedfeatureids: 112 #if $pnohashedfeatureids:
49 --p-no-hashed-feature-ids 113 --p-no-hashed-feature-ids
56 cp otable.qza $otable; 120 cp otable.qza $otable;
57 cp orepresentativesequences.qza $orepresentativesequences; 121 cp orepresentativesequences.qza $orepresentativesequences;
58 cp odenoisingstats.qza $odenoisingstats 122 cp odenoisingstats.qza $odenoisingstats
59 ]]></command> 123 ]]></command>
60 <inputs> 124 <inputs>
125 <param format="tabular" label="Mapping file where 3rd and 4th columns must be forward and reverse primers respectively" name="mapping_fp" optional="True" type="data"/>
126 <param format="html" label="Summary file" name="sum_fp" optional="True" type="data"/>
127
61 <param format="qza,no_unzip.zip" label="--i-demultiplexed-seqs: ARTIFACT SampleData[PairedEndSequencesWithQuality] The paired-end demultiplexed sequences to be denoised. [required]" name="idemultiplexedseqs" optional="False" type="data"/> 128 <param format="qza,no_unzip.zip" label="--i-demultiplexed-seqs: ARTIFACT SampleData[PairedEndSequencesWithQuality] The paired-end demultiplexed sequences to be denoised. [required]" name="idemultiplexedseqs" optional="False" type="data"/>
62 <param label="--p-trunc-len-f: INTEGER Position at which forward read sequences should be truncated due to decrease in quality. This truncates the 3' end of the of the input sequences, which will be the bases that were sequenced in the last cycles. Reads that are shorter than this value will be discarded. After this parameter is applied there must still be at least a 20 nucleotide overlap between the forward and reverse reads. If 0 is provided, no truncation or length filtering will be performed [required]" name="ptrunclenf" optional="False" value="" type="integer"/> 129 <param label="--p-trunc-len-f: INTEGER Position at which forward read sequences should be truncated due to decrease in quality. This truncates the 3' end of the of the input sequences, which will be the bases that were sequenced in the last cycles. Reads that are shorter than this value will be discarded. After this parameter is applied there must still be at least a 20 nucleotide overlap between the forward and reverse reads. If 0 is provided, no truncation or length filtering will be performed [required]" name="ptrunclenf" optional="False" value="" type="integer"/>
63 <param label="--p-trunc-len-r: INTEGER Position at which reverse read sequences should be truncated due to decrease in quality. This truncates the 3' end of the of the input sequences, which will be the bases that were sequenced in the last cycles. Reads that are shorter than this value will be discarded. After this parameter is applied there must still be at least a 20 nucleotide overlap between the forward and reverse reads. If 0 is provided, no truncation or length filtering will be performed [required]" name="ptrunclenr" optional="False" value="" type="integer"/> 130 <param label="--p-trunc-len-r: INTEGER Position at which reverse read sequences should be truncated due to decrease in quality. This truncates the 3' end of the of the input sequences, which will be the bases that were sequenced in the last cycles. Reads that are shorter than this value will be discarded. After this parameter is applied there must still be at least a 20 nucleotide overlap between the forward and reverse reads. If 0 is provided, no truncation or length filtering will be performed [required]" name="ptrunclenr" optional="False" value="" type="integer"/>
64 <param label="--p-trim-left-f: INTEGER Position at which forward read sequences should be trimmed due to low quality. This trims the 5' end of the input sequences, which will be the bases that were sequenced in the first cycles. [default: 0]" name="ptrimleftf" optional="True" type="integer" value="0"/> 131 <param label="--p-trim-left-f: INTEGER Position at which forward read sequences should be trimmed due to low quality. This trims the 5' end of the input sequences, which will be the bases that were sequenced in the first cycles. [default: 0]" name="ptrimleftf" optional="True" type="integer" value="0"/>
65 <param label="--p-trim-left-r: INTEGER Position at which reverse read sequences should be trimmed due to low quality. This trims the 5' end of the input sequences, which will be the bases that were sequenced in the first cycles. [default: 0]" name="ptrimleftr" optional="True" type="integer" value="0"/> 132 <param label="--p-trim-left-r: INTEGER Position at which reverse read sequences should be trimmed due to low quality. This trims the 5' end of the input sequences, which will be the bases that were sequenced in the first cycles. [default: 0]" name="ptrimleftr" optional="True" type="integer" value="0"/>