Mercurial > repos > bgruening > trim_galore
changeset 10:02efbf4740c1 draft
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/trim_galore commit bbef69cc08154b5c156c25f9ca43df0915803856
line wrap: on
line diff
--- a/test-data/paired_collection_example_results3.txt Wed Nov 09 14:36:33 2016 -0500 +++ b/test-data/paired_collection_example_results3.txt Thu Apr 20 09:14:17 2017 -0400 @@ -1,7 +1,7 @@ SUMMARISING RUN PARAMETERS ========================== -Input filename: ./input_mate1 +Input filename: input_1.fastq Trimming mode: paired-end Trim Galore version: 0.4.0 Cutadapt version: 1.8 @@ -15,8 +15,8 @@ Length cut-off for read 2: 35 bp (default) -This is cutadapt 1.8 with Python 2.7.9 -Command line parameters: -f fastq -e 0.1 -q 20 -O 1 -a CTGTCTCTTATA ./input_mate1 +This is cutadapt 1.8 with Python 3.5.3 +Command line parameters: -f fastq -e 0.1 -q 20 -O 1 -a CTGTCTCTTATA input_1.fastq Trimming 1 adapter(s) with at most 10.0% errors in single-end mode ... Finished in 0.10 s (1010 us/read; 0.06 M reads/minute). @@ -76,14 +76,14 @@ 86 1 0.0 1 1 -RUN STATISTICS FOR INPUT FILE: ./input_mate1 +RUN STATISTICS FOR INPUT FILE: input_1.fastq ============================================= 99 sequences processed in total SUMMARISING RUN PARAMETERS ========================== -Input filename: ./input_mate2 +Input filename: input_2.fastq Trimming mode: paired-end Trim Galore version: 0.4.0 Cutadapt version: 1.8 @@ -97,8 +97,8 @@ Length cut-off for read 2: 35 bp (default) -This is cutadapt 1.8 with Python 2.7.9 -Command line parameters: -f fastq -e 0.1 -q 20 -O 1 -a CTGTCTCTTATA ./input_mate2 +This is cutadapt 1.8 with Python 3.5.3 +Command line parameters: -f fastq -e 0.1 -q 20 -O 1 -a CTGTCTCTTATA input_2.fastq Trimming 1 adapter(s) with at most 10.0% errors in single-end mode ... Finished in 0.10 s (1000 us/read; 0.06 M reads/minute). @@ -161,7 +161,7 @@ 80 1 0.0 1 1 -RUN STATISTICS FOR INPUT FILE: ./input_mate2 +RUN STATISTICS FOR INPUT FILE: input_2.fastq ============================================= 100 sequences processed in total
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/paired_collection_example_results3gz.txt Thu Apr 20 09:14:17 2017 -0400 @@ -0,0 +1,172 @@ + +SUMMARISING RUN PARAMETERS +========================== +Input filename: input_1.fastq.gz +Trimming mode: paired-end +Trim Galore version: 0.4.0 +Cutadapt version: 1.8 +Quality Phred score cutoff: 20 +Quality encoding type selected: ASCII+33 +Adapter sequence: 'CTGTCTCTTATA' (Nextera Transposase sequence; auto-detected) +Maximum trimming error rate: 0.1 (default) +Minimum required adapter overlap (stringency): 1 bp +Minimum required sequence length for both reads before a sequence pair gets removed: 20 bp +Length cut-off for read 1: 35 bp (default) +Length cut-off for read 2: 35 bp (default) +Output file will be GZIP compressed + + +This is cutadapt 1.8 with Python 3.5.3 +Command line parameters: -f fastq -e 0.1 -q 20 -O 1 -a CTGTCTCTTATA input_1.fastq.gz +Trimming 1 adapter(s) with at most 10.0% errors in single-end mode ... +Finished in 0.10 s (1010 us/read; 0.06 M reads/minute). + +=== Summary === + +Total reads processed: 99 +Reads with adapters: 52 (52.5%) +Reads written (passing filters): 99 (100.0%) + +Total basepairs processed: 24,849 bp +Quality-trimmed: 205 bp (0.8%) +Total written (filtered): 23,339 bp (93.9%) + +=== Adapter 1 === + +Sequence: CTGTCTCTTATA; Type: regular 3'; Length: 12; Trimmed: 52 times. + +No. of allowed errors: +0-9 bp: 0; 10-12 bp: 1 + +Bases preceding removed adapters: + A: 9.6% + C: 38.5% + G: 23.1% + T: 28.8% + none/other: 0.0% + +Overview of removed sequences +length count expect max.err error counts +1 11 24.8 0 11 +2 5 6.2 0 5 +3 3 1.5 0 3 +4 3 0.4 0 3 +12 1 0.0 1 1 +13 2 0.0 1 2 +14 1 0.0 1 1 +16 1 0.0 1 1 +17 1 0.0 1 0 1 +20 2 0.0 1 2 +21 1 0.0 1 1 +24 1 0.0 1 1 +26 2 0.0 1 2 +31 1 0.0 1 1 +33 1 0.0 1 1 +41 2 0.0 1 2 +49 1 0.0 1 1 +50 1 0.0 1 1 +54 1 0.0 1 1 +56 1 0.0 1 1 +58 2 0.0 1 2 +60 1 0.0 1 1 +67 2 0.0 1 2 +68 1 0.0 1 1 +69 1 0.0 1 1 +73 1 0.0 1 1 +80 1 0.0 1 1 +86 1 0.0 1 1 + + +RUN STATISTICS FOR INPUT FILE: input_1.fastq.gz +============================================= +99 sequences processed in total + + +SUMMARISING RUN PARAMETERS +========================== +Input filename: input_2.fastq.gz +Trimming mode: paired-end +Trim Galore version: 0.4.0 +Cutadapt version: 1.8 +Quality Phred score cutoff: 20 +Quality encoding type selected: ASCII+33 +Adapter sequence: 'CTGTCTCTTATA' (Nextera Transposase sequence; auto-detected) +Maximum trimming error rate: 0.1 (default) +Minimum required adapter overlap (stringency): 1 bp +Minimum required sequence length for both reads before a sequence pair gets removed: 20 bp +Length cut-off for read 1: 35 bp (default) +Length cut-off for read 2: 35 bp (default) +Output file will be GZIP compressed + + +This is cutadapt 1.8 with Python 3.5.3 +Command line parameters: -f fastq -e 0.1 -q 20 -O 1 -a CTGTCTCTTATA input_2.fastq.gz +Trimming 1 adapter(s) with at most 10.0% errors in single-end mode ... +Finished in 0.10 s (1000 us/read; 0.06 M reads/minute). + +=== Summary === + +Total reads processed: 100 +Reads with adapters: 59 (59.0%) +Reads written (passing filters): 100 (100.0%) + +Total basepairs processed: 25,100 bp +Quality-trimmed: 746 bp (3.0%) +Total written (filtered): 23,276 bp (92.7%) + +=== Adapter 1 === + +Sequence: CTGTCTCTTATA; Type: regular 3'; Length: 12; Trimmed: 59 times. + +No. of allowed errors: +0-9 bp: 0; 10-12 bp: 1 + +Bases preceding removed adapters: + A: 11.9% + C: 39.0% + G: 8.5% + T: 40.7% + none/other: 0.0% + +Overview of removed sequences +length count expect max.err error counts +1 16 25.0 0 16 +2 7 6.2 0 7 +3 1 1.6 0 1 +4 2 0.4 0 2 +6 2 0.0 0 2 +9 2 0.0 0 2 +10 1 0.0 1 1 +13 1 0.0 1 1 +14 2 0.0 1 2 +15 1 0.0 1 1 +16 1 0.0 1 1 +17 1 0.0 1 1 +19 2 0.0 1 2 +21 1 0.0 1 1 +25 1 0.0 1 1 +30 1 0.0 1 1 +32 2 0.0 1 2 +34 1 0.0 1 1 +36 2 0.0 1 2 +38 1 0.0 1 1 +40 1 0.0 1 1 +41 1 0.0 1 1 +42 1 0.0 1 1 +43 1 0.0 1 1 +49 1 0.0 1 1 +51 1 0.0 1 1 +56 1 0.0 1 1 +57 1 0.0 1 1 +60 1 0.0 1 1 +67 1 0.0 1 1 +80 1 0.0 1 1 + + +RUN STATISTICS FOR INPUT FILE: input_2.fastq.gz +============================================= +100 sequences processed in total + +Total number of sequences analysed for the sequence pair length validation: 99 + +Number of sequence pairs removed because at least one read was shorter than the length cutoff (20 bp): 1 (1.01%)
--- a/test-data/paired_example_results2.txt Wed Nov 09 14:36:33 2016 -0500 +++ b/test-data/paired_example_results2.txt Thu Apr 20 09:14:17 2017 -0400 @@ -1,7 +1,7 @@ SUMMARISING RUN PARAMETERS ========================== -Input filename: ./input_mate1 +Input filename: input_1.fastq Trimming mode: paired-end Trim Galore version: 0.4.0 Cutadapt version: 1.8 @@ -13,8 +13,8 @@ Minimum required sequence length for both reads before a sequence pair gets removed: 20 bp -This is cutadapt 1.8 with Python 2.7.9 -Command line parameters: -f fastq -e 0.1 -q 20 -O 1 -a CTGTCTCTTATA ./input_mate1 +This is cutadapt 1.8 with Python 3.5.3 +Command line parameters: -f fastq -e 0.1 -q 20 -O 1 -a CTGTCTCTTATA input_1.fastq Trimming 1 adapter(s) with at most 10.0% errors in single-end mode ... Finished in 0.10 s (1010 us/read; 0.06 M reads/minute). @@ -74,14 +74,14 @@ 86 1 0.0 1 1 -RUN STATISTICS FOR INPUT FILE: ./input_mate1 +RUN STATISTICS FOR INPUT FILE: input_1.fastq ============================================= 99 sequences processed in total SUMMARISING RUN PARAMETERS ========================== -Input filename: ./input_mate2 +Input filename: input_2.fastq Trimming mode: paired-end Trim Galore version: 0.4.0 Cutadapt version: 1.8 @@ -93,8 +93,8 @@ Minimum required sequence length for both reads before a sequence pair gets removed: 20 bp -This is cutadapt 1.8 with Python 2.7.9 -Command line parameters: -f fastq -e 0.1 -q 20 -O 1 -a CTGTCTCTTATA ./input_mate2 +This is cutadapt 1.8 with Python 3.5.3 +Command line parameters: -f fastq -e 0.1 -q 20 -O 1 -a CTGTCTCTTATA input_2.fastq Trimming 1 adapter(s) with at most 10.0% errors in single-end mode ... Finished in 0.10 s (1000 us/read; 0.06 M reads/minute). @@ -157,7 +157,7 @@ 80 1 0.0 1 1 -RUN STATISTICS FOR INPUT FILE: ./input_mate2 +RUN STATISTICS FOR INPUT FILE: input_2.fastq ============================================= 100 sequences processed in total
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/paired_example_results2gz.txt Thu Apr 20 09:14:17 2017 -0400 @@ -0,0 +1,168 @@ + +SUMMARISING RUN PARAMETERS +========================== +Input filename: input_1.fastq.gz +Trimming mode: paired-end +Trim Galore version: 0.4.0 +Cutadapt version: 1.8 +Quality Phred score cutoff: 20 +Quality encoding type selected: ASCII+33 +Adapter sequence: 'CTGTCTCTTATA' (Nextera Transposase sequence; auto-detected) +Maximum trimming error rate: 0.1 (default) +Minimum required adapter overlap (stringency): 1 bp +Minimum required sequence length for both reads before a sequence pair gets removed: 20 bp +Output file will be GZIP compressed + + +This is cutadapt 1.8 with Python 3.5.3 +Command line parameters: -f fastq -e 0.1 -q 20 -O 1 -a CTGTCTCTTATA input_1.fastq.gz +Trimming 1 adapter(s) with at most 10.0% errors in single-end mode ... +Finished in 0.10 s (1010 us/read; 0.06 M reads/minute). + +=== Summary === + +Total reads processed: 99 +Reads with adapters: 52 (52.5%) +Reads written (passing filters): 99 (100.0%) + +Total basepairs processed: 24,849 bp +Quality-trimmed: 205 bp (0.8%) +Total written (filtered): 23,339 bp (93.9%) + +=== Adapter 1 === + +Sequence: CTGTCTCTTATA; Type: regular 3'; Length: 12; Trimmed: 52 times. + +No. of allowed errors: +0-9 bp: 0; 10-12 bp: 1 + +Bases preceding removed adapters: + A: 9.6% + C: 38.5% + G: 23.1% + T: 28.8% + none/other: 0.0% + +Overview of removed sequences +length count expect max.err error counts +1 11 24.8 0 11 +2 5 6.2 0 5 +3 3 1.5 0 3 +4 3 0.4 0 3 +12 1 0.0 1 1 +13 2 0.0 1 2 +14 1 0.0 1 1 +16 1 0.0 1 1 +17 1 0.0 1 0 1 +20 2 0.0 1 2 +21 1 0.0 1 1 +24 1 0.0 1 1 +26 2 0.0 1 2 +31 1 0.0 1 1 +33 1 0.0 1 1 +41 2 0.0 1 2 +49 1 0.0 1 1 +50 1 0.0 1 1 +54 1 0.0 1 1 +56 1 0.0 1 1 +58 2 0.0 1 2 +60 1 0.0 1 1 +67 2 0.0 1 2 +68 1 0.0 1 1 +69 1 0.0 1 1 +73 1 0.0 1 1 +80 1 0.0 1 1 +86 1 0.0 1 1 + + +RUN STATISTICS FOR INPUT FILE: input_1.fastq.gz +============================================= +99 sequences processed in total + + +SUMMARISING RUN PARAMETERS +========================== +Input filename: input_2.fastq.gz +Trimming mode: paired-end +Trim Galore version: 0.4.0 +Cutadapt version: 1.8 +Quality Phred score cutoff: 20 +Quality encoding type selected: ASCII+33 +Adapter sequence: 'CTGTCTCTTATA' (Nextera Transposase sequence; auto-detected) +Maximum trimming error rate: 0.1 (default) +Minimum required adapter overlap (stringency): 1 bp +Minimum required sequence length for both reads before a sequence pair gets removed: 20 bp +Output file will be GZIP compressed + + +This is cutadapt 1.8 with Python 3.5.3 +Command line parameters: -f fastq -e 0.1 -q 20 -O 1 -a CTGTCTCTTATA input_2.fastq.gz +Trimming 1 adapter(s) with at most 10.0% errors in single-end mode ... +Finished in 0.10 s (1000 us/read; 0.06 M reads/minute). + +=== Summary === + +Total reads processed: 100 +Reads with adapters: 59 (59.0%) +Reads written (passing filters): 100 (100.0%) + +Total basepairs processed: 25,100 bp +Quality-trimmed: 746 bp (3.0%) +Total written (filtered): 23,276 bp (92.7%) + +=== Adapter 1 === + +Sequence: CTGTCTCTTATA; Type: regular 3'; Length: 12; Trimmed: 59 times. + +No. of allowed errors: +0-9 bp: 0; 10-12 bp: 1 + +Bases preceding removed adapters: + A: 11.9% + C: 39.0% + G: 8.5% + T: 40.7% + none/other: 0.0% + +Overview of removed sequences +length count expect max.err error counts +1 16 25.0 0 16 +2 7 6.2 0 7 +3 1 1.6 0 1 +4 2 0.4 0 2 +6 2 0.0 0 2 +9 2 0.0 0 2 +10 1 0.0 1 1 +13 1 0.0 1 1 +14 2 0.0 1 2 +15 1 0.0 1 1 +16 1 0.0 1 1 +17 1 0.0 1 1 +19 2 0.0 1 2 +21 1 0.0 1 1 +25 1 0.0 1 1 +30 1 0.0 1 1 +32 2 0.0 1 2 +34 1 0.0 1 1 +36 2 0.0 1 2 +38 1 0.0 1 1 +40 1 0.0 1 1 +41 1 0.0 1 1 +42 1 0.0 1 1 +43 1 0.0 1 1 +49 1 0.0 1 1 +51 1 0.0 1 1 +56 1 0.0 1 1 +57 1 0.0 1 1 +60 1 0.0 1 1 +67 1 0.0 1 1 +80 1 0.0 1 1 + + +RUN STATISTICS FOR INPUT FILE: input_2.fastq.gz +============================================= +100 sequences processed in total + +Total number of sequences analysed for the sequence pair length validation: 99 + +Number of sequence pairs removed because at least one read was shorter than the length cutoff (20 bp): 1 (1.01%)
--- a/test-data/sanger_full_range_report_results1.txt Wed Nov 09 14:36:33 2016 -0500 +++ b/test-data/sanger_full_range_report_results1.txt Thu Apr 20 09:14:17 2017 -0400 @@ -1,7 +1,7 @@ SUMMARISING RUN PARAMETERS ========================== -Input filename: ./input_singles +Input filename: input_1.fastq Trimming mode: single-end Trim Galore version: 0.4.0 Cutadapt version: 1.8 @@ -13,8 +13,8 @@ Minimum required sequence length before a sequence gets removed: 20 bp -This is cutadapt 1.8 with Python 2.7.9 -Command line parameters: -f fastq -e 0.1 -q 20 -O 1 -a AGATCGGAAGAGC ./input_singles +This is cutadapt 1.8 with Python 3.5.3 +Command line parameters: -f fastq -e 0.1 -q 20 -O 1 -a AGATCGGAAGAGC input_1.fastq Trimming 1 adapter(s) with at most 10.0% errors in single-end mode ... Finished in 0.10 s (50000 us/read; 0.00 M reads/minute). @@ -47,7 +47,7 @@ 1 1 0.5 0 1 -RUN STATISTICS FOR INPUT FILE: ./input_singles +RUN STATISTICS FOR INPUT FILE: input_1.fastq ============================================= 2 sequences processed in total Sequences removed because they became shorter than the length cutoff of 20 bp: 0 (0.0%)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/sanger_full_range_report_results1gz.txt Thu Apr 20 09:14:17 2017 -0400 @@ -0,0 +1,55 @@ + +SUMMARISING RUN PARAMETERS +========================== +Input filename: input_1.fastq.gz +Trimming mode: single-end +Trim Galore version: 0.4.0 +Cutadapt version: 1.8 +Quality Phred score cutoff: 20 +Quality encoding type selected: ASCII+33 +Adapter sequence: 'AGATCGGAAGAGC' (Illumina TruSeq, Sanger iPCR; default (inconclusive auto-detection)) +Maximum trimming error rate: 0.1 (default) +Minimum required adapter overlap (stringency): 1 bp +Minimum required sequence length before a sequence gets removed: 20 bp +Output file will be GZIP compressed + + +This is cutadapt 1.8 with Python 3.5.3 +Command line parameters: -f fastq -e 0.1 -q 20 -O 1 -a AGATCGGAAGAGC input_1.fastq.gz +Trimming 1 adapter(s) with at most 10.0% errors in single-end mode ... +Finished in 0.10 s (50000 us/read; 0.00 M reads/minute). + +=== Summary === + +Total reads processed: 2 +Reads with adapters: 1 (50.0%) +Reads written (passing filters): 2 (100.0%) + +Total basepairs processed: 188 bp +Quality-trimmed: 20 bp (10.6%) +Total written (filtered): 167 bp (88.8%) + +=== Adapter 1 === + +Sequence: AGATCGGAAGAGC; Type: regular 3'; Length: 13; Trimmed: 1 times. + +No. of allowed errors: +0-9 bp: 0; 10-13 bp: 1 + +Bases preceding removed adapters: + A: 0.0% + C: 100.0% + G: 0.0% + T: 0.0% + none/other: 0.0% + +Overview of removed sequences +length count expect max.err error counts +1 1 0.5 0 1 + + +RUN STATISTICS FOR INPUT FILE: input_1.fastq.gz +============================================= +2 sequences processed in total +Sequences removed because they became shorter than the length cutoff of 20 bp: 0 (0.0%) +
--- a/trim_galore.xml Wed Nov 09 14:36:33 2016 -0500 +++ b/trim_galore.xml Thu Apr 20 09:14:17 2017 -0400 @@ -1,4 +1,4 @@ -<tool id="trim_galore" name="Trim Galore!" version="0.4.2"> +<tool id="trim_galore" name="Trim Galore!" version="0.4.3" profile="17.01"> <!-- Wrapper compatible with Trim Galore! version 0.4 --> <description>Quality and adapter trimmer of reads</description> <macros> @@ -49,41 +49,53 @@ <requirement type="package" version="1.8">cutadapt</requirement> </requirements> <version_command> - perl $__tool_directory__/trim_galore --version + perl '$__tool_directory__/trim_galore' --version </version_command> <command> <![CDATA[ - ## trim_galore removes .fastq and .fq file extensions of input files. - ## This is essential if Galaxy provides links to files (with real extensions) - ## but that behaviour is causing an inconsistency in output filenaming. - ## We work around this by linking every file to cwd without file extension - + #set compressed = 'no' #if $singlePaired.sPaired == "single": - #if str($singlePaired.input_singles).endswith(".gz"): - ln -s "${singlePaired.input_singles}" ./input_singles.gz; + #if $singlePaired.input_singles.is_of_type("fastq.gz"): + #set read1 = 'input_1.fastq.gz' + #set compressed = 'gz' #else - ln -s "${singlePaired.input_singles}" ./input_singles; + #set read1 = 'input_1.fastq' #end if + ln -s '${singlePaired.input_singles}' ${read1} && #elif $singlePaired.sPaired == "paired": - #if str($singlePaired.input_mate1).endswith(".gz"): - ln -s "${singlePaired.input_mate1}" ./input_mate1.gz; - ln -s "${singlePaired.input_mate2}" ./input_mate2.gz; + #if $singlePaired.input_mate1.is_of_type("fastq.gz"): + #set read1 = 'input_1.fastq.gz' + #set compressed = 'gz' #else - ln -s "${singlePaired.input_mate1}" ./input_mate1; - ln -s "${singlePaired.input_mate2}" ./input_mate2; + #set read1 = 'input_1.fastq' #end if + ln -s '${singlePaired.input_mate1}' ${read1} && + + #if $singlePaired.input_mate2.is_of_type("fastq.gz"): + #set read2 = 'input_2.fastq.gz' + #else + #set read2 = 'input_2.fastq' + #end if + ln -s '${singlePaired.input_mate2}' ${read2} && #else: - #if str($singlePaired.input_mate_pairs.forward).endswith(".gz"): - ln -s "${singlePaired.input_mate_pairs.forward}" ./input_mate1.gz; - ln -s "${singlePaired.input_mate_pairs.reverse}" ./input_mate2.gz; + #if $singlePaired.input_mate_pairs.forward.is_of_type("fastq.gz"): + #set read1 = 'input_1.fastq.gz' + #set compressed = 'gz' #else - ln -s "${singlePaired.input_mate_pairs.forward}" ./input_mate1; - ln -s "${singlePaired.input_mate_pairs.reverse}" ./input_mate2; + #set read1 = 'input_1.fastq' #end if + ln -s '${singlePaired.input_mate_pairs.forward}' ${read1} && + + #if $singlePaired.input_mate_pairs.reverse.is_of_type("fastq.gz"): + #set read2 = 'input_2.fastq.gz' + #else + #set read2 = 'input_2.fastq' + #end if + ln -s '${singlePaired.input_mate_pairs.reverse}' ${read2} && #end if - perl $__tool_directory__/trim_galore + perl '$__tool_directory__/trim_galore' ## we only support fastqsanger --phred33 @@ -147,12 +159,7 @@ #if $singlePaired.sPaired == "single": ## input sequence - #if str($singlePaired.input_singles).endswith(".gz"): - ./input_singles.gz - --dont_gzip - #else - ./input_singles - #end if + ${read1} #else: --paired @@ -169,39 +176,25 @@ #end if ## input sequences - #if $singlePaired.sPaired == "paired": - #if str($singlePaired.input_mate1).endswith(".gz"): - ./input_mate1.gz - ./input_mate2.gz - --dont_gzip - #else - ./input_mate1 - ./input_mate2 - #end if - #else: - #if str($singlePaired.input_mate_pairs.forward).endswith(".gz"): - ./input_mate1.gz - ./input_mate2.gz - --dont_gzip - #else - ./input_mate1 - ./input_mate2 - #end if - #end if + ${read1} + ${read2} + #end if + #if $compressed == 'no': + --dont_gzip #end if ## Trim Galore is finished, rename the output if compressed && - if [ -f input_singles.gz_trimmed.fq ] ; then mv input_singles.gz_trimmed.fq input_singles_trimmed.fq ; fi + if [ -f input_1_trimmed.fq.gz ] ; then mv input_1_trimmed.fq.gz input_1_trimmed.fq ; fi && - if [ -f input_mate1.gz_val_1.fq ] ; then mv input_mate1.gz_val_1.fq input_mate1_val_1.fq ; fi + if [ -f input_1_val_1.fq.gz ] ; then mv input_1_val_1.fq.gz input_1_val_1.fq ; fi && - if [ -f input_mate2.gz_val_2.fq ] ; then mv input_mate2.gz_val_2.fq input_mate2_val_2.fq ; fi + if [ -f input_2_val_2.fq.gz ] ; then mv input_2_val_2.fq.gz input_2_val_2.fq ; fi && - if [ -f input_mate1.gz_unpaired_1.fq ] ; then mv input_mate1.gz_unpaired_1.fq input_mate1_unpaired_1.fq ; fi + if [ -f input_1_unpaired_1.fq.gz ] ; then mv input_1_unpaired_1.fq.gz input_1_unpaired_1.fq ; fi && - if [ -f input_mate2.gz_unpaired_2.fq ] ; then mv input_mate2.gz_unpaired_2.fq input_mate2_unpaired_2.fq ; fi + if [ -f input_2_unpaired_2.fq.gz ] ; then mv input_2_unpaired_2.fq.gz input_2_unpaired_2.fq ; fi ## Trim Galore! run is finished. Move the report files to the proper place #if $params.settingsType == "custom" and $params.report: @@ -220,7 +213,7 @@ <option value="paired_collection">Paired Collection</option> </param> <when value="single"> - <param name="input_singles" type="data" format="fastqsanger" label="Reads in FASTQ format" /> + <param name="input_singles" type="data" format="fastqsanger,fastqsanger.gz" label="Reads in FASTQ format" /> <expand macro="adapter_trimming"/> <param name="three_prime_clip_R1" type="integer" value="" optional="True" label="Remove N bp from the 3' end"> @@ -230,12 +223,12 @@ </param> </when> <when value="paired"> - <param name="input_mate1" type="data" format="fastqsanger" label="Reads in FASTQ format" /> - <param name="input_mate2" type="data" format="fastqsanger" label="Reads in FASTQ format" /> + <param name="input_mate1" type="data" format="fastqsanger,fastqsanger.gz" label="Reads in FASTQ format" /> + <param name="input_mate2" type="data" format="fastqsanger,fastqsanger.gz" label="Reads in FASTQ format" /> <expand macro="paired_adapter_trimming" /> </when> <when value="paired_collection"> - <param name="input_mate_pairs" format="fastqsanger" type="data_collection" collection_type="paired" + <param name="input_mate_pairs" format="fastqsanger,fastqsanger.gz" type="data_collection" collection_type="paired" label="Select a paired collection" help="See help section for an explanation of dataset collections"/> <expand macro="paired_adapter_trimming" /> </when> @@ -293,42 +286,42 @@ </inputs> <outputs> - <data format="fastqsanger" name="trimmed_reads_single" from_work_dir="input_singles_trimmed.fq" label="${tool.name} on ${on_string}: trimmed reads"> + <data format_source="input_singles" name="trimmed_reads_single" from_work_dir="input_1_trimmed.fq" label="${tool.name} on ${on_string}: trimmed reads"> <filter>singlePaired['sPaired'] == "single"</filter> </data> <collection name="trimmed_reads_paired_collection" type="paired" label="${tool.name} on ${on_string}: paired reads"> - <data name="forward" format="fastqsanger" from_work_dir="input_mate1_val_1.fq" /> - <data name="reverse" format="fastqsanger" from_work_dir="input_mate2_val_2.fq" /> + <data name="forward" format_source="input_mate_pairs['forward']" from_work_dir="input_1_val_1.fq" /> + <data name="reverse" format_source="input_mate_pairs['forward']" from_work_dir="input_2_val_2.fq" /> <filter>singlePaired['sPaired'] == "paired_collection"</filter> </collection> <collection name="trimmed_reads_unpaired_collection" type="paired" label="${tool.name} on ${on_string}: unpaired reads"> - <data name="forward" format="fastqsanger" from_work_dir="input_mate1_unpaired_1.fq" /> - <data name="reverse" format="fastqsanger" from_work_dir="input_mate2_unpaired_2.fq" /> + <data name="forward" format_source="input_mate_pairs['forward']" from_work_dir="input_1_unpaired_1.fq" /> + <data name="reverse" format_source="input_mate_pairs['forward']" from_work_dir="input_2_unpaired_2.fq" /> <filter>params['settingsType'] == "custom"</filter> <filter>params['retain_unpaired']['retain_unpaired_select'] == "retain_unpaired_output"</filter> <filter>singlePaired['sPaired'] == "paired_collection"</filter> </collection> - <data format="fastqsanger" name="trimmed_reads_pair1" from_work_dir="input_mate1_val_1.fq" + <data format_source="input_mate1" name="trimmed_reads_pair1" from_work_dir="input_1_val_1.fq" label="${tool.name} on ${on_string}: trimmed reads pair 1"> <filter>singlePaired['sPaired'] == "paired"</filter> </data> - <data format="fastqsanger" name="trimmed_reads_pair2" from_work_dir="input_mate2_val_2.fq" + <data format_source="input_mate2" name="trimmed_reads_pair2" from_work_dir="input_2_val_2.fq" label="${tool.name} on ${on_string}: trimmed reads pair 2"> <filter>singlePaired['sPaired'] == "paired"</filter> </data> - <data format="fastqsanger" name="unpaired_reads_1" from_work_dir="input_mate1_unpaired_1.fq" + <data format_source="input_mate1" name="unpaired_reads_1" from_work_dir="input_1_unpaired_1.fq" label="${tool.name} on ${on_string}: unpaired reads (1)"> <filter>params['settingsType'] == "custom"</filter> <filter>params['retain_unpaired']['retain_unpaired_select'] == "retain_unpaired_output"</filter> <filter>singlePaired['sPaired'] == "paired"</filter> </data> - <data format="fastqsanger" name="unpaired_reads_2" from_work_dir="input_mate2_unpaired_2.fq" + <data format_source="input_mate2" name="unpaired_reads_2" from_work_dir="input_2_unpaired_2.fq" label="${tool.name} on ${on_string}: unpaired reads (2)"> <filter>params['settingsType'] == "custom"</filter> <filter>params['retain_unpaired']['retain_unpaired_select'] == "retain_unpaired_output"</filter> @@ -349,6 +342,14 @@ <output name="trimmed_reads_single" file="sanger_full_range_results1.fastqsanger" ftype="fastqsanger"/> <output name="report_file" file="sanger_full_range_report_results1.txt" ftype="txt" lines_diff="8" /> </test> + <test> + <param name="input_singles" value="sanger_full_range_original_sanger.fastq.gz" ftype="fastqsanger.gz" /> + <param name="sPaired" value="single" /> + <param name="settingsType" value="custom" /> + <param name="report" value="true" /> + <output name="trimmed_reads_single" file="sanger_full_range_results1.fastq.gz" ftype="fastqsanger.gz" compare="sim_size" delta="0"/> + <output name="report_file" file="sanger_full_range_report_results1gz.txt" ftype="txt" lines_diff="9" /> + </test> <test> <param name="input_singles" value="sanger_full_range_original_sanger.fastqsanger" ftype="fastqsanger" /> @@ -356,6 +357,12 @@ <param name="trimming_select" value="--illumina" /> <output name="trimmed_reads_single" file="sanger_full_range_results2.fastqsanger" ftype="fastqsanger"/> </test> + <test> + <param name="input_singles" value="sanger_full_range_original_sanger.fastq.gz" ftype="fastqsanger.gz" /> + <param name="sPaired" value="single" /> + <param name="trimming_select" value="--illumina" /> + <output name="trimmed_reads_single" file="sanger_full_range_results2.fastq.gz" ftype="fastqsanger.gz" compare="sim_size" delta="0"/> + </test> <test> <param name="input_singles" value="sanger_full_range_original_sanger.fastqsanger" ftype="fastqsanger" /> @@ -363,6 +370,12 @@ <param name="adapter" value="AAAGAGC" /> <output name="trimmed_reads_single" file="sanger_full_range_results3.fastqsanger" ftype="fastqsanger"/> </test> + <test> + <param name="input_singles" value="sanger_full_range_original_sanger.fastq.gz" ftype="fastqsanger.gz" /> + <param name="sPaired" value="single" /> + <param name="adapter" value="AAAGAGC" /> + <output name="trimmed_reads_single" file="sanger_full_range_results3.fastq.gz" ftype="fastqsanger.gz" compare="sim_size" delta="0"/> + </test> <test> <param name="input_mate1" value="bwa-mem-fastq1.fq" ftype="fastqsanger" /> @@ -374,6 +387,16 @@ <output name="trimmed_reads_pair2" file="paired_example_pair2_results2.fastqsanger" ftype="fastqsanger"/> <output name="report_file" file="paired_example_results2.txt" ftype="txt" lines_diff="24" /> </test> + <test> + <param name="input_mate1" value="bwa-mem-fastq1.fq.gz" ftype="fastqsanger.gz" /> + <param name="input_mate2" value="bwa-mem-fastq2.fq.gz" ftype="fastqsanger.gz" /> + <param name="sPaired" value="paired" /> + <param name="settingsType" value="custom" /> + <param name="report" value="true" /> + <output name="trimmed_reads_pair1" file="paired_example_pair1_results2.fastq.gz" ftype="fastqsanger.gz" compare="sim_size" delta="0"/> + <output name="trimmed_reads_pair2" file="paired_example_pair2_results2.fastq.gz" ftype="fastqsanger.gz" compare="sim_size" delta="0"/> + <output name="report_file" file="paired_example_results2gz.txt" ftype="txt" lines_diff="24" /> + </test> <test> <param name="input_mate_pairs"> @@ -399,7 +422,31 @@ <element name="forward" file="paired_collection_example_unpair1_results3.fastqsanger" ftype="fastqsanger"/> <element name="reverse" file="paired_collection_example_unpair2_results3.fastqsanger" ftype="fastqsanger"/> </output_collection> + </test> + <test> + <param name="input_mate_pairs"> + <collection type="paired"> + <element name="forward" value="bwa-mem-fastq1.fq.gz" ftype="fastqsanger.gz" /> + <element name="reverse" value="bwa-mem-fastq2.fq.gz" ftype="fastqsanger.gz" /> + </collection> + </param> + <param name="sPaired" value="paired_collection" /> + <param name="settingsType" value="custom" /> + <param name="report" value="true" /> + <param name="retain_unpaired_select" value="retain_unpaired_output" /> + + <output name="report_file" file="paired_collection_example_results3gz.txt" ftype="txt" lines_diff="25" /> + + <output_collection name="trimmed_reads_paired_collection" type="paired"> + <element name="forward" file="paired_collection_example_pair1_results3.fastq.gz" ftype="fastqsanger.gz" compare="sim_size" delta="0"/> + <element name="reverse" file="paired_collection_example_pair2_results3.fastq.gz" ftype="fastqsanger.gz" compare="sim_size" delta="0"/> + </output_collection> + + <output_collection name="trimmed_reads_unpaired_collection" type="paired"> + <element name="forward" file="paired_collection_example_unpair1_results3.fastq.gz" ftype="fastqsanger.gz" compare="sim_size" delta="0"/> + <element name="reverse" file="paired_collection_example_unpair2_results3.fastq.gz" ftype="fastqsanger.gz" compare="sim_size" delta="0"/> + </output_collection> </test> </tests> <help> @@ -443,7 +490,7 @@ * **Illumina small RNA adapters** - | Adapter sequence to be trimmed is the first 12bp of the Illumina Small RNA 3' Adapter 'TGGAATTCTCGG' instead of the default auto-detection of adapter sequence. Selecting to trim smallRNA adapters will also lower the --length value to 18bp. If the smallRNA libraries are paired-end then -a2 will be set to the Illumina small RNA 5' adapter automatically (‘GATCGTCGGACT’) unless -a 2 had been defined explicitly. + | Adapter sequence to be trimmed is the first 12bp of the Illumina Small RNA 3' Adapter 'TGGAATTCTCGG' instead of the default auto-detection of adapter sequence. Selecting to trim smallRNA adapters will also lower the --length value to 18bp. If the smallRNA libraries are paired-end then -a2 will be set to the Illumina small RNA 5' adapter automatically ('GATCGTCGGACT') unless -a 2 had been defined explicitly. | | *option --small_rna*