Error msg in R: Error in unlist_as_integer(x#subscript) : object 'fancy_mseq' not found - r

I am reading 2 vcf files in to R. They load fine (I have used 3 different methods to do this (read.vcf, readVCF, and fread) and all are fine) however when I go on to try and do anything with 1 of the vcf files, the msg reads:
Error in unlist_as_integer(x#subscript) : object 'fancy_mseq' not found
Error in h(simpleError(msg, call)) :
error in evaluating the argument 'x' in selecting a method for function 'from': object 'fancy_mseq' not found
Usually I just google error msgs but I can not find anything online about this. Does anyone have any idea what could be causing this error message? Whilst it's hard to be 100% sure because of the vcf format, I can't see anything wrong with the file when I call str(), head() or any other ways of looking at the data.
Thank you!

Related

Warning message within R function seems to make the function not work?

Using the syuzhet package in R, the following works but returns a warning message:
object <- get_text_as_string("path/name.txt")
When I put this in a function, it returns the same warning error but does NOT change the value of object:
gen <- function(file){
object <- get_text_as_string(file)
}
gen("path/name.txt")
This is the warning message, if it matters:
Warning message:
In readLines(path_to_file) :
incomplete final line found on 'path/name.txt'
...but again, I get that from get_text_as_string() when used outside of the function, but it DOES change the value of object.
Anyone have any advice? There must be something I don't understand about functions?
(I've looked for similar questions/answers, if I've missed the right one I'd be happy to just be directed there.)

Error in validityMethod(as(object, superClass)) : object 'Matrix_validate' not found

I just try to use :
scRNA <- FindNeighbors(scRNA, dims = pc.num)
and
scRNA.counts <- Read10X(data.dir = "filtered_feature_bc_matrix")
and both of them gives error like :
Error in validityMethod(as(object, superClass)) : object 'Matrix_validate' not found
I guess these code totally run well in other's computer
so I wonder what's wrong with my code and how to fix it ?
Indeed, to solve the problem for you, it should be sufficient to do what #Mikael Jagan says:
update.packages("Matrix")
2nd thought: The above may not solve the problem entirely:
As there are other packages involved, some of these may have to be re-installed (after the updating of Matrix).
Can you post the output (or good summary of that if it's too long) of
traceback()
immediately after producing the error you are seeing?

Rmakdown serious problem with strange warning and error message in out of bound I never encounterd

Oh my god, the problem nearly drive me crazy.
I even used simplest method to create a markdownfile with default format through clicking Knit button, and before it , I chose output format in knit to PDF. whatever I tried knit to HTML or Knit to HTML, it was always giving warning message and didn't output anything. The warning message is below:
processing file: _main.Rmd
output file: _main.knit.md
Output created: _main.html
Output created: D:/R-project/me/0000-MainCottonAkesu/NewProcedure2021/Rmarkdown/_main.html
Warning message:
In value[[3L]](cond) :
Could not force captions - error occurred: 'Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'xmlParent': subscript out of bounds
I tried creating new projects but didn't work. I nearly can't resolve it. Please help me.
Sincerely thanks to you.

ASCII files in R

I have some data that's in an ASCII format. I'm not allowed to put the data online so unfortunately I can't post it on here (although I realize that it would be the most helpful that way). The code I'm using now to get the ASCII data in R is...
library(SAScii)
parse.SAScii("file.txt")
But then I get this error:
Error in firstline:lastline : NA/NaN argument
In addition: Warning message:
In min(a[a > firstline]) : no non-missing arguments to min; returning Inf
I can't find anything online about this error and I was hoping someone might be able to point me to what I could be doing wrong. I know this question is kind of vague but I'm just hoping someone can direct me in the right direction.
Try this to read lines from a file with that name in the working directory:
my.input <- readLines("file.txt")
head(my.input)
str(my.input)

methylSigCalc function error

Trying to use the latest version of methylSig package (0.3.2), and getting an error when using the methylSigCalc function.
I get a cryptic error message after it figures out the number of loci:
Total number of bases: 2.59m
Error in result[, 3] : subscript out of bounds”
I tried running the code of the methylSigCalc function line by line, and the first error I encounter is when it gets to the methylSig_dataProcess function (below is the error after specifying just one core to try to get a useful error message):
Error in do.call(rbind, lapply(which(validLoci),
methylSig_dataProcess, : error in evaluating the argument 'args' in
selecting a method for function 'do.call': Error in match.fun(FUN) :
object 'methylSig_dataProcess' not found
It does seem that methylSig_dataProcess is now missing from the package.
Any suggestions on where I might be going wrong?
Many thanks,
gogatea

Resources