# -----
Com.ave.gd<-read.csv("Com.SCA.gd.csv")
hete<-as.matrix(Com.ave.gd[,-c(1:3)])
a<-rcorr(hete, type="pearson")
write.csv(a$r,"corr_SCA_gd.csv")
write.csv(a$P,"corr_SCA_gd_pvalue.csv")
# ----匹配heterosis SCA 和gd
gd<-read.csv("gd.nei between parents.csv")
gd$com1<-paste0(gd$p1,gd$p2)
gd$com2<-paste0(gd$p2,gd$p1)
# 1 heterosis 和gd
hete<-read.csv("heterosis_growth.csv")
names(hete)
hete<-hete[,-11]
for(i in 1:dim(hete)[1]){
for(j in 1:dim(gd)[1]){
if(hete$X[i]==gd$com1[j])(hete$GD[i]<-gd$GD[j])
}
}
for(i in 1:dim(hete)[1]){
for(j in 1:dim(gd)[1]){
if(hete$X[i]==gd$com2[j])(hete$GD[i]<-gd$GD[j])
}
}
# 2 SCA 和gd
sca<-read.csv("Com.SCA.gd.csv")
sca$com2<-paste0(sca$Mum,sca$Dad)
for(i in 1:dim(sca)[1]){
for(j in 1:dim(gd)[1]){
if(sca$com2[i]==gd$com1[j])(sca$GD[i]<-gd$GD[j])
}
}
for(i in 1:dim(sca)[1]){
for(j in 1:dim(gd)[1]){
if(sca$com2[i]==gd$com2[j])(sca$GD[i]<-gd$GD[j])
}
}
# -----cor
library(Hmisc) #相关显著性检验
# 1 heterosis 和gd
hete.cor<-as.matrix(hete[,-1])
a<-rcorr(hete.cor, type="pearson")
# a<-cor(hete,method = c("pearson"), use = "complete.obs")
write.csv(a$r,"corr_hete_gd.csv")
write.csv(a$P,"corr_hete_gd_pvalue.csv")
# 1 sca 和gd
names(sca)
sca.cor<-as.matrix(sca[,-c(1:3,13)])
b<-rcorr(sca.cor, type="pearson")
# a<-cor(hete,method = c("pearson"), use = "complete.obs")
write.csv(b$r,"corr_sca_gd.csv")
write.csv(b$P,"corr_sca_gd_pvalue.csv")
heterosis SCA 和gd 关系
最后编辑于 :
©著作权归作者所有,转载或内容合作请联系作者
- 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
- 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
- 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
推荐阅读更多精彩内容
- 小学语文修改病句的方法 修改病句是小学语文考试中常见的题型,在修改病句之前,我们应该清晰的了解有哪些病句现象,下面...