jiabowang / gapit Goto Github PK
View Code? Open in Web Editor NEWGenome Association Predict Integrate Tools
Genome Association Predict Integrate Tools
@jiabowang I believe your directory "NAMESPCAE" should be "NAMESPACE". I'm not sure what the impact of changing this would be.
I am trying to install GAPIT3. i tried all the ways but it always ends up in below error
ERROR: dependency 'LDheatmap' is not available for package 'GAPIT3'
Also, LDheatmap cannot be installed. Please help.
Hello,
I'm getting the following error from running the BLINK model in GAPIT with one covariate that may also affect other model functions but doesn't seem to affect MLM. Someone else also mentioned this error here (https://www.biostars.org/p/412603/), but it was considered off topic.
Error in if (ncol(CV) == 1) { : argument is of length zero
Calls: GAPIT -> GAPIT.SS -> GAPIT.Bus -> Blink
The cause of this error appears to originate in line 1,748 of gapit_functions.txt where the following command is used:
if(!is.null(CV))blink_CV=CV[,-1]
Normally this is fine. However, when using a single covariate data frame, this results in a numeric vector rather than a data frame. I recommend changing this line to:
if(!is.null(CV))blink_CV=CV[,-1, drop=FALSE]
If you search for ",-1]" you will find similar potential issues (ex. line 1,174, etc). This shouldn't be an issue for things like KI or GD, but it might not hurt to change those instances as well.
Of course, even after that fix I had another error:
Error in [.data.frame
(CV, seqTaxa) : undefined columns selected
Calls: GAPIT ... GAPIT.SS -> GAPIT.Bus -> Blink -> [ -> [.data.frame
The traceback is as follows:
Error in [.data.frame
(CV, seqTaxa) : undefined columns selected
In addition: There were 15 warnings (use warnings() to see them)
traceback() # partial
11: stop("undefined columns selected")
10:[.data.frame
(CV, seqTaxa) at gapit_functions.txt#161
9: CV[seqTaxa] at gapit_functions.txt#161
This was resolved by editing (line 161 or so):
if(!is.null(CV)){
if(ncol(CV)==1){
CV1=CV[seqTaxa]
}else{
CV1=CV[seqTaxa,]
}
To:
if(!is.null(CV)){
CV1=CV[seqTaxa,]
}
Because now it's a data frame and you don't need a check for both vector and data frame.
My locally edited version now appears to run just fine.
I've built GAPIT3 in R 4.1.0 from a Git clone of the package, following the instructions under "Installation from an archive". For your information I received the following "notes":
Note: possible error in 'Blink.Pred(Y = YP, GD = GDpred, ': unused argument (orientation = orientation)
Note: break used in wrong context: no loop is visible
Note: possible error in 'Blink.cor(Y = Y, w = w, ': unused argument (alist())
Note: possible error in 'FarmCPU.LM.Parallel(y = Y[, ': unused argument (npc = npc)
Note: possible error in 'layout(title = "Interactive.Manhattan.Plot", ': unused arguments (title = "Interactive.Manhattan.Plot", xaxis = list(title = "Chromsome", zeroline = FALSE, showticklabels = FALSE), yaxis = list(title = "-Log10(p)"))
Note: possible error in 'layout(title = "Interactive.QQ.Plot", ': unused arguments (title = "Interactive.QQ.Plot", xaxis = list(title = "Expected -Log10(p)"), yaxis = list(title = "Observed -Log10(p)"), showlegend = FALSE)
There was also the warning:
Warning: replacing previous import ‘multtest::wapply’ by ‘gplots::wapply’ when loading ‘GAPIT3’
Although I can't be sure, I'd guess that of these are too significant (I'm a system administrator, not an R user), but they do look like the kind of things that would be worth addressing.
(And thanks @knausb for your prompt response on the issue I raised earlier today.)
Hi,
I am trying to integrate GAPIT3 to my GWAS1001 project. However, if I set file.output = T, I will get an error saying that the dimension not equal to array extent when it is trying to plot the kinship graph. Therefore, I changed it to file.output = FALSE so that my code wouldn't break. Could you please give me some suggestion to solve this? I need to keep all the output.
Pictures below are the configurations of GWAS1001. I used the same configuration before when I made the GWAS_Cli_App. However, it doesn't output the GWAS table at the end, and I couldn't figure out why. Could you please give me some suggestion to solve this?
When running multiple models under one command, if FarmCPU goes before GLM in the list of models, the GLM results are identical to farmCPU. However, when you reverse the order, the results are different as one would expect.
here is my example:
pacman::p_load(GAPIT3, data.table)
setwd("mywd")
myY <- read.delim("pheno.txt", header = TRUE, check.names = F, stringsAsFactors = F)
myG <- fread("genotype.tsv", check.names = FALSE, header = FALSE, nThread = 8, sep = "\t")
myG[1:4, 1:5]
head(myY)
#Step 2: Run GAPIT
myGAPIT <- GAPIT(
Y=myY,
G=myG,
PCA.total=3,
model=c("MLM", "FarmCPU", "GLM", "Blink", "SUPER"),
Multiple_analysis=TRUE,
file.output=T)
And the manhattan I combined from the analysis:
The GLM and FarmCPU results from running each method separately are similar to the ones where GLM precedes FarmCPU.
Could you please attach a license to this package? Otherwise it is not clear if and how this code could be used.
I've created a toy dataset for a class I'm teaching and it keeps failing in GAPIT at this step:
[1] "Filting marker for GAPIT.Genotype.View function ..."
Error in sample.int(x, size, replace, prob) :
cannot take a sample larger than the population when 'replace = FALSE'
Digging into the code, this seems to be because the declaration for GAPIT.Genotype.View() includes the code n.select=10000
, which makes it so the test on line 90 of if(is.null(n.select))n.select=nrow(GI)
can never occur because n.select is never null. (Maybe it's supposed to inherit NULL from a higher function call, but that is obviously not happening. My function call is just GAPIT(Y=phenos, G=genos, model="GLM")
, so everything else is basically default.
Fix would be to correct the declaration so n.select=NULL
, and to check whichever functions call this one to make sure they aren't passing a different default value.
Thank you.
I've been playing around with GAPIT for doing GWAS analysis in soy. In total, I have a hapmap file (or vcf) with about 5.4 million loci and about 1200 samples. I've been encountering significant memory limits with GAPIT.
I haven't fully explored resource usage yet but a run with only a subset of about 100K loci and SNP.fraction set to 0.1 still took about 100 gigs of memory. See linked plots for detailed resource usage in that run...
https://salk-tm-logs.s3.amazonaws.com/CdkBqQYga1NR.metrics/metrics.html
...I have the following questions...
Hi,
I am running multiple model GWAS with multi traits phenotype. Following script I used:
myGAPIT <- GAPIT(
Y=myY,
GD=myGD,
GM=myGM,
PCA.total=3,
NJtree.group=3,
Multiple_analysis=TRUE,
model=c("GLM","MLM","MLMM","FarmCPU","Blink")
)
[.data.frame
(geneGD, GT %in% taxa_Y) :I have another issue in Multi-model run, when I using multi-traits data, it started with GLM first for all traits. If any error found in anyone traits, run was stooped and I have to repeat run for all traits and multiple model.
Can we I run multiple model with traits wise (first run all model for first trait with Multiple_analysis=TRUE, and then run for second trait) ?
Please help me to solve this issues.
Best Regards,
Javed Akhatar
I am running GAPIT3 using the following command for GWAS analysis:
for(i in 2:ncol(myY))
{
myGAPIT <- GAPIT(
Y=myY[,c(1,i)],
GD=myGD,
GM=myGM,
model=c("GLM","MLM","MLMM","FarmCPU","Blink"),
PCA.total=3,
NJtree.group=4,
Geno.View.output=F,
Inter.Plot=FALSE,
Multiple_analysis=TRUE,
PCA.3d=FALSE,
file.output=T
)
}
Error in if (file.output & !SNP.test & model_store %in% c("gBLUP", "cBLUP", :
the condition has length > 1
In addition: Warning message:
In max(numeric.chr, na.rm = TRUE) :
no non-missing arguments to max; returning -Inf
The installation manual needs updating with BiocManager installation of multtest BiocManager::install("multtest")
for R 3.6+. The dependency snpStats for LDheatmap is missing as well, which is installed via BiocManager::install("snpStats")
. Without snpStats LDheatmap will have a non-zero exit status.
Hi,
I am trying to install GAPIT using following commands. However, I am getting errors.
install.packages("devtools")
devtools::install_github("jiabowang/GAPIT3")
library(GAPIT3)
Here is the complete error message:
Skipping 1 packages not available: multtest
Error: Failed to install 'GAPIT3' from GitHub:
(converted from warning) installation of package ‘C:/Users/AppData/Local/Temp/Rtmp69Xt8w/file192c2c9c5ec7/GAPIT3_3.1.0.tar.gz’ had non-zero exit status
Dear all,
I have a question,
I have the honour to read the manual of GAPIT, and interesting to the function of NJ-tree. After testing my data by using parameter with : res_gapit <- GAPIT(Y=myY, GD=myGD, GM=myGM,Inter.Plot=T, NJtree.group = 4), I obtained the NJ-tree only figure. However, I can not edit the tree using other software without text format of NJ-tree.
Should I add some parameter? How can I do it?
Thanks.
Hello,
I am rerunning some data that had previously worked in GAPIT and now it is giving me an error. Currently, I am inputting my HapMap file and phenotyping data in and asking it correct for 3 PCs using FarmCPU. I am getting an error for myGM not being found, but as far as I understand that file only needs to be input for a different genotyping file type. The error code is below.
Error in myGM[, 1] %in% marker.name : object 'myGM' not found
Thank you
@jiabowang
Dear Dr. Wang:
When performing association with variations in a regon, it reported an erro in myGD3[, w1_start:w1_end] : subscript out of bounds after Kinship created. (The variation number is 3248, GAPIT version is 2020.10.24, GAPIT 3.0)
Details:
[1] "Kinship save as file"
[1] "Kinship created!"
Error in myGD3[, w1_start:w1_end] : subscript out of bounds
Calls: GAPIT -> GAPIT.DP -> GAPIT.Genotype -> GAPIT.Genotype.View
It seems sth wrong with the genotype, as association with variations in another region was normal. (The variation number is 2657)
But I don't known what was wrong. Could you help me to deal with it? Attached is the genotype file.
Another question is that: How could I turn off some functions while performing GWAS, such as GAPIT.Genotype.View and phenotype view function? Files of phenotype_view.pdf and MAF.pdf were repeatly generated in different models.
for_GWAS_region_03.merged.hmp.txt
Thanks!
Best wishes !
struggling to install on R 4.1.1
when running source("http://zzlab.net/GAPIT/GAPIT.library.R")
I get
ERROR: dependency ‘snpStats’ is not available for package ‘LDheatmap’ removing ‘/usr/local/lib/R/4.1/site-library/LDheatmap’
and further
Error: With R version 3.5 or greater, install Bioconductor packages using BiocManager; see https://bioconductor.org/install
EDIT
I am able to make it work if I install 'snpStats' and 'LDHeatmap' (in that order) by hand
if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("snpStats")
install.packages("LDheatmap")
and finally GAPIT3 via github
devtools::install_github("jiabowang/GAPIT3",force=TRUE)
This software you have developed is really powerful. But unfortunately I have a problem about " rs.index".
1 [1] "--------------------- Welcome to GAPIT ----------------------------"
2 [1] "MLM"
3 [1] "--------------------Processing traits----------------------------------"
4 [1] "Phenotype provided!"
5 [1] "The 1 model in all."
5 [1] "The 1 model in all."
6 [1] "MLM"
7 [1] "GAPIT.DP in process..."
8 [1] "Converting genotype..."
9 [1] "Converting HapMap format to numerical under model of Middle"
10 [1] "Perform numericalization"
11 [1] "--------------------- Welcome to GAPIT ----------------------------"
12 [1] "MLM"
13 [1] "--------------------Processing traits----------------------------------"
14 [1] "Phenotype provided!"
15 [1] "The 1 model in all."
16 [1] "MLM"
17 [1] "GAPIT.DP in process..."
18 [1] "Converting genotype..."
19 [1] "Converting HapMap format to numerical under model of Middle"
20 [1] "Perform numericalization"
21 [1] "Succesfuly finished converting HapMap which has bits of 2"
22 [1] "Converting genotype done."
23 [1] "GAPIT will filter marker with MAF setting !!"
24 [1] "The markers will be filtered by SNP.MAF: 0"
25 maf_index
26 TRUE
27 4140284
28 [1] "Calculating kinship..."
29 [1] "Number of individuals and SNPs are 330 and 4140284"
30 [1] "Calculating ZHANG relationship defined by Zhiwu Zhang..."
31 [1] "substracting mean..."
32 [1] "Getting X'X..."
33 [1] "Adjusting..."
34 [1] "Calculating kinship with Zhang method: done"
35 [1] "kinship calculated"
36 [1] "Creating heat map for kinship..."
37 [1] "Kinship heat map created"
38 [1] "Adding IDs to kinship..."
39 [1] "Writing kinship to file..."
40 [1] "Kinship save as file"
41 [1] "Kinship created!"
42 [1] "Filting marker for GAPIT.Genotype.View function ..."
43 rs.index
44 FALSE TRUE
45 4130284 10000
46 Error in plot.window(...) : need finite 'ylim' values
47 Calls: GAPIT ... GAPIT.Genotype.View -> plot -> plot.default -> localWindow -> plot.window
48 In addition: There were 50 or more warnings (use warnings() to see the first 50)
49 Execution halted
Locally building the 3.2 release creates a GAPIT3_3.1.0.tar.gz file.
Dear Professor:
I producted a few of snp genotype data with numeric value between “0” and “2”. I noticed that GAPIT support this numeric format to used for GWAS.
However, I have no idear to their working mechanism. Maybe change the numeric format between “0” and “2” to "0" "1" "2" ? If so, how can I get the transformed file? I want to understand it, important to me.
Best.
The GAPIT3 produces many warning message regarding memory.size is depreciated. Also, could you please add some examples to work with categorical and binary traits?
Thanks in advance.
Dear Author
Thank you for providing such good software for GWAS analysis . and I have been using it and it is very good. However, I recently used the updated version of the gapit_functions and found that some traits have been stuck in this step [RandomModel beginning]. It take too long time at this step at some traits .
Is there anything wrong? I suspect that an endless loop has already taken place at this step for some traits.
Hi,
I want to know how to use GAPIT3 to run FaST-LMM model, NOT SUPER.
By the way, is model = "MLM" perform model which implemented in EMMAX program exactly?
Kun.
Hi Jiabo,
I am interested in how to design novel approaches for genotype encoding. There is much higher LD in my genotypic data than usually used SNPs. As far as I could understand, I need to adjust the maxLoop parameter for the Blink model.
What is the default value of the maxLoop parameter for the Blink model implemented in the GAPIT3 package, please?
How could I change that?
I learned the maxLoop parameter from https://github.com/YaoZhou89/BLINK/blob/master/man/User%20Manual.md
Baoxing from the Buckler Lab at Cornell
[.data.frame
(GWAS_result, , c(1, 3)) :Please help me..
Best wishes
Javed
Hi,
I am getting the above error when including the covariate matrix (myCV). I also included phenotype, genotype, and kinship files.
Here are a few lines of myCV file:
Taxa Q1 Q2 Q3
A3 0.955274 9.7e-05 0.04463
A4 0.999971 1.4e-05 1.5e-05
A7 1.3e-05 1.4e-05 0.999973
A11 0.999971 1.4e-05 1.4e-05
If any other details are required, please let me know.
Thank you
I am getting error while running GAPIT.
Error in data.frame(..., check.names = FALSE) :
arguments imply differing number of rows: 1, 0
when I run the gapit,the error
my friend, how to debug this error. thanks
.
Hi
I am trying to running GAPIT with a kinship matrix already generated
However i got this error message
Error in if (KI != 1) { : the condition has length > 1
In addition: Warning messages:
1: 'memory.size()' is no longer supported
2: 'memory.size()' is no longer supported
3: 'memory.size()' is no longer supported
Error in if (KI != 1) { : the condition has length > 1
Any idea?
Thank you
[1] "--------------------Phenotype and Genotype ----------------------------------"
[1] "Blink"
[1] "There are 1 traits in phenotype data."
[1] "There are 292 individuals in phenotype data."
[1] "There are 1878584 markers in genotype data."
[1] "Phenotype and Genotype are test OK !!"
[1] "--------------------GAPIT Logical ----------------------------------"
[1] "GAPIT.IC in process..."
[1] 263 4
[1] "GAPIT.IC accomplished successfully for multiple traits. Results are saved"
[1] "GAPIT.SS in process..."
Error in data.frame(..., check.names = FALSE) :
arguments imply differing number of rows: 1, 0
In addition: There were 17 warnings (use warnings() to see them)
Except my phenotype data has more than 200 traits (microbiome taxa in this case)
Y <- read.table("pheno.txt", head = TRUE, sep = "\t")
dim(Y)
[1] 292 231
How can I fix this issue? I'm also unsure what "arguments imply differing number of rows: 1, 0" but I'm assuming it has to do with my phenotype data not being read in correctly?
Thanks!
I have also downloaded the source file (https://github.com/jiabowang/GAPIT3/archive/refs/tags/GAPIT3.2.tar.gz) and tried to install it using:
install.packages("~/R/x86_64-pc-linux-gnu-library/GAPIT3-GAPIT3.2.tar.gz", repos = NULL, type = "source")
But I have got NAMESPACE error msg:
Installing package into ‘/home/super/R/x86_64-pc-linux-gnu-library/4.2’
(as ‘lib’ is unspecified)
Warning in untar2(tarfile, files, list, exdir, restore_times) :
skipping pax global extended headers
Secondly, the description file shows its Version: 3.1.0, so is it version 3.1.0 or 3.2 (as name suggests)
Next, I have tried to install GAPIT via devtools:
devtools::install_github("jiabowang/GAPIT3",force=TRUE)
It got installed successfully but I have got the following note during installation:
Note: possible error in 'layout(title = "Interactive.Manhattan.Plot", ': unused arguments (title = "Interactive.Manhattan.Plot", xaxis = list(title = "Chromsome", zeroline = FALSE, showticklabels = FALSE), yaxis = list(title = "-Log10(p)"))
Note: possible error in 'layout(title = "Interactive.Multiple_Synthesis.Manhattan.Plot", ': unused arguments (title = "Interactive.Multiple_Synthesis.Manhattan.Plot", xaxis = list(title = "Chromsome", zeroline = FALSE, showticklabels = FALSE), yaxis = list(title = "-Log10(p)"))
Note: possible error in 'layout(title = "Interactive.Multiple_Synthesis.Manhattan.Plot", ': unused arguments (title = "Interactive.Multiple_Synthesis.Manhattan.Plot", xaxis = list(title = "Chromsome", zeroline = FALSE, showticklabels = FALSE), yaxis = list(title = "-Log10(p)"))
Installation Summary
Downloading GitHub repo jiabowang/GAPIT3@HEAD
✔ checking for file ‘/tmp/RtmpjHtFXO/remotesfc213684195d/jiabowang-GAPIT3-b947561/DESCRIPTION’ ...
─ preparing ‘GAPIT3’:
✔ checking DESCRIPTION meta-information ...
─ checking for LF line-endings in source and make files and shell scripts
─ checking for empty or unneeded directories
Removed empty directory ‘GAPIT3/Documents/Github/GAPIT3’
Removed empty directory ‘GAPIT3/Documents/Github’
Removed empty directory ‘GAPIT3/Documents’
Omitted ‘LazyData’ from DESCRIPTION
─ building ‘GAPIT3_3.1.0.tar.gz’
Installing package into ‘/home/super/R/x86_64-pc-linux-gnu-library/4.2’
(as ‘lib’ is unspecified)
Now if I try to run Gapit it produces the following error msg for single model:
library('MASS') # required for ginv
library(multtest)
library(gplots)
library(compiler) #required for cmpfun
library("scatterplot3d")
library(GAPIT3)
myG <- read.table("/home/super/Documents/Cowpea_genotyping_lancs/PHOTOSYNTHESIS_GWAS/Gapit/PCA_5/290_41256_maria_cluster_QC_filtered.txt.hmp.txt", header = F, sep = "\t")
myY <- read.table("/home/super/Documents/Cowpea_genotyping_lancs/PHOTOSYNTHESIS_GWAS/Gapit/PCA_5/PHENOTYPES_Gapit.txt", header = T, sep = "\t")
#myKI <- read.table("Kinship/kinship.txt", head = T)
myGAPIT <- GAPIT(
Y=myY,
G=myG,
PCA.total=5,
model="MLM"
)
Error in density.default(y) : 'x' contains missing values
In addition: Warning messages:
1: In order(as.numeric(as.character(chor_taxa))) :
NAs introduced by coercion
2: In coefficient * sqrt(Vp) :
Recycling array of length 1 in vector-array arithmetic is deprecated.
Use c() or as.vector() instead.
3: In xy.coords(x, y, xlabel, ylabel, log) :
1 x value <= 0 omitted from logarithmic plot
And following error if I use multiple models:
myGAPIT <- GAPIT(
Y=myY,
G=myGM,
PCA.total=5,
Multiple_analysis=TRUE,
model=c("GLM","MLM","FarmCPU","Blink")
)
[1] "--------------------- Welcome to GAPIT ----------------------------"
Error in if (model %in% c("gBLUP", "cBLUP", "sBLUP")) { :
the condition has length > 1
Hi,
Please solve the error when run GAPIT function in "GAPIT3".
#my gapit function:-
for(i in 2:ncol(myY))
{ myGAPIT <- GAPIT( Y=myY[,c(1,i)], GD=myGD, GM=myGM, model=c("GLM","MLM","SUPER","MLMM","FarmCPU","Blink"), PCA.total=3, NJtree.group=4, Geno.View.output=F, Inter.Plot=TRUE, Multiple_analysis=TRUE, PCA.3d=FALSE, file.output=T)}
Error in gapit function:-____________________________________________________________________
Error in FarmCPU(Y = Y, GD = GD, GM = GM, CV = farmcpuCV, cutOff = cutOff, :
object 'myPower' not found
Calls: GAPIT -> GAPIT.SS -> GAPIT.Bus -> FarmCPU
In addition: There were 50 or more warnings (use warnings() to see the first 50)
Execution halted
HI,
I am running GAPIT3 using the following commands but I get the error you see below.
library(GAPIT3)
myY=read.table(file="http://zzlab.net/GAPIT/data/mdp_traits.txt", head = TRUE)
myGD=read.table("http://zzlab.net/GAPIT/data/mdp_numeric.txt",head=T)
myGAPIT <- GAPIT(
Y=myY,
G=myG,
PCA.total=3
)
The screen output is the following (error at the end)
1] "--------------------- Welcome to GAPIT ----------------------------"
[1] "MLM"
[1] "--------------------Processing traits----------------------------------"
[1] "Phenotype provided!"
[1] "The 1 model in all."
[1] "MLM"
[1] "GAPIT.DP in process..."
[1] "Converting genotype..."
[1] "Converting HapMap format to numerical under model of Middle"
[1] "Perform numericalization"
[1] "Succesfuly finished converting HapMap which has bits of 2"
[1] "Converting genotype done."
[1] "GAPIT will filter marker with MAF setting !!"
[1] "The markers will be filtered by SNP.MAF: 0"
maf_index
TRUE
3093
[1] "Calculating kinship..."
[1] "Number of individuals and SNPs are 281 and 3093"
[1] "Calculating ZHANG relationship defined by Zhiwu Zhang..."
[1] "substracting mean..."
[1] "Getting X'X..."
[1] "Adjusting..."
[1] "Adjustment by the minimum diagonal"
[1] "Calculating kinship with Zhang method: done"
[1] "kinship calculated"
[1] "Creating heat map for kinship..."
[1] "Kinship heat map created"
[1] "Adding IDs to kinship..."
[1] "Writing kinship to file..."
[1] "Kinship save as file"
[1] "Kinship created!"
[1] "Calling prcomp..."
[1] "Creating PCA graphs..."
[1] "Joining taxa..."
[1] "Exporting PCs..."
[1] "PC created"
[1] "Filting marker for GAPIT.Genotype.View function ..."
rs.index
FALSE TRUE
1006 2087
Error in graphics::layout(p, ...) :
el argumento "p" está ausente, sin valor por omisión (english translation: "p" argument is absent, without value due to omission)
Thanks in advance,
Kostas
[1] "GAPIT.IC accomplished successfully for multiple traits. Results are saved"
[1] "GAPIT.SS in process..."
[1] "GAPIT will be into GWAS approach..."
Error in data.frame(..., check.names = FALSE) :
arguments imply differing number of rows: 1, 0
The above error is what I get- assuming my geno and pheno files are attempted to be combined into one data frame but the row numbers are differing. Is this the correct assumption? How might I go about fixing this error and/or data structure?
I'm running multiple models on multiple traits and for one of them FarmCPU raised the following error:
[1] "Reading GWAS result with FarmCPU.Visual.Score.Average"
Error in names(x) <- value :
'names' attribute [4] must be the same length as the vector [3]
In addition: There were 50 or more warnings (use warnings() to see the first 50)
I don't know what does this mean or how can I solve this error. FarmCPU worked on the other traits perfectly, and the other models GLM, MLM, and CMLM
worked on this trait perfectly fine.
source("http://www.zzlab.net/GAPIT/GAPIT.library.R")
Error in file(filename, "r", encoding = encoding) :
cannot open the connection
In addition: Warning message:
In file(filename, "r", encoding = encoding) :
InternetOpenUrl failed: 'A connection with the server could not be established'
Hi!
I´m trying to perform a GWAS MLM analysis using GAPIT, but I get an error when I use a specific covariate (structure K=6) in the MLM approach. This is curious because I am able to perform it with any other structure covariate (K=3,4,5,7,8..) but not with K=6. Even I obtained succesful results using K=6 with BLINK and FarmCPU approaches.
The error that I obtain is:
"Error in t(KWO) %% MASS::ginv(as.matrix(KW)) %% UW : requires numeric/complex matrix/vector arguments
In addition: Warning message: In order(as.numeric(as.character(chor_taxa))) : NAs introduced by coercion
Error in t(KWO) %% MASS::ginv(as.matrix(KW)) %% UW : requires numeric/complex matrix/vector arguments"
I don´t know if it could be related with this frequent question of the manual:
"11. How to fix the error of using covariates from STRUCTURE as fixed effects?
A: This error is occurring because the covariates from STRUCTURE are linearly dependent. In particular, for a given individual/taxa, these covariates sum to 1. To circumvent this error, remove one of the STRUCTURE covariates from the corresponding input file."
But in any case I´m not able of how to interpret this to solve it.
Some solution?
Thanks in advance!!!!
Hi,
Thank you for writing such good software.
When I ran Gapit 3.0 , I got the following error:
Error in svd(snp.pool, LINPACK = TRUE) :
the LINPACK argument has been defunct since R 3.1.0
Calls: GAPIT ... GAPIT.SS -> GAPIT.Main -> GAPIT.Bread -> GAPIT.get.LL -> svd
此外: There were 50 or more warnings (use warnings() to see the first 50)
停止执行
I don't have a good solution, do you have any suggestions?
I am trying to use GAPIT function but keep getting this error. I Used basic function :
myGapit <- GAPIT(Y = myY, GD = myGD, GM = myGM, Model.selection = TRUE, kinship.algorithm="EMMA", model="Blink")
myY, myGD, myGM..all these files are according to gapit input format. I even checked this with demo data and it's the same.
please help...
myGapit <- GAPIT(Y = myY, GD = myGD, GM = myGM, Model.selection = TRUE, kinship.algorithm="EMMA", model="Blink")
[1] "--------------------- Welcome to GAPIT ----------------------------"
[1] "Blink"
[1] "--------------------Processing traits----------------------------------"
[1] "Phenotype provided!"
[1] "The 1 model in all."
[1] "BLINK"
[1] "GAPIT.DP in process..."
Error in FUN(newX[, i], ...) : invalid 'type' (character) of argument
In addition: Warning messages:
1: 'memory.size()' is no longer supported
2: 'memory.size()' is no longer supported
3: 'memory.size()' is no longer supported
4: In order(as.numeric(as.character(chor_taxa))) :
NAs introduced by coercion
Hi,
I am running GAPIT3 using the following command
Rscript ../GAPIT.R \
ploidy4_12scaffolds_diploid_SNPs_atLeast1Trait_filt.hmp \
pheno_MD_166.txt \
covariates_166indvs.txt k\
inship_166indvs.txt \
3 \ # number of PCs used
166 # number of samples
Even though the program runs properly, for some reason, it does not plot markers lying in the Iast 4 chromosomes (*Genomewise.pdf) but it does generate the individual plots for all the chromosomes (*Chromosomewise.pdf). I have attached the corresponding files in order to reproduce the error.
ploidy4_12scaffolds_diploid_SNPs_atLeast1Trait_filt.hmp.txt
GAPIT.R.txt # need to modify line 12
covariates_166indvs.txt
kinship_166indvs.txt
pheno_MD_166.txt
.
Thanks
Dear GAPIT team,
first at all, I'd like to thanks for your hard work!
I ran in an issue when using MLMM and FarmCPU models including a external covariate generated by a dimensionality reduction method such as PCoA, MDS, or UMAP. Curiously, it work with GLM and MLM models. It seems the covariate input have been ignored in MLMM and FarmCPU calculation and using instead no covariate input at all (CV = NULL, PCA.total=0). If I added the PCA.total=2 option, the PCA and external covariate input have been take into account for the calculation, which is strange. It appears to be a bug.
Kind regards,
Dominic
Taxa D1 D2
L001 0.126112094254585 -0.038672389111241
L002 -0.2767514432165 -0.0759661848509927
L003 -0.077520991841471 0.180553918963981
L004 0.0443296733767869 -0.148258358953949
L005 -0.170783671878282 0.137673962732827
...
GAPIT(
Y = pht,
G = gnt,
KI = ks, # = NULL
CV = cv, # Covariate table as described in the manual
PCA.total = n.pc, # = 0
model = model, # = "MLMM" or "FarmCPU"
cutOff = sig.threshold,
file.output = TRUE,
PCA.View.output = FALSE,
Geno.View.output = FALSE
)
Hi, I have ran GAPIT and it ran perfectly good and produce results before this, until yesterday. But today, I got this error msg while performing all my GAPIT GWAS analysis;
Error in GAPIT.Genotype(G = G, GD = GD, GM = GM, KI = KI, PCA.total = PCA.total, :
object 'lettet.index' not found
I have tried to reinstalled GAPIT, tried with samples that ran perfectly before but the same error occurred. Appreciate if you can help me on this.
Dear All,
I have a favour to ask: I am new to GAPIT, and association studies in general (I'm trying to find my way around it as the start of my PhD study in plant genomics). Based on the information that I gathered from GAPIT manual and online sources, I came up with a basic workflow as follows:
# First, importing libraries and sources
if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install(version = "3.13")
BiocManager::install('multtest', force = TRUE)
library('MASS') # required for ginv
library(multtest)
library(gplots)
library(compiler) #required for cmpfun
@library(scatterplot3d)
source("http://zzlab.net/GAPIT/emma.txt")
source("http://zzlab.net/GAPIT/gapit_functions.txt")
# Importing Phenotypic and Hapmap files
myY = ...
myG = ...
# Calling GAPIT function
myGAPIT <- GAPIT(
Y=myY[,c(1, "some_trait")],
G=myG,
model = c("GLM", "MLM", "MLMM", "Blink"),
Multiple_analysis = TRUE)
I received results and found associated SNPs. My main CONCERN is that I didn't define "covariates". Can you please have a look at the above workflow and tell me if this looks Okay or do I need to define covariates/PCAs? If YES, would you point me to the best methods to define covariates in polyploid plants, as I understood there are a number of available approaches.
Thanks very much in advance.
Best,
Ehsan
Hi,
Thanks a lot for the nice library. I think there might be an error in the calculation of FDRcutoff at line 76 of GAPIT.Manhattan.R.
My understanding is that the plotted threshold is intended to be the Benjamini-Hochberg corrected threshold, but the equation as written doesn't seem to be consistent with Eqn 1 of the BH 1995 paper.
In my hands, this results in too lenient a threshold being plotted, showing significant values which are inconsistent with the significant values output in the FDR_Adjusted_P-values column output in the XXX.GWAS.Results.csv file.
Hopefully I'm wrong - otherwise I lose a lot of "significant" peaks :)
the basic command just can not work well...
Based on the GAPIT_Tutorial_Data(https://zzlab.net/GAPIT/)...
such as ...
#Tutorial Step(g-1): Compare to Power against FDR for GLM,MLM,CMLM,ECMLM,SUPER
#Hint:Program runing time is more than 24 hours for repetition 100 times.
#----------------------------------------------------------------------------------------
#Step 1: Set data directory and import files
myGD <-read.table("mdp_numeric.txt", head = TRUE)
myGM <-read.table("mdp_SNP_information.txt", head = TRUE)
myKI <- read.table("KSN.txt", head = FALSE)
myG <- read.table("mdp_genotype_test.hmp.txt", head = FALSE)
#Step 2: Run GAPIT
GAPIT.Power.compare(
G=myG,
GD=myGD,
GM=myGM,
KI=myKI,
**nrep**=3,
h2=0.9,
NQTN=5
)
I am getting this error when trying gblup in GAPIT
Error in names(x) <- value :
'names' attribute [2] must be the same length as the vector [1]
In addition: There were 13 warnings (use warnings() to see them)
This happens after getting VA VE and the kinship file is already calculated.
Dear GAPIT authors,
I have a question.
By default, GAPIT3 uses all the cores. Is there any option to control the number of cores?
Tentatively, I use taskset command, but it would be nice to have an option in GAPIT application side.
Thanks in advance and best regards,
Masa
Hello Jiabo (@jiabowang) and Brian (@knausb),
I have a general question regarding best practice in GAPIT; I have phenotypic and genomic data on replicates of spring wheat. I tried different GWAS scenarios such as calculating BLUPs and running GWAS afterwards, or calculating BLUEs before GWAS analysis, or running GWAS on raw means of replicates per accession, and GWAS with intact data, i.e. using replicated data for GWAS.
For each of this scenarios I received results and in some cases they overlap. GAPIT produced and estimated BLUP and BLUE for the tested trait in all of these analyses. However, I was wondering what is the best practice that you recommend for adjusting phenotypes prior to GWAS in GAPIT given that you know what is going on under the hood? Many thanks in advance for your time and attention. Best /Ehsan
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.