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

mitochondrial gene filtering #21

Open
AuroreCapillon opened this issue Mar 1, 2021 · 0 comments
Open

mitochondrial gene filtering #21

AuroreCapillon opened this issue Mar 1, 2021 · 0 comments

Comments

@AuroreCapillon
Copy link

Hi,

While cleaning my data following your protocol (kb_into_2_python) I ran into an issue concerning the mitochondrial filtering. When running :

mito_ensembl_ids = sc.queries.mitochondrial_genes("dmelanogaster", attrname="ensembl_gene_id")
mito_genes = mito_ensembl_ids["external_gene_name"].values

adata.obs['percent_mito'] = np.sum(
    adata[:, mito_genes].X, axis=1).A1 / np.sum(adata.X, axis=1).A1

adata.obs['n_counts'] = adata.X.sum(axis=1).A1

I get 0 mitochondrial gene/cell. However they are still present as I find some in the following steps (highly variable genes). I am applying it on Drosophila melanogaster. In my transcripts_to_genes file the mitochondrial genes are annotated "mt:", so I tried to adapt the code :
mito_ensembl_ids = sc.queries.mitochondrial_genes("dmelanogaster", attrname="ensembl_gene_id",chromosome='mt:')

I also tried to change ensembl_gene_id into external_gene_name, but to no avail.
Did anyone encounter the same issue ?

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

1 participant