Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mnnpy.mnn_correct returning a Tuple #27

Open
Gpasquini opened this issue Aug 21, 2019 · 1 comment
Open

mnnpy.mnn_correct returning a Tuple #27

Gpasquini opened this issue Aug 21, 2019 · 1 comment

Comments

@Gpasquini
Copy link

Here is a reproducible code for the error:

import scanpy as sc
import scanpy.external as ice
from itertools import cycle

pbmc = sc.datasets.pbmc68k_reduced()
pbmc_corrected = mnnpy.mnn_correct(pbmc, batch_key="phase", save_raw=True)

pbmc_corrected

(AnnData object with n_obs × n_vars = 700 × 765 
     obs: 'bulk_labels', 'n_genes', 'percent_mito', 'n_counts', 'S_score', 'G2M_score', 'phase', 'louvain'
     var: 'n_counts', 'means', 'dispersions', 'dispersions_norm', 'highly_variable'
     uns: 'bulk_labels_colors', 'louvain', 'louvain_colors', 'neighbors', 'pca', 'rank_genes_groups'
     obsm: 'X_pca', 'X_umap'
     varm: 'PCs',)

type(pbmc_corrected)
tuple

@flying-sheep
Copy link

It expects multiple anndata objects and batch_key is just for concatenating the corrected AnnDatas:

mnnpy/mnnpy/mnn.py

Lines 106 to 107 in 750bba4

if len(datas) < 2:
return datas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants