Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the stacksize and pretty much everything else #311

Merged
merged 17 commits into from
Feb 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 50 additions & 18 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -45,28 +45,28 @@ process {
//
// FASTQ_FASTQC_UMITOOLS_FASTP
//
withName: '.*:FASTQC_UMITOOLS_FASTP:FASTP' {
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 = [
[
path: { "${params.outdir}/fastp" },
path: { "${params.outdir}/fastp/on_raw" },
mode: params.publish_dir_mode,
pattern: "*.{json,html}"
],
[
path: { "${params.outdir}/fastp/log" },
path: { "${params.outdir}/fastp/on_raw/log" },
mode: params.publish_dir_mode,
pattern: "*.log"
],
[
path: { "${params.outdir}/fastp" },
path: { "${params.outdir}/fastp/on_raw" },
mode: params.publish_dir_mode,
pattern: "*.fail.fastq.gz",
enabled: params.save_trimmed_fail
Expand All @@ -92,22 +92,34 @@ process {
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}
withName: '.*:FASTQ_FASTQC_UMITOOLS_FASTP:UMITOOLS_EXTRACT' {
ext.args = [
params.umitools_extract_method ? "--extract-method=${params.umitools_extract_method}" : '',
params.umitools_bc_pattern ? "--bc-pattern='${params.umitools_bc_pattern}'" : '',
].join(' ').trim()

//
// FASTP LENGTH FILTER
//
withName: 'FASTP_LENGTH_FILTER' {
ext.args = [ "",
"--disable_adapter_trimming",
"--disable_quality_filtering",
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}" : ""
].join(" ").trim()
publishDir = [
[
path: { "${params.outdir}/umi_dedup/fastq_extracted_umi" },
path: { "${params.outdir}/fastp/on_umi_extracted" },
mode: params.publish_dir_mode,
pattern: "*.{json,html}"
],
[
path: { "${params.outdir}/fastp/on_umi_extracted/log" },
mode: params.publish_dir_mode,
pattern: "*.log"
],
[
path: { "${params.outdir}/umi_dedup/fastq_extracted_umi" },
path: { "${params.outdir}/fastp/on_umi_extracted" },
mode: params.publish_dir_mode,
pattern: "*.fastq.gz",
enabled: params.save_umi_intermeds
pattern: "*.fail.fastq.gz",
enabled: params.save_trimmed_fail
]
]
}
Expand Down Expand Up @@ -140,6 +152,26 @@ process {
]
}

withName: 'UMITOOLS_EXTRACT' {
ext.args = [
params.umitools_extract_method ? "--extract-method=${params.umitools_extract_method}" : '',
params.umitools_bc_pattern ? "--bc-pattern='${params.umitools_bc_pattern}'" : '',
].join(' ').trim()
publishDir = [
[
path: { "${params.outdir}/umi_dedup/fastq_extracted_umi" },
mode: params.publish_dir_mode,
pattern: "*.log"
],
[
path: { "${params.outdir}/umi_dedup/fastq_extracted_umi" },
mode: params.publish_dir_mode,
pattern: "*.fastq.gz",
enabled: params.save_umi_intermeds
]
]
}

//
// MIRTRACE QC
//
Expand Down
2 changes: 1 addition & 1 deletion conf/test_umi.config
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ params {
//UMI Specific testcase
with_umi = true
umitools_extract_method = 'regex'
umitools_bc_pattern = '.+AACTGTAGGCACCATCAAT{s<=2}(?P<umi_1>.{12})(?P<discard_2>.*)'
umitools_bc_pattern = '.+(?P<discard_1>AACTGTAGGCACCATCAAT){s<=2}(?P<umi_1>.{12})(?P<discard_2>.*)'
save_umi_intermeds = true
}
4 changes: 2 additions & 2 deletions modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
},
"fastqc": {
"branch": "master",
"git_sha": "c9488585ce7bd35ccd2a30faa2371454c8112fb9",
"git_sha": "f4ae1d942bd50c5c0b9bd2de1393ce38315ba57c",
"installed_by": ["fastq_fastqc_umitools_fastp"]
},
"multiqc": {
Expand Down Expand Up @@ -62,7 +62,7 @@
},
"umicollapse": {
"branch": "master",
"git_sha": "6971511e34fb6563a48f1bf583238a7c49654910",
"git_sha": "2e561f4551ce3df2bc60016f7ea359f2ed4bce49",
"installed_by": ["modules"]
},
"umitools/extract": {
Expand Down
14 changes: 7 additions & 7 deletions modules/nf-core/fastqc/tests/main.nf.test

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

76 changes: 72 additions & 4 deletions modules/nf-core/fastqc/tests/main.nf.test.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion modules/nf-core/umicollapse/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ params {

// UMI handling
with_umi = false
skip_umi_extract = false
skip_umi_extract = true //Needs to be true for fastq mode in collapsing reads
umitools_extract_method = 'string'
umitools_bc_pattern = null
umi_discard_read = null
Expand All @@ -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
2 changes: 1 addition & 1 deletion nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@
},
"fastp_max_length": {
"type": "integer",
"default": 40,
"default": 100,
"description": "Maximum filter length for raw reads.",
"fa_icon": "fas fa-ruler-horizontal"
},
Expand Down
5 changes: 1 addition & 4 deletions subworkflows/local/mirna_quant.nf
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ workflow MIRNA_QUANT {
BAM_STATS_MATURE ( BOWTIE_MAP_MATURE.out.bam, FORMAT_MATURE.out.formatted_fasta )
ch_versions = ch_versions.mix(BAM_STATS_MATURE.out.versions)



PARSE_HAIRPIN ( hairpin ).parsed_fasta.set { hairpin_parsed }
ch_versions = ch_versions.mix(PARSE_HAIRPIN.out.versions)

Expand All @@ -75,15 +73,14 @@ workflow MIRNA_QUANT {
BAM_STATS_HAIRPIN ( BOWTIE_MAP_HAIRPIN.out.bam, FORMAT_HAIRPIN.out.formatted_fasta )
ch_versions = ch_versions.mix(BAM_STATS_HAIRPIN.out.versions)


BAM_STATS_MATURE.out.idxstats.collect{it[1]}
.mix(BAM_STATS_HAIRPIN.out.idxstats.collect{it[1]})
.dump(tag:'edger')
.flatten()
.collect()
.set { edger_input }
EDGER_QC ( edger_input )

EDGER_QC ( edger_input )
ch_versions.mix(EDGER_QC.out.versions)

reads
Expand Down
17 changes: 17 additions & 0 deletions subworkflows/local/mirtrace.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//
// Quantify mirna with bowtie and mirtop
//

include { MIRTRACE_RUN } from '../../modules/local/mirtrace'

workflow MIRTRACE {
take:
reads // channel: [ val(adapterseq), [ val(ids) ], [ path(reads) ] ]

main:
reads | MIRTRACE_RUN

emit:
results = MIRTRACE_RUN.out.mirtrace
versions = MIRTRACE_RUN.out.versions
}
Loading
Loading