Skip to content

Commit

Permalink
reorganize star modules
Browse files Browse the repository at this point in the history
  • Loading branch information
zxBIB Almeida,Felipe (GCBDS) EXTERNAL committed Sep 30, 2024
1 parent 7fc32f0 commit e366396
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 42 deletions.
35 changes: 0 additions & 35 deletions modules/local/star/mtx_to_h5ad.nf

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,11 @@ def input_to_adata(
#

# create the directory with the sample name
os.makedirs("${meta2.id}", exist_ok=True)
os.makedirs("${meta.id}", exist_ok=True)

# input_type comes from NF module
adata = input_to_adata(
input_data="${meta2.input_type}",
output="${meta2.id}/${meta2.id}_${meta2.input_type}_matrix.h5ad",
sample="${meta2.id}"
input_data="${meta.input_type}",
output="${meta.id}/${meta.id}_${meta.input_type}_matrix.h5ad",
sample="${meta.id}"
)
9 changes: 6 additions & 3 deletions subworkflows/local/starsolo.nf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* -- IMPORT LOCAL MODULES/SUBWORKFLOWS -- */
include { STAR_ALIGN } from '../../modules/local/star/star_align'
include { MTX_TO_H5AD } from '../../modules/local/star/mtx_to_h5ad'
include { STAR_ALIGN } from '../../modules/local/star_align'
include { MTX_TO_H5AD } from '../../modules/local/mtx_to_h5ad'

/* -- IMPORT NF-CORE MODULES/SUBWORKFLOWS -- */
include { GUNZIP } from '../../modules/nf-core/gunzip/main'
Expand Down Expand Up @@ -58,7 +58,10 @@ workflow STARSOLO {
* Perform h5ad conversion
*/
MTX_TO_H5AD (
STAR_ALIGN.out.raw_counts.mix( STAR_ALIGN.out.filtered_counts ),
STAR_ALIGN.out.raw_counts
.map{ meta, files -> [meta + [input_type: 'raw'], files] }
.mix( STAR_ALIGN.out.filtered_counts.map{ meta, files -> [meta + [input_type: 'filtered'], files] } ),
[],
star_index.map{ meta, index -> index }
)
ch_versions = ch_versions.mix(MTX_TO_H5AD.out.versions.first())
Expand Down

0 comments on commit e366396

Please sign in to comment.