Skip to content

Commit

Permalink
parse filtered / raw channels
Browse files Browse the repository at this point in the history
  • Loading branch information
fmalmeida committed Apr 16, 2024
1 parent 6dc725b commit 95a9ffa
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion subworkflows/local/align_cellranger.nf
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,30 @@ workflow CELLRANGER_ALIGN {
)
ch_versions = ch_versions.mix(CELLRANGER_COUNT.out.versions)

//
// Split channels of raw and filtered to avoid file collision problems when loading the inputs in conversion modules.
//
ch_matrices_raw =
CELLRANGER_COUNT.out.outs.map { meta, mtx_files ->
def desired_files = []
mtx_files.each{
if ( it.toString().contains("raw_feature_bc_matrix") ) { desired_files.add( it ) }
}
[ meta, desired_files ]
}

ch_matrices_filtered =
CELLRANGER_COUNT.out.outs.map { meta, mtx_files ->
def desired_files = []
mtx_files.each{
if ( it.toString().contains("filtered_feature_bc_matrix") ) { desired_files.add( it ) }
}
[ meta, desired_files ]
}

emit:
ch_versions
cellranger_out = CELLRANGER_COUNT.out.outs
cellranger_matrices = CELLRANGER_COUNT.out.filtered.mix( CELLRANGER_COUNT.out.raw )
cellranger_matrices = ch_matrices_raw.mix( ch_matrices_filtered )
star_index = cellranger_index
}

0 comments on commit 95a9ffa

Please sign in to comment.