ben-laufer / DMRichR

A R package and executable for the preprocessing, statistical analysis, and downstream testing and visualization of differentially methylated regions (DMRs) from CpG count matrices (Bismark cytosine reports)
https://www.benlaufer.com/DMRichR/
MIT License
39 stars 22 forks source link

Cannot install this package "ben-laufer / DMRichR" with error information #69

Closed DengEr-1993 closed 1 year ago

DengEr-1993 commented 1 year ago

Hi Sir,

I just want to use this package to visualise the methylation calling result.

I think your sample visualization for CpG count matrix is beautiful.

But when I tried to install it with below tutorial:

if(!requireNamespace("BiocManager", quietly = TRUE))
  install.packages("BiocManager")
if(!requireNamespace("remotes", quietly = TRUE))
  install.packages("remotes")
Sys.setenv("R_REMOTES_NO_ERRORS_FROM_WARNINGS" = TRUE)
BiocManager::install("ben-laufer/DMRichR")

The error information appeared:

> BiocManager::install("ben-laufer/DMRichR")
'getOption("repos")' replaces Bioconductor standard repositories, see 'help("repositories", package = "BiocManager")'
for details.
Replacement repositories:
    CRAN: https://cran.rstudio.com/
Bioconductor version 3.16 (BiocManager 1.30.20), R 4.2.1 (2022-06-23 ucrt)
Installing github package(s) 'ben-laufer/DMRichR'
Downloading GitHub repo ben-laufer/DMRichR@HEAD
Error in utils::download.file(url, path, method = method, quiet = quiet,  : 
  cannot open URL 'https://api.github.com/repos/ben-laufer/DMRichR/tarball/HEAD'
Installation paths not writeable, unable to update packages
  path: C:/Program Files/R/R-4.2.1/library
  packages:
    boot, class, cluster, codetools, foreign, MASS, Matrix, mgcv, nlme, nnet, rpart, spatial, survival
Old packages: 'BiocParallel', 'cli', 'XML'
Update all/some/none? [a/s/n]: 
n

I also failed to install it manually.

Can you give me some advice. I don't know if it is OK for me to use the source code of this package only.

ben-laufer commented 1 year ago

This error doesn't seem to be specific to DMRichR. It looks to me like you weren't able to download from GitHub. Can you test this by trying to download a different package from GitHub?

DengEr-1993 commented 1 year ago

This error doesn't seem to be specific to DMRichR. It looks to me like you weren't able to download from GitHub. Can you test this by trying to download a different package from GitHub?

@ben-laufer Thanks, I can install this pacakge on my mac. Maybe I don't have the permission on windows PC.

DengEr-1993 commented 1 year ago

This error doesn't seem to be specific to DMRichR. It looks to me like you weren't able to download from GitHub. Can you test this by trying to download a different package from GitHub?

Thank you. I finally installed this package manually. But I don't know the exact reason.

Here is my installation code:

if(!requireNamespace("BiocManager", quietly = TRUE))
  install.packages("BiocManager")
if(!requireNamespace("remotes", quietly = TRUE))
  install.packages("remotes")

###########b
Bioconductor_packages<-c('Boruta', 'CMplot', 'ChIPseeker', 'GOfuncR', 'gt', 'lsmeans', 'rGREAT', 'sigFeature', 'R2HTML', 'LOLA', 'PerformanceAnalytics', 'hablar', 'ggsci', 'minfi', 'plyranges', 'rrvgo', 'Glimma', 'genefilter', 'methylCC')

for (pkg in Bioconductor_packages) {
  if (!require(pkg,character.only = T)) {
   BiocManager::install(pkg,ask = F,update = F)
    require(pkg,character.only = T)

  }

}

#############

Sys.setenv("R_REMOTES_NO_ERRORS_FROM_WARNINGS" = TRUE)
BiocManager::install("ben-laufer/DMRichR")  ##  Here I installed package manually instead
## library("ben-laufer/DMRichR")
library(RCurl)
#library(devtools)
## install_github("ben-laufer/DMRichR")
## library("ben-laufer/DMRichR")
library(DMRichR)   ## this worked.
##########################

Warning in untar2(tarfile, files, list, exdir, restore_times) :
  skipping pax global extended headers
* installing *source* package 'DMRichR' ...
** using staged installation
** R
** exec
** inst
** byte-compile and prepare package for lazy loading
Warning messages:
1: package 'GenomicRanges' was built under R version 4.2.2 
2: package 'S4Vectors' was built under R version 4.2.2 
3: package 'GenomeInfoDb' was built under R version 4.2.2 
4: package 'matrixStats' was built under R version 4.2.2 
Note: wrong number of arguments to '*' 
Note: wrong number of arguments to '/' 
** help
*** installing help indices
*** copying figures
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
Warning: package 'GenomicRanges' was built under R version 4.2.2
Warning: package 'S4Vectors' was built under R version 4.2.2
Warning: package 'GenomeInfoDb' was built under R version 4.2.2
Warning: package 'matrixStats' was built under R version 4.2.2
** testing if installed package can be loaded from final location
Warning: package 'GenomicRanges' was built under R version 4.2.2
Warning: package 'S4Vectors' was built under R version 4.2.2
Warning: package 'GenomeInfoDb' was built under R version 4.2.2
Warning: package 'matrixStats' was built under R version 4.2.2
** testing if installed package keeps a record of temporary installation path
* DONE (DMRichR)
> #library(devtools)
> # install_github("ben-laufer/DMRichR")
> library("ben-laufer/DMRichR")
Error in library("ben-laufer/DMRichR") : 
  there is no package called ‘ben-laufer/DMRichR’
> library(DMRichR)
Loading required package: dmrseq
Loading required package: bsseq

Attaching package: ‘bsseq’

The following object is masked from ‘package:minfi’:

    getMeth

DMRichR v1.7.1 has loaded. If you use DMRichR in published research please cite Laufer et al. 2020, Korthauer et al. 2018, and Hansen et al. 2012.

Attaching package: 'DMRichR'

The following object is masked from 'package:minfi':

    densityPlot

The following object is masked from 'package:Biostrings':

    windows

The following object is masked from 'package:XVector':

    windows

The following object is masked from 'package:GenomicRanges':

    windows

The following object is masked from 'package:IRanges':

    windows

The following object is masked from 'package:grDevices':

    windows

> library(DMRichR)