GreenleafLab / ArchR

ArchR : Analysis of Regulatory Chromatin in R (www.ArchRProject.com)
MIT License
388 stars 140 forks source link

Install Harmony Error #1664

Closed JING202 closed 2 years ago

JING202 commented 2 years ago

Here is the version I used: ArchR: 1.0.2 R: 4.2.1 MacOS Big Sur Version 11.7

I did batch correction with "Addharmony". It was showed :

"Error in .requirePackage("harmony", installInfo = "devtools::install_github(\"immunogenomics/harmony\")") : Required package : harmony is not installed/found! Package Can Be Installed : devtools::install_github("immunogenomics/harmony")".

Then I tried to install Harmony. But it was failed, as shown below. How can I deal with this issue?

devtools::install_github("immunogenomics/harmony") Downloading GitHub repo immunogenomics/harmony@HEAD ✔ checking for file ‘/private/var/folders/wb/j4cm9d3152lfvrf7p91srqrw0000gn/T/RtmpSpaSb9/remotes3235291d09cd/immunogenomics-harmony-6866e01/DESCRIPTION’ ... ─ preparing ‘harmony’: ✔ checking DESCRIPTION meta-information ... ─ cleaning src ─ checking for LF line-endings in source and make files and shell scripts ─ checking for empty or unneeded directories ─ building ‘harmony_0.1.0.tar.gz’

  • installing source package ‘harmony’ ... using staged installation libs clang++ -mmacosx-version-min=10.13 -std=gnu++14 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include' -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppProgress/include' -I/usr/local/include -fPIC -Wall -g -O2 -c RcppExports.cpp -o RcppExports.o clang++ -mmacosx-version-min=10.13 -std=gnu++14 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include' -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppProgress/include' -I/usr/local/include -fPIC -Wall -g -O2 -c harmony.cpp -o harmony.o harmony.cpp:211:52: error: call to 'pow' is ambiguous R.cols(cells_update) = R.cols(cells_update) % (pow((E + 1) / (O + 1), theta) * Phi.cols(cells_update)); ^~~ /Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/armadillo_bits/fn_powext.hpp:33:1: note: candidate function [with T1 = arma::eGlue<arma::eOp<arma::Mat, arma::eop_scalar_plus>, arma::eOp<arma::Mat, arma::eop_scalar_plus>, arma::eglue_div>, T2 = arma::Mat] pow ^ ./utils.h:27:9: note: candidate function MATTYPE pow(MATTYPE A, const VECTYPE & T) { ^ 1 error generated. make: *** [harmony.o] Error 1 ERROR: compilation failed for package ‘harmony’
  • removing ‘/Library/Frameworks/R.framework/Versions/4.2/Resources/library/harmony’ Warning message: In i.p(...) : installation of package ‘/var/folders/wb/j4cm9d3152lfvrf7p91srqrw0000gn/T//RtmpSpaSb9/file3235316e86d1/harmony_0.1.0.tar.gz’ had non-zero exit status
rcorces commented 2 years ago

Hi @JING202! Thanks for using ArchR! Please make sure that your post belongs in the Issues section. Only bugs and error reports belong in the Issues section. Usage questions and feature requests should be posted in the Discussions section, not in Issues.
Before we help you, you must respond to the following questions unless your original post already contained this information: 1. If you've encountered an error, have you already searched previous Issues to make sure that this hasn't already been solved? 2. Can you recapitulate your error using the tutorial code and dataset? If so, provide a reproducible example. 3. Did you post your log file? If not, add it now. 4. Remove any screenshots that contain text and instead copy and paste the text using markdown's codeblock syntax (three consecutive backticks). You can do this by editing your original post.

JING202 commented 2 years ago

Hi @rcorces ,

  1. https://github.com/immunogenomics/harmony/issues/10 and https://github.com/immunogenomics/harmony/issues/38 also have similar but not the same issue. Both showed "ERROR: compilation failed for package ‘harmony’". Someone suggested to add add a line to the Makevars file. I did this but didn't work. In my case, it also showed "harmony.cpp:211:52: error: call to 'pow' is ambiguous". I didn't see anyone report this.
  2. This is to install Harmony. Before installing it successfully, I cannot run any data.
  3. Also, there is no log file.
  4. I put a comment under https://github.com/immunogenomics/harmony/issues/38. But this issue has been closed. I don't know if anyone will answer it.
JING202 commented 2 years ago

Hi @rcorces ,

I just tried install.packages("harmony"), but not "devtools::install_github("immunogenomics/harmony")". It worked. I don't know if the compilation issue. Thanks.