From 5586eadd80fb8164f10fc058c7d8c5d85c992221 Mon Sep 17 00:00:00 2001 From: Mariya Lysenkova Wiklander Date: Tue, 15 Oct 2024 16:27:34 +0200 Subject: [PATCH] Add allcop predictions file --- src/mpm_experiments/__init__.py | 0 src/mpm_experiments/allcop_predictions.py | 16 ++++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 src/mpm_experiments/__init__.py create mode 100644 src/mpm_experiments/allcop_predictions.py diff --git a/src/mpm_experiments/__init__.py b/src/mpm_experiments/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/src/mpm_experiments/allcop_predictions.py b/src/mpm_experiments/allcop_predictions.py new file mode 100644 index 0000000..d551e13 --- /dev/null +++ b/src/mpm_experiments/allcop_predictions.py @@ -0,0 +1,16 @@ +import pandas as pd +from src.allium.gex_classifier import GEXClassifier + +datasets = ['jude', 'lilljebjorn', 'jude'] +data_dir = '/home/mariya/Data/allium' +gc = GEXClassifier('v3') + +for dataset in datasets: + print("Predicting for", dataset) + testX = pd.read_csv(f'{data_dir}/{dataset}.counts.allium.csv', + index_col="id") + pheno = pd.read_csv(f'{data_dir}/{dataset}.pheno.allium.csv', + index_col="id", + sep=';') + result = gc.get_predictions(testX, pheno=pheno) + result.to_csv(f'{data_dir}/{dataset}.predictions.csv')