
## gwas on chr 6- amylose content for indica subpop'n
### processing done on linux server

## relevant variables saved as GWAS_IND_chr6_imputed_var_170309.Rbin

# A.ind = kinship matrix determined from original HDRA 700K snp chip
# geno.ind = genotype file (imputed)
# pheno.ind = phenotype file containing amylose content and 3 other quality traits

library(rrBLUP)

load("GWAS_IND_chr6_imputed_var_170309.Rbin")

##0PC -- most recent run 170309
res =GWAS(pheno=data.frame(ID=pheno.ind[,1] ,AMYLOSE=pheno.ind$AMYLOSE_CONTENT), geno=geno.ind, fixed=NULL, 
          K=A.ind, n.PC= 0,min.MAF=0.05, n.core=1, P3D=TRUE, plot=FALSE)
output= "GWAS_HDRA_IMPUTED_chr6_IND_0PC_AMYLOSE_170309.csv"
write.table(res, file= output, sep=",", row.names=FALSE)


