Files
openpipeline/src/workflows/gdo/gdo_singlesample/main.nf
CI cd0af18851 Build branch fix-integration-tests with version dev (2dbe3b72)
Build pipeline: vsh-ci-dev-k8tz4

Source commit: 2dbe3b7231

Source message: Fix pointers to test resources
2024-10-17 17:56:12 +00:00

52 lines
1.5 KiB
Plaintext

workflow run_wf {
take:
input_ch
main:
output_ch = input_ch
// Set aside the output for this workflow to avoid conflicts
| map {id, state ->
def new_state = state + ["workflow_output": state.output]
[id, new_state]
}
// cell filtering
| filter_with_counts.run(
key: "gdo_filter_with_counts",
fromState: { id, state ->
[
"input": state.input,
"modality": "gdo",
"obs_name_filter": "filter_with_counts",
"var_name_filter": "filter_with_counts",
"min_counts": state.min_counts,
"max_counts": state.max_counts,
"min_genes_per_cell": state.min_guides_per_cell,
"max_genes_per_cell": state.max_guides_per_cell,
"min_cells_per_gene": state.min_cells_per_guide,
"layer": state.layer,
]
},
toState: ["input": "output"]
)
| do_filter.run(
key: "gdo_do_filter",
fromState : { id, state ->
// do_filter does not need a layer argument because it filters all layers
// from a modality.
def newState = [
"input": state.input,
"obs_filter": "filter_with_counts",
"modality": "gdo",
"var_filter": "filter_with_counts",
"output_compression": "gzip",
"output": state.workflow_output
]
return newState
},
toState: ["output": "output"],
auto: [ publish: true ]
)
| setState(["output"])
emit:
output_ch
}