Skip to content

Commit

Permalink
robust analysis fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
janursa committed Aug 24, 2024
1 parent 7ecf20c commit a183f16
Show file tree
Hide file tree
Showing 7 changed files with 99 additions and 3 deletions.
10 changes: 8 additions & 2 deletions scripts/run_robust_analys.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,15 @@
# RUN_ID="run_$(date +%Y-%m-%d_%H-%M-%S)"

RUN_ID="robust_analy"
resources_dir="resources"
publish_dir="output/${RUN_ID}"
# resources_dir="resources"
# publish_dir="output/${RUN_ID}"

resources_dir="s3://openproblems-data/resources/grn"
publish_dir="s3://openproblems-data/resources/grn/results/${RUN_ID}"

grn_models_folder="${resources_dir}/grn_models"


reg_type=ridge
subsample=-2
max_workers=10
Expand Down Expand Up @@ -35,6 +40,7 @@ HERE
append_entry() {
cat >> $param_file << HERE
- id: ${1}_${2}_${3}
perturbation_data: ${resources_dir}/grn-benchmark/perturbation_data.h5ad
layer: ${layer}
reg_type: $reg_type
method_id: $1
Expand Down
1 change: 1 addition & 0 deletions src/methods/multi_omics/scenicplus/config.vsh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ __merge__: ../../../api/comp_method.yaml

functionality:
name: scenicplus
namespace: grn_methods
info:
label: scenicplus
summary: "GRN inference using scenicplus"
Expand Down
21 changes: 21 additions & 0 deletions src/methods/multi_omics/scenicplus_ns/config.vsh.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@

__merge__: ../../../api/comp_method.yaml

functionality:
name: grn_inference_scenicplus
namespace: "workflows"
info:
label: grn_inference_scenicplus
summary: "Infers GRNs from multiomics data using scenicplus."

resources:
- type: nextflow_script
path: main.nf
entrypoint: run_wf
dependencies:
- name: grn_methods/scenicplus

platforms:
- type: nextflow
directives:
label: [ midtime, midmem, lowcpu ]
21 changes: 21 additions & 0 deletions src/methods/multi_omics/scenicplus_ns/main.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
workflow run_wf {
take:
input_ch

main:
output_ch = input_ch

| scenicplus.run(
fromState: [multiomics_rna: "multiomics_rna",
multiomics_atac: "multiomics_atac",
temp_dir: "temp_dir",
num_workers: "num_workers"
],
toState: [prediction:"prediction"]
)

| setState(["prediction"])

emit:
output_ch
}
44 changes: 44 additions & 0 deletions src/methods/multi_omics/scenicplus_ns/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#!/bin/bash

RUN_ID="scenicplus"
resources_dir="s3://openproblems-data/resources_test/grn"
publish_dir="s3://openproblems-data/resources_test/grn/results/${RUN_ID}"

# resources_dir="./resources_test"
# publish_dir="./output/${RUN_ID}"

num_workers=20

param_file="./params/${RUN_ID}.yaml"
# Start writing to the YAML file
cat > $param_file << HERE
param_list:
- id: ${RUN_ID}
multiomics_rna: ${resources_dir}/grn-benchmark/multiomics_rna.h5ad
multiomics_atac: ${resources_dir}/grn-benchmark/multiomics_atac.h5ad
num_workers: $num_workers
temp_dir: ./tmp/grn
output_state: "state.yaml"
publish_dir: "$publish_dir"
HERE


# nextflow run . \
# -main-script target/nextflow/workflows/grn_inference_scenicplus/main.nf \
# -profile docker \
# -with-trace \
# -c src/common/nextflow_helpers/labels_ci.config \
# -params-file params/${RUN_ID}.yaml


# ./tw-windows-x86_64.exe launch `
# https://github.com/openproblems-bio/task_grn_benchmark.git `
# --revision build/main `
# --pull-latest `
# --main-script target/nextflow/workflows/run_grn_inference/main.nf `
# --workspace 53907369739130 `
# --compute-env 6TeIFgV5OY4pJCk8I0bfOh `
# --params-file ./params/celloracle_test.yaml `
# --config src/common/nextflow_helpers/labels_tw.config


4 changes: 3 additions & 1 deletion src/workflows/run_robustness_analysis/config.vsh.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

functionality:
name: run_robustness_analysis
namespace: "workflows"
Expand All @@ -8,6 +7,9 @@ functionality:
argument_groups:
- name: Inputs
arguments:
- name: --perturbation_data
type: file
direction: input
- name: --layer
type: string
direction: input
Expand Down
1 change: 1 addition & 0 deletions src/workflows/run_robustness_analysis/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ workflow run_wf {
},
// use 'fromState' to fetch the arguments the component requires from the overall state
fromState: [
perturbation_data: "perturbation_data",
prediction_n: "prediction",
layer: "layer",
subsample: "subsample",
Expand Down

0 comments on commit a183f16

Please sign in to comment.