Error when using GAPIT for GWAS

I have been trying to run a GWAS using GAPIT and I keep getting this error:

> # Import data from Zhiwu Zhang Lab
> myZZY <- read.table("http://zzlab.net/GAPIT/data/mdp_traits.txt", head = TRUE) 
> myZZGD <- read.table(file = "http://zzlab.net/GAPIT/data/mdp_numeric.txt", head = TRUE) 
> myZZGM <- read.table(file = "http://zzlab.net/GAPIT/data/mdp_SNP_information.txt", head = TRUE) 
> # GWAS 
> myGAPIT <- GAPIT(
+   Y = myZZY[, c(1, 2, 3)], # first column is ID 
+   GD = myZZGD, 
+   GM = myZZGM, 
+   PCA.total = 3, 
+   model = c("FarmCPU", "Blink"), 
+   Multiple_analysis = TRUE
+ ) 
[1] "--------------------- Welcome to GAPIT ----------------------------"
[1] "FarmCPU" "Blink"  
[1] "--------------------Processing traits----------------------------------"
[1] "Phenotype provided!"
[1] "The 1 model in all."
[1] "FarmCPU"
[1] "GAPIT.DP in process..."
[1] "GAPIT will filter marker with MAF setting !!"
[1] "The markers will be filtered by SNP.MAF: 0"
maf_index
TRUE 
3093 
[1] "Calling prcomp..."
[1] "Creating PCA graphs..."
[1] "Joining taxa..."
[1] "Exporting PCs..."
[1] "PC created"
[1] "Filting marker for GAPIT.Genotype.View function ..."
Error in layout.matrix(mat = layout.matrix, heights = c(100, 80, 120),  : 
  argument "p" is missing, with no default
In addition: There were 50 or more warnings (use warnings() to see the first 50)

So far I have tried the following:
I have tried the following to solve it so far:

  • I ran the example data from the GAPIT manual and had the same issue which is the code above
  • I double checked the structures of myY, myGD and myGM against the example and they seem the same
> str(myY)
'data.frame':	2559 obs. of  2 variables:
 $ taxa : chr  "XYZ" "ABC" "123" "EFG" ...
 $ Blues: num  659 638 620 715 652 ...
> str(myGM) ###Allele ID is character, Chr and Pos = numeric - use code below
'data.frame':	13678 obs. of  3 variables:
 $ Marker: chr  "6178219|F|0-66:T>C-66:T>C" "6154603|F|0-43:C>T-43:C>T" "6194871|F|0-43:G>A-43:G>A" "6186111|F|0-6:G>A-6:G>A" ...
 $ Chr   : num  12 5 5 1 11 8 12 1 9 8 ...
 $ Pos   : num  4636524 15568186 15584805 7403652 18283519 ...
> str(myGD)
'data.frame':	1759 obs. of  13679 variables:
 $ taxa                       : chr  "XYZ" "ABC" "123" "EFG" ...
 $ 6178219|F|0-66:T>C-66:T>C  : num  0 0 1 0 2 0 0 0 2 0 ...
 $ 6154603|F|0-43:C>T-43:C>T  : num  0 0 1 0 0 0 0 0 2 0 ...
  • I had also cleaned the marker and genotype names, removing |,-,:,> . This did not seem to matter in the GAPIT manual or the video example.
  • Last thing I tried was converting myY, myGD and myGM to matrixes and that still resulted in the same error. I have set these back to normal to keep them the same as the other two scripts I am going between.

Thank you so much for any advice you can provide

1 Like

I tried to run GWAS using GAPIT and faced the same error you mentioned. Seems like this error is not because of our data but rather due to some bugs in the GAPIT package.

Hoping somebody will fix it soon!

I think I finally got it to work. I had to make sure I didn't have any other packages when running this one.

Thanks Caiden, for the suggestion; it worked for me as well!

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.