Skip to content

Commit

Permalink
Merge branch 'nf_tests_blat' of https://github.com/atrigila/smrnaseq
Browse files Browse the repository at this point in the history
…into nf_tests_blat
  • Loading branch information
atrigila committed Aug 26, 2024
2 parents 13d77c5 + 13ab7bf commit c425db9
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 7 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
- "test_index"
- "test_technical_repeats"
- "test_mirgenedb"
- "test_skipfastp"
steps:
- name: Check out pipeline code
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [[#380]](https://github.com/nf-core/smrnaseq/pull/380) - Fix checking number of samples which causes error in plotMDS. Add nf-tests for local modules using custom R scripts: [edgeR_mirBase.R](https://github.com/nf-core/smrnaseq/issues/187).
- [[#378]](https://github.com/nf-core/smrnaseq/pull/378) - Fix [`--mirtrace_species` bug](<(https://github.com/nf-core/smrnaseq/issues/348)>). Make `MIRTRACE` process conditional. Add mirgenedb test.
- [[#375]](https://github.com/nf-core/smrnaseq/pull/375) - Test merging of [technical repeats](https://github.com/nf-core/smrnaseq/issues/212).
- [[#383]](https://github.com/nf-core/smrnaseq/pull/383) - Fixes [parameter `--skip_fastp` throws an error](https://github.com/nf-core/smrnaseq/issues/263).
- [[#382]](https://github.com/nf-core/smrnaseq/pull/382) - Add nf-tests for local modules using custom R scripts: [collapse_mirtop.R](https://github.com/nf-core/smrnaseq/issues/174).
- [[#384]](https://github.com/nf-core/smrnaseq/pull/384) - Fix filter stats module and add filter contaminants test profile: [filter status bug fix](https://github.com/nf-core/smrnaseq/issues/360).
- [[#387]](https://github.com/nf-core/smrnaseq/pull/387) - Add nf-test to local module `blat_mirna` and fixes [contaminant filter failure because the Docker image for BLAT cannot be pulled](https://github.com/nf-core/smrnaseq/issues/354). Adds a small test profile to test contaminant filter results.
Expand Down
6 changes: 6 additions & 0 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@ process {
mode: params.publish_dir_mode,
pattern: "*.fail.fastq.gz",
enabled: params.save_trimmed_fail
],
[
path: { "${params.outdir}/fastp/fastq" },
mode: params.publish_dir_mode,
pattern: "*.fastp.fastq.gz",
enabled: params.save_merged
]
]
}
Expand Down
35 changes: 35 additions & 0 deletions conf/test_skipfastp.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Nextflow config file for running minimal tests
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Defines input files and everything required to run a fast and simple pipeline test.
Use as follows:
nextflow run nf-core/smrnaseq -profile test_skipfastp,<docker/singularity> --outdir <OUTDIR>
----------------------------------------------------------------------------------------
*/

params {
config_profile_name = 'Test profile'
config_profile_description = 'Minimal test dataset to check pipeline function skipping trimming'

// Limit resources so that this can run on GitHub Actions
max_cpus = 2
max_memory = '6.GB'
max_time = '6.h'

// Input data

input = 'https://github.com/nf-core/test-datasets/raw/smrnaseq/samplesheet/v2.0/samplesheet_skipfastp.csv'

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

cleanup = true //Otherwise tests dont run through properly.
}

// Do not include any additional config so it defaults to protocol custom
3 changes: 2 additions & 1 deletion nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ profiles {

}


test { includeConfig 'conf/test.config' }
test_umi { includeConfig 'conf/test_umi.config' }
test_no_genome { includeConfig 'conf/test_no_genome.config' }
Expand All @@ -248,7 +249,7 @@ profiles {
test_technical_repeats { includeConfig 'conf/test_technical_repeats.config' }
test_mirgenedb { includeConfig 'conf/test_mirgenedb.config' }
test_contamination { includeConfig 'conf/test_contamination.config' }

test_skipfastp { includeConfig 'conf/test_skipfastp.config' }


//Protocol specific profiles
Expand Down
23 changes: 17 additions & 6 deletions workflows/smrnaseq.nf
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,23 @@ workflow NFCORE_SMRNASEQ {
//
// MODULE: mirtrace QC
//
FASTQ_FASTQC_UMITOOLS_FASTP.out.adapter_seq
.join( ch_reads_for_mirna )
.dump()
.map { meta, adapter_seq, reads -> [adapter_seq, meta.id, reads] }
.groupTuple()
.set { ch_mirtrace_inputs }

// Define the main adapter sequence channel
ch_adapter_seq = FASTQ_FASTQC_UMITOOLS_FASTP.out.adapter_seq

// Define a fallback channel with the default value "custom"
ch_fallback_adapter_seq = ch_reads_for_mirna.map { meta, reads -> [meta, 'custom'] }

// Change to fallback channel if ch_adapter_seq is empty
ch_adapter_seq = ch_adapter_seq ? ch_fallback_adapter_seq : ch_adapter_seq

// Now join the adapter sequence channel with the reads channel
ch_adapter_seq
.join(ch_reads_for_mirna)
.map { meta, adapter_seq, reads -> [adapter_seq, meta.id, reads] }
.groupTuple()
.map { adapter_seq, ids, reads_list -> [adapter_seq, ids, reads_list.flatten()] }
.set { ch_mirtrace_inputs }

//
// SUBWORKFLOW: MIRTRACE
Expand Down

0 comments on commit c425db9

Please sign in to comment.