Skip to content

Commit

Permalink
granie bug fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
janursa committed Aug 21, 2024
1 parent 7f91a8f commit 5e30c29
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/methods/multi_omics/granie/script.R
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,12 @@ if (!file.exists(file_RNA)) {
if (par$forceRerun | !file.exists(file_seurat)) {

# Sparse matrix
rna.m = readRDS(par$perturbation_rna)
rna.m = readRDS(par$multiomics_rna)

seurat_object <- CreateSeuratObject(count = rna.m, project = "PBMC", min.cells = 1, min.features = 1, assay = "RNA")

# RangedSummarizedExperiment
atac = readRDS(par$perturbation_atac)
atac = readRDS(par$multiomics_atac)

# Extract counts and metadata from the RangedSummarizedExperiment
atac_counts <- assays(atac)$counts
Expand Down
7 changes: 3 additions & 4 deletions src/metrics/regression_1/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,6 @@ def regression_1(
"""
gene_names = train_df.index.to_numpy()
gene_names_grn = net.index.to_numpy()
print(net)
print(gene_names)
aa
# determine regressor
if reg_type=='ridge':
regr = Ridge(**dict(random_state=32))
Expand Down Expand Up @@ -175,8 +172,10 @@ def main(par):
print('Reading input files', flush=True)

perturbation_data = ad.read_h5ad(par['perturbation_data'])
# perturbation_data = perturbation_data[:, :2000]
# print(perturbation_data)
gene_names = perturbation_data.var.index.to_numpy()
net = pd.read_csv(par['prediction'], index_col=0)
net = pd.read_csv(par['prediction'])

subsample = par['subsample']
reg_type = par['reg_type']
Expand Down
3 changes: 2 additions & 1 deletion src/metrics/regression_2/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,10 +231,11 @@ def main(par: Dict[str, Any]) -> pd.DataFrame:
gene_names = perturbation_data.var.index.to_numpy()
n_genes = len(gene_names)
groups = LabelEncoder().fit_transform(perturbation_data.obs.plate_name)


# Load inferred GRN
print(f'Loading GRN', flush=True)
grn = load_grn(par['prediction'], gene_names)
grn = pd.read_csv(par['prediction'])

# Load and standardize perturbation data
layer = par['layer']
Expand Down

0 comments on commit 5e30c29

Please sign in to comment.