Skip to content

Commit

Permalink
Add a couple more markers, but need to examine how good they are
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffreyMaurer committed Oct 7, 2024
1 parent a3edbd5 commit 9ceb2e0
Showing 1 changed file with 67 additions and 0 deletions.
67 changes: 67 additions & 0 deletions scripts/14_Plot_Add_Ups.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
#!/usr/bin/env python3
# coding: utf-8

# In this notebook, we're going plot the mouse retinal data and determine proper marker genes.

import datetime
print(f'{datetime.datetime.now()} Analysis Setup')

import sklearn as sk
import anndata as ad
import scanpy as sc
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
import seaborn as sns
import os

os.chdir('/project/ycheng11lab/jfmaurer/mouse_retina_atlas_chen_2024/')
os.makedirs('14_Add_Ups', exist_ok = True)
sc.settings.n_jobs = -1

adata = ad.read_h5ad('10_Make_Shiny/10_Shiny_Input.h5ad')


all_markers = [
'Tmcc3',
'Anks1b',
'Asic2',
'Vsx2',
'Rho',
'Pde6a',
'Nr2e3',
'Cnga1',
'Guca1b',
'Rp1',
'Rcvrn']

sc.plotting.DotPlot.DEFAULT_SAVE_PREFIX = ""
sc.plotting.DotPlot.DEFAULT_LARGEST_DOT = 200.0
plot_prefix = "/project/ycheng11lab/jfmaurer/mouse_retina_atlas_chen_2024/14_Add_Ups/AddUp_"

raw = True
data_string = "normCounts"
max_col = 3

for raw in [False, True]:

if raw:
data_string = "rawCounts"
max_col = 12
adata.X = adata.raw.X

sc.pl.dotplot(adata[:, all_markers],
var_names = all_markers, gene_symbols = "feature_name",
groupby = "minorclass",
vmax = max_col,
vmin = 0,
show = False,
save = f"{plot_prefix}Minor-Cell_All-Marker_{data_string}.pdf")

sc.pl.dotplot(adata[:, all_markers],
var_names = all_markers, gene_symbols = "feature_name",
groupby = "majorclass",
vmax = max_col,
vmin = 0,
show = False,
save = f"{plot_prefix}Major-Cell_All-Marker_{data_string}.pdf")

0 comments on commit 9ceb2e0

Please sign in to comment.