devtools::install_github("Moonerss/CIBERSORT") Skipping install of 'CIBERSORT' from a github remote, the SHA1 (cf2b173f) has not changed since last install. Use `force = TRUE` to force installation
时间: 2024-02-02 20:04:26 浏览: 52
这是因为你在之前已经安装了 `CIBERSORT` 包,而且该包的代码没有更新,所以它不需要重新安装。如果你想更新已安装的包,请使用 `force = TRUE` 参数来强制重新安装。例如:
```
devtools::install_github("Moonerss/CIBERSORT", force = TRUE)
```
这将会强制重新安装 `CIBERSORT` 包,并覆盖旧版本。
相关问题
if(!file.exists(f)){ #devtools:: install_github ("Moonerss/CIBERSORT") library(CIBERSORT) lm22f = system.file("extdata", "LM22.txt", package = "CIBERSORT") TME.results = cibersort(lm22f, "exp.txt" , perm = 1000, QN = T) save(TME.results,file = f) } load(f) TME.results[1:4,1:4]
根据您提供的代码片段,这是一段 R 代码。该代码的作用是检查一个名为 `f` 的文件是否存在,如果不存在,则从 GitHub 上安装 `CIBERSORT` 包并加载它,然后使用 `cibersort()` 函数对数据进行 CIBERSORT 分析,并将结果存储到文件 `f` 中。如果文件 `f` 存在,则直接加载其中的结果并输出前 4 行和前 4 列。
具体而言,该代码使用 `system.file()` 函数获取 `LM22.txt` 文件的路径,并将其与名为 `exp.txt` 的表达数据一起传递给 `cibersort()` 函数,使用 `perm = 1000` 参数设置重排次数为 1000,使用 `QN = T` 参数执行表达数据的量化归一化。
最后,代码使用 `save()` 函数将结果保存到文件中,并使用 `load()` 函数加载文件中的结果,再使用索引选取前 4 行和前 4 列的子集并输出。
install.packages('pcaReduce') ## try http:// if https:// URLs are not supported source("https://bioconductor.org/biocLite.R") biocLite("SC3") biocLite("Seurat") install.packages("devtools") library("devtools") install_github("BPSC","nghiavtr") install_github("hemberg-lab/scRNA.seq.funcs") devtools::install_github("JustinaZ/pcaReduce")
对于安装R包,您可以按照以下步骤进行操作:
1. 首先,您需要安装`pcaReduce`包。您可以使用下面的命令来安装它:
```R
install.packages('pcaReduce')
```
如果您遇到了问题,可以尝试使用`http`而不是`https`的URL。例如:
```R
install.packages('pcaReduce', repos='http://cran.us.r-project.org')
```
2. 接下来,您需要安装`SC3`和`Seurat`包。您可以使用下面的命令来安装它们:
```R
source("https://bioconductor.org/biocLite.R")
biocLite("SC3")
biocLite("Seurat")
```
3. 然后,您需要安装`devtools`包。您可以使用以下命令进行安装:
```R
install.packages("devtools")
```
4. 安装完`devtools`后,加载`devtools`库:
```R
library("devtools")
```
5. 最后,使用`install_github()`函数来安装其他需要的包。例如:
```R
install_github("BPSC","nghiavtr")
install_github("hemberg-lab/scRNA.seq.funcs")
install_github("JustinaZ/pcaReduce")
```
这样就完成了R包的安装过程。请确保您的计算机已连接到互联网,并且在安装过程中没有出现错误。希望这可以帮助到您!如果您有任何其他问题,请随时提问。
相关推荐
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)