Skip to content

Commit

Permalink
change default parameter values of FASTP max
Browse files Browse the repository at this point in the history
length and three prime adapter sequence, set adapter fasta
based on with_umi parameter, change included adapter fasta
  • Loading branch information
christopher-mohr committed Feb 2, 2024
1 parent 8c1143d commit f83f0a5
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 10 deletions.
6 changes: 5 additions & 1 deletion assets/known_adapters.fa
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
> Illumina Sequencing Adapter
> QIAseq miRNA adapter
AACTGTAGGCACCATCAAT
> Illumina miRNA adapter
TGGAATTCTCGGGTGCCAAGG
> Nextflex miRNA adapter
TGGAATTCTCGGGTGCCAAGG
10 changes: 5 additions & 5 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down
4 changes: 2 additions & 2 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand Down
6 changes: 4 additions & 2 deletions workflows/smrnaseq.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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
//
Expand All @@ -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
Expand Down Expand Up @@ -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
)
Expand Down

0 comments on commit f83f0a5

Please sign in to comment.