Entering edit mode
I come up with a problem when I run the function in the "An Introduction to the GenomicRanges Package"。
> library(GenomicRanges)
> gr1 <- GRanges(
+ seqnames = "chr2",
+ ranges = IRanges(103, 106),
+ strand = "+",
+ score = 5L, GC = 0.45)
> gr2 <- GRanges(
+ seqnames = c("chr1", "chr1"),
+ ranges = IRanges(c(107, 113), width = 3),
+ strand = c("+", "-"),
+ score = 3:4, GC = c(0.3, 0.5))
> grl <- GRangesList("txA" = gr1, "txB" = gr2)
> seqnames(grl)
RleList of length 2
$txA
factor-Rle of length 1 with 1 run
Error in nchar(str[ind]) : invalid multibyte string, element 1
I run again in another PC with same GenomicRanges version, and I still meet this problem. But I run with older version, this problem disapper.
Here is my version now
> sessionInfo()
R version 3.6.0 (2019-04-26)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18362)
Matrix products: default
locale:
[1] LC_COLLATE=Chinese (Simplified)_China.936 LC_CTYPE=Chinese (Simplified)_China.936 LC_MONETARY=Chinese (Simplified)_China.936
[4] LC_NUMERIC=C LC_TIME=Chinese (Simplified)_China.936
attached base packages:
[1] parallel stats4 stats graphics grDevices utils datasets methods base
other attached packages:
[1] GenomicRanges_1.36.0 GenomeInfoDb_1.20.0 IRanges_2.18.2 S4Vectors_0.22.0 BiocGenerics_0.30.0
loaded via a namespace (and not attached):
[1] zlibbioc_1.30.0 compiler_3.6.0 XVector_0.24.0 tools_3.6.0 GenomeInfoDbData_1.2.1 RCurl_1.95-4.12
[7] bitops_1.0-6
The version with no problem is GenomicRanges_1.34.0 and 1.28.6
I am unable to currently reproduce this. Could you try doing a
BiocManager::valid()
to make sure all dependent packages are up-to-date and if necessaryBiocManager::install()
and if it asks to update packages choosea
for update all. Please try again and see if this corrects the issue, else please comment back here and we will try to investigate further.Thanks for your reply. Here is my
BiocManager::valid()
resultThen I run
And now
But I still get
Wild guess, but does
help? I don't have your issue, and changing my computer to Chinese (Simplified)_China.936 didn't cause the error, but it's worth a try.
Cool! It does work!