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

Get a small number of UMI per cell #6

Open
dongspy opened this issue Dec 13, 2022 · 0 comments
Open

Get a small number of UMI per cell #6

dongspy opened this issue Dec 13, 2022 · 0 comments

Comments

@dongspy
Copy link

dongspy commented Dec 13, 2022

Using the h5 file(GSM5151369_PD212_scifi_2C_4lines_7650_MeOH-cells.h5ad.gz) uploaded to the GEO(https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSM5151369), we analyzed the median genes per cell per plate_well.
Note that, in each plate_well, the top 500 cells with the largest number of UMI were used.

But we get a small number of UMI per cell that are not consistent with the figure 2e. The maximum median UMI count per plate_well is 89.

The table below is the median UMI count per plate_well.

scifi_h5_UMIcount_plate.csv

Below is my code.

import numpy as np
import pandas as pd
import scanpy as sc

h5_file = "GSM5151369_PD212_scifi_2C_4lines_7650_MeOH-cells.h5ad"

adata = sc.read_h5ad(h5_file)
sc.pp.calculate_qc_metrics(adata, percent_top=None, log1p=False, inplace=True)
# top_cells = 500

plate_well_gene_counts_df = adata.obs.groupby('plate_well').apply(
    lambda df: df['total_counts'].sort_values(ascending=False).head(500).median()).reset_index()

plate_well_gene_counts_df.columns = ['plate_well', 'Median UMI Count']
plate_well_gene_counts_sort_df = plate_well_gene_counts_df.sort_values('Median UMI Count', ascending=False)
plate_well_gene_counts_sort_df.to_csv('data/scifi_h5_UMIcount_plate.csv', index=False)

Is there a problem with this analysis ?

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