Matt:LabNotes/2015-12-11: Difference between revisions

From ZhangLabWiki
Jump to navigation Jump to search
>Mzcai
(Created page with " load.packages("gplots") library(gplots) tileA <- read.table("C:\\Users\\Matt\\Dropbox\\GradZhangLab\\SpatialSearching\\20151029_20XDecoding\\DARTFISH_BA8_suppv2_20151029_Ti...")
 
>Mzcai
mNo edit summary
Line 1: Line 1:
=Heatmap=


  load.packages("gplots")
  library(gplots)


load.packages("gplots")
  tileA <- read.table("C:\\Users\\Matt\\Dropbox\\GradZhangLab\\SpatialSearching\\20151029_20XDecoding\\DARTFISH_BA8_suppv2_20151029_TileA_240genes21bins.txt",header=TRUE,sep="\t",row.names=1)
library(gplots)
  tileB <- read.table("C:\\Users\\Matt\\Dropbox\\GradZhangLab\\SpatialSearching\\20151029_20XDecoding\\DARTFISH_BA8_suppv2_20151029_TileB_240genes21bins.txt",header=TRUE,sep="\t",row.names=1)
  y <- as.matrix(tileA)
  z <- as.matrix(tileB)


tileA <- read.table("C:\\Users\\Matt\\Dropbox\\GradZhangLab\\SpatialSearching\\20151029_20XDecoding\\DARTFISH_BA8_suppv2_20151029_TileA_240genes21bins.txt",header=TRUE,sep="\t",row.names=1)
  my_palette <- colorRampPalette(c("turquoise","yellow","red"))(n=299)
tileB <- read.table("C:\\Users\\Matt\\Dropbox\\GradZhangLab\\SpatialSearching\\20151029_20XDecoding\\DARTFISH_BA8_suppv2_20151029_TileB_240genes21bins.txt",header=TRUE,sep="\t",row.names=1)
  col_breaks=c(seq(-4,-1,length=100),seq(-1,1,length=100),seq(1,4,length=100))
y <- as.matrix(tileA)
z <- as.matrix(tileB)


 
  heatmap.2(y,density.info="none",trace="none",col=my_palette,breaks=col_breaks)
my_palette <- colorRampPalette(c("turquoise","yellow","red"))(n=299)
col_breaks=c(seq(-4,-1,length=100),seq(-1,1,length=100),seq(1,4,length=100))
 
heatmap.2(y,density.info="none",trace="none",col=my_palette,breaks=col_breaks)

Revision as of 02:53, 12 December 2015

Heatmap

 load.packages("gplots")
 library(gplots)
 tileA <- read.table("C:\\Users\\Matt\\Dropbox\\GradZhangLab\\SpatialSearching\\20151029_20XDecoding\\DARTFISH_BA8_suppv2_20151029_TileA_240genes21bins.txt",header=TRUE,sep="\t",row.names=1)
 tileB <- read.table("C:\\Users\\Matt\\Dropbox\\GradZhangLab\\SpatialSearching\\20151029_20XDecoding\\DARTFISH_BA8_suppv2_20151029_TileB_240genes21bins.txt",header=TRUE,sep="\t",row.names=1)
 y <- as.matrix(tileA)
 z <- as.matrix(tileB)
 my_palette <- colorRampPalette(c("turquoise","yellow","red"))(n=299)
 col_breaks=c(seq(-4,-1,length=100),seq(-1,1,length=100),seq(1,4,length=100))
 heatmap.2(y,density.info="none",trace="none",col=my_palette,breaks=col_breaks)