diff --git a/genesets/Homo_sapiens.GRCh38.86.gtf b/genesets/Homo_sapiens.GRCh38.86.gtf new file mode 100755 index 0000000000000000000000000000000000000000..6fea15384022ef6473128abf49468f4c5123f59a Binary files /dev/null and b/genesets/Homo_sapiens.GRCh38.86.gtf differ diff --git a/r.scripts/sc_CNV.R b/r.scripts/sc_CNV.R new file mode 100644 index 0000000000000000000000000000000000000000..a37f387ee68e085d10129a1890f5e44415765aa8 --- /dev/null +++ b/r.scripts/sc_CNV.R @@ -0,0 +1,23 @@ +library(Seurat) +library(refGenome) + +load("~/R-Analysis/RNA-Seq/SingleCell/Pr_PrCa/sc10x.Pr_PrCa.ALL.cluster.NOStress.IDepi+st+ne+LGEAepi+LGEAst.Rda") +sc10x.Group <- get('sc10x.ALL.cluster.NOStress.IDepi+st+ne+LGEAepi+LGEAst') +ens <- ensemblGenome() +read.gtf(ens, "../Homo_sapiens.GRCh38.86.gtf") +gpu <- getGenePositions(ens) +gpu <- gpu[order(gpu$seqid,gpu$start),] +gene <- gpu$gene_name +mat <- sc10x.Group@data +mat <- as.matrix(mat[,1:50]) +mat <- mat[rownames(mat) %in% gene,] +mat2 <- mat[order(match(rownames(mat),gene)),] + +mat3 <- movingAverage(mat2,51,TRUE) +mat4 <- scale(mat3, scale=FALSE) + +library(gplots) +heatmap.2(mat4,dendrogram="none",Rowv=FALSE,Colv=FALSE,col=bluered(75),density.info="none",trace="none", scale="none",ylab="Genes",xlab="Cells",labRow=FALSE,labCol=FALSE) + + +write.csv(mat2,file="../mat.csv")