Commit 6896d29c authored by Nijsse, Bart's avatar Nijsse, Bart
Browse files

optional ref filter + change order

parent 1b0e7cce
......@@ -79,7 +79,7 @@ inputs:
doc: Reverse sequence fastq file(s) locally
label: Reverse reads
filter_references:
type: string[]
type: string[]?
doc: References fasta file(s) for filtering
label: Filter reference file(s)
default: ["/unlock/references/databases/bbduk/GCA_000001405.28_GRCh38.p13_genomic.fna.gz"] # HUMAN
......@@ -93,6 +93,11 @@ inputs:
doc: Optionally run Kraken2
label: Kraken2
default: true
run_filter_references:
type: boolean?
doc: Optionally filter references
label: Filter References
default: false
kraken_database:
type: string?
doc: Kraken2 database location
......@@ -177,6 +182,53 @@ steps:
deduplicate: deduplicate
threads: threads
out: [out_forward_reads, out_reverse_reads, html_report, json_report]
#############################################
#### rRNA filter
rrna_filter:
label: rRNA filter (bbduk)
doc: Filters rRNA sequences from reads using bbduk
when: $(inputs.filter_rrna)
run: ../bbmap/bbduk_filter.cwl
in:
identifier:
source: identifier
valueFrom: $(self+"_rRNA-filter")
filter_rrna: filter_rrna
forward_reads: reference_filter_illumina/out_forward_reads
reverse_reads: reference_filter_illumina/out_reverse_reads
reference:
valueFrom: "/unlock/references/databases/riboKmers.fa.gz"
threads: threads
memory: memory
out: [out_forward_reads, out_reverse_reads, summary]
#############################################
#### Filter PhiX
phix_filter:
label: PhiX filter (bbduk)
doc: Filters illumina spike-in PhiX sequences from reads using bbduk
run: ../bbmap/bbduk_filter.cwl
in:
identifier:
source: identifier
valueFrom: $(self+"_illumina_filtered")
forward_reads:
source:
- rrna_filter/out_forward_reads
- reference_filter_illumina/out_forward_reads
pickValue: first_non_null
reverse_reads:
source:
- rrna_filter/out_reverse_reads
- reference_filter_illumina/out_reverse_reads
pickValue: first_non_null
reference:
valueFrom: "/unlock/references/databases/phix.fasta"
threads: threads
memory: memory
out: [out_forward_reads, out_reverse_reads, summary]
#############################################
#### Kraken2
illumina_quality_kraken2:
......@@ -189,8 +241,8 @@ steps:
valueFrom: $(inputs.tmp_id)_unfiltered_illumina
threads: threads
database: kraken_database
forward_reads: fastp/out_forward_reads
reverse_reads: fastp/out_reverse_reads
forward_reads: phix_filter/out_forward_reads
reverse_reads: phix_filter/out_reverse_reads
paired_end:
default: true
out: [sample_report]
......@@ -208,6 +260,7 @@ steps:
combine_references:
label: Combine references
doc: Combine references to a single fasta file
when: $(inputs.run_filter_references)
run: ../bash/concatenate.cwl
in:
# infiles:
......@@ -226,6 +279,7 @@ steps:
reference_filter_illumina:
label: Reference read mapping
doc: Map reads against references using BBMap
when: $(inputs.run_filter_references)
run: ../bbmap/bbmap_filter-reads.cwl
in:
identifier: identifier
......@@ -237,52 +291,6 @@ steps:
memory: memory
out: [out_forward_reads, out_reverse_reads, log, stats, covstats]
#############################################
#### rRNA filter
rrna_filter:
label: rRNA filter (bbduk)
doc: Filters rRNA sequences from reads using bbduk
when: $(inputs.filter_rrna)
run: ../bbmap/bbduk_filter.cwl
in:
identifier:
source: identifier
valueFrom: $(self+"_rRNA-filter")
filter_rrna: filter_rrna
forward_reads: reference_filter_illumina/out_forward_reads
reverse_reads: reference_filter_illumina/out_reverse_reads
reference:
valueFrom: "/unlock/references/databases/riboKmers.fa.gz"
threads: threads
memory: memory
out: [out_forward_reads, out_reverse_reads, summary]
#############################################
#### Filter PhiX
phix_filter:
label: PhiX filter (bbduk)
doc: Filters illumina spike-in PhiX sequences from reads using bbduk
run: ../bbmap/bbduk_filter.cwl
in:
identifier:
source: identifier
valueFrom: $(self+"_illumina_filtered")
forward_reads:
source:
- rrna_filter/out_forward_reads
- reference_filter_illumina/out_forward_reads
pickValue: first_non_null
reverse_reads:
source:
- rrna_filter/out_reverse_reads
- reference_filter_illumina/out_reverse_reads
pickValue: first_non_null
reference:
valueFrom: "/unlock/references/databases/phix.fasta"
threads: threads
memory: memory
out: [out_forward_reads, out_reverse_reads, summary]
#############################################
#### FASTQC
fastqc_illumina_after:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment