diff --git a/src/methods/multi_omics/celloracle_ns/config.novsh.yaml b/src/methods/multi_omics/celloracle_ns/config.novsh.yaml new file mode 100644 index 000000000..d38d395e3 --- /dev/null +++ b/src/methods/multi_omics/celloracle_ns/config.novsh.yaml @@ -0,0 +1,29 @@ + +__merge__: ../../../api/comp_method.yaml + +functionality: + name: grn_inference_celloracle + namespace: "workflows" + info: + label: grn_inference_celloracle + summary: "Infers GRNs from multiomics data using celloracle." + arguments: + - name: --base_grn + type: file + direction: output + default: output/celloracle/base_grn.csv + - name: --links + type: file + direction: output + default: output/celloracle/links.celloracle.links + resources: + - type: nextflow_script + path: main.nf + entrypoint: run_wf + dependencies: + - name: grn_methods/celloracle + +platforms: + - type: nextflow + directives: + label: [ midtime, midmem, lowcpu ] diff --git a/src/methods/multi_omics/celloracle_ns/main.nf b/src/methods/multi_omics/celloracle_ns/main.nf new file mode 100644 index 000000000..e224f438e --- /dev/null +++ b/src/methods/multi_omics/celloracle_ns/main.nf @@ -0,0 +1,21 @@ +workflow run_wf { + take: + input_ch + + main: + output_ch = input_ch + + | celloracle.run( + fromState: [multiomics_rna: "multiomics_rna", + multiomics_atac: "multiomics_atac", + temp_dir: "temp_dir", + num_workers: "num_workers" + ], + toState: [prediction:"prediction", base_grn: "base_grn", links: "links"] + ) + + | setState(["prediction", "base_grn", "links"]) + + emit: + output_ch +} diff --git a/src/methods/multi_omics/celloracle_ns/run.sh b/src/methods/multi_omics/celloracle_ns/run.sh new file mode 100644 index 000000000..bd5b3160a --- /dev/null +++ b/src/methods/multi_omics/celloracle_ns/run.sh @@ -0,0 +1,61 @@ +#!/bin/bash + +# RUN_ID="run_$(date +%Y-%m-%d_%H-%M-%S)" +RUN_ID="celloracle" +resources_dir="s3://openproblems-data/resources/grn" +publish_dir="s3://openproblems-data/resources/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 + +if [ "$submit" = true ]; then + nextflow run . \ + -main-script target/nextflow/workflows/grn_inference_celloracle/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_inference.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 +fi + + + +if [ "$read_results" = true ]; then + aws s3 sync s3://openproblems-data/resources/grn/results/${RUN_ID} ./resources/results/${RUN_ID} +fi + + +./tw-windows-x86_64.exe launch ` + https://github.com/openproblems-bio/task_grn_inference.git ` + --revision build/main ` + --pull-latest ` + --main-script target/nextflow/workflows/grn_inference_celloracle/main.nf ` + --workspace 53907369739130 ` + --compute-env 6TeIFgV5OY4pJCk8I0bfOh ` + --params-file ./params/celloracle.yaml ` + --config src/common/nextflow_helpers/labels_tw.config \ No newline at end of file diff --git a/src/methods/multi_omics/granie_ns/config.novsh.yaml b/src/methods/multi_omics/granie_ns/config.novsh.yaml new file mode 100644 index 000000000..4e005399e --- /dev/null +++ b/src/methods/multi_omics/granie_ns/config.novsh.yaml @@ -0,0 +1,27 @@ + +__merge__: ../../../api/comp_method_r.yaml + +functionality: + name: grn_inference_granie + namespace: "workflows" + info: + label: grn_inference_granie + summary: "Infers GRNs from multiomics data using granie." + arguments: + - name: --subset + type: boolean + required: false + default: false + direction: input + + resources: + - type: nextflow_script + path: main.nf + entrypoint: run_wf + dependencies: + - name: grn_methods/granie + +platforms: + - type: nextflow + directives: + label: [ hightime, midmem, highcpu ] diff --git a/src/methods/multi_omics/granie_ns/main.nf b/src/methods/multi_omics/granie_ns/main.nf new file mode 100644 index 000000000..9bef84115 --- /dev/null +++ b/src/methods/multi_omics/granie_ns/main.nf @@ -0,0 +1,22 @@ +workflow run_wf { + take: + input_ch + + main: + output_ch = input_ch + + | granie.run( + fromState: [ + multiomics_rna_r: "multiomics_rna_r", + multiomics_atac_r: "multiomics_atac_r", + num_workers: "num_workers", + subset: "subset" + ], + toState: [prediction:"prediction"] + ) + + | setState(["prediction"]) + + emit: + output_ch +} diff --git a/src/methods/multi_omics/granie_ns/run.sh b/src/methods/multi_omics/granie_ns/run.sh new file mode 100644 index 000000000..9ee2b676f --- /dev/null +++ b/src/methods/multi_omics/granie_ns/run.sh @@ -0,0 +1,35 @@ +#!/bin/bash + +# RUN_ID="run_$(date +%Y-%m-%d_%H-%M-%S)" +RUN_ID="scglue" +resources_dir="s3://openproblems-data/resources/grn" +publish_dir="s3://openproblems-data/resources/grn/results/${RUN_ID}" + +num_workers=20 + +param_file="./params/${RUN_ID}.yaml" + +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 + annotation_file: ${resources_dir}/supplementary/gencode.v45.annotation.gtf.gz + motif_file: ${resources_dir}/supplementary/JASPAR2022-hg38.bed.gz + num_workers: $num_workers + temp_dir: ./tmp/grn +output_state: "state.yaml" +publish_dir: "$publish_dir" +HERE + + + +./tw-windows-x86_64.exe launch ` + https://github.com/openproblems-bio/task_grn_inference.git ` + --revision build/main ` + --pull-latest ` + --main-script target/nextflow/workflows/grn_inference_scglue/main.nf ` + --workspace 53907369739130 ` + --compute-env 6TeIFgV5OY4pJCk8I0bfOh ` + --params-file ./params/scglue.yaml ` + --config src/common/nextflow_helpers/labels_tw.config \ No newline at end of file diff --git a/src/methods/multi_omics/scenicplus_ns/config.novsh.yaml b/src/methods/multi_omics/scenicplus_ns/config.novsh.yaml new file mode 100644 index 000000000..ac7060938 --- /dev/null +++ b/src/methods/multi_omics/scenicplus_ns/config.novsh.yaml @@ -0,0 +1,39 @@ + +__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." + arguments: + - name: --scplus_mdata + type: file + required: false + direction: output + description: "Main output object." + default: "scplus_mdata.h5mu" + - name: --qc + type: boolean + default: false + description: "Whether to perform quality control." + - name: --cell_topic + type: file + default: output/cell_topic.csv + required: false + direction: output + description: "Cell-topics prob scores" + + + resources: + - type: nextflow_script + path: main.nf + entrypoint: run_wf + dependencies: + - name: grn_methods/scenicplus + +platforms: + - type: nextflow + directives: + label: [ midtime, highmem, highcpu ] diff --git a/src/methods/multi_omics/scenicplus_ns/main.nf b/src/methods/multi_omics/scenicplus_ns/main.nf new file mode 100644 index 000000000..4a27b82d0 --- /dev/null +++ b/src/methods/multi_omics/scenicplus_ns/main.nf @@ -0,0 +1,23 @@ +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", cell_topic:"cell_topic", scplus_mdata:"scplus_mdata"] + ) + + | setState(["prediction", "cell_topic", "scplus_mdata"]) + + emit: + output_ch +} diff --git a/src/methods/multi_omics/scenicplus_ns/run.sh b/src/methods/multi_omics/scenicplus_ns/run.sh new file mode 100644 index 000000000..eef0d8c0a --- /dev/null +++ b/src/methods/multi_omics/scenicplus_ns/run.sh @@ -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=10 + +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_inference.git ` +# --revision build/main ` +# --pull-latest ` +# --main-script target/nextflow/workflows/grn_inference_scenicplus/main.nf ` +# --workspace 53907369739130 ` +# --compute-env 6TeIFgV5OY4pJCk8I0bfOh ` +# --params-file ./params/scenicplus.yaml ` +# --config src/common/nextflow_helpers/labels_tw.config + + diff --git a/src/methods/multi_omics/scglue_ns/config.novsh.yaml b/src/methods/multi_omics/scglue_ns/config.novsh.yaml new file mode 100644 index 000000000..805bc8b5b --- /dev/null +++ b/src/methods/multi_omics/scglue_ns/config.novsh.yaml @@ -0,0 +1,29 @@ + +__merge__: ../../../api/comp_method.yaml + +functionality: + name: grn_inference_scglue + namespace: "workflows" + info: + label: grn_inference_scglue + summary: "Infers GRNs from multiomics data using scglue." + arguments: + - name: --annotation_file + type: file + required: true + direction: input + - name: --motif_file + type: file + required: true + direction: input + resources: + - type: nextflow_script + path: main.nf + entrypoint: run_wf + dependencies: + - name: grn_methods/scglue + +platforms: + - type: nextflow + directives: + label: [oneweektime,midmem,highcpu] diff --git a/src/methods/multi_omics/scglue_ns/main.nf b/src/methods/multi_omics/scglue_ns/main.nf new file mode 100644 index 000000000..bc58828cd --- /dev/null +++ b/src/methods/multi_omics/scglue_ns/main.nf @@ -0,0 +1,23 @@ +workflow run_wf { + take: + input_ch + + main: + output_ch = input_ch + + | scglue.run( + fromState: [multiomics_rna: "multiomics_rna", + multiomics_atac: "multiomics_atac", + temp_dir: "temp_dir", + num_workers: "num_workers", + annotation_file: "annotation_file", + motif_file: "motif_file" + ], + toState: [prediction:"prediction"] + ) + + | setState(["prediction"]) + + emit: + output_ch +} diff --git a/src/methods/multi_omics/scglue_ns/run.sh b/src/methods/multi_omics/scglue_ns/run.sh new file mode 100644 index 000000000..6677eb0d3 --- /dev/null +++ b/src/methods/multi_omics/scglue_ns/run.sh @@ -0,0 +1,34 @@ +#!/bin/bash + +# RUN_ID="run_$(date +%Y-%m-%d_%H-%M-%S)" +RUN_ID="scglue" +resources_dir="s3://openproblems-data/resources/grn" +publish_dir="s3://openproblems-data/resources/grn/results/${RUN_ID}" + + +param_file="./params/${RUN_ID}.yaml" + +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 + annotation_file: ${resources_dir}/supplementary/gencode.v45.annotation.gtf.gz + motif_file: ${resources_dir}/supplementary/JASPAR2022-hg38.bed.gz + num_workers: $num_workers + temp_dir: ./tmp/grn +output_state: "state.yaml" +publish_dir: "$publish_dir" +HERE + + + +# ./tw-windows-x86_64.exe launch ` +# https://github.com/openproblems-bio/task_grn_inference.git ` +# --revision build/main ` +# --pull-latest ` +# --main-script target/nextflow/workflows/grn_inference_scglue/main.nf ` +# --workspace 53907369739130 ` +# --compute-env 6TeIFgV5OY4pJCk8I0bfOh ` +# --params-file ./params/scglue.yaml ` +# --config src/common/nextflow_helpers/labels_tw.config \ No newline at end of file