Switch to unified view

a b/Lecture 2/Tips on Installing MOVICS
1
Tips for installation of MOVICS package (4/23)
2
 
3
•   Install heatmap.plus package from source code
4
NOTE: v1.3 is recommended
5
R CMD: install.packages("https://cran.r-project.org/src/contrib/Archive/heatmap.plus/heatmap.plus_1.3.tar.gz", repos = NULL, type="source")
6
 
7
8
•   Install SNFtool package from source code
9
NOTE: v2.3.0 is recommended
10
R CMD: install.packages("https://cran.r-project.org/src/contrib/Archive/SNFtool/SNFtool_2.3.0.tar.gz", repos = NULL, type="source")
11
12
13
•   How to install CIMLR with R CMD
14
Reference: https://github.com/danro9685/CIMLR
15
16
library("devtools")
17
devtools::install_github("danro9685/CIMLR", ref = 'R')
18
library("CIMLR")
19
20
21
•   Troubleshooting for installing CIMLR package
22
If you cannot install CIMLR package with R CMD, please try the following two solutions.
23
24
Solution 1: Update R Makevars file
25
In ~/.R/Makevars, add these lines.
26
 
27
FC = /opt/homebrew/Cellar/gcc/12.2.0/bin/gfortran
28
F77 = /opt/homebrew/Cellar/gcc/12.2.0/bin/gfortran
29
FLIBS = -L/opt/homebrew/Cellar/gcc/12.2.0/lib/gcc/12
30
 
31
NOTE: You can use vim to make edits to the file (https://www.linuxfoundation.org/blog/blog/classic-sysadmin-vim-101-a-beginners-guide-to-vim)
32
NOTE: If the ~/.R directory doesn’t exist, you create it this way: mkdir -p ~/.R
33
 
34
Solution 2: install Xcode on mac (takes ~ 30 min)
35
https://developer.apple.com/download/all/?q=Xcode
36
37
38
•   Make sure to install these packages
39
install.packages("BiocManager")
40
install.packages("devtools")
41
install.packages("Matrix", dependencies = TRUE)
42
  
43
 
44
•   GitHub access error
45
If you get an error like this:
46
 
47
Using github PAT from envvar GITHUB_PAT
48
Error: Failed to install 'unknown package' from GitHub:
49
  HTTP error 401.
50
  Bad credentials
51
 
52
  Rate limit remaining: 37/60
53
  Rate limit reset at: 2021-09-15 17:23:41 UTC
54
 
55
Then you need to create a personal access token (PAT) and increase your GitHub API rate limit
56
  - Use `usethis::browse_github_pat()` to create a Personal Access Token.
57
  - Use `usethis::edit_r_environ()` and add the token as `GITHUB_PAT`.
58
 
59
For example, my PAT was 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
60
Sys.setenv(GITHUB_PAT = "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")
61
 
62
You would do this
63
Sys.setenv(GITHUB_PAT = “yourPATcode”)
64
 
65
•   Install MOVICS
66
devtools::install_github("xlucpu/MOVICS")