-
Notifications
You must be signed in to change notification settings - Fork 187
Fix: Support for --aligner cellrangerarc
#441
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
8be8cd6
modified samplesheet parsing for cellrangeratac
matbonfanti 6edee1c
process fastq_barcode from input samplesheet
matbonfanti 4de1e0d
get raw and filtered matrices from cellrangerarc output
matbonfanti ec5cc94
fastq_barcode read through meta
matbonfanti 156991c
use file only when meta.fastq_barcode is defined
matbonfanti 801aaf1
Merge branch 'dev' into fix_cellrangerarc_input_ch
matbonfanti c2cc11e
Merge branch 'dev' into fix_cellrangerarc_input_ch
matbonfanti 980f5c6
draft of the cellrangerarc test added
matbonfanti e65bd57
Merge branch 'fix_cellrangerarc_input_ch' of github.com:matbonfanti/s…
matbonfanti 17cc26b
Merge branch 'dev' into fix_cellrangerarc_input_ch
matbonfanti 6983615
added cellrangerarc test
matbonfanti b2df8c4
Merge branch 'dev' into fix_cellrangerarc_input_ch
matbonfanti fb3ae40
Update CHANGELOG.md
matbonfanti 0f6bcad
Merge branch 'dev' into fix_cellrangerarc_input_ch
matbonfanti File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
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,3 @@ | ||
sample,fastq_1,fastq_2,fastq_barcode,sample_type | ||
10k_PBMC,"https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/10xgenomics/cellranger-arc/10x_pbmc_multiome/fastqs/10k_PBMC_Multiome_nextgem_Chromium_X_gex_chr21_subsample_S2_L001_R1_001.fastq.gz","https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/10xgenomics/cellranger-arc/10x_pbmc_multiome/fastqs/10k_PBMC_Multiome_nextgem_Chromium_X_gex_chr21_subsample_S2_L001_R2_001.fastq.gz",,gex | ||
10k_PBMC,"https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/10xgenomics/cellranger-arc/10x_pbmc_multiome/fastqs/10k_PBMC_Multiome_nextgem_Chromium_X_atac_chr21_subsample_S2_L001_R1_001.fastq.gz","https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/10xgenomics/cellranger-arc/10x_pbmc_multiome/fastqs/10k_PBMC_Multiome_nextgem_Chromium_X_atac_chr21_subsample_S2_L001_R2_001.fastq.gz","https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/10xgenomics/cellranger-arc/10x_pbmc_multiome/fastqs/10k_PBMC_Multiome_nextgem_Chromium_X_atac_chr21_subsample_S2_L001_R3_001.fastq.gz",atac |
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
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
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
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,87 @@ | ||
nextflow_pipeline { | ||
|
||
name "Test Workflow main.nf" | ||
script "main.nf" | ||
|
||
test("test-dataset_cellrangerarc_aligner") { | ||
|
||
when { | ||
// the rest is taken from shared config | ||
params { | ||
aligner = 'cellrangerarc' | ||
outdir = "${outputDir}/results_cellrangerarc" | ||
input = "${baseDir}/assets/cellrangerarc_samplesheet.csv" | ||
fasta = 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/genome/chr21/sequence/genome.fasta' | ||
gtf = 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/genome/chr21/sequence/chr21_gencode.gtf' | ||
protocol = 'auto' | ||
skip_cellbender = true | ||
} | ||
} | ||
|
||
then { | ||
|
||
assertAll( | ||
|
||
// | ||
// General assertions | ||
// | ||
|
||
// Did it finish successfully? | ||
{assert workflow.success}, | ||
|
||
// How many tasks were executed? | ||
{assert workflow.trace.tasks().size() == 14}, | ||
|
||
// How many results were produced? | ||
{assert path("${outputDir}/results_cellrangerarc").list().size() == 4}, | ||
{assert path("${outputDir}/results_cellrangerarc/cellrangerarc").list().size() == 4}, | ||
{assert path("${outputDir}/results_cellrangerarc/cellrangerarc/mtx_conversions").list().size() == 7}, | ||
{assert path("${outputDir}/results_cellrangerarc/cellrangerarc/count").list().size() == 3}, | ||
{assert path("${outputDir}/results_cellrangerarc/fastqc").list().size() == 10}, | ||
{assert path("${outputDir}/results_cellrangerarc/multiqc").list().size() == 3}, | ||
|
||
// | ||
// Check if files were produced | ||
// | ||
{assert new File( "${outputDir}/results_cellrangerarc/cellrangerarc/mtx_conversions/10k_PBMC/10k_PBMC_raw_matrix.h5ad" ).exists()}, | ||
{assert new File( "${outputDir}/results_cellrangerarc/cellrangerarc/mtx_conversions/10k_PBMC/10k_PBMC_filtered_matrix.h5ad" ).exists()}, | ||
{assert new File( "${outputDir}/results_cellrangerarc/cellrangerarc/mtx_conversions/combined_raw_matrix.h5ad" ).exists()}, | ||
{assert new File( "${outputDir}/results_cellrangerarc/cellrangerarc/mtx_conversions/combined_filtered_matrix.h5ad" ).exists()}, | ||
|
||
// | ||
// Check if files are the same | ||
// | ||
{assert snapshot( | ||
// barcodes.tsv.gz files | ||
path( "${outputDir}/results_cellrangerarc/cellrangerarc/count/10k_PBMC/outs/filtered_feature_bc_matrix/barcodes.tsv.gz" ), | ||
path( "${outputDir}/results_cellrangerarc/cellrangerarc/count/10k_PBMC/outs/raw_feature_bc_matrix/barcodes.tsv.gz" ), | ||
|
||
// features.tsv.gz files | ||
path( "${outputDir}/results_cellrangerarc/cellrangerarc/count/10k_PBMC/outs/filtered_feature_bc_matrix/features.tsv.gz" ), | ||
path( "${outputDir}/results_cellrangerarc/cellrangerarc/count/10k_PBMC/outs/raw_feature_bc_matrix/features.tsv.gz" ), | ||
|
||
// matrix.mtx.gz files | ||
path( "${outputDir}/results_cellrangerarc/cellrangerarc/count/10k_PBMC/outs/filtered_feature_bc_matrix/matrix.mtx.gz" ), | ||
path( "${outputDir}/results_cellrangerarc/cellrangerarc/count/10k_PBMC/outs/raw_feature_bc_matrix/matrix.mtx.gz" ), | ||
|
||
// metrics_summary.csv files | ||
path( "${outputDir}/results_cellrangerarc/cellrangerarc/count/10k_PBMC/outs/summary.csv" ), | ||
|
||
// .rds files | ||
path( "${outputDir}/results_cellrangerarc/cellrangerarc/mtx_conversions/10k_PBMC/10k_PBMC_raw_matrix.sce.rds" ), | ||
path( "${outputDir}/results_cellrangerarc/cellrangerarc/mtx_conversions/10k_PBMC/10k_PBMC_filtered_matrix.sce.rds" ), | ||
path( "${outputDir}/results_cellrangerarc/cellrangerarc/mtx_conversions/10k_PBMC/10k_PBMC_raw_matrix.seurat.rds" ), | ||
path( "${outputDir}/results_cellrangerarc/cellrangerarc/mtx_conversions/10k_PBMC/10k_PBMC_filtered_matrix.seurat.rds" ), | ||
path( "${outputDir}/results_cellrangerarc/cellrangerarc/mtx_conversions/combined_raw_matrix.sce.rds" ), | ||
path( "${outputDir}/results_cellrangerarc/cellrangerarc/mtx_conversions/combined_filtered_matrix.sce.rds" ), | ||
path( "${outputDir}/results_cellrangerarc/cellrangerarc/mtx_conversions/combined_raw_matrix.seurat.rds" ), | ||
path( "${outputDir}/results_cellrangerarc/cellrangerarc/mtx_conversions/combined_filtered_matrix.seurat.rds" ), | ||
|
||
).match()} | ||
|
||
) // end of assertAll() | ||
|
||
} | ||
} | ||
|
||
} |
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,26 @@ | ||
{ | ||
"test-dataset_cellrangerarc_aligner": { | ||
"content": [ | ||
"barcodes.tsv.gz:md5,b5499384bbd9ecbd448c90dd73d9e84c", | ||
"barcodes.tsv.gz:md5,dc8ef24c54122529bdb2c7cd5969c805", | ||
"features.tsv.gz:md5,456af0e5fa4a7bcb3968400f300d12e9", | ||
"features.tsv.gz:md5,456af0e5fa4a7bcb3968400f300d12e9", | ||
"matrix.mtx.gz:md5,83c4b3e84668282fbe55d02d84256b3f", | ||
"matrix.mtx.gz:md5,4b3aa16b720d414f5df50c533052d360", | ||
"summary.csv:md5,90da383cd94786c0a3810b903c8de8f6", | ||
"10k_PBMC_raw_matrix.sce.rds:md5,196adfcb230f9ba9bb7d0aba36e7e261", | ||
"10k_PBMC_filtered_matrix.sce.rds:md5,359160d80821c5dbf1ebc7a88dbe8400", | ||
"10k_PBMC_raw_matrix.seurat.rds:md5,8ff4d68d88a6a7e3528147e06aeaa4dd", | ||
"10k_PBMC_filtered_matrix.seurat.rds:md5,ca44f68f2ea255bfd556c71a6b91423e", | ||
"combined_raw_matrix.sce.rds:md5,4846edfc332c65c129b554c27a357dc7", | ||
"combined_filtered_matrix.sce.rds:md5,4c1dee683e3d0e602556a69b9b64b3a5", | ||
"combined_raw_matrix.seurat.rds:md5,8900e93d58f613d56f02a4243769498a", | ||
"combined_filtered_matrix.seurat.rds:md5,91f83560d80b7b1ab238161d73c64831" | ||
], | ||
"meta": { | ||
"nf-test": "0.9.2", | ||
"nextflow": "24.10.5" | ||
}, | ||
"timestamp": "2025-03-26T16:19:15.398105567" | ||
} | ||
} |
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally, this could go to the json-schema, but it currently can't because we only have one aligner-agnostic schema.
Created #461 to follow up as this is beyond the scope of this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, that would be much cleaner... If you need help writing and testing the schema for cellranger-arc, I would be happy to contribute!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you want to give #461 a shot, that would be fantastic. I don't think I'd have time soonish.