-
Notifications
You must be signed in to change notification settings - Fork 182
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
141 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,4 @@ testing* | |
log/ | ||
reports/ | ||
testme.sh | ||
.nf-test/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
config { | ||
|
||
testsDir "tests" | ||
workDir ".nf-test" | ||
configFile "tests/nextflow.config" | ||
profile "docker" | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
nextflow_pipeline { | ||
|
||
name "Test Workflow main.nf" | ||
script "main.nf" | ||
|
||
test("test-dataset_alevin_aligner") { | ||
|
||
when { | ||
// the rest is taken from shared config | ||
params { | ||
aligner = 'alevin' | ||
outdir = "${outputDir}/results_alevin" | ||
|
||
// Limit resources so that this can run on GitHub Actions -- for some reason it had not been taken from shared config | ||
max_cpus = 2 | ||
max_memory = '6.GB' | ||
max_time = '6.h' | ||
} | ||
} | ||
|
||
then { | ||
|
||
// | ||
// General assertions | ||
// | ||
|
||
// Did it finish successfully? | ||
assert workflow.success | ||
|
||
// How many tasks were executed? | ||
assert workflow.trace.tasks().size() == 16 | ||
|
||
// How many results were produced? | ||
assert path("${outputDir}/results_alevin").list().size() == 5 | ||
assert path("${outputDir}/results_alevin/alevin").list().size() == 4 | ||
assert path("${outputDir}/results_alevin/alevin/mtx_conversions").list().size() == 4 | ||
assert path("${outputDir}/results_alevin/alevinqc").list().size() == 2 | ||
assert path("${outputDir}/results_alevin/fastqc").list().size() == 12 | ||
assert path("${outputDir}/results_alevin/multiqc").list().size() == 3 | ||
|
||
// | ||
// Check if files were produced | ||
// | ||
assert new File( "${outputDir}/results_alevin/alevin/Sample_X_alevin_results/af_quant/alevin/quants_mat_cols.txt" ).exists() | ||
assert new File( "${outputDir}/results_alevin/alevin/Sample_X_alevin_results/af_quant/alevin/quants_mat.mtx" ).exists() | ||
assert new File( "${outputDir}/results_alevin/alevin/Sample_X_alevin_results/af_quant/alevin/quants_mat_rows.txt" ).exists() | ||
|
||
assert new File( "${outputDir}/results_alevin/alevin/Sample_Y_alevin_results/af_quant/alevin/quants_mat_cols.txt" ).exists() | ||
assert new File( "${outputDir}/results_alevin/alevin/Sample_Y_alevin_results/af_quant/alevin/quants_mat.mtx" ).exists() | ||
assert new File( "${outputDir}/results_alevin/alevin/Sample_Y_alevin_results/af_quant/alevin/quants_mat_rows.txt" ).exists() | ||
|
||
// | ||
// Check if files are the same | ||
// | ||
assert snapshot( | ||
workflow, | ||
path( "${outputDir}/results_alevin/alevin/Sample_X_alevin_results/af_quant/alevin/quants_mat_cols.txt" ), | ||
path( "${outputDir}/results_alevin/alevin/Sample_X_alevin_results/af_quant/alevin/quants_mat.mtx" ), | ||
path( "${outputDir}/results_alevin/alevin/Sample_X_alevin_results/af_quant/alevin/quants_mat_rows.txt" ), | ||
path( "${outputDir}/results_alevin/alevin/Sample_Y_alevin_results/af_quant/alevin/quants_mat_cols.txt" ), | ||
path( "${outputDir}/results_alevin/alevin/Sample_Y_alevin_results/af_quant/alevin/quants_mat.mtx" ), | ||
path( "${outputDir}/results_alevin/alevin/Sample_Y_alevin_results/af_quant/alevin/quants_mat_rows.txt" ) | ||
).match() | ||
|
||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"test-dataset_alevin_aligner": { | ||
"content": [ | ||
{ | ||
"stderr": [ | ||
|
||
], | ||
"errorReport": "", | ||
"exitStatus": 0, | ||
"failed": false, | ||
"stdout": [ | ||
|
||
], | ||
"errorMessage": "", | ||
"trace": { | ||
"tasksFailed": 0, | ||
"tasksCount": 16, | ||
"tasksSucceeded": 16 | ||
}, | ||
"name": "workflow", | ||
"success": true | ||
}, | ||
"quants_mat_cols.txt:md5,e9868982c17a330392e38c2a5933cf97", | ||
"quants_mat.mtx:md5,b8aa7b3c488fd8923de50a3621d4991f", | ||
"quants_mat_rows.txt:md5,6227df5a13127b71c71fb18cd8574857", | ||
"quants_mat_cols.txt:md5,e9868982c17a330392e38c2a5933cf97", | ||
"quants_mat.mtx:md5,54cd12666016adce94c025b2e07f4b02", | ||
"quants_mat_rows.txt:md5,6b458a7777260ba90eccbe7919df934b" | ||
], | ||
"timestamp": "2024-01-19T10:28:35.652763852" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
======================================================================================== | ||
Nextflow config file for running tests | ||
======================================================================================== | ||
*/ | ||
|
||
// Copy from test.config for standardization | ||
params { | ||
config_profile_name = 'Test profile' | ||
config_profile_description = 'Minimal test dataset to check pipeline function' | ||
|
||
// 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/scrnaseq/samplesheet-2-0.csv' | ||
|
||
// Genome references | ||
fasta = 'https://github.com/nf-core/test-datasets/raw/scrnaseq/reference/GRCm38.p6.genome.chr19.fa' | ||
gtf = 'https://github.com/nf-core/test-datasets/raw/scrnaseq/reference/gencode.vM19.annotation.chr19.gtf' | ||
protocol = '10XV2' | ||
|
||
validationSchemaIgnoreParams = 'genomes' | ||
} | ||
|
||
process { | ||
withName: '.*:CELLRANGER_COUNT' { | ||
maxForks = 1 | ||
} | ||
} |