Closed ShaowenJ closed 3 years ago
My scArches version
Yes, thanks, it is not in the latest release yet, but it is on master.
Thanks for the response? Can I take a trial? Where to download the master?
you can siply clone the repo and pip install -e .
Great, thanks.
Hi,
I was following the tutorial of Reference maping using scGen. But stuck with the initial step Here is the ERROR
And here is my following code
import os import sys sys.path.insert(0, "../")
import warnings warnings.simplefilter(action='ignore', category=FutureWarning) warnings.simplefilter(action='ignore', category=UserWarning) import scanpy as sc import scarches as sca from scarches.dataset.trvae.data_handling import remove_sparsity import matplotlib.pyplot as plt import numpy as np import gdown sc.settings.set_figure_params(dpi=200, frameon=False) sc.set_figure_params(dpi=200) sc.set_figure_params(figsize=(4, 4))
condition_key = 'study' cell_type_key = 'cell_type' target_conditions = ['Pancreas CelSeq2', 'Pancreas SS2']
epoch = 50
early_stopping_kwargs = { "early_stopping_metric": "val_loss", "patience": 20, "threshold": 0, "reduce_lr": True, "lr_patience": 13, "lr_factor": 0.1, } adata = sc.read('../pancreas.h5ad') adata = remove_sparsity(adata) # remove sparsity source_adata = adata[~adata.obs[condition_key].isin(target_conditions)].copy() target_adata = adata[adata.obs[condition_key].isin(target_conditions)].copy()
network = sca.models.scgen(adata = source_adata, hidden_layer_sizes=[256,128])