Skip to content

Commit

Permalink
Port 0.12.1 changes to main (#615)
Browse files Browse the repository at this point in the history
  • Loading branch information
DriesSchaumont authored Nov 14, 2023
1 parent d999df9 commit 27e74d9
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 6 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@

* Refactored `cellranger_mapping` workflow to use `fromState` and `toState` functionality (PR #610).

# openpipelines 0.12.1

## BUG FIXES

* `rna_singlesample`: Fix filtering parameters values `min_counts`, `max_counts`, `min_genes_per_cell`, `max_genes_per_cell` and `min_cells_per_gene` not being passed to the `filter_with_counts` component (PR #614).

* `prot_singlesample`: Fix filtering parameters values `min_counts`, `max_counts`, `min_proteins_per_cell`, `max_proteins_per_cell` and `min_cells_per_protein` not being passed to the `filter_with_counts` component (PR #614).

# openpipelines 0.12.0

Expand Down
11 changes: 7 additions & 4 deletions src/workflows/multiomics/prot_singlesample/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ workflow run_wf {
"min_genes_per_cell": "min_proteins_per_cell",
"max_genes_per_cell": "max_proteins_per_cell",
"min_cells_per_gene": "min_cells_per_protein",
"min_fraction_mito": "min_fraction_mito",
"max_fraction_mito": "max_fraction_mito",
"workflow_output": "workflow_output"
]
def new_state = stateMapping.collectEntries{newKey, origKey ->
Expand All @@ -70,6 +68,11 @@ workflow run_wf {
fromState: { id, state ->
[
"input": state.input,
"min_counts": state.min_counts,
"max_counts": state.max_counts,
"min_genes_per_cell": state.min_proteins_per_cell,
"max_genes_per_cell": state.max_proteins_per_cell,
"min_cells_per_gene": state.min_cells_per_protein,
"obs_name_filter": "filter_with_counts",
"var_name_filter": "filter_with_counts",
"modality": "prot"
Expand All @@ -81,9 +84,9 @@ workflow run_wf {
fromState : { id, state ->
[
"input": state.input,
"obs_filter": state.filter_with_counts,
"obs_filter": "filter_with_counts",
"modality": "prot",
"var_filter": state.filter_with_counts,
"var_filter": "filter_with_counts",
"output_compression": "gzip",
"output": state.workflow_output
]
Expand Down
16 changes: 14 additions & 2 deletions src/workflows/multiomics/rna_singlesample/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,12 @@ workflow run_wf {
"var_name_mitochondrial_genes": "var_name_mitochondrial_genes",
"workflow_output": "workflow_output"
]
if (orig_state.min_fraction_mito) {
stateMapping += ["min_fraction_mito": "min_fraction_mito"]
}
if (orig_state.max_fraction_mito) {
stateMapping += ["max_fraction_mito": "max_fraction_mito"]
}
def new_state = stateMapping.collectEntries{newKey, origKey ->
[newKey, orig_state[origKey]]
}
Expand All @@ -113,6 +119,8 @@ workflow run_wf {
[
"input": state.input,
"obs_name_filter": "filter_mitochondrial",
"min_fraction": state.min_fraction_mito,
"max_fraction": state.max_fraction_mito,
"obs_fraction_column": "fraction_$state.var_name_mitochondrial_genes"
]
},
Expand All @@ -128,12 +136,16 @@ workflow run_wf {
[
"input": state.input,
"obs_name_filter": "filter_with_counts",
"var_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_genes_per_cell,
"max_genes_per_cell": state.max_genes_per_cell,
"min_cells_per_gene": state.min_cells_per_gene,
]
},
toState: ["input": "output"]
)
| view {"before filter: $it"}
| do_filter.run(
fromState: {id, state ->
def stateMapping = [
Expand Down

0 comments on commit 27e74d9

Please sign in to comment.