Table S1. Example of R script that was used to simulate a trait, having Heritability=60% and number of QTLs=20 (H60_Q20), using the marker data of 31,260 SNPs for 346 soybean accessions.
#Read Soybean Genotype data file
D<-read.big.matrix("GN.txt", type="char", sep="\t",head = TRUE)
dim(D)
D=D[,2:31261]
D1=as.data.frame(as.matrix(D))
D2=t(D1)
QTL <-100*(1:20) #pick 20 QTL
u <-rep(0,31620) #marker effects
u[QTL] <- 1
g <-as.vector(crossprod(D2,u))
h2 <- 0.6 #heritability
y <- g +rnorm(346,mean=0,sd=sqrt((1-h2)/h2*var(g)))
#Saving simulated file write.table(y,"H60Q20.txt", sep="\t")
参考文献:https://www.frontiersin.org/articles/10.3389/fpls.2019.01794/full#supplementary-material
GWAS关联分析课程推荐:https://bdtcd.xetslk.com/s/2KgXQq
如果觉得我的文章对您有用,请随意打赏。你的支持将鼓励我继续创作!