Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove some fromState workarounds for older viash versions #943

Merged
merged 1 commit into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 12 additions & 28 deletions src/workflows/integration/bbknn_leiden/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -12,34 +12,18 @@ workflow run_wf {
}
// compute bbknn graph
| bbknn.run(
fromState: { id, state ->
[
input: state.input,
modality: state.modality,
obsm_input: state.obsm_input,
obs_batch: state.obs_batch,
uns_output: state.uns_output,
obsp_distances: state.obsp_distances,
obsp_connectivities: state.obsp_connectivities,
n_neighbors_within_batch: state.n_neighbors_within_batch,
n_pcs: state.n_pcs,
n_trim: state.n_trim
]
},
// use map when viash 0.7.6 is released
// related to https://github.com/viash-io/viash/pull/515
// fromState: [
// "input": "input",
// "obsm_input": "obsm_input",
// "obs_batch": "obs_batch",
// "modality": "modality",
// "uns_output": "uns_output",
// "obsp_distances": "obsp_distances",
// "obsp_connectivities": "obsp_connectivities",
// "n_neighbors_within_batch": "n_neighbors_within_batch",
// "n_pcs": "n_pcs",
// "n_trim": "n_trim"
// ],
fromState: [
"input": "input",
"modality": "modality",
"obsm_input": "obsm_input",
"obs_batch": "obs_batch",
"uns_output": "uns_output",
"obsp_distances": "obsp_distances",
"obsp_connectivities": "obsp_connectivities",
"n_neighbors_within_batch": "n_neighbors_within_batch",
"n_pcs": "n_pcs",
"n_trim": "n_trim",
],
toState: [
"input": "output"
]
Expand Down
54 changes: 17 additions & 37 deletions src/workflows/integration/scvi_leiden/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -9,43 +9,23 @@ workflow run_wf {
[id, new_state]
}
| scvi.run(
fromState: {id, state ->
[
"input": state.input,
"obs_batch": state.obs_batch,
"obsm_output": state.obsm_output,
"var_input": state.var_input,
"early_stopping": state.early_stopping,
"early_stopping_monitor": state.early_stopping_monitor,
"early_stopping_patience": state.early_stopping_patience,
"early_stopping_min_delta": state.early_stopping_min_delta,
"max_epochs": state.max_epochs,
"reduce_lr_on_plateau": state.reduce_lr_on_plateau,
"lr_factor": state.lr_factor,
"lr_patience": state.lr_patience,
"output_model": state.output_model,
"modality": state.modality,
"input_layer": state.layer,
]
},
// use map when viash 0.7.6 is released
// related to https://github.com/viash-io/viash/pull/515
// fromState: [
// "input": "input",
// "obs_batch": "obs_batch",
// "obsm_output": "obsm_output",
// "var_input": "var_input",
// "early_stopping": "early_stopping",
// "early_stopping_monitor": "early_stopping_monitor",
// "early_stopping_patience": "early_stopping_patience",
// "early_stopping_min_delta": "early_stopping_min_delta",
// "max_epochs": "max_epochs",
// "reduce_lr_on_plateau": "reduce_lr_on_plateau",
// "lr_factor": "lr_factor",
// "lr_patience": "lr_patience",
// "output_model": "output_model",
// "modality": "modality"
// ],
fromState: [
"input": "input",
"obs_batch": "obs_batch",
"obsm_output": "obsm_output",
"var_input": "var_input",
"early_stopping": "early_stopping",
"early_stopping_monitor": "early_stopping_monitor",
"early_stopping_patience": "early_stopping_patience",
"early_stopping_min_delta": "early_stopping_min_delta",
"max_epochs": "max_epochs",
"reduce_lr_on_plateau": "reduce_lr_on_plateau",
"lr_factor": "lr_factor",
"lr_patience": "lr_patience",
"output_model": "output_model",
"modality": "modality",
"input_layer": "layer",
],
toState: [
"input": "output",
"output_model": "output_model"
Expand Down
2 changes: 0 additions & 2 deletions src/workflows/qc/qc/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ workflow run_wf {
}
return newState
},
// use map when viash 0.7.6 is released
// related to https://github.com/viash-io/viash/pull/515
toState: ["input": "output"]
)
| publish.run(
Expand Down
Loading