Zafar-Lab/scDREAMER

batch corrected counts

Closed this issue · 1 comments

Where are the batch corrected counts?
What is the csv file that is output? Is this the latent space embeddings? would like the batch corrected counts to run my own PCA and UMAP

import warnings

warnings.filterwarnings("ignore")
import os
import random
import anndata
import numpy as np
import tensorflow as tf2
import tensorflow.compat.v1 as tf
from scDREAMER import scDREAMER_SUP
import scanpy as sc

run_config = tf.ConfigProto()
np.random.seed(0)
tf.set_random_seed(0)
random.seed(0)
tf2.random.set_seed(0)
tf2.keras.utils.set_random_seed(0)

run_config.gpu_options.per_process_gpu_memory_fraction = 0.333
run_config.gpu_options.allow_growth = True

tf.disable_v2_behavior()

run_config.gpu_options.per_process_gpu_memory_fraction = 0.333
run_config.gpu_options.allow_growth = True

data_path = '/hpc/group/adrc/dcg27/african_american_multiome/scripts/6.cell_type_annotation/4.create_anndata___reference_datasets.h5ad'
# to look at data beforehand:
# ad = sc.read_h5ad(data_path)

# Leaning rate to use for small data vs large input data
learning_rate = {
# lr_ae = 0.0002, lr_dis = 0.0007, if Small Datasets
# lr_ae = 0.0001, lr_dis = 0.00001 if >= 0.5 million cells

with tf.Session(config=run_config) as sess:
    dreamer = scDREAMER_SUP(sess, epoch = 10, dataset_name = data_path,
                            batch = "batch", cell_type = "final_annotation",
                            plot_cell_type = "final_annotation", name = "Immune_Human",
                            lr_ae = 0.0002, lr_dis = 0.0007)
    dreamer.train_cluster()

Dear Daniel,

Thank you for your interest in scDREAMER.

scDREAMER produces a batch-corrected latent dimensional embeddings in CSV format. As of now, scDREAMER does not generate batch-corrected counts. We plan to incorporate this feature in the later version of scDREAMER. Closing the issue as we have resolved it over email.