Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
jiabowang authored Jul 27, 2021
1 parent 851f50b commit 8ce5d54
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 18 deletions.
30 changes: 13 additions & 17 deletions R/GAPIT.Blink.R
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,10 @@
seqTaxa=which(!is.na(Y[,trait]))
Y1=Y[seqTaxa,]
if(!is.null(CV)){
if(ncol(CV)==1){
CV1=CV[seqTaxa]
}else{
CV1=CV[seqTaxa,]
}
}else{
CV1=NULL
}
CV1=CV[seqTaxa,] #Thanks for jloat's suggestion in Jul 23 2021
}else{
CV1=NULL
}
if(orientation=="col"){
if(is.big.matrix(GD)){
GD1=deepcopy(GD,rows=seqTaxa,cols=index)
Expand Down Expand Up @@ -223,8 +219,8 @@
GWAS[,4][which(GWAS[,4]>1)]=1
colnames(GWAS)=c(colnames(GM),"P.value","maf","nobs","Rsquare.of.Model.without.SNP","Rsquare.of.Model.with.SNP","FDR_Adjusted_P-values")
Vp=var(Y1[,2],na.rm=TRUE)
if(file.output) GAPIT.Report(name.of.trait=name.of.trait2,GWAS=GWAS,pred=NULL,tvalue=NULL,stderr=stderr,Vp=Vp,DPP=DPP,cutOff=cutOff,threshold.output=threshold.output,MAF=MAF,seqQTN=QTN.position,MAF.calculate=MAF.calculate,plot.style=plot.style)
myPower=GAPIT.Power(WS=WS, alpha=alpha, maxOut=maxOut,seqQTN=QTN.position,GM=GM,GWAS=GWAS,MaxBP=1e10)
# if(file.output) GAPIT.Report(name.of.trait=name.of.trait2,GWAS=GWAS,pred=NULL,tvalue=NULL,stderr=stderr,Vp=Vp,DPP=DPP,cutOff=cutOff,threshold.output=threshold.output,MAF=MAF,seqQTN=QTN.position,MAF.calculate=MAF.calculate,plot.style=plot.style)
# myPower=GAPIT.Power(WS=WS, alpha=alpha, maxOut=maxOut,seqQTN=QTN.position,GM=GM,GWAS=GWAS,MaxBP=1e10)
}
break
}
Expand Down Expand Up @@ -285,13 +281,13 @@
GWAS=cbind(GM[MAF.index,],P,MAF,NA,NA,NA,NA)
colnames(GWAS)=c(colnames(GM),"P.value","maf","nobs","Rsquare.of.Model.without.SNP","Rsquare.of.Model.with.SNP","FDR_Adjusted_P-values")
Vp=var(Y1[,2],na.rm=TRUE)
if(file.output){
if(theLoop==1&&is.null(CV)){
GAPIT.Report(name.of.trait=name.of.trait2,GWAS=GWAS,pred=NULL,ypred=NULL,tvalue=NULL,stderr=stderr,Vp=Vp,DPP=DPP,cutOff=cutOff,threshold.output=threshold.output,MAF=MAF,seqQTN=QTN.position,MAF.calculate=MAF.calculate,plot.style=plot.style)
}else{
GAPIT.Report(name.of.trait=name.of.trait2,GWAS=GWAS,pred=NULL,ypred=NULL,tvalue=NULL,stderr=stderr,Vp=Vp,DPP=DPP,cutOff=cutOff,threshold.output=threshold.output,MAF=MAF,seqQTN=QTN.position,MAF.calculate=MAF.calculate,plot.style=plot.style)
}
}# end of file.out
# if(file.output){
# if(theLoop==1&&is.null(CV)){
# GAPIT.Report(name.of.trait=name.of.trait2,GWAS=GWAS,pred=NULL,ypred=NULL,tvalue=NULL,stderr=stderr,Vp=Vp,DPP=DPP,cutOff=cutOff,threshold.output=threshold.output,MAF=MAF,seqQTN=QTN.position,MAF.calculate=MAF.calculate,plot.style=plot.style)
# }else{
# GAPIT.Report(name.of.trait=name.of.trait2,GWAS=GWAS,pred=NULL,ypred=NULL,tvalue=NULL,stderr=stderr,Vp=Vp,DPP=DPP,cutOff=cutOff,threshold.output=threshold.output,MAF=MAF,seqQTN=QTN.position,MAF.calculate=MAF.calculate,plot.style=plot.style)
# }
# }# end of file.out
} #end of theLoop
PEV=NULL
if(Prediction){
Expand Down
2 changes: 1 addition & 1 deletion R/GAPIT.Bus.R
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ library(biganalytics) #for FARM-CPU
blink_GM=GM
blink_Y=Y
blink_CV=NULL
if(!is.null(CV))blink_CV=CV[,-1]
if(!is.null(CV))blink_CV=CV[,-1,drop=FALSE] #Thanks for jloat's suggestion in Jul 23 2021

#print(head(blink_CV))
# library(BLINK)
Expand Down

0 comments on commit 8ce5d54

Please sign in to comment.