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 May 11, 2021
1 parent 061d308 commit 931d9cd
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 6 deletions.
14 changes: 8 additions & 6 deletions R/GAPIT.Bus.R
Original file line number Diff line number Diff line change
Expand Up @@ -254,10 +254,10 @@ if(n!=num_bins)
# print(table(aim_area))
# print(dim(GD))
# aim_area=aim_area[1:(nrow(GWAS))]
# if(setequal(aim_area,logical(0))) next
if(setequal(aim_area,logical(0))) next
# this is used to set with sig marker in second model
# aim_area[GM[,1]==aim_marker[,1]]=FALSE
secondCV=NULL
# secondCV=NULL
secondGD=GD[,c(TRUE,aim_area)]
# print(dim(secondGD))
secondGM=GM[aim_area,]
Expand All @@ -272,7 +272,7 @@ if(n!=num_bins)
Second_GWAS= myGAPIT_Second$GWAS [,1:4]
Second_GWAS[is.na(Second_GWAS[,4]),4]=1
orignal_GWAS=GWAS[aim_area,]
write.csv(cbind(orignal_GWAS,Second_GWAS),paste("TEST_",i,".csv",sep=""),quote=F)
# write.csv(cbind(orignal_GWAS,Second_GWAS),paste("TEST_",i,".csv",sep=""),quote=F)

# GWAS_index=match(Second_GWAS[,1],GWAS[,1])
#test_GWAS=GWAS
Expand Down Expand Up @@ -317,7 +317,7 @@ if(method=="BlinkC")
print("BlinkC will be started !!")
colnames(GD)[-1]=as.character(GM[,1])

# blink_GD=t(GD[,-1])
blink_GD=t(GD[,-1])
blink_GM=GM
blink_Y=Y
blink_Y[is.na(blink_Y)]="NaN"
Expand Down Expand Up @@ -395,8 +395,10 @@ library(biganalytics) #for FARM-CPU
#print(head(blink_CV))
# library(BLINK)
# source("http://zzlab.net/GAPIT/BLINK.R")
myBlink=Blink(Y=blink_Y,GD=blink_GD,GM=blink_GM,CV=blink_CV,maxLoop=10,time.cal=T,FDRcut=FDRcut)
#print(head(myBlink$GWAS))
totaltaxa=cbind(blink_Y[,1],GD[,1])
# print(totaltaxa)
myBlink=Blink(Y=blink_Y,GD=blink_GD,GM=blink_GM,CV=blink_CV,maxLoop=10,cutOff=cutOff,time.cal=T,FDRcut=FDRcut)
# print(head(myBlink$GWAS))
seqQTN=myBlink$seqQTN
taxa=names(blink_Y)[2]
GWAS=myBlink$GWAS[,1:4]
Expand Down
15 changes: 15 additions & 0 deletions R/GAPIT.MAS.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
`GAPIT.MAS` <-function(Y,GD=NULL,GM=NULL,KI=NULL,GWAS=NULL,CM=NULL){
#Object: Useing MAS to predict phenotype
#Designed by Zhiwu Zhang
#Writen by Jiabo Wang
#Last update: Apr 23, 2021
##############################################################################################
print("GAPIT.MAS in process...")
#Define the function here





}

0 comments on commit 931d9cd

Please sign in to comment.