Commit 8194e9b0 authored by Gervaise Henry's avatar Gervaise Henry 🤠
Browse files

Update species difference for cell cycle genes... don't print for mouse

parent 67631d03
......@@ -30,7 +30,7 @@ sc10x <- scLoad(p=project.name,cellranger=3,ref="mm10")
lg=500
hg=3000
hm=0.05
results <- scQC(sc10x,lg=lg,hg=hg,hm=hm,sub=FALSE,sp="mus")
results <- scQC(sc10x,lg=lg,hg=hg,hm=hm,sub=FALSE,sp="mu")
sc10x <- results[[1]]
counts.cell.raw <- results[[2]]
counts.gene.raw <- results[[3]]
......@@ -41,7 +41,7 @@ rm(lg)
rm(hg)
rm(hm)
results <- scCellCycle(sc10x,sub=FALSE)
results <- scCellCycle(sc10x,sub=FALSE,sp="mu")
sc10x <- results[[1]]
genes.s <- results[[2]]
genes.g2m <- results[[3]]
......
......@@ -141,7 +141,7 @@ scQC <- function(sc10x,lg=500,hg=2500,hm=0.1,sub=FALSE,sp="hu"){
mito.genes <- grep(pattern="^MT-",x=rownames(x=GetAssayData(object=sc10x)),value=TRUE)
} else {
mito.genes <- grep(pattern="^mt-",x=rownames(x=GetAssayData(object=sc10x)),value=TRUE)
}
}
percent.mito <- Matrix::colSums(GetAssayData(object=sc10x,slot="counts")[mito.genes,])/Matrix::colSums(GetAssayData(object=sc10x,slot="counts"))
sc10x$percent.mito <- percent.mito
......@@ -202,7 +202,7 @@ scQC <- function(sc10x,lg=500,hg=2500,hm=0.1,sub=FALSE,sp="hu"){
}
scCellCycle <- function(sc10x,sub=FALSE){
scCellCycle <- function(sc10x,sub=FALSE,sp="hu"){
#Runs Seurat based PCA analysis for cell cycle ID
#Inputs:
......@@ -232,11 +232,13 @@ scCellCycle <- function(sc10x,sub=FALSE){
sc10x <- CellCycleScoring(object=sc10x,s.features=genes.s,g2m.features=genes.g2m,set.ident=TRUE)
#plot cell cycle specific genes
genes=c("PCNA","TOP2A","MCM6","MKI67")
postscript(paste0(folder,"Violin_cc.Raw.eps"))
plot <- VlnPlot(object=sc10x,features=genes,ncol=2,pt.size=1)
plot(plot)
dev.off()
if (sp=="hu"){
genes=c("PCNA","TOP2A","MCM6","MKI67")
postscript(paste0(folder,"Violin_cc.Raw.eps"))
plot <- VlnPlot(object=sc10x,features=genes,ncol=2,pt.size=1)
plot(plot)
dev.off()
}
# sc10x <- RunPCA(object=sc10x,features=c(genes.s,genes.g2m),npcs=2,verbose=FALSE)
# postscript(paste0(folder,"PCA_cc.Raw.eps"))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment