Created
March 6, 2019 08:42
-
-
Save allenday/be369bf0bcfec8d55a12d898d24dc4d8 to your computer and use it in GitHub Desktop.
Rice 3K analysis 1: dataviz of genetic variant distribution
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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?