Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Rice 3K analysis 1: dataviz of genetic variant distribution
rice3k = read.csv("~/Downloads/rice3k_z.csv",header=F)
#chromosomes 1-12, excludes Sy and Un
rice3k.z = as.matrix(rice3k[,c(2:45,129:165,166:202,203:239,240:270,271:302,303:333,334:362,363:386,46:69,70:99,100:128)])
rownames(rice3k.z) = rice3k[,1]
colnames(rice3k.z) = c(rep(1,44),rep(2,37),rep(3,37),rep(4,37),rep(5,31),rep(6,32),rep(7,31),rep(8,29),rep(9,24),rep(10,24),rep(11,30),rep(12,29))
heatmap(rice3k.z,Colv=NA,ColSideColors=colnames(rice3k.z),labCol=F,scale="none",cexRow=0.1)
#2:45 #1
#46:69 #10
#70:99 #11
#100:128 #12
#129:165 #2
#166:202 #3
#203:239 #4
#240:270 #5
#271:302 #6
#303:333 #7
#334:362 #8
#363:386 #9
#387:388 #Sy
#389:390 #Un
#Chr1 44
#Chr10 24
#Chr11 30
#Chr12 29
#Chr2 37
#Chr3 37
#Chr4 37
#Chr5 31
#Chr6 32
#Chr7 31
#Chr8 29
#Chr9 24
#ChrSy 2
#ChrUn 2
@ylipacbio

This comment has been minimized.

Copy link

commented Mar 20, 2019

Thanks for sharing R script to plot the rice3k selective pressure heatmap!
Seems like this R script does not include functions to plot the dendrogram?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.