Skip to content

Commit

Permalink
Merge pull request #427 from atrigila/add_pigz
Browse files Browse the repository at this point in the history
Add nf-core `pigz uncompress`
  • Loading branch information
atrigila authored Sep 17, 2024
2 parents ef77e5c + a41a338 commit 1e29e16
Show file tree
Hide file tree
Showing 18 changed files with 187 additions and 99 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [[#405]](https://github.com/nf-core/smrnaseq/pull/405) - Fix [Umicollapse algo wrong set](https://github.com/nf-core/smrnaseq/issues/404) - Fix potential bug in Umicollapse (not effective as we do not allow PE data in smrnaseq - but for consistency)
- [[#420]](https://github.com/nf-core/smrnaseq/pull/420) - Fix [mirTrace produces an error in test nextflex](https://github.com/nf-core/smrnaseq/issues/419) - Allow config mode to be used in mirtrace/qc
- [[#425]](https://github.com/nf-core/smrnaseq/pull/425) - Raise [minimum required NXF version for pipeline](https://github.com/nf-core/smrnaseq/issues/424) - usage of `arity` in some modules now requires this
- [[#426]](https://github.com/nf-core/smrnaseq/pull/426) - Add [nf-core mirtop](https://github.com/nf-core/smrnaseq/issues/426) - replace local for nf-core `mirtop`
- [[#426]](https://github.com/nf-core/smrnaseq/pull/426) - Add [nf-core mirtop](https://github.com/nf-core/smrnaseq/issues/417) - replace local `mirtop`
- [[#427]](https://github.com/nf-core/smrnaseq/pull/427) - Add [nf-core pigz uncompress](https://github.com/nf-core/smrnaseq/issues/422) - replace local `mirdeep_pigz`
- [[#429]](https://github.com/nf-core/smrnaseq/pull/429) - Make [saving of intermediate files optional](https://github.com/nf-core/smrnaseq/issues/424) - Allows user to choose whether to save intermediate files or not. Replaces several params that referred to the same such as `params.save_aligned` and `params.save_aligned_mirna_quant`.

## v2.3.1 - 2024-04-18 - Gray Zinc Dalmation Patch
Expand Down
15 changes: 7 additions & 8 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -347,14 +347,7 @@ process {
enabled: params.save_intermediates
]
}
withName: 'MIRTOP_QUANT' {
publishDir = [
//mirtop already part of the output folder
path: { "${params.outdir}/mirna_quant/" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}


// Mirtop

Expand Down Expand Up @@ -429,6 +422,12 @@ process {
//
// MIRDEEP
//

withName: 'PIGZ_UNCOMPRESS' {
tag = {"${meta.id}"}
stageInMode = 'copy'
}

withName: 'NFCORE_SMRNASEQ:MIRDEEP2:MIRDEEP2_MAPPER' {
publishDir = [
path: { "${params.outdir}/mirdeep2/mapper" },
Expand Down
3 changes: 1 addition & 2 deletions conf/test_contamination_tech_reps.config
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ params {
input = 'https://github.com/nf-core/test-datasets/raw/smrnaseq/samplesheet/v2.0/samplesheet_technical_repeats_short.csv'

mirtrace_species = 'hsa'
save_merged = false
save_aligned_mirna_quant = false
save_intermediates = true

skip_multiqc = true
skip_mirdeep = true
Expand Down
3 changes: 1 addition & 2 deletions conf/test_mirgenedb.config
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ params {
mirgenedb_species = "Hsa"

skip_mirdeep = true
save_merged = false
save_aligned_mirna_quant = false
save_intermediates = true

}

Expand Down
1 change: 1 addition & 0 deletions conf/test_nextflex.config
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ params {
mirtrace_species = 'hsa'

skip_mirdeep = true
save_intermediates = true

}

Expand Down
3 changes: 1 addition & 2 deletions conf/test_skipfastp.config
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ params {
mirtrace_species = 'hsa'
skip_mirdeep = true
skip_fastp = true
save_merged = false
save_aligned_mirna_quant = false
save_intermediates = true
}

// Do not include any additional config so it defaults to protocol custom
3 changes: 1 addition & 2 deletions conf/test_technical_repeats.config
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ params {

mirtrace_species = 'hsa'
skip_mirdeep = true
save_merged = false
save_aligned_mirna_quant = false
save_intermediates = true

skip_fastqc = true
skip_multiqc = true
Expand Down
7 changes: 4 additions & 3 deletions conf/test_umi.config
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,10 @@ params {

//UMI Specific testcase
with_umi = true
umitools_extract_method = 'regex'
umitools_bc_pattern = '.+(?P<discard_1>AACTGTAGGCACCATCAAT){s<=2}(?P<umi_1>.{12})(?P<discard_2>.*)'
save_umi_intermeds = true
umitools_extract_method = 'regex'
umitools_bc_pattern = '.+(?P<discard_1>AACTGTAGGCACCATCAAT){s<=2}(?P<umi_1>.{12})(?P<discard_2>.*)'
save_umi_intermeds = true
save_intermediates = true
}

// Include illumina config to run test without additional profiles
Expand Down
5 changes: 5 additions & 0 deletions modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@
"git_sha": "b80f5fd12ff7c43938f424dd76392a2704fa2396",
"installed_by": ["modules"]
},
"pigz/uncompress": {
"branch": "master",
"git_sha": "c00055a0b13d622b4f1f51a8e5be31deaf99ded7",
"installed_by": ["modules"]
},
"samtools/flagstat": {
"branch": "master",
"git_sha": "46eca555142d6e597729fcb682adcc791796f514",
Expand Down
31 changes: 0 additions & 31 deletions modules/local/mirdeep2_prepare.nf

This file was deleted.

43 changes: 0 additions & 43 deletions modules/local/mirtop_quant.nf

This file was deleted.

48 changes: 48 additions & 0 deletions modules/nf-core/pigz/uncompress/main.nf

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

42 changes: 42 additions & 0 deletions modules/nf-core/pigz/uncompress/meta.yml

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

33 changes: 33 additions & 0 deletions modules/nf-core/pigz/uncompress/tests/main.nf.test

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

35 changes: 35 additions & 0 deletions modules/nf-core/pigz/uncompress/tests/main.nf.test.snap

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

2 changes: 2 additions & 0 deletions modules/nf-core/pigz/uncompress/tests/tags.yml

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

8 changes: 4 additions & 4 deletions subworkflows/local/mirdeep2.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Quantify mirna with bowtie and mirtop
//

include { MIRDEEP2_PIGZ } from '../../modules/local/mirdeep2_prepare'
include { PIGZ_UNCOMPRESS } from '../../modules/nf-core/pigz/uncompress/main'
include { MIRDEEP2_MAPPER } from '../../modules/local/mirdeep2_mapper'
include { MIRDEEP2_RUN } from '../../modules/local/mirdeep2_run'

Expand All @@ -17,10 +17,10 @@ workflow MIRDEEP2 {
main:
ch_versions = Channel.empty()

MIRDEEP2_PIGZ ( reads )
ch_versions = ch_versions.mix(MIRDEEP2_PIGZ.out.versions.first())
PIGZ_UNCOMPRESS ( reads )
ch_versions = ch_versions.mix(PIGZ_UNCOMPRESS.out.versions.first())

MIRDEEP2_MAPPER ( MIRDEEP2_PIGZ.out.reads, index )
MIRDEEP2_MAPPER ( PIGZ_UNCOMPRESS.out.file, index )
ch_versions = ch_versions.mix(MIRDEEP2_MAPPER.out.versions.first())

MIRDEEP2_RUN ( fasta.map{meta,file->file}, MIRDEEP2_MAPPER.out.mirdeep2_inputs, hairpin, mature )
Expand Down
1 change: 0 additions & 1 deletion subworkflows/local/mirna_quant.nf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ include { BAM_SORT_STATS_SAMTOOLS as BAM_STATS_MATURE
BAM_SORT_STATS_SAMTOOLS as BAM_STATS_HAIRPIN } from '../nf-core/bam_sort_stats_samtools'

include { SEQCLUSTER_COLLAPSE } from '../../modules/nf-core/seqcluster/collapse/main'
include { MIRTOP_QUANT } from '../../modules/local/mirtop_quant.nf'
include { TABLE_MERGE } from '../../modules/local/datatable_merge/datatable_merge.nf'
include { EDGER_QC } from '../../modules/local/edger_qc/edger_qc.nf'
include { BAM_STATS_MIRNA_MIRTOP } from '../../subworkflows/nf-core/bam_stats_mirna_mirtop/main'
Expand Down

0 comments on commit 1e29e16

Please sign in to comment.