setwd("~/Desktop/Probe-Seq_Code")
# Load libraries
library("DESeq2")
library("pheatmap")
library("RColorBrewer")
library("ggplot2")
library("dplyr")
library("ggrepel")
# Load Data
read.counts<-read.table("Mouse_Whole_Cell_Vsx2_Grik1.txt", header=FALSE, stringsAsFactors=FALSE)
row.names(read.counts)<-read.counts[,1]
read.counts<-read.counts[, -c(0:1)]
names(read.counts)<-c("V-1", "V-2", "G-1", "G-2", "G+1", "G+2")
sample.info<-data.frame(Mouse=c("1","2","1","2", "1","2"), condition=c(rep("Vsx2_Neg",2), rep("Grik1_Neg",2), rep("Grik1_Pos",2)), row.names=names(read.counts))
# Differential Expression analysis
# Create DESeq object
DESeq.ds<-DESeqDataSetFromMatrix(countData=read.counts, colData=sample.info, design = ~ Mouse + condition)
DESeq.ds <- DESeq.ds[rowSums(counts(DESeq.ds)) >0,]
DESeq.ds <- estimateSizeFactors(DESeq.ds)
counts.sf_normalized<-counts(DESeq.ds, normalized=TRUE)
log.norm.counts <- log2(counts.sf_normalized +1)
str(colData(DESeq.ds)$condition)
colData(DESeq.ds)$condition <- relevel(colData(DESeq.ds)$condition, "Grik1_Neg")
DESeq.ds <- DESeq(DESeq.ds)
results.VN.GN <- results(DESeq.ds, pAdjustMethod="BH", contrast = c("condition", "Vsx2_Neg","Grik1_Neg"))
results.VN.GP <- results(DESeq.ds, pAdjustMethod="BH", contrast = c("condition", "Vsx2_Neg","Grik1_Pos"))
results.GN.GP <- results(DESeq.ds, pAdjustMethod="BH", contrast = c("condition", "Grik1_Pos","Grik1_Neg"))
DGE.results <- c(results.VN.GN, results.VN.GP, results.GN.GP)
table(results.VN.GN$padj<0.05)
table(results.VN.GP$padj<0.05)
table(results.GN.GP$padj<0.05)
# Sort and obtain differentially expressed genes in a csv file
results.VN.GN.sorted <- results.VN.GN[order(results.VN.GN$padj),]
results.VN.GP.sorted <- results.VN.GP[order(results.VN.GP$padj),]
results.GN.GP.sorted <- results.GN.GP[order(results.GN.GP$padj),]
DGEgenes.VN.GN <- rownames(subset(results.VN.GN.sorted, padj<0.05))
DGEgenes.VN.GP <- rownames(subset(results.VN.GP.sorted, padj<0.05))
DGEgenes.GN.GP <- rownames(subset(results.GN.GP.sorted, padj<0.05))
All.DGEgenes <- c(DGEgenes.GN.GP, DGEgenes.VN.GN, DGEgenes.VN.GP)
All.DGEgenes.VN <- c(DGEgenes.VN.GN, DGEgenes.VN.GP)
DE_genes.VN.GN <- as.data.frame(results.VN.GN.sorted)
DE_genes.VN.GP <- as.data.frame(results.VN.GP.sorted)
DE_genes.GN.GP <- as.data.frame(results.GN.GP.sorted)
#DE genes that are specific to each population
Grik1.Pos <- rownames(subset(results.VN.GP.sorted, log2FoldChange<0))
Grik1.Pos <- intersect(Grik1.Pos, DGEgenes.GN.GP)
Grik1.Neg <- rownames(subset(results.GN.GP.sorted, log2FoldChange<0))
Grik1.Neg <- intersect(Grik1.Neg, DGEgenes.VN.GN)
Vsx2.Neg <- rownames(subset(results.VN.GP.sorted, log2FoldChange>0))
Vsx2.Neg <- intersect(Vsx2.Neg, DGEgenes.VN.GN)
# Heatmap plot of Top 20 differentially expressed genes for each population
DGE_Top<-Grik1.Pos[1:20]
hm.mat_DGEgenes<-log.norm.counts[DGE_Top,]
pheatmap(hm.mat_DGEgenes, clustering_method = "average", scale="row")
DGE_Top<-Grik1.Neg[1:20]
hm.mat_DGEgenes<-log.norm.counts[DGE_Top,]
pheatmap(hm.mat_DGEgenes, clustering_method = "average", scale="row")
DGE_Top<-Vsx2.Neg[1:20]
hm.mat_DGEgenes<-log.norm.counts[DGE_Top,]
pheatmap(hm.mat_DGEgenes, clustering_method = "average", scale="row")
hist(results.VN.GN$pvalue, col="grey", border = "white", xlab = "", ylab = "", main="frequencies of p-values")
hist(results.VN.GP$pvalue, col="grey", border = "white", xlab = "", ylab = "", main="frequencies of p-values")
hist(results.GN.GP$pvalue, col="grey", border = "white", xlab = "", ylab = "", main="frequencies of p-values")
boxplot(log.norm.counts, notch=TRUE, main = "log2-transformed read counts", ylab="log2(read counts)")
distance.log<- as.dist(1-cor(log.norm.counts, method="pearson"))
plot(hclust(distance.log), labels= colnames(log.norm.counts), main="log2 transformed read counts\ndistance:Pearson correlation")
plotMA(results.VN.GN, alpha=0.05, main="Vsx2- vs Grik1-", ylim= c(-10,10))
# Function to change the upper case gene names to lower case + upper case first
simpleCap <- function(x) {
s <- strsplit(x, " ")[[1]]
paste(toupper(substring(s, 1,1)), substring(s, 2),
sep="", collapse=" ")
}
# Heatmap for Cell Type Specific Markers in the Retina from Macoscko et al. that are unique to a certain cell type and is DE between VN and GN/GP.
# Rod markers are not unique (likely because of contamination in other cell types) so the Top 20 DE rod markers are added.
# Minor cell types were discarded (Astrocytes, fibroblasts, endothelium, microglia, pericytes) as too few cells were sequenced.
Cells <- read.delim("Macoscko.prn", sep=" ", header=FALSE)
Cell_clusters <- as.character(Cells$V1)
Cell_clusters <- tolower(Cell_clusters)
Cell_clusters <- sapply(Cell_clusters, simpleCap)
Rod_cluster <- Cell_clusters[2679:2699]
duplicates <- Cell_clusters[duplicated(Cell_clusters)]
Cell_clusters <- setdiff(Cell_clusters, duplicates)
Cell_clusters <- c(Rod_cluster, Cell_clusters)
Cell_clusters <- Cell_clusters[1:403]
true <- Cell_clusters %in% All.DGEgenes
a<-as.data.frame(true)
b<-as.data.frame(Cell_clusters)
total<-cbind(a,b)
ind <- which(with(total, true=="TRUE"))
all<-total[ind,]
DE_markers <- as.character(all$Cell_clusters)
DE_markerheatmap <- log.norm.counts[DE_markers,]
pheatmap(DE_markerheatmap, cluster_rows=FALSE, cluster_cols = FALSE, scale="row", fontsize=3)
# Heatmap for BC Subtype Specific Markers in the Retina from Karthik et al. that are within high confidence and unique to a certain subtype and is DE between GN and GP
Bipolar_clusters <- read.delim("Bipolar_cluster_HiConf_unique.txt", sep=",", header=FALSE)
Bipolar_clusters <- as.character(Bipolar_clusters$V2)
duplicates <- Bipolar_clusters[duplicated(Bipolar_clusters)]
Bipolar_clusters <- setdiff(Bipolar_clusters, duplicates)
true <- Bipolar_clusters %in% DGEgenes.GN.GP
a<-as.data.frame(true)
b<-as.data.frame(Bipolar_clusters)
total<-cbind(a,b)
ind <- which(with(total, true=="TRUE"))
all<-total[ind,]
DE_markers <- as.character(all$Bipolar_clusters)
DE_markerheatmap <- log.norm.counts[DE_markers,3:6]
pheatmap(DE_markerheatmap, cluster_rows=FALSE, cluster_cols = FALSE, scale="row", fontsize=3)
myGenes<-c("Tpbgl")
geneCounts <- plotCounts(DESeq.ds, gene=myGenes, intgroup = c("condition"), returnData = TRUE)
ggplot(geneCounts, aes(x=condition, y=count)) + geom_point(position=position_jitter(width=.1, height = 0), size=5) + coord_cartesian(ylim=c(0,3000)) + stat_summary(fun.data=mean_sdl, fun.args=list(mult=1), geom="errorbar", color = "red", width=0.2) + stat_summary(fun.y=mean, geom="point", color="red", size=5)
# Load Data
read.counts<-read.table("Mouse_Nuclei_Grik1.txt", header=FALSE, stringsAsFactors=FALSE)
row.names(read.counts)<-read.counts[,1]
read.counts<-read.counts[, -c(0:1)]
names(read.counts)<-c("C-", "7-", "6-", "C+", "7+", "6+")
sample.info<-data.frame(Mouse=c("C","7","6","C","7","6"), condition=c(rep("Negative",3), rep("Positive",3)), row.names=names(read.counts))
# Differential Expression analysis
# Create DESeq object
DESeq.ds<-DESeqDataSetFromMatrix(countData=read.counts, colData=sample.info, design = ~ Mouse + condition)
DESeq.ds <- DESeq.ds[rowSums(counts(DESeq.ds)) >0,]
DESeq.ds <- estimateSizeFactors(DESeq.ds)
counts.sf_normalized<-counts(DESeq.ds, normalized=TRUE)
log.norm.counts <- log2(counts.sf_normalized +1)
str(colData(DESeq.ds)$condition)
colData(DESeq.ds)$condition <- relevel(colData(DESeq.ds)$condition, "Negative")
DESeq.ds <- DESeq(DESeq.ds, fitType = "local")
# Obtaining Results
DGE.results <- results(DESeq.ds, pAdjustMethod="BH")
summary(DGE.results)
head(DGE.results)
# Number of Differentially expressed genes at p<0.05 (n)
table(DGE.results$padj<0.05)
# Sort and obtain differentially expressed genes in a csv file
DGE.results.sorted <- DGE.results[order(DGE.results$padj),]
DGEgenes <- rownames(subset(DGE.results.sorted, padj<0.05))
All_DE_genes <- as.data.frame(DGE.results.sorted)
# Heatmap for BC Subtype Specific Markers in the Retina from Karthik et al. that are within high confidence and unique to a certain subtype and is DE between GN and GP
Bipolar_clusters <- read.delim("Bipolar_cluster_HiConf_unique.txt", sep=",", header=FALSE)
Bipolar_clusters <- as.character(Bipolar_clusters$V2)
duplicates <- Bipolar_clusters[duplicated(Bipolar_clusters)]
Bipolar_clusters <- setdiff(Bipolar_clusters, duplicates)
true <- Bipolar_clusters %in% DGEgenes
a<-as.data.frame(true)
b<-as.data.frame(Bipolar_clusters)
total<-cbind(a,b)
ind <- which(with(total, true=="TRUE"))
all<-total[ind,]
DE_markers <- as.character(all$Bipolar_clusters)
DE_markerheatmap <- log.norm.counts[DE_markers,]
pheatmap(DE_markerheatmap, cluster_rows=FALSE, cluster_cols = FALSE, scale="row", fontsize=5)
# Load Data
read.counts<-read.table("Human_GRM6_Read_Counts.txt", header=FALSE, stringsAsFactors=FALSE)
row.names(read.counts)<-read.counts[,1]
read.counts<-read.counts[, -c(0:1)]
names(read.counts)<-c("43F-", "47F-", "53F-", "43F+", "47F+", "53F+")
sample.info<-data.frame(Human=c("43F","47F","53F","43F","47F","53F"), condition=c(rep("Negative",3), rep("Positive",3)), row.names=names(read.counts))
# Differential Expression analysis
# Create DESeq object
DESeq.ds<-DESeqDataSetFromMatrix(countData=read.counts, colData=sample.info, design = ~ Human + condition)
DESeq.ds <- DESeq.ds[rowSums(counts(DESeq.ds)) >0,]
DESeq.ds <- DESeq.ds[rowSums(counts(DESeq.ds)>0)>=4]
DESeq.ds <- estimateSizeFactors(DESeq.ds)
counts.sf_normalized<-counts(DESeq.ds, normalized=TRUE)
log.norm.counts <- log2(counts.sf_normalized +1)
str(colData(DESeq.ds)$condition)
colData(DESeq.ds)$condition <- relevel(colData(DESeq.ds)$condition, "Negative")
DESeq.ds <- DESeq(DESeq.ds, fitType = "local")
# Obtaining Results
DGE.results <- results(DESeq.ds, pAdjustMethod="BH")
summary(DGE.results)
head(DGE.results)
# Number of Differentially expressed genes at p<0.05 (n)
table(DGE.results$padj<0.05)
# Sort and obtain differentially expressed genes in a csv file
DGE.results.sorted <- DGE.results[order(DGE.results$padj),]
DGEgenes <- rownames(subset(DGE.results.sorted, padj<0.05))
All_DE_genes <- as.data.frame(DGE.results.sorted)
hist(DGE.results$pvalue, col="grey", border = "white", xlab = "", ylab = "", main="frequencies of p-values")
boxplot(log.norm.counts, notch=FALSE, main = "log2-transformed read counts", ylab="log2(read counts)")
distance.log<- as.dist(1-cor(log.norm.counts, method="pearson"))
plot(hclust(distance.log), labels= colnames(log.norm.counts), main="log2 transformed read counts\ndistance:Pearson correlation")
plotMA(DGE.results, alpha=0.05, main="GRM6- vs GRM6+", ylim= c(-15,15))
# Cross-reference of our DE data set (adj. p-val<0.05) and the Cowan et al. human scRNAseq paper.
# The marker list was trimmed so that only markers that are expressed in >90% of cells in that cluster remained
Bipolar_clusters <- read.delim("Human_Cowan_90_Single_Cell_RNAseq_Markers.csv", sep = ",", header=FALSE)
Bipolar_clusters <- as.character(Bipolar_clusters$V1)
duplicates <- Bipolar_clusters[duplicated(Bipolar_clusters)]
Bipolar_clusters <- setdiff(Bipolar_clusters, duplicates)
# Cross-reference of our DE data set (adj. p-val<0.05) and the Cowan et al. human scRNAseq paper.
# The marker list was trimmed so that only markers that are expressed in >90% of cells in that cluster remained
Bipolar_clusters <- read.delim("Human_Cowan_90_Single_Cell_RNAseq_Markers.csv", sep = ",", header=FALSE)
Bipolar_clusters <- as.character(Bipolar_clusters$V1)
true <- Bipolar_clusters %in% DGEgenes
a<-as.data.frame(true)
b<-as.data.frame(Bipolar_clusters)
total<-cbind(a,b)
ind <- which(with(total, true=="TRUE"))
all<-total[ind,]
DE_markers <- as.character(all$Bipolar_clusters)
DE_markerheatmap <- log.norm.counts[DE_markers,]
pheatmap(DE_markerheatmap, cluster_rows=FALSE, cluster_cols = FALSE, scale="row", fontsize=5)
# Heatmap for BC Subtype Specific Markers in the Retina from Karthik et al. that are within high confidence and unique to a certain subtype and is DE between GN and GP
Bipolar_clusters <- read.delim("Mouse_Bipolar_cluster_HiConf_unique.txt", sep=",", header=FALSE)
# Heatmap for BC Subtype Specific Markers in the Retina from Karthik et al. that are within high confidence and unique to a certain subtype and is DE between GN and GP
Bipolar_clusters <- read.delim("Mouse_Bipolar_cluster_HiConf_unique.txt", sep=",", header=FALSE)
# Load Data
read.counts<-read.table("Drosophila_Esg_Read_Counts.txt", header=FALSE, stringsAsFactors=FALSE)
row.names(read.counts)<-read.counts[,1]
read.counts<-read.counts[, -c(0:1)]
names(read.counts)<-c("1-", "2-", "3-", "1+", "2+", "3+")
sample.info<-data.frame(Dm=c("1","2","3","1","2","3"), condition=c(rep("Negative",3), rep("Positive",3)), row.names=names(read.counts))
# Differential Expression analysis
# Create DESeq object
DESeq.ds<-DESeqDataSetFromMatrix(countData=read.counts, colData=sample.info, design = ~ Dm + condition)
DESeq.ds <- DESeq.ds[rowSums(counts(DESeq.ds)) >0,]
DESeq.ds <- DESeq.ds[rowSums(counts(DESeq.ds)>0)>=3]
DESeq.ds <- estimateSizeFactors(DESeq.ds)
counts.sf_normalized<-counts(DESeq.ds, normalized=TRUE)
log.norm.counts <- log2(counts.sf_normalized +1)
str(colData(DESeq.ds)$condition)
colData(DESeq.ds)$condition <- relevel(colData(DESeq.ds)$condition, "Negative")
DESeq.ds <- DESeq(DESeq.ds, fitType = "local")
# Obtaining Results
DGE.results <- results(DESeq.ds, pAdjustMethod="BH")
summary(DGE.results)
head(DGE.results)
# Number of Differentially expressed genes at p<0.05 (n)
table(DGE.results$padj<0.05)
# Sort and obtain differentially expressed genes in a csv file
DGE.results.sorted <- DGE.results[order(DGE.results$padj),]
DGEgenes <- rownames(subset(DGE.results.sorted, padj<0.05))
All_DE_genes <- as.data.frame(DGE.results.sorted)
hist(DGE.results$pvalue, col="grey", border = "white", xlab = "", ylab = "", main="frequencies of p-values")
boxplot(log.norm.counts, notch=FALSE, main = "log2-transformed read counts", ylab="log2(read counts)")
distance.log<- as.dist(1-cor(log.norm.counts, method="pearson"))
plot(hclust(distance.log), labels= colnames(log.norm.counts), main="log2 transformed read counts\ndistance:Pearson correlation")
plotMA(DGE.results, alpha=0.05, main="esg- vs esg+", ylim= c(-15,15))
hm.mat_DGEgenes<-log.norm.counts[DGE_Top,]
pheatmap(hm.mat_DGEgenes, clustering_method = "average", scale="row", fontsize = 7)
# Heatmap of markers genes based on Hung et al., bioRxiv single cell RNA-seq paper
Cell_clusters <- read.delim("Drosophila_gut_scRNA-seq_all_markers.txt", header=FALSE)
Cell_clusters <- as.character(Cell_clusters$V5)
true <- Cell_clusters %in% DGEgenes
a<-as.data.frame(true)
b<-as.data.frame(Cell_clusters)
total<-cbind(a,b)
ind <- which(with(total, true=="TRUE"))
all<-total[ind,]
DE_markers <- as.character(all$Cell_clusters)
DE_markerheatmap <- log.norm.counts[DE_markers,]
pheatmap(DE_markerheatmap, cluster_rows=FALSE, cluster_cols = FALSE, scale="row", fontsize=6)
# Heatmap of markers based on Doupe et al., 2018 DamID paper
Cell_clusters <- read.delim("Drosophila_Perrimon_DamID_Markers.csv", header=TRUE, sep=",")
Cell_clusters <- subset(Cell_clusters, FDR.esg<0.01)
Cell_clusters <- subset(Cell_clusters, FDR.myo>0.01)
Cell_clusters <- Cell_clusters[order(Cell_clusters$FDR.esg),]
Cell_clusters <- as.character(Cell_clusters$name)
Cell_clusters_2 <- read.delim("Drosophila_Perrimon_DamID_Markers.csv", header=TRUE, sep=",")
Cell_clusters_2 <- subset(Cell_clusters_2, FDR.myo<0.01)
Cell_clusters_2 <- subset(Cell_clusters_2, FDR.esg>0.01)
Cell_clusters_2 <- Cell_clusters_2[order(Cell_clusters_2$FDR.myo),]
Cell_clusters_2 <- as.character(Cell_clusters_2$name)
Cell_clusters <- c(Cell_clusters, Cell_clusters_2)
true <- Cell_clusters %in% DGEgenes
a<-as.data.frame(true)
b<-as.data.frame(Cell_clusters)
total<-cbind(a,b)
ind <- which(with(total, true=="TRUE"))
all<-total[ind,]
DE_markers <- as.character(all$Cell_clusters)
DE_markerheatmap <- log.norm.counts[DE_markers,]
pheatmap(DE_markerheatmap, cluster_rows=FALSE, cluster_cols = FALSE, scale="row", fontsize=2)
# Load Data
read.counts<-read.table("Chick_Fgf8_Read_Counts.txt", header=FALSE, stringsAsFactors=FALSE)
id <- read.counts$V1
# Load Data
read.counts<-read.table("Mouse_Live_vs_Probe-Seq_Grik1_Read_Counts.txt", header=FALSE, stringsAsFactors=FALSE)
row.names(read.counts)<-read.counts[,1]
read.counts <- read.counts[, -c(0:1)]
names(read.counts)<-c("Fresh_Pos_1", "Fresh_Pos_2", "Fresh_Pos_3", "Probe_Pos_1", "Probe_Pos_2", "Probe_Pos_3")
sample.info<-data.frame(condition=c(rep("Fresh_Pos",3), rep("Probe_Pos",3)), row.names=names(read.counts))
# Differential Expression analysis
# Create DESeq object
DESeq.ds<-DESeqDataSetFromMatrix(countData=read.counts, colData=sample.info, design = ~ condition)
DESeq.ds <- DESeq.ds[rowSums(counts(DESeq.ds)) >0,]
DESeq.ds <- estimateSizeFactors(DESeq.ds)
counts.sf_normalized<-counts(DESeq.ds, normalized=TRUE)
log.norm.counts <- log2(counts.sf_normalized +1)
str(colData(DESeq.ds)$condition)
colData(DESeq.ds)$condition <- relevel(colData(DESeq.ds)$condition, "Fresh_Pos")
DESeq.ds <- DESeq(DESeq.ds)
# Obtaining Results
DGE.results <- results(DESeq.ds, pAdjustMethod="BH")
summary(DGE.results)
head(DGE.results)
# Number of Differentially expressed genes at p<0.05 (n)
table(DGE.results$padj<0.05)
# Sort and obtain differentially expressed genes in a csv file
DGE.results.sorted <- DGE.results[order(DGE.results$padj),]
DGEgenes <- rownames(subset(DGE.results.sorted, padj<0.05))
All_DE_genes <- as.data.frame(DGE.results.sorted)
# Heatmap plot of Top 50 differentially expressed genes
DGE_Top<-DGEgenes[1:50]
hm.mat_DGEgenes<-log.norm.counts[DGE_Top,]
pheatmap(hm.mat_DGEgenes, clustering_method = "average", scale="row", fontsize=7)
boxplot(log.norm.counts, notch=FALSE, main = "log2-transformed read counts", ylab="log2(read counts)")
distance.log<- as.dist(1-cor(log.norm.counts, method="pearson"))
plot(hclust(distance.log), labels= colnames(log.norm.counts), main="log2 transformed read counts\ndistance:Pearson correlation")
plot(log.norm.counts[,5], log.norm.counts[,1], col=ifelse(rownames(log.norm.counts)=="Glul","red","black"))
abline(a=0, b=1, col="red")
cor(log.norm.counts)
# For Scatterplot of BC markers
Bipolar_clusters <- read.delim("Mouse_BC2-BC4_Hi_Conf.csv", sep=",", header=FALSE)
Bipolar_clusters <- as.character(Bipolar_clusters$V1)
Bipolar_clusters <- intersect(Bipolar_clusters, row.names(log.norm.counts))
cor(log.norm.counts[Bipolar_clusters,])
plot(log.norm.counts[Bipolar_clusters,5], log.norm.counts[Bipolar_clusters,1], col=ifelse(rownames(log.norm.counts)=="Ackr1","red","black"))
abline(a=0, b=1, col="red")
setwd("~/Dropbox (Personal)/19-4-24 Probe-Seq/eLife Initial Submission/Full Submission/Revision/Probe-Seq_Code")
# Heatmap for BC Subtype Specific Markers in the Retina from Karthik et al. that are within high confidence and unique to a certain subtype and is DE between GN and GP
Bipolar_clusters <- read.delim("Mouse_Bipolar_cluster_HiConf_unique.txt", sep=",", header=FALSE)
# Load Data
read.counts<-read.table("Mouse_Nuclei_Grik1_Read_Counts.txt", header=FALSE, stringsAsFactors=FALSE)
# Load Data
read.counts<-read.table("Dm_Esg_Read_Counts.txt", header=FALSE, stringsAsFactors=FALSE)
# Load Data
read.counts<-read.table("Drosophila_Esg_Read_Counts.txt", header=FALSE, stringsAsFactors=FALSE)
# Heatmap of markers based on Doupe et al., 2018 DamID paper
Cell_clusters <- read.delim("Perrimon_DamID_Markers.csv", header=TRUE, sep=",")
# Heatmap of markers based on Doupe et al., 2018 DamID paper
Cell_clusters <- read.delim("Drosophila_Perrimon_DamID_Markers.csv", header=TRUE, sep=",")
Cell_clusters_2 <- read.delim("Drosophila_Perrimon_DamID_Markers.csv", header=TRUE, sep=",")
# Heatmap of markers genes based on Hung et al., PNAS single cell RNA-seq paper
Cell_clusters <- read.delim("Gut_marker_scRNA-seq_ ROC_avg_diff_0.75_Major_Celltypes.txt", header=FALSE)
Cell_clusters <- as.character(Cell_clusters$V4)
# Load Data
read.counts<-read.table("Drosophila_Esg_Read_Counts.txt", header=FALSE, stringsAsFactors=FALSE)
# Load Data
read.counts<-read.table("Mouse_Live_vs_Probe-Seq_Grik1_Read_Counts.txt", header=FALSE, stringsAsFactors=FALSE)
# For Scatterplot of BC markers
Bipolar_clusters <- read.delim("Mouse_BC2-BC4_Hi_Conf.csv", sep=",", header=FALSE)
# Load Data
read.counts<-read.table("Mouse_Whole_Cell_Vsx2_Grik1_Read_Counts.txt", header=FALSE, stringsAsFactors=FALSE)
# Function to change the upper case gene names to lower case + upper case first
simpleCap <- function(x) {
s <- strsplit(x, " ")[[1]]
paste(toupper(substring(s, 1,1)), substring(s, 2),
sep="", collapse=" ")
}
# Heatmap for Cell Type Specific Markers in the Retina from Macoscko et al. that are unique to a certain cell type and is DE between VN and GN/GP.
# Rod markers are not unique (likely because of contamination in other cell types) so the Top 20 DE rod markers are added.
# Minor cell types were discarded (Astrocytes, fibroblasts, endothelium, microglia, pericytes) as too few cells were sequenced.
Cells <- read.delim("Mouse_Retina_Cell_Class_Markers_Macoscko.prn", sep=" ", header=FALSE)
# Heatmap for BC Subtype Specific Markers in the Retina from Karthik et al. that are within high confidence and unique to a certain subtype and is DE between GN and GP
Bipolar_clusters <- read.delim("Mouse_Bipolar_cluster_HiConf_unique.txt", sep=",", header=FALSE)
# Load Data
read.counts<-read.table("Chick_Fgf8_Read_Counts.txt", header=FALSE, stringsAsFactors=FALSE)
id <- read.counts$V1
