jiabowang/GAPIT

How to handle missing genotype data, numeric format

syesdnil11 opened this issue · 1 comments

I'm getting the following error when I try to run GAPIT because some of my SNPS are listed as NA in my genotype file:

Error in GAPIT.kinship.Zhang(snps = as.matrix(thisGD)) :
GAPIT says: Missing data is not allowed for numerical genotype data

Is there a way for me to tell GAPIT to ignore the missing data somehow? Apologies if my question is naive, I'm new to R...

Input is as follows:

library(GAPIT)

#Set data directory and import files#
Y <- read.table("cleaner_pheno.txt",header=T,sep="\t")
GD <- readRDS("clean_geno.rds")
tGD <- t(GD)
dim(tGD)
[1] 68337 807
GM <- read.table("map.txt",header=T,sep="\t")

#Run GAPIT#
myGAPIT <- GAPIT( Y,
GD=tGD, GM, PCA.total=1,
SNP.impute="Major",
Major.allele.zero=T,
model=c("GLM", "MLM", "MLMM", "FarmCPU", "Blink")
)

Screenshot 2023-12-12 at 5 04 52 PM

Please impute them using other software, such as Beagle or Impute.