diff --git a/tests/main_pipeline_alevin.test b/tests/main_pipeline_alevin.test index f2730699..303a625b 100644 --- a/tests/main_pipeline_alevin.test +++ b/tests/main_pipeline_alevin.test @@ -20,42 +20,46 @@ nextflow_pipeline { 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/mtx_conversions/Sample_X/Sample_X_matrix.h5ad" ).exists() - assert new File( "${outputDir}/results_alevin/alevin/mtx_conversions/Sample_Y/Sample_Y_matrix.h5ad" ).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() + assertAll( + + // + // 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/mtx_conversions/Sample_X/Sample_X_matrix.h5ad" ).exists()}, + {assert new File( "${outputDir}/results_alevin/alevin/mtx_conversions/Sample_Y/Sample_Y_matrix.h5ad" ).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()} + + ) // end of assertAll() } } diff --git a/tests/main_pipeline_cellranger.test b/tests/main_pipeline_cellranger.test index 314177e0..996c0f76 100644 --- a/tests/main_pipeline_cellranger.test +++ b/tests/main_pipeline_cellranger.test @@ -20,50 +20,54 @@ nextflow_pipeline { then { - // - // General assertions - // + assertAll( - // Did it finish successfully? - assert workflow.success + // + // General assertions + // - // How many tasks were executed? - assert workflow.trace.tasks().size() == 15 + // Did it finish successfully? + {assert workflow.success}, - // How many results were produced? - assert path("${outputDir}/results_cellranger").list().size() == 4 - assert path("${outputDir}/results_cellranger/cellranger").list().size() == 4 - assert path("${outputDir}/results_cellranger/cellranger/mtx_conversions").list().size() == 4 - assert path("${outputDir}/results_cellranger/cellranger/count").list().size() == 3 - assert path("${outputDir}/results_cellranger/fastqc").list().size() == 12 - assert path("${outputDir}/results_cellranger/multiqc").list().size() == 3 + // How many tasks were executed? + {assert workflow.trace.tasks().size() == 15}, - // - // Check if files were produced - // - assert new File( "${outputDir}/results_cellranger/cellranger/mtx_conversions/Sample_X/Sample_X_matrix.h5ad" ).exists() - assert new File( "${outputDir}/results_cellranger/cellranger/mtx_conversions/Sample_Y/Sample_Y_matrix.h5ad" ).exists() + // How many results were produced? + {assert path("${outputDir}/results_cellranger").list().size() == 4}, + {assert path("${outputDir}/results_cellranger/cellranger").list().size() == 4}, + {assert path("${outputDir}/results_cellranger/cellranger/mtx_conversions").list().size() == 4}, + {assert path("${outputDir}/results_cellranger/cellranger/count").list().size() == 3}, + {assert path("${outputDir}/results_cellranger/fastqc").list().size() == 12}, + {assert path("${outputDir}/results_cellranger/multiqc").list().size() == 3}, - // - // Check if files are the same - // - assert snapshot( - workflow, - path( "${outputDir}/results_cellranger/cellranger/count/Sample_X/outs/filtered_feature_bc_matrix/barcodes.tsv.gz" ), - path( "${outputDir}/results_cellranger/cellranger/count/Sample_X/outs/filtered_feature_bc_matrix/features.tsv.gz" ), - path( "${outputDir}/results_cellranger/cellranger/count/Sample_X/outs/filtered_feature_bc_matrix/matrix.mtx.gz" ), - path( "${outputDir}/results_cellranger/cellranger/count/Sample_Y/outs/filtered_feature_bc_matrix/barcodes.tsv.gz" ), - path( "${outputDir}/results_cellranger/cellranger/count/Sample_Y/outs/filtered_feature_bc_matrix/features.tsv.gz" ), - path( "${outputDir}/results_cellranger/cellranger/count/Sample_Y/outs/filtered_feature_bc_matrix/matrix.mtx.gz" ), - path( "${outputDir}/results_cellranger/cellranger/count/Sample_X/outs/raw_feature_bc_matrix/barcodes.tsv.gz" ), - path( "${outputDir}/results_cellranger/cellranger/count/Sample_X/outs/raw_feature_bc_matrix/features.tsv.gz" ), - path( "${outputDir}/results_cellranger/cellranger/count/Sample_X/outs/raw_feature_bc_matrix/matrix.mtx.gz" ), - path( "${outputDir}/results_cellranger/cellranger/count/Sample_Y/outs/raw_feature_bc_matrix/barcodes.tsv.gz" ), - path( "${outputDir}/results_cellranger/cellranger/count/Sample_Y/outs/raw_feature_bc_matrix/features.tsv.gz" ), - path( "${outputDir}/results_cellranger/cellranger/count/Sample_Y/outs/raw_feature_bc_matrix/matrix.mtx.gz" ), - path( "${outputDir}/results_cellranger/cellranger/mtx_conversions/Sample_X/Sample_X_matrix.rds" ), - path( "${outputDir}/results_cellranger/cellranger/mtx_conversions/Sample_Y/Sample_Y_matrix.rds" ) - ).match() + // + // Check if files were produced + // + {assert new File( "${outputDir}/results_cellranger/cellranger/mtx_conversions/Sample_X/Sample_X_matrix.h5ad" ).exists()}, + {assert new File( "${outputDir}/results_cellranger/cellranger/mtx_conversions/Sample_Y/Sample_Y_matrix.h5ad" ).exists()}, + + // + // Check if files are the same + // + {assert snapshot( + workflow, + path( "${outputDir}/results_cellranger/cellranger/count/Sample_X/outs/filtered_feature_bc_matrix/barcodes.tsv.gz" ), + path( "${outputDir}/results_cellranger/cellranger/count/Sample_X/outs/filtered_feature_bc_matrix/features.tsv.gz" ), + path( "${outputDir}/results_cellranger/cellranger/count/Sample_X/outs/filtered_feature_bc_matrix/matrix.mtx.gz" ), + path( "${outputDir}/results_cellranger/cellranger/count/Sample_Y/outs/filtered_feature_bc_matrix/barcodes.tsv.gz" ), + path( "${outputDir}/results_cellranger/cellranger/count/Sample_Y/outs/filtered_feature_bc_matrix/features.tsv.gz" ), + path( "${outputDir}/results_cellranger/cellranger/count/Sample_Y/outs/filtered_feature_bc_matrix/matrix.mtx.gz" ), + path( "${outputDir}/results_cellranger/cellranger/count/Sample_X/outs/raw_feature_bc_matrix/barcodes.tsv.gz" ), + path( "${outputDir}/results_cellranger/cellranger/count/Sample_X/outs/raw_feature_bc_matrix/features.tsv.gz" ), + path( "${outputDir}/results_cellranger/cellranger/count/Sample_X/outs/raw_feature_bc_matrix/matrix.mtx.gz" ), + path( "${outputDir}/results_cellranger/cellranger/count/Sample_Y/outs/raw_feature_bc_matrix/barcodes.tsv.gz" ), + path( "${outputDir}/results_cellranger/cellranger/count/Sample_Y/outs/raw_feature_bc_matrix/features.tsv.gz" ), + path( "${outputDir}/results_cellranger/cellranger/count/Sample_Y/outs/raw_feature_bc_matrix/matrix.mtx.gz" ), + path( "${outputDir}/results_cellranger/cellranger/mtx_conversions/Sample_X/Sample_X_matrix.rds" ), + path( "${outputDir}/results_cellranger/cellranger/mtx_conversions/Sample_Y/Sample_Y_matrix.rds" ) + ).match()} + + ) // end of assertAll() } } diff --git a/tests/main_pipeline_kallisto.test b/tests/main_pipeline_kallisto.test index 1b06f249..98ede8c4 100644 --- a/tests/main_pipeline_kallisto.test +++ b/tests/main_pipeline_kallisto.test @@ -20,45 +20,49 @@ nextflow_pipeline { then { - // - // General assertions - // + assertAll( - // Did it finish successfully? - assert workflow.success + // + // General assertions + // - // How many tasks were executed? - assert workflow.trace.tasks().size() == 14 + // Did it finish successfully? + {assert workflow.success}, - // How many results were produced? - assert path("${outputDir}/results_kallisto").list().size() == 4 - assert path("${outputDir}/results_kallisto/kallisto").list().size() == 4 - assert path("${outputDir}/results_kallisto/kallisto/mtx_conversions").list().size() == 4 - assert path("${outputDir}/results_kallisto/kallisto/Sample_X.count").list().size() == 9 - assert path("${outputDir}/results_kallisto/kallisto/Sample_Y.count").list().size() == 9 - assert path("${outputDir}/results_kallisto/fastqc").list().size() == 12 - assert path("${outputDir}/results_kallisto/multiqc").list().size() == 3 + // How many tasks were executed? + {assert workflow.trace.tasks().size() == 14}, - // - // Check if files were produced - // - assert new File( "${outputDir}/results_kallisto/kallisto/mtx_conversions/Sample_X/Sample_X_matrix.h5ad" ).exists() - assert new File( "${outputDir}/results_kallisto/kallisto/mtx_conversions/Sample_Y/Sample_Y_matrix.h5ad" ).exists() + // How many results were produced? + {assert path("${outputDir}/results_kallisto").list().size() == 4}, + {assert path("${outputDir}/results_kallisto/kallisto").list().size() == 4}, + {assert path("${outputDir}/results_kallisto/kallisto/mtx_conversions").list().size() == 4}, + {assert path("${outputDir}/results_kallisto/kallisto/Sample_X.count").list().size() == 9}, + {assert path("${outputDir}/results_kallisto/kallisto/Sample_Y.count").list().size() == 9}, + {assert path("${outputDir}/results_kallisto/fastqc").list().size() == 12}, + {assert path("${outputDir}/results_kallisto/multiqc").list().size() == 3}, - // - // Check if files are the same - // - assert snapshot( - workflow, - path( "${outputDir}/results_kallisto/kallisto/Sample_X.count/counts_unfiltered/cells_x_genes.barcodes.txt" ), - path( "${outputDir}/results_kallisto/kallisto/Sample_X.count/counts_unfiltered/cells_x_genes.genes.txt" ), - path( "${outputDir}/results_kallisto/kallisto/Sample_X.count/counts_unfiltered/cells_x_genes.mtx" ), - path( "${outputDir}/results_kallisto/kallisto/Sample_Y.count/counts_unfiltered/cells_x_genes.barcodes.txt" ), - path( "${outputDir}/results_kallisto/kallisto/Sample_Y.count/counts_unfiltered/cells_x_genes.genes.txt" ), - path( "${outputDir}/results_kallisto/kallisto/Sample_Y.count/counts_unfiltered/cells_x_genes.mtx" ), - path( "${outputDir}/results_kallisto/kallisto/mtx_conversions/Sample_X/Sample_X_matrix.rds" ), - path( "${outputDir}/results_kallisto/kallisto/mtx_conversions/Sample_Y/Sample_Y_matrix.rds" ) - ).match() + // + // Check if files were produced + // + {assert new File( "${outputDir}/results_kallisto/kallisto/mtx_conversions/Sample_X/Sample_X_matrix.h5ad" ).exists()}, + {assert new File( "${outputDir}/results_kallisto/kallisto/mtx_conversions/Sample_Y/Sample_Y_matrix.h5ad" ).exists()}, + + // + // Check if files are the same + // + {assert snapshot( + workflow, + path( "${outputDir}/results_kallisto/kallisto/Sample_X.count/counts_unfiltered/cells_x_genes.barcodes.txt" ), + path( "${outputDir}/results_kallisto/kallisto/Sample_X.count/counts_unfiltered/cells_x_genes.genes.txt" ), + path( "${outputDir}/results_kallisto/kallisto/Sample_X.count/counts_unfiltered/cells_x_genes.mtx" ), + path( "${outputDir}/results_kallisto/kallisto/Sample_Y.count/counts_unfiltered/cells_x_genes.barcodes.txt" ), + path( "${outputDir}/results_kallisto/kallisto/Sample_Y.count/counts_unfiltered/cells_x_genes.genes.txt" ), + path( "${outputDir}/results_kallisto/kallisto/Sample_Y.count/counts_unfiltered/cells_x_genes.mtx" ), + path( "${outputDir}/results_kallisto/kallisto/mtx_conversions/Sample_X/Sample_X_matrix.rds" ), + path( "${outputDir}/results_kallisto/kallisto/mtx_conversions/Sample_Y/Sample_Y_matrix.rds" ) + ).match()} + + ) // end of assertAll() } } diff --git a/tests/main_pipeline_star.test b/tests/main_pipeline_star.test index de07c8d3..6616ea87 100644 --- a/tests/main_pipeline_star.test +++ b/tests/main_pipeline_star.test @@ -20,49 +20,53 @@ nextflow_pipeline { then { - // - // General assertions - // + assertAll( - // Did it finish successfully? - assert workflow.success + // + // General assertions + // - // How many tasks were executed? - assert workflow.trace.tasks().size() == 14 + // Did it finish successfully? + {assert workflow.success}, - // How many results were produced? - assert path("${outputDir}/results_star").list().size() == 4 - assert path("${outputDir}/results_star/star").list().size() == 3 - assert path("${outputDir}/results_star/star/mtx_conversions").list().size() == 4 - assert path("${outputDir}/results_star/fastqc").list().size() == 12 - assert path("${outputDir}/results_star/multiqc").list().size() == 3 + // How many tasks were executed? + {assert workflow.trace.tasks().size() == 14}, - // - // Check if files were produced - // - assert new File( "${outputDir}/results_star/star/mtx_conversions/Sample_X/Sample_X_matrix.h5ad" ).exists() - assert new File( "${outputDir}/results_star/star/mtx_conversions/Sample_Y/Sample_Y_matrix.h5ad" ).exists() + // How many results were produced? + {assert path("${outputDir}/results_star").list().size() == 4}, + {assert path("${outputDir}/results_star/star").list().size() == 3}, + {assert path("${outputDir}/results_star/star/mtx_conversions").list().size() == 4}, + {assert path("${outputDir}/results_star/fastqc").list().size() == 12}, + {assert path("${outputDir}/results_star/multiqc").list().size() == 3}, - // - // Check if files are the same - // - assert snapshot( - workflow, - path( "${outputDir}/results_star/star/Sample_X/Sample_X.SJ.out.tab" ), - path( "${outputDir}/results_star/star/Sample_X/Sample_X.Solo.out/Barcodes.stats" ), - path( "${outputDir}/results_star/star/Sample_X/Sample_X.Solo.out/Gene/filtered/matrix.mtx.gz" ), - path( "${outputDir}/results_star/star/Sample_X/Sample_X.Solo.out/Gene/filtered/features.tsv.gz" ), - path( "${outputDir}/results_star/star/Sample_X/Sample_X.Solo.out/Gene/filtered/barcodes.tsv.gz" ), - // path( "${outputDir}/results_star/star/mtx_conversions/Sample_X/Sample_X_matrix.h5ad" ), // does not match - path( "${outputDir}/results_star/star/mtx_conversions/Sample_X/Sample_X_matrix.rds" ), - path( "${outputDir}/results_star/star/Sample_Y/Sample_Y.SJ.out.tab" ), - path( "${outputDir}/results_star/star/Sample_Y/Sample_Y.Solo.out/Barcodes.stats" ), - path( "${outputDir}/results_star/star/Sample_Y/Sample_Y.Solo.out/Gene/filtered/matrix.mtx.gz" ), - path( "${outputDir}/results_star/star/Sample_Y/Sample_Y.Solo.out/Gene/filtered/features.tsv.gz" ), - path( "${outputDir}/results_star/star/Sample_Y/Sample_Y.Solo.out/Gene/filtered/barcodes.tsv.gz" ), - // path( "${outputDir}/results_star/star/mtx_conversions/Sample_Y/Sample_Y_matrix.h5ad" ), // does not match - path( "${outputDir}/results_star/star/mtx_conversions/Sample_Y/Sample_Y_matrix.rds" ), - ).match() + // + // Check if files were produced + // + {assert new File( "${outputDir}/results_star/star/mtx_conversions/Sample_X/Sample_X_matrix.h5ad" ).exists()}, + {assert new File( "${outputDir}/results_star/star/mtx_conversions/Sample_Y/Sample_Y_matrix.h5ad" ).exists()}, + + // + // Check if files are the same + // + {assert snapshot( + workflow, + path( "${outputDir}/results_star/star/Sample_X/Sample_X.SJ.out.tab" ), + path( "${outputDir}/results_star/star/Sample_X/Sample_X.Solo.out/Barcodes.stats" ), + path( "${outputDir}/results_star/star/Sample_X/Sample_X.Solo.out/Gene/filtered/matrix.mtx.gz" ), + path( "${outputDir}/results_star/star/Sample_X/Sample_X.Solo.out/Gene/filtered/features.tsv.gz" ), + path( "${outputDir}/results_star/star/Sample_X/Sample_X.Solo.out/Gene/filtered/barcodes.tsv.gz" ), + // path( "${outputDir}/results_star/star/mtx_conversions/Sample_X/Sample_X_matrix.h5ad" ), // does not match + path( "${outputDir}/results_star/star/mtx_conversions/Sample_X/Sample_X_matrix.rds" ), + path( "${outputDir}/results_star/star/Sample_Y/Sample_Y.SJ.out.tab" ), + path( "${outputDir}/results_star/star/Sample_Y/Sample_Y.Solo.out/Barcodes.stats" ), + path( "${outputDir}/results_star/star/Sample_Y/Sample_Y.Solo.out/Gene/filtered/matrix.mtx.gz" ), + path( "${outputDir}/results_star/star/Sample_Y/Sample_Y.Solo.out/Gene/filtered/features.tsv.gz" ), + path( "${outputDir}/results_star/star/Sample_Y/Sample_Y.Solo.out/Gene/filtered/barcodes.tsv.gz" ), + // path( "${outputDir}/results_star/star/mtx_conversions/Sample_Y/Sample_Y_matrix.h5ad" ), // does not match + path( "${outputDir}/results_star/star/mtx_conversions/Sample_Y/Sample_Y_matrix.rds" ), + ).match()} + + ) // end of assertAll() } }