Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/skip_nf_test.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"modules/nf-core/cellranger/mkvdjref",
"modules/nf-core/cellranger/multi",
"modules/nf-core/cellranger/vdj",
"modules/nf-core/cellrangerarc/count",
"modules/nf-core/cellrangerarc/mkgtf",
"modules/nf-core/checkqc",
"modules/nf-core/coreograph",
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/pytest-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,6 @@ jobs:
tags: bwa/samse
- profile: conda
tags: cellpose
- profile: conda
tags: cellrangerarc/count
- profile: conda
tags: cellrangerarc/mkfastq
- profile: conda
Expand Down
171 changes: 171 additions & 0 deletions modules/nf-core/cellrangerarc/count/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
nextflow_process {

name "Test Process CELLRANGERARC_COUNT"
script "../main.nf"
process "CELLRANGERARC_COUNT"

tag "modules"
tag "modules_nfcore"
tag "cellrangerarc"
tag "cellrangerarc/mkref"
tag "cellrangerarc/count"
tag "unzip"

setup {
run("UNZIP") {
script "../../../unzip/main.nf"

process {
"""
input[0] = [[],file(params.modules_testdata_base_path + 'genomics/mus_musculus/genome/chr19.fa.gz',checkIfExists:true)]
"""
}
}
run("CELLRANGERARC_MKREF") {
script "../../mkref/main.nf"

process {
"""
input[0] = UNZIP.out.unzipped_archive.map{it[1]}+"/chr19.fa"
input[1] = file(params.modules_testdata_base_path + 'genomics/mus_musculus/genome/chr19.filtered.gtf.gz',checkIfExists:true)
input[2] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome_motifs.txt',checkIfExists:true)
input[3] = file(params.modules_testdata_base_path + 'genomics/mus_musculus/illumina/10xgenomics/multiome/cellranger_arc_mkref_test_mm39_chr19_config.json',checkIfExists:true)
input[4] = "cellrangerarc_reference"
"""
}
}
}
test("test_cellrangerarc_count") {

when {
params {
module_args = ''
}
process {
"""
input[0] = [[id:'test'],['gex','atac'],['SRR18907480_chr19_sub','SRR18907481_chr19_sub'],
[file(params.modules_testdata_base_path + 'genomics/mus_musculus/illumina/10xgenomics/multiome/SRR18907480_chr19_sub_S1_L001_R1_001.fastq.gz',checkIfExists:true),
file(params.modules_testdata_base_path + 'genomics/mus_musculus/illumina/10xgenomics/multiome/SRR18907480_chr19_sub_S1_L001_R2_001.fastq.gz',checkIfExists:true),
file(params.modules_testdata_base_path + 'genomics/mus_musculus/illumina/10xgenomics/multiome/SRR18907481_chr19_sub_S1_L001_R1_001.fastq.gz',checkIfExists:true),
file(params.modules_testdata_base_path + 'genomics/mus_musculus/illumina/10xgenomics/multiome/SRR18907481_chr19_sub_S1_L001_R2_001.fastq.gz',checkIfExists:true),
file(params.modules_testdata_base_path + 'genomics/mus_musculus/illumina/10xgenomics/multiome/SRR18907481_chr19_sub_S1_L001_I2_001.fastq.gz',checkIfExists:true)
]
]
input[1] = CELLRANGERARC_MKREF.out.reference
"""
}
}
then {
assertAll(
{ assert process.success },
{
def all_files = process.out.outs[0][1]

def stable_file_names = [
'analysis/clustering/atac/graphclust/clusters.csv',
'analysis/clustering/atac/graphclust/differential_accessibility.csv',
'analysis/clustering/atac/graphclust/differential_expression.csv',
'analysis/clustering/atac/kmeans_2_clusters/clusters.csv',
'analysis/clustering/atac/kmeans_2_clusters/differential_accessibility.csv',
'analysis/clustering/atac/kmeans_2_clusters/differential_expression.csv',
'analysis/clustering/atac/kmeans_3_clusters/clusters.csv',
'analysis/clustering/atac/kmeans_3_clusters/differential_accessibility.csv',
'analysis/clustering/atac/kmeans_3_clusters/differential_expression.csv',
'analysis/clustering/atac/kmeans_4_clusters/clusters.csv',
'analysis/clustering/atac/kmeans_4_clusters/differential_accessibility.csv',
'analysis/clustering/atac/kmeans_4_clusters/differential_expression.csv',
'analysis/clustering/atac/kmeans_5_clusters/clusters.csv',
'analysis/clustering/atac/kmeans_5_clusters/differential_accessibility.csv',
'analysis/clustering/atac/kmeans_5_clusters/differential_expression.csv',
'analysis/clustering/gex/graphclust/clusters.csv',
'analysis/clustering/gex/graphclust/differential_accessibility.csv',
'analysis/clustering/gex/graphclust/differential_expression.csv',
'analysis/clustering/gex/kmeans_2_clusters/clusters.csv',
'analysis/clustering/gex/kmeans_2_clusters/differential_accessibility.csv',
'analysis/clustering/gex/kmeans_2_clusters/differential_expression.csv',
'analysis/clustering/gex/kmeans_3_clusters/clusters.csv',
'analysis/clustering/gex/kmeans_3_clusters/differential_accessibility.csv',
'analysis/clustering/gex/kmeans_3_clusters/differential_expression.csv',
'analysis/clustering/gex/kmeans_4_clusters/clusters.csv',
'analysis/clustering/gex/kmeans_4_clusters/differential_accessibility.csv',
'analysis/clustering/gex/kmeans_4_clusters/differential_expression.csv',
'analysis/clustering/gex/kmeans_5_clusters/clusters.csv',
'analysis/clustering/gex/kmeans_5_clusters/differential_accessibility.csv',
'analysis/clustering/gex/kmeans_5_clusters/differential_expression.csv',
'analysis/dimensionality_reduction/atac/lsa_components.csv',
'analysis/dimensionality_reduction/atac/lsa_dispersion.csv',
'analysis/dimensionality_reduction/atac/lsa_features_selected.csv',
'analysis/dimensionality_reduction/atac/lsa_projection.csv',
'analysis/dimensionality_reduction/atac/lsa_variance.csv',
'analysis/dimensionality_reduction/atac/tsne_projection.csv',
'analysis/dimensionality_reduction/atac/umap_projection.csv',
'analysis/dimensionality_reduction/gex/pca_components.csv',
'analysis/dimensionality_reduction/gex/pca_dispersion.csv',
'analysis/dimensionality_reduction/gex/pca_features_selected.csv',
'analysis/dimensionality_reduction/gex/pca_projection.csv',
'analysis/dimensionality_reduction/gex/pca_variance.csv',
'analysis/dimensionality_reduction/gex/tsne_projection.csv',
'analysis/dimensionality_reduction/gex/umap_projection.csv',
'analysis/feature_linkage/feature_linkage.bedpe',
'analysis/tf_analysis/filtered_tf_bc_matrix/barcodes.tsv.gz',
'analysis/tf_analysis/filtered_tf_bc_matrix/matrix.mtx.gz',
'analysis/tf_analysis/filtered_tf_bc_matrix/motifs.tsv',
'analysis/tf_analysis/peak_motif_mapping.bed',
'atac_cut_sites.bigwig',
'atac_peak_annotation.tsv',
'filtered_feature_bc_matrix/barcodes.tsv.gz',
'filtered_feature_bc_matrix/features.tsv.gz',
'filtered_feature_bc_matrix/matrix.mtx.gz',
'gex_molecule_info.h5',
'gex_possorted_bam.bam',
'gex_possorted_bam.bam.bai',
'per_barcode_metrics.csv',
'raw_feature_bc_matrix/barcodes.tsv.gz',
'raw_feature_bc_matrix/features.tsv.gz',
'raw_feature_bc_matrix/matrix.mtx.gz',
'summary.csv',
]

def stable_files = all_files.findAll { file ->
// Check if the file path ends with any of the stable file paths
return stable_file_names.any { stable_path ->
file.toString().endsWith(stable_path)
}
}.toSorted()

assert snapshot(
stable_files,
process.out.versions[0]
).match()

def unstable_file_names = [
'analysis/feature_linkage/feature_linkage_matrix.h5',
'analysis/tf_analysis/filtered_tf_bc_matrix.h5',
'atac_fragments.tsv.gz',
'atac_fragments.tsv.gz.tbi',
'atac_peaks.bed',
'atac_possorted_bam.bam',
'atac_possorted_bam.bam.bai',
'cloupe.cloupe',
'filtered_feature_bc_matrix.h5',
'raw_feature_bc_matrix.h5',
'web_summary.html'
]

def unstable_files = all_files.findAll { file ->
return unstable_file_names.any { unstable_path ->
file.toString().endsWith(unstable_path)
}
}.toSorted()

unstable_files.each { filePath ->
def fileObj = file(filePath)
assert fileObj.exists(): "File ${filePath} does not exist"
}
}
)
}
}
// No stub test, as the stub test for `UNZIP` doesn't actually extract the archive.
// This breaks the downstream stub tests as a fasta file is required.
}
76 changes: 76 additions & 0 deletions modules/nf-core/cellrangerarc/count/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
{
"test_cellrangerarc_count": {
"content": [
[
"clusters.csv:md5,ed29b219ca3b79305129aea2d38ca60e",
"differential_accessibility.csv:md5,90e3e1001432bd1f94f53f39ae86971c",
"differential_expression.csv:md5,2806595b0c66af8407977b6ea57e30a3",
"clusters.csv:md5,35232075d0184cc6a31178ed58176bbe",
"differential_accessibility.csv:md5,0c597e33c58aac61a54e71c0ca3d1343",
"differential_expression.csv:md5,e77580db30873fba52bf4490f752ed22",
"clusters.csv:md5,127636548ad77bfa2646cbf62209e73b",
"differential_accessibility.csv:md5,9d1efbb7209c95a6f7714b43aca22130",
"differential_expression.csv:md5,24a85767ec0013a9f444bed5b23fb7f2",
"clusters.csv:md5,c84df7cc5cb684dd4a431915df0b58b2",
"differential_accessibility.csv:md5,2492068224aba9a65f860b6fb3464056",
"differential_expression.csv:md5,e02a8c8e3bc1d924357b46af2da76a6b",
"clusters.csv:md5,fcbbc4f29456778935fbbf4dc52791ea",
"differential_accessibility.csv:md5,630f412020f85765b2a32ac689701ce5",
"differential_expression.csv:md5,0aae96dbf649f0bc738f5d2c19e2be76",
"clusters.csv:md5,6cd4c2b06047c99cee59548c9b3000ac",
"differential_accessibility.csv:md5,08fc89ad11d1834cab677390f385a88a",
"differential_expression.csv:md5,6e97ced39f84b02f843f0b757b02f100",
"clusters.csv:md5,cd135bf9e9b5aa69abe95d5356aec96c",
"differential_accessibility.csv:md5,9ef66432c3f66f2190ff936324091e9f",
"differential_expression.csv:md5,223e516ce7ddf219575a32a60217e83d",
"clusters.csv:md5,ae9c24a834f1863a8faf03b3b4bdf74a",
"differential_accessibility.csv:md5,84bf1b3b3c90abdd92a817cc5a9d2ee8",
"differential_expression.csv:md5,8b0ec69f3cd0d3156d6def50cdde4340",
"clusters.csv:md5,aceb697994f98ee50b4d3db8e12e2a3a",
"differential_accessibility.csv:md5,05f0b3a10ce71d2fbafc6c9b74acf969",
"differential_expression.csv:md5,7b339771b1731b9cff2c52ac4fc632ce",
"clusters.csv:md5,243233d51193e6ce3127ed5ef8a08daf",
"differential_accessibility.csv:md5,25deefdff4c870e52c84f97cc4b9d5d2",
"differential_expression.csv:md5,b70730d7301cba11c46297d08b81677d",
"lsa_components.csv:md5,c3a48d3849f6b5e268bcb16b4d3db7ec",
"lsa_dispersion.csv:md5,1bdae634bd63d044dcfd8ae821b3744c",
"lsa_features_selected.csv:md5,b4e3cc5cac26dc6df059c1b8e38e72a8",
"lsa_projection.csv:md5,3bce47a5a0e8dc0cb24c2ecbba5c745b",
"lsa_variance.csv:md5,ff92c64ec140084673fd7ec48ce48993",
"tsne_projection.csv:md5,b0ff0a327a7cad898087c169b9815bab",
"umap_projection.csv:md5,8a34ad7bcf4ae7d14ad8f451acb4a12e",
"pca_components.csv:md5,82a4384a22390821cbfe06b2de9e9b4d",
"pca_dispersion.csv:md5,a6c8d15062a67bf828c1b58d1bc1eff8",
"pca_features_selected.csv:md5,34acd3e8d57f68bf592856c0c69847e7",
"pca_projection.csv:md5,6a2bf5e268da6705b92ec02309b3f61e",
"pca_variance.csv:md5,060e80415e690a7bfc9cd385c929842f",
"tsne_projection.csv:md5,aa42abe3c868c7d0e35628acf1a24966",
"umap_projection.csv:md5,34acdb54ff9f9c8b7d7f91a625450294",
"feature_linkage.bedpe:md5,4a92b2e49591c21a3d08602235e6ef7a",
"barcodes.tsv.gz:md5,1b2010b38c2de59bea1b71d374114919",
"matrix.mtx.gz:md5,2627809b0951961282c3b31fb83d7f1b",
"motifs.tsv:md5,9a397341713d07560937054df442afcb",
"peak_motif_mapping.bed:md5,b1d02a287485989ca294284bd95ad572",
"atac_cut_sites.bigwig:md5,03e0c63674192256d55a3c117fff66ee",
"atac_peak_annotation.tsv:md5,f4770b4197ff32c74bd206476f1f0dba",
"barcodes.tsv.gz:md5,1b2010b38c2de59bea1b71d374114919",
"features.tsv.gz:md5,9a315f46dbf99b9120527df78fd7e081",
"matrix.mtx.gz:md5,2304085aaac98027cf9241a3b2593760",
"gex_molecule_info.h5:md5,f1ab414eb8b8da017c974d7109f5e7ca",
"gex_possorted_bam.bam:md5,8455846fa1aa417e4252bd09584d1098",
"gex_possorted_bam.bam.bai:md5,444fb175b75d0e22c8e14724b7790e34",
"per_barcode_metrics.csv:md5,055ddb433b94d44efa0113a1db84a63d",
"barcodes.tsv.gz:md5,4e020c4c968100a61a542c0d6e56e5f5",
"features.tsv.gz:md5,9a315f46dbf99b9120527df78fd7e081",
"matrix.mtx.gz:md5,743fc9d85f85cd2e5a40654d3ae2e3e4",
"summary.csv:md5,7641192d4cc0c6072dc447a46d5f89a2"
],
"versions.yml:md5,dc627e4bae7ded9a34b7e8f52b4b903d"
],
"meta": {
"nf-test": "0.9.2",
"nextflow": "24.10.5"
},
"timestamp": "2025-04-03T18:30:31.250399555"
}
}
5 changes: 0 additions & 5 deletions tests/config/pytest_modules.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
cellrangerarc/count:
- modules/nf-core/cellrangerarc/count/**
- tests/modules/nf-core/cellrangerarc/count/**
- modules/nf-core/cellrangerarc/mkref/**
- tests/modules/nf-core/cellrangerarc/mkref/**
cellrangerarc/mkfastq:
- modules/nf-core/cellrangerarc/mkfastq/**
- tests/modules/nf-core/cellrangerarc/mkfastq/**
Expand Down
39 changes: 0 additions & 39 deletions tests/modules/nf-core/cellrangerarc/count/main.nf

This file was deleted.

27 changes: 0 additions & 27 deletions tests/modules/nf-core/cellrangerarc/count/nextflow.config

This file was deleted.

Loading
Loading