diff --git a/modules/local/sra_to_samplesheet/main.nf b/modules/local/sra_to_samplesheet/main.nf index 92edf5df..b663692b 100644 --- a/modules/local/sra_to_samplesheet/main.nf +++ b/modules/local/sra_to_samplesheet/main.nf @@ -44,6 +44,8 @@ process SRA_TO_SAMPLESHEET { pipeline_map << [ replicate: 1 ] } else if (pipeline == 'taxprofiler') { pipeline_map << [ fasta: '' ] + } else if (pipeline == 'ampliseq'){ + pipeline_map << [ run: ''] } } pipeline_map << meta_clone diff --git a/nextflow_schema.json b/nextflow_schema.json index 29f7b710..e7f22b0e 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -38,7 +38,7 @@ "type": "string", "fa_icon": "fab fa-apple", "description": "Name of supported nf-core pipeline e.g. 'rnaseq'. A samplesheet for direct use with the pipeline will be created with the appropriate columns.", - "enum": ["rnaseq", "atacseq", "viralrecon", "taxprofiler"] + "enum": ["rnaseq", "atacseq", "viralrecon", "taxprofiler", "ampliseq"] }, "nf_core_rnaseq_strandedness": { "type": "string", diff --git a/workflows/sra/tests/sra_nf_core_pipeline_ampliseq.nf.test b/workflows/sra/tests/sra_nf_core_pipeline_ampliseq.nf.test new file mode 100644 index 00000000..dbb553b7 --- /dev/null +++ b/workflows/sra/tests/sra_nf_core_pipeline_ampliseq.nf.test @@ -0,0 +1,55 @@ +nextflow_workflow { + + name "Test workflow: sra/main.nf" + script "../main.nf" + workflow "SRA" + tag "SRA_NF_CORE_PIPELINE_AMPLISEQ" + + // Dependencies + tag "SRA_IDS_TO_RUNINFO" + tag "SRA_RUNINFO_TO_FTP" + tag "SRA_FASTQ_FTP" + tag "SRA_TO_SAMPLESHEET" + tag "MULTIQC_MAPPINGS_CONFIG" + + test("Parameters: --nf_core_pipeline ampliseq") { + + when { + workflow { + """ + input[0] = Channel.from("DRX026011", "ERX1234253", "SRX6725035") + """ + } + params { + nf_core_pipeline = "ampliseq" + } + } + + then { + assert workflow.success + + assertAll( + { + with(workflow.out.samplesheet) { + assert path(get(0)).readLines().size() == 4 + assert path(get(0)).readLines()*.split(',')[0].take(4) == ['"sample', '"fastq_1"', '"fastq_2"', '"run"'] + assert path(get(0)).readLines()*.split(',').collect { it[0] } == ['"sample"', '"DRX026011"', '"ERX1234253"', '"SRX6725035"'] + assert path(get(0)).text.contains('Illumina HiSeq 2500') + } + }, + { + with(workflow.out.mappings) { + assert path(get(0)).readLines().size() == 4 + assert path(get(0)).readLines()*.split(',').collect { it[0] } == ['"sample"', '"DRX026011"', '"ERX1234253"', '"SRX6725035"'] + assert path(get(0)).text.contains('Illumina HiSeq 2500') + } + }, + { + with(workflow.out.sample_mappings) { + assert path(get(0)[0]).md5 == "1ac06bb95b503703430e74660bbdd768" + } + } + ) + } + } +}