GWAS根据遗传率和QTL的数量产出模拟表型数据

GWAS根据遗传率和QTL的数量产出模拟表型数据

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


  • 发表于 2021-11-18 13:49
  • 阅读 ( 1460 )
  • 分类:GWAS

0 条评论

请先 登录 后评论
omicsgene
omicsgene

生物信息

658 篇文章

作家榜 »

  1. omicsgene 658 文章
  2. 安生水 328 文章
  3. Daitoue 167 文章
  4. 生物女学霸 120 文章
  5. 红橙子 78 文章
  6. CORNERSTONE 72 文章
  7. xun 67 文章
  8. rzx 67 文章