Skip to content

Instantly share code, notes, and snippets.

@ivirshup
Created February 14, 2019 06:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ivirshup/03cbaff8641bfbefda241bf27182e578 to your computer and use it in GitHub Desktop.
Save ivirshup/03cbaff8641bfbefda241bf27182e578 to your computer and use it in GitHub Desktop.
Set `adata.var_names` to be ids not names. Based on default reading of 10x h5 files
def fix_names(adata):
adata.var_names_make_unique()
adata.var["gene_symbols"] = adata.var.index
adata.var.index = adata.var["gene_ids"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment