From 5fcf932c44613e6bf4063ef3075ad6062bf5d9a1 Mon Sep 17 00:00:00 2001 From: le-ander <20015434+le-ander@users.noreply.github.com> Date: Thu, 21 Dec 2023 09:20:42 +0100 Subject: [PATCH] round restored counts in some affected datasets --- .../homosapiens_blood_2020_na_schulteschrepping_001.py | 2 ++ .../homosapiens_lung_2020_10x3v2_miller_001.py | 1 + .../homosapiens_testis_2018_10x3v2_guo_001.py | 1 + .../homosapiens_x_2020_10x3v2_cook_001.yaml | 2 +- .../homosapiens_x_2019_x_mcfalinefigueroa_001.yaml | 2 +- .../homosapiens_x_2022_10x3v3_becker_001.yaml | 4 ++-- .../homosapiens_x_2022_10x3v3_becker_001_assay_sc.tsv | 2 -- 7 files changed, 8 insertions(+), 6 deletions(-) delete mode 100644 sfaira/data/dataloaders/loaders/d10_1038_s41588_022_01088_x/homosapiens_x_2022_10x3v3_becker_001_assay_sc.tsv diff --git a/sfaira/data/dataloaders/loaders/d10_1016_j_cell_2020_08_001/homosapiens_blood_2020_na_schulteschrepping_001.py b/sfaira/data/dataloaders/loaders/d10_1016_j_cell_2020_08_001/homosapiens_blood_2020_na_schulteschrepping_001.py index 95fc6729e..62221f692 100644 --- a/sfaira/data/dataloaders/loaders/d10_1016_j_cell_2020_08_001/homosapiens_blood_2020_na_schulteschrepping_001.py +++ b/sfaira/data/dataloaders/loaders/d10_1016_j_cell_2020_08_001/homosapiens_blood_2020_na_schulteschrepping_001.py @@ -1,11 +1,13 @@ import anndata import os import scipy.sparse +import numpy as np def load(data_dir, sample_fn, **kwargs): fn = os.path.join(data_dir, sample_fn) adata = anndata.read_h5ad(fn) + adata.X = np.round((np.expm1(adata.X.A) * adata.obs["nCount_RNA"][:, None] / 10000)) adata.X = scipy.sparse.csr_matrix(adata.X) return adata diff --git a/sfaira/data/dataloaders/loaders/d10_1016_j_devcel_2020_01_033/homosapiens_lung_2020_10x3v2_miller_001.py b/sfaira/data/dataloaders/loaders/d10_1016_j_devcel_2020_01_033/homosapiens_lung_2020_10x3v2_miller_001.py index c6cb72e61..834e2ad0b 100644 --- a/sfaira/data/dataloaders/loaders/d10_1016_j_devcel_2020_01_033/homosapiens_lung_2020_10x3v2_miller_001.py +++ b/sfaira/data/dataloaders/loaders/d10_1016_j_devcel_2020_01_033/homosapiens_lung_2020_10x3v2_miller_001.py @@ -9,5 +9,6 @@ def load(data_dir, **kwargs): adata = anndata.read_h5ad(fn) adata.X = np.expm1(adata.X) adata.X = adata.X.multiply(scipy.sparse.csc_matrix(adata.obs["nUMI"].values[:, None])).multiply(1 / 10000) + adata.X = np.round(adata.X) return adata diff --git a/sfaira/data/dataloaders/loaders/d10_1038_s41422_018_0099_2/homosapiens_testis_2018_10x3v2_guo_001.py b/sfaira/data/dataloaders/loaders/d10_1038_s41422_018_0099_2/homosapiens_testis_2018_10x3v2_guo_001.py index e20d4912d..70cf337e4 100644 --- a/sfaira/data/dataloaders/loaders/d10_1038_s41422_018_0099_2/homosapiens_testis_2018_10x3v2_guo_001.py +++ b/sfaira/data/dataloaders/loaders/d10_1038_s41422_018_0099_2/homosapiens_testis_2018_10x3v2_guo_001.py @@ -9,5 +9,6 @@ def load(data_dir, **kwargs): adata = anndata.read_h5ad(fn) adata.X = np.expm1(adata.X) adata.X = adata.X.multiply(scipy.sparse.csc_matrix(adata.obs["n_counts"].values[:, None])).multiply(1 / 10000) + adata.X + np.round(adata.X) return adata diff --git a/sfaira/data/dataloaders/loaders/d10_1038_s41467_020_16066_2/homosapiens_x_2020_10x3v2_cook_001.yaml b/sfaira/data/dataloaders/loaders/d10_1038_s41467_020_16066_2/homosapiens_x_2020_10x3v2_cook_001.yaml index d341bbe09..b4130693d 100644 --- a/sfaira/data/dataloaders/loaders/d10_1038_s41467_020_16066_2/homosapiens_x_2020_10x3v2_cook_001.yaml +++ b/sfaira/data/dataloaders/loaders/d10_1038_s41467_020_16066_2/homosapiens_x_2020_10x3v2_cook_001.yaml @@ -188,7 +188,7 @@ dataset_or_observation_wise: gm_obs_key: individual: individual_obs_key: - organ: + organ: "cell in vitro" organ_obs_key: organism: "Homo sapiens" organism_obs_key: diff --git a/sfaira/data/dataloaders/loaders/d10_1038_s41588_019_0489_5/homosapiens_x_2019_x_mcfalinefigueroa_001.yaml b/sfaira/data/dataloaders/loaders/d10_1038_s41588_019_0489_5/homosapiens_x_2019_x_mcfalinefigueroa_001.yaml index 57f88c07f..d74e42afa 100644 --- a/sfaira/data/dataloaders/loaders/d10_1038_s41588_019_0489_5/homosapiens_x_2019_x_mcfalinefigueroa_001.yaml +++ b/sfaira/data/dataloaders/loaders/d10_1038_s41588_019_0489_5/homosapiens_x_2019_x_mcfalinefigueroa_001.yaml @@ -61,7 +61,7 @@ dataset_or_observation_wise: gm_obs_key: individual: individual_obs_key: - organ: + organ: "cell in vitro" organ_obs_key: organism: "Homo sapiens" organism_obs_key: diff --git a/sfaira/data/dataloaders/loaders/d10_1038_s41588_022_01088_x/homosapiens_x_2022_10x3v3_becker_001.yaml b/sfaira/data/dataloaders/loaders/d10_1038_s41588_022_01088_x/homosapiens_x_2022_10x3v3_becker_001.yaml index dfe25b57e..0b8578b03 100644 --- a/sfaira/data/dataloaders/loaders/d10_1038_s41588_022_01088_x/homosapiens_x_2022_10x3v3_becker_001.yaml +++ b/sfaira/data/dataloaders/loaders/d10_1038_s41588_022_01088_x/homosapiens_x_2022_10x3v3_becker_001.yaml @@ -25,7 +25,7 @@ dataset_or_feature_wise: feature_type_var_key: dataset_or_observation_wise: assay_sc: "10x 3' v3" - assay_sc_obs_key: "assay" + assay_sc_obs_key: assay_differentiation: assay_differentiation_obs_key: assay_type_differentiation: @@ -46,7 +46,7 @@ dataset_or_observation_wise: gm_obs_key: individual: individual_obs_key: "Donor_Study_ID" - organ: + organ: colon organ_obs_key: organism: "Homo sapiens" organism_obs_key: diff --git a/sfaira/data/dataloaders/loaders/d10_1038_s41588_022_01088_x/homosapiens_x_2022_10x3v3_becker_001_assay_sc.tsv b/sfaira/data/dataloaders/loaders/d10_1038_s41588_022_01088_x/homosapiens_x_2022_10x3v3_becker_001_assay_sc.tsv deleted file mode 100644 index a6229ac20..000000000 --- a/sfaira/data/dataloaders/loaders/d10_1038_s41588_022_01088_x/homosapiens_x_2022_10x3v3_becker_001_assay_sc.tsv +++ /dev/null @@ -1,2 +0,0 @@ -source target target_id -10x v.3.1 10x 3' v3 EFO:0009922