EdgeR function nearestTSS() fails saying NAs are not allowed in subscripted assignments
1
0
Entering edit mode
@amlivernois-22992
Last seen 4.5 years ago

Hi everyone,

I’m following section 4.7 in the using EdgeR user guide for differential methylation analysis using the count data associated with GSE86297 from GEO.

My output looks as it does in the user guide until I get to annotating CpG loci with the nearest gene. The command and output look like this:

>TSS <- nearestTSS(yall$genes$Chr, yall$genes$Locus, species="Mm")
Error in Out$distance[Out$neg] <- -Out$distance[Out$neg] : 
  NAs are not allowed in subscripted assignments

I installed EdgeR today using install("edgeR") and my session info is below.

I’ve exhausted Google trying to figure this out and the only thing I can see is that my Edge R version (3.26.8) is different than the EdgeR version used in the user guide (3.27.14). I would be very grateful for any thoughts/advice on this error!

> sessionInfo()
R version 3.6.1 (2019-07-05)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS High Sierra 10.13.6
Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib
Random number generation:
 RNG:     Mersenne-Twister 
 Normal:  Inversion 
 Sample:  Rounding 
 locale:
[1] en_CA.UTF-8/en_CA.UTF-8/en_CA.UTF-8/C/en_CA.UTF-8/en_CA.UTF-8
attached base packages:
[1] parallel  stats4    stats     graphics  grDevices utils     datasets  methods  
[9] base     
other attached packages:
 [1] org.Mm.eg.db_3.8.2   BiocManager_1.30.10  org.Bt.eg.db_3.8.2   AnnotationDbi_1.46.1
 [5] IRanges_2.18.3       S4Vectors_0.22.1     Biobase_2.44.0       BiocGenerics_0.30.0 
 [9] edgeR_3.26.8         limma_3.40.6        
loaded via a namespace (and not attached):
 [1] Rcpp_1.0.3         rstudioapi_0.11    hms_0.5.3          bit_1.1-15.2      
 [5] lattice_0.20-40    R6_2.4.1           rlang_0.4.4        org.Hs.eg.db_3.8.2
 [9] blob_1.2.1         tools_3.6.1        grid_3.6.1         DBI_1.1.0         
[13] digest_0.6.25      bit64_0.9-7        tibble_2.1.3       crayon_1.3.4      
[17] readr_1.3.1        vctrs_0.2.3        memoise_1.1.0      RSQLite_2.2.0     
[21] compiler_3.6.1     pillar_1.4.3       locfit_1.5-9.1     pkgconfig_2.0.3 

Thanks heaps,

Alexandra

edgeR nearestTSS • 634 views
ADD COMMENT
1
Entering edit mode
@gordon-smyth
Last seen 1 day ago
WEHI, Melbourne, Australia

The error is because nearestTSS does not accept NA values, either for the chromosome or the locus. (It will accept NAs in the next Bioconductor release, but the current release version does not.) You appear to be getting the error because you are following documentation that is out-of-sync with the software you are using.

The current version of edgeR is 3.28.0, not 3.26.8. You appear to have set BiocManager to install Bioconductor 3.9 instead of Bioconductor 3.10.

The edgeR package comes with the User's Guide builtin as part of the package, and it is important to always read the documentation and User's Guide that comes with the package. The User's Guide is installed on your own computer so you don't need to Google it, just type

edgeRUsersGuide()

at the R prompt.

According to the version numbers in your question, you are using the version of edgeR that was released with Bioconductor 3.9 but you are reading the Guide that comes with edgeR for Bioconductor 3.10. We gradually improve the package over time, so there is no guarantee that newer documentation will be appropriate for older software.

Anyway, I have just rerun the code from Section 4.7 of the edgeR User's Guide and confirmed that it runs correctly without errors using the current release of edgeR.

ADD COMMENT
0
Entering edit mode

Thank you for your input Gordon - updated Bioconductor and all runs fine now. Even made it through the tutorial with my own data.

Best,

Ali

ADD REPLY

Login before adding your answer.

Traffic: 631 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6