Loss of 'var' using concatenation of AnnData objects
1
0
Entering edit mode
5 months ago
Rachel • 0

Hello all! I am doing scRNAseq analysis in python using scanpy library and am having multiple different issues during concatenation of my 16 samples (stored previously in adata_list).

The following line of code results in a loss of genes (n_vars):

adataConcat = sc.concat(adata_list, merge='same')

Output:

AnnData object with n_obs × n_vars = 111386 × 13620
    obs: 'n_genes'
    var: 'gene_ids', 'feature_types', 'genome'

While running this line of code results in a loss of var data ('gene_ids', 'feature_types', 'genome'):

adataConcat = sc.concat(adata_list, join='outer', merge='same')

Output:

AnnData object with n_obs × n_vars = 111386 × 15702
    obs: 'n_genes'

How do I retain both during a concatenation?

Scanpy AnnData • 541 views
ADD COMMENT
0
Entering edit mode
14 days ago
Hugo • 0

Similar question has been asked and answered on scverse discourse

ADD COMMENT

Login before adding your answer.

Traffic: 2352 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6