diff --git a/.nf-core.yml b/.nf-core.yml index 1f79c1a..3d97354 100644 --- a/.nf-core.yml +++ b/.nf-core.yml @@ -34,5 +34,8 @@ lint: - custom_config - manifest.name - manifest.homePage + - params.max_cpus + - params.max_memory + - params.max_time readme: - nextflow_badge diff --git a/assets/schema_input.json b/assets/schema_input.json index dc3b468..f1060cf 100644 --- a/assets/schema_input.json +++ b/assets/schema_input.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema", + "$schema": "https://json-schema.org/draft-07/schema", "$id": "https://raw.githubusercontent.com/phac-nml/fetchdatairidanext/main/assets/schema_input.json", "title": "phac-nml/fetchdatairidanext pipeline - params.input schema", "description": "Schema for the file provided with params.input", diff --git a/nextflow_schema.json b/nextflow_schema.json index e7709da..a5f1c26 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema", + "$schema": "https://json-schema.org/draft-07/schema", "$id": "https://raw.githubusercontent.com/phac-nml/fetchdatairidanext/main/nextflow_schema.json", "title": "phac-nml/fetchdatairidanext pipeline parameters", "description": "IRIDA Next NCBI Download pipeline", diff --git a/tests/pipelines/fetchdatairidanext.nf.test b/tests/pipelines/fetchdatairidanext.nf.test deleted file mode 100644 index b6779c1..0000000 --- a/tests/pipelines/fetchdatairidanext.nf.test +++ /dev/null @@ -1,84 +0,0 @@ -nextflow_pipeline { - - name "Test fetching small datasets from NCBI" - script "main.nf" - - test("basic integration test") { - - when { - params { - input = "$baseDir/tests/data/samplesheet.csv" - outdir = "test1_out" - } - } - - then { - assert workflow.success - - // IRIDA Next output file - assert path("$launchDir/test1_out/iridanext.output.json").json == path("$baseDir/tests/data/test1_iridanext.output.json").json - - // Output data - assert path("$launchDir/test1_out/reads/ERR1109373_1.fastq.gz").linesGzip.size() == 512 - assert path("$launchDir/test1_out/reads/ERR1109373_2.fastq.gz").linesGzip.size() == 512 - assert path("$launchDir/test1_out/reads/SRR13191702_1.fastq.gz").linesGzip.size() == 364 - assert path("$launchDir/test1_out/reads/SRR13191702_2.fastq.gz").linesGzip.size() == 364 - } - } - - test("integration test with prefetch failures") { - - when { - params { - input = "$baseDir/tests/data/errorsheet.csv" - outdir = "results" - } - } - - then { - assert workflow.success - - // IRIDA Next output file - assert path("$launchDir/results/iridanext.output.json").json == path("$baseDir/tests/data/prefetch_errors_iridanext.output.json").json - - // Output data: - assert path("$launchDir/results/reads/ERR1109373_1.fastq.gz").linesGzip.size() == 512 - assert path("$launchDir/results/reads/ERR1109373_2.fastq.gz").linesGzip.size() == 512 - assert path("$launchDir/results/reads/SRR13191702_1.fastq.gz").linesGzip.size() == 364 - assert path("$launchDir/results/reads/SRR13191702_2.fastq.gz").linesGzip.size() == 364 - - // These files should have failed, and have no output reads: - assert path("$launchDir/results/reads/SRR999908_1.fastq.gz").exists() == false - assert path("$launchDir/results/reads/SRR999908_2.fastq.gz").exists() == false - assert path("$launchDir/results/reads/SRR999934_1.fastq.gz").exists() == false - assert path("$launchDir/results/reads/SRR999934_2.fastq.gz").exists() == false - } - } - - test("Include sample_name in samplesheet") { - tag "sample_name" - when { - params { - input = "$baseDir/tests/data/add-samplesheet.csv" - outdir = "output" - } - } - - then { - assert workflow.success - assert path("$launchDir/output").exists() - // Check that the failures report has a sample_name column when included in the samplesheet - def lines = path("$launchDir/output/prefetch/failures_report.csv").readLines() - assert lines.size() == 3 - assert lines.contains("sample,sample_name,error_accession") - assert lines.contains("ERROR1,S2,SRR999908") - assert lines.contains("ERROR2,S3,SRR999934") - - // Check reads have been produced with modified names (i.e. suffixed with sample_name): - assert path("$launchDir/output/reads/S1_ERR1109373_1.fastq.gz").exists() - assert path("$launchDir/output/reads/S1_ERR1109373_2.fastq.gz").exists() - assert path("$launchDir/output/reads/S4_SRR13191702_1.fastq.gz").exists() - assert path("$launchDir/output/reads/S4_SRR13191702_2.fastq.gz").exists() - } - } -}