[R] Error related to matrix system is exactly singular
Ana Marija
@okov|c@@n@m@r|j@ @end|ng |rom gm@||@com
Wed Dec 4 19:04:45 CET 2019
Hello,
I was running this software https://github.com/eleporcu/TWMR
via:
Rscript MR.R ENSG00000154803
my files are located here:
https://filebin.net/smt1kcw2d9sody67
I got this error:
[1] "ENSG00000154803"
Error in solve.default(C) :
Lapack routine dgesv: system is exactly singular: U[15,15] = 0
Calls: solve -> solve.default
Execution halted
in the original code I changed this:
and I also in order to run it I changed the beginning of the code to be:
cmd_args <- commandArgs(TRUE)if (length(cmd_args) == 0L) stop("No
arguments specified.")
print(cmd_args)
gene<-cmd_args[length(cmd_args)] ## Last argument is the 'gene'
Ngwas<-239087
N_eQTLs<-32000
out<-c("gene","alpha","SE","P","Nsnps","Ngene")
file<-paste(gene,"matrix",sep=".")if (!file.exists(file)) stop("File
not found: ", file)
filecluster<-read.table(file,header=T,sep=" ",dec=".")
beta<-as.matrix(filecluster[,2:(length(filecluster[1,])-1)])
when I was running it with just 3 columns in .matrix file.
Please advise, is it something wrong with the format of my files now?
Thanks
Ana
[[alternative HTML version deleted]]
More information about the R-help
mailing list