Afterwards, I am getting this error:
Error in dim(data) = c(length(rowvals[[1]]), length(rowvals)) :
dims [product 48375] do not match the length of object [48362]
When I did as you told in directory path. It loading file then gave the above error.
As I am doing same for expression _file_name. I am getting the error:
gene$LoadFile(gene_file_name)
Error in scan(file = fid, what = double(), nlines = 1, quiet = TRUE, sep = fileDelimiter, :
scan() expected 'a real', got '0,715703853'
snps$LoadFile( SNP_file_name )
Error in dim(data) = c(length(rowvals[[1]]), length(rowvals)) : dims [product 48375] do not match the length of object [48362]
Thank you! I check if you tell me some format, let me know about geneloc.txt and snpsloc.txt file. I am new in this. Kindly help me..I will be heartily thankful to you.
SNP.txt/genotype.txt ::::::::::::::::::.
Based on the error you get when you try to import the SNP file, it appears you that some missing values in your SNP file are not denoted by NA. Try importing the data with read.table() to figure that out.
You'll need to create the geneloc.txt and snpsloc.txt files.
geneloc.txt should contain information about where the genes in your GE.txt file are located in the genome formatted like this.
snpsloc.txt should contain information about where the SNPs in your SNP.txt file are located in the genome formatted like this
It may not be necessary to remove SNPs without rsids. I'm guessing the SNPs must have IDs of sorts, you can use other SNP IDs in addition to rsid.
It is quite difficult to help you with this without seeing your lines of code.
library(MatrixEQTL) base.dir = find.package("MatrixEQTL") useModel = modelLINEAR SNP_file_name = paste(base.dir, "/Users/user1/Desktop/Plant_1/eqtl/209_40.txt", sep = "") expression_file_name = paste(base.dir, "/Users/user1/Desktop/Plant_1/eqtl/Gene_expression.txt.", sep = "") covariates_file_name to character() Error: unexpected symbol in "covariates_file_name to" covariates_file_name = character() output_file_name = tempfile() pvOutputThreshold = 1e-2 errorCovariance = numeric() snps = SlicedData$new() snps$fileDelimiter = "\t" snps$fileOmitCharacters = "NA" snps$fileSkipRows = 1 snps$fileSkipColumns = 1 snps$fileSliceSize = 2000 snps$LoadFile( SNP_file_name ) Error in file(description = filename, open = "rt", blocking = FALSE, raw = FALSE) : cannot open the connection In addition: Warning message: In file(description = filename, open = "rt", blocking = FALSE, raw = FALSE) : cannot open file 'C:/Program Files/R/R-4.0.3/library/MatrixEQTL/209_40.txt': No such file or directory
I tried as setwd() (the directory where the files are. Same Error I got.