Skip to content

Commit

Permalink
also convert concat h5ads
Browse files Browse the repository at this point in the history
  • Loading branch information
fmalmeida committed Oct 30, 2024
1 parent 5c31226 commit 8278429
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion modules/local/concat_h5ad.nf
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ process CONCAT_H5AD {
path samplesheet

output:
path "*.h5ad", emit: h5ad
tuple val(meta), path("*.h5ad"), emit: h5ad

when:
task.ext.when == null || task.ext.when
Expand Down
19 changes: 12 additions & 7 deletions subworkflows/local/mtx_conversion.nf
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,6 @@ workflow MTX_CONVERSION {

}

//
// MODULE: Convert to Rds with AnndataR package
//
ANNDATAR_CONVERT (
ch_h5ads
)

//
// Concat sample-specific h5ad in one
//
Expand All @@ -78,6 +71,18 @@ workflow MTX_CONVERSION {
ch_concat_h5ad_input,
samplesheet
)
ch_h5ad_concat = CONCAT_H5AD.out.h5ad.map{ meta, file ->
def meta_clone = meta.clone()
meta_clone.id = 'combined' // maintain output prefix
[ meta_clone, file ]
}

//
// MODULE: Convert to Rds with AnndataR package
//
ANNDATAR_CONVERT (
ch_h5ads.mix( ch_h5ad_concat )
)

//TODO CONCAT h5ad and MTX to h5ad should also have versions.yaml output
// ch_versions = ch_versions.mix(MTX_TO_H5AD.out.versions, MTX_TO_SEURAT.out.versions)
Expand Down

0 comments on commit 8278429

Please sign in to comment.