From 88936d503bdd96066687c78a63b05d4515722601 Mon Sep 17 00:00:00 2001 From: Jalil Nourisa Date: Tue, 26 Nov 2024 22:30:25 +0100 Subject: [PATCH] scsgl added back --- src/methods/multi_omics/scglue/config.vsh.yaml | 14 +++++++------- src/methods/single_omics/scenic/script.py | 1 + .../scsgl/{config.novsh.yaml => config.vsh.yaml} | 0 src/methods/single_omics/scsgl/script.py | 6 +++--- 4 files changed, 11 insertions(+), 10 deletions(-) rename src/methods/single_omics/scsgl/{config.novsh.yaml => config.vsh.yaml} (100%) diff --git a/src/methods/multi_omics/scglue/config.vsh.yaml b/src/methods/multi_omics/scglue/config.vsh.yaml index c34b49ac3..98b94d72c 100644 --- a/src/methods/multi_omics/scglue/config.vsh.yaml +++ b/src/methods/multi_omics/scglue/config.vsh.yaml @@ -41,13 +41,13 @@ functionality: platforms: - type: docker - # image: janursa/scglue:19-08-2024 - image: nvcr.io/nvidia/pytorch:24.06-py3 - setup: - - type: python - packages: [ scglue==0.3.2, pyscenic==0.12.1, numpy==1.23.4, scanpy, networkx, pyarrow, cytoolz, scikit-misc, cuda-python, faiss-gpu] - - type: apt - packages: [bedtools] + image: janursa/scglue:19-08-2024 + # image: nvcr.io/nvidia/pytorch:24.06-py3 + # setup: + # - type: python + # packages: [ scglue==0.3.2, pyscenic==0.12.1, numpy==1.23.4, scanpy, networkx, pyarrow, cytoolz, scikit-misc, cuda-python, faiss-gpu] + # - type: apt + # packages: [bedtools] - type: native - type: nextflow diff --git a/src/methods/single_omics/scenic/script.py b/src/methods/single_omics/scenic/script.py index d8965042b..a0b995ef7 100644 --- a/src/methods/single_omics/scenic/script.py +++ b/src/methods/single_omics/scenic/script.py @@ -143,6 +143,7 @@ def main(par): par['expression_data'] = os.path.join(par['temp_dir'], "expression_data.tsv") par['regulons'] = f"{par['temp_dir']}/regulons.csv" + download_prior(par) format_data(par) run_grn(par) prune_grn(par) diff --git a/src/methods/single_omics/scsgl/config.novsh.yaml b/src/methods/single_omics/scsgl/config.vsh.yaml similarity index 100% rename from src/methods/single_omics/scsgl/config.novsh.yaml rename to src/methods/single_omics/scsgl/config.vsh.yaml diff --git a/src/methods/single_omics/scsgl/script.py b/src/methods/single_omics/scsgl/script.py index 11cc9cc5d..210c18bb0 100644 --- a/src/methods/single_omics/scsgl/script.py +++ b/src/methods/single_omics/scsgl/script.py @@ -13,7 +13,7 @@ ## VIASH START par = { - 'multiomics_rna': 'resources/resources_test/grn-benchmark/multiomics_rna.h5ad', + 'rna': 'resources/resources_test/grn-benchmark/multiomics_rna.h5ad', 'prediction': 'output/scsgl/prediction.csv', 'temp_dir': 'output/scsgl', 'max_n_links': 50000 @@ -21,8 +21,8 @@ ## VIASH END # Load scRNA-seq data -adata_rna = anndata.read_h5ad(par['multiomics_rna']) -gene_names = adata_rna.var.gene_ids.index.to_numpy() +adata_rna = anndata.read_h5ad(par['rna']) +gene_names = adata_rna.var_names X = adata_rna.X.toarray() if scipy.sparse.issparse(adata_rna.X) else adata_rna.X # Import pysrc locally