diff --git a/assets/known_adapters.fa b/assets/known_adapters.fa index 729d233a..6b54be80 100644 --- a/assets/known_adapters.fa +++ b/assets/known_adapters.fa @@ -1,2 +1,6 @@ -> Illumina Sequencing Adapter +> QIAseq miRNA adapter +AACTGTAGGCACCATCAAT +> Illumina miRNA adapter +TGGAATTCTCGGGTGCCAAGG +> Nextflex miRNA adapter TGGAATTCTCGGGTGCCAAGG diff --git a/conf/modules.config b/conf/modules.config index 3513870d..9c48f6f0 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -47,11 +47,11 @@ process { // withName: '.*:FASTQ_FASTQC_UMITOOLS_FASTP:FASTP' { ext.args = [ "", - params.trim_fastq ? "" : "--disable_adapter_trimming", - params.clip_r1 > 0 ? "--trim_front1 ${params.clip_r1}" : "", // Remove bp from the 5' end of read 1. - params.three_prime_clip_r1 > 0 ? "--trim_tail1 ${params.three_prime_clip_r1}" : "", // Remove bp from the 3' end of read 1 AFTER adapter/quality trimming has been performed. - params.fastp_min_length > 0 ? "-l ${params.fastp_min_length}" : "", - params.fastp_max_length > 0 ? "--max_len1 ${params.fastp_max_length}" : "", + params.trim_fastq ? "" : "--disable_adapter_trimming", + params.clip_r1 > 0 ? "--trim_front1 ${params.clip_r1}" : "", // Remove bp from the 5' end of read 1. + params.three_prime_clip_r1 > 0 ? "--trim_tail1 ${params.three_prime_clip_r1}" : "", // Remove bp from the 3' end of read 1 AFTER adapter/quality trimming has been performed. + params.fastp_min_length > 0 ? "-l ${params.fastp_min_length}" : "", + params.fastp_max_length > 0 ? "--max_len1 ${params.fastp_max_length}" : "", params.three_prime_adapter == null ? '' : "--adapter_sequence ${params.three_prime_adapter}" ].join(" ").trim() publishDir = [ diff --git a/nextflow.config b/nextflow.config index 0f923d42..34d26823 100644 --- a/nextflow.config +++ b/nextflow.config @@ -41,7 +41,7 @@ params { // Trimming options clip_r1 = null three_prime_clip_r1 = null - three_prime_adapter = null + three_prime_adapter = 'AGATCGGAAGAGCACACGTCTGAACTCCAGTCA' trim_fastq = true fastp_min_length = 17 fastp_known_mirna_adapters = "$projectDir/assets/known_adapters.fa" @@ -52,7 +52,7 @@ params { skip_mirdeep = false skip_fastp = false save_reference = false - fastp_max_length = 40 + fastp_max_length = 100 min_trimmed_reads = 10 // Contamination filtering diff --git a/workflows/smrnaseq.nf b/workflows/smrnaseq.nf index e2a76a9e..f28f267a 100644 --- a/workflows/smrnaseq.nf +++ b/workflows/smrnaseq.nf @@ -134,6 +134,8 @@ workflow SMRNASEQ { .set { ch_cat_fastq } ch_versions = ch_versions.mix(CAT_FASTQ.out.versions.first().ifEmpty(null)) + mirna_adapters = params.with_umi ? [] : params.fastp_known_mirna_adapters + // // SUBWORKFLOW: Read QC, extract UMI and trim adapters & dedup UMIs if necessary / desired by the user // @@ -144,7 +146,7 @@ workflow SMRNASEQ { params.skip_umi_extract, params.umi_discard_read, params.skip_fastp, - params.fastp_known_mirna_adapters, + mirna_adapters, params.save_trimmed_fail, params.save_merged, params.min_trimmed_reads @@ -184,7 +186,7 @@ workflow SMRNASEQ { // Filter out sequences smaller than params.fastp_min_length FASTP_LENGTH_FILTER ( UMITOOLS_EXTRACT.out.reads, - params.fastp_known_mirna_adapters, + mirna_adapters, params.save_trimmed_fail, params.save_merged )