Skip to content

Commit

Permalink
Merge pull request #183 from drpatelh/nf-test
Browse files Browse the repository at this point in the history
Restructure local modules and main script names
  • Loading branch information
drpatelh authored Aug 17, 2023
2 parents 23d2f21 + de46456 commit 3f31ccc
Show file tree
Hide file tree
Showing 59 changed files with 680 additions and 586 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ jobs:
matrix:
NXF_VER: ${{ fromJson(needs.define_nxf_versions.outputs.matrix) }}
test_tags:
- "sra"
- "sra_force_sratools_download"
- "sra_skip_fastq"
- "sra_with_atacseq"
- "sra_with_rnaseq"
- "sra_with_rnaseq_specific_ena"
- "sra_with_taxprofiler"
- "sra_with_viralrecon"
- "modules_local"
- "sra_default_parameters"
- "sra_custom_ena_metadata_fields"
- "sra_force_sratools_download"
- "sra_nf_core_pipeline_atacseq"
- "sra_nf_core_pipeline_rnaseq"
- "sra_nf_core_pipeline_taxprofiler"
- "sra_nf_core_pipeline_viralrecon"
- "sra_skip_fastq_download"
profile:
- "docker"

Expand Down
4 changes: 2 additions & 2 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ if (WorkflowMain.isSraId(ch_input)) {

if (params.input_type == input_type) {
if (params.input_type == 'sra') {
include { SRA } from './workflows/sra/main'
include { SRA } from './workflows/sra'
} else if (params.input_type == 'synapse') {
include { SYNAPSE } from './workflows/synapse/main'
include { SYNAPSE } from './workflows/synapse'
}
} else {
exit 1, "Ids auto-detected as ${input_type}. Please provide '--input_type ${input_type}' as a parameter to the pipeline!"
Expand Down
3 changes: 2 additions & 1 deletion modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"custom/dumpsoftwareversions": {
"branch": "master",
"git_sha": "911696ea0b62df80e900ef244d7867d177971f73",
"installed_by": ["modules"]
"installed_by": ["modules"],
"patch": "modules/nf-core/custom/dumpsoftwareversions/custom-dumpsoftwareversions.diff"
},
"custom/sratoolsncbisettings": {
"branch": "master",
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
nextflow_process {

name "Test Process MULTIQC_MAPPINGS_CONFIG"
script "modules/local/multiqc_mappings_config/multiqc_mappings_config.nf"
name "Test process: MULTIQC_MAPPINGS_CONFIG"
script "modules/local/multiqc_mappings_config/main.nf"
process "MULTIQC_MAPPINGS_CONFIG"
tag "multiqc_mappings_config"
tag "modules"
tag "modules_local"
tag "multiqc_mappings_config"

test("SRX9626017_SRR13191702") {
test("Should run without failures") {

when {
params {
outdir = "$outputDir"
outdir = "$outputDir"
}

process {
"""
input[0] = file(params.test_data['modules_local']['multiqc_mappings_config'], checkIfExists: true)
Expand All @@ -22,10 +24,8 @@ nextflow_process {
then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out).match() },
{ assert snapshot(process.out).match() }
)
}

}

}
52 changes: 52 additions & 0 deletions modules/local/multiqc_mappings_config/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"SRX9626017_SRR13191702": {
"content": [
{
"0": [
[
"multiqc_config.yml:md5,7f3cb10fff83ba9eb3e8fa6862d1290a",
"versions.yml:md5,dd4c66f0551d15510b36bb2e2b2fdd73"
]
],
"1": [
"versions.yml:md5,dd4c66f0551d15510b36bb2e2b2fdd73"
],
"versions": [
"versions.yml:md5,dd4c66f0551d15510b36bb2e2b2fdd73"
],
"yml": [
[
"multiqc_config.yml:md5,7f3cb10fff83ba9eb3e8fa6862d1290a",
"versions.yml:md5,dd4c66f0551d15510b36bb2e2b2fdd73"
]
]
}
],
"timestamp": "2023-08-17T12:02:35+0000"
},
"Should run without failures": {
"content": [
{
"0": [
[
"multiqc_config.yml:md5,7f3cb10fff83ba9eb3e8fa6862d1290a",
"versions.yml:md5,dd4c66f0551d15510b36bb2e2b2fdd73"
]
],
"1": [
"versions.yml:md5,dd4c66f0551d15510b36bb2e2b2fdd73"
],
"versions": [
"versions.yml:md5,dd4c66f0551d15510b36bb2e2b2fdd73"
],
"yml": [
[
"multiqc_config.yml:md5,7f3cb10fff83ba9eb3e8fa6862d1290a",
"versions.yml:md5,dd4c66f0551d15510b36bb2e2b2fdd73"
]
]
}
],
"timestamp": "2023-08-17T12:02:35+0000"
}
}
File renamed without changes.
34 changes: 0 additions & 34 deletions modules/local/sra_fastq_ftp/sra_fastq_ftp.nf.test

This file was deleted.

34 changes: 34 additions & 0 deletions modules/local/sra_fastq_ftp/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
nextflow_process {

name "Test process: SRA_FASTQ_FTP"
script "modules/local/sra_fastq_ftp/main.nf"
process "SRA_FASTQ_FTP"
tag "modules"
tag "modules_local"
tag "sra_fastq_ftp"

test("Should run without failures") {

when {
params {
outdir = "$outputDir"
}

process {
"""
input[0] = [
[ id:'SRX9626017_SRR13191702', single_end:false, md5_1: '89c5be920021a035084d8aeb74f32df7', md5_2: '56271be38a80db78ef3bdfc5d9909b98' ], // meta map
params.test_data['modules_local']['sra_fastq_ftp']
]
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out).match() }
)
}
}
}
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
nextflow_process {

name "Test Process SRA_IDS_TO_RUNINFO"
script "modules/local/sra_ids_to_runinfo/sra_ids_to_runinfo.nf"
name "Test process: SRA_IDS_TO_RUNINFO"
script "modules/local/sra_ids_to_runinfo/main.nf"
process "SRA_IDS_TO_RUNINFO"
tag "sra_ids_to_runinfo"
tag "modules"
tag "modules_local"
tag "sra_ids_to_runinfo"

test("Should run without failures") {

when {
params {
outdir = "$outputDir"
outdir = "$outputDir"
}

process {
"""
input[0] = 'SRR13191702'
Expand All @@ -23,10 +25,8 @@ nextflow_process {
then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out).match() },
{ assert snapshot(process.out).match() }
)
}

}

}
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
nextflow_process {

name "Test Process SRA_MERGE_SAMPLESHEET"
script "modules/local/sra_merge_samplesheet/sra_merge_samplesheet.nf"
name "Test process: SRA_MERGE_SAMPLESHEET"
script "modules/local/sra_merge_samplesheet/main.nf"
process "SRA_MERGE_SAMPLESHEET"
tag "sra_merge_samplesheet"
tag "modules"
tag "modules_local"
tag "sra_merge_samplesheet"

test("Should run without failures") {

when {
params {
outdir = "$outputDir"
outdir = "$outputDir"
}

process {
"""
input[0] = params.test_data['modules_local']['sra_merge_samplesheet_samplesheets'].collect { file(it, checkIfExists: true) }
Expand All @@ -23,10 +25,8 @@ nextflow_process {
then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out).match() },
{ assert snapshot(process.out).match() }
)
}

}

}
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
nextflow_process {

name "Test Process SRA_RUNINFO_TO_FTP"
script "modules/local/sra_runinfo_to_ftp/sra_runinfo_to_ftp.nf"
name "Test process: SRA_RUNINFO_TO_FTP"
script "modules/local/sra_runinfo_to_ftp/main.nf"
process "SRA_RUNINFO_TO_FTP"
tag "sra_runinfo_to_ftp"
tag "modules"
tag "modules_local"
tag "sra_runinfo_to_ftp"

test("Should run without failures") {

when {
params {
outdir = "$outputDir"
outdir = "$outputDir"
}

process {
"""
input[0] = file(params.test_data['modules_local']['sra_runinfo_to_ftp'], checkIfExists: true)
Expand All @@ -22,10 +24,8 @@ nextflow_process {
then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out).match() },
{ assert snapshot(process.out).match() }
)
}

}

}
File renamed without changes.
33 changes: 0 additions & 33 deletions modules/local/sra_to_samplesheet/sra_to_samplesheet.nf.test

This file was deleted.

Loading

0 comments on commit 3f31ccc

Please sign in to comment.