macOS devtools安装github包失败解决
                                                            生活随笔
收集整理的這篇文章主要介紹了
                                macOS devtools安装github包失败解决
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.                        
                                我在安裝R包STUtility包時,一直處于失敗的狀態
 https://ludvigla.github.io/STUtility_web_site/Installation.html
最終總是顯示
 解決辦法:
 首先錯誤中提供的網址是可以下載的
 下載后,本地安裝即可
這里會提示安裝以下的依賴包
install.packages("zeallot") install.packages("imager") install.packages("Morpho") install.packages("Rvcg") install.packages("spatstat") install.packages("imagerExtra") install.packages("shinyjs") install.packages("ggiraph")再次安裝就可以成功了
install.packages("~/Desktop/問題/jbergenstrahle-STUtility-1.1-2-gf120348.tar.gz", repos = NULL, type = "source")測試demo
library(STutility) library(SeuratData) library(Seurat) library(tidyverse) df <- data.frame(samples =c("/Volumes/MACPAN/空間轉錄組數據集/BreastCancer/V1_Breast_Cancer_Block_A_Section_1/filtered_feature_bc_matrix.h5",'/Volumes/MACPAN/空間轉錄組數據集/BreastCancer/V1_Breast_Cancer_Block_A_Section_2/filtered_feature_bc_matrix.h5'),spotfiles = c("/Volumes/MACPAN/空間轉錄組數據集/BreastCancer/V1_Breast_Cancer_Block_A_Section_1/spatial/tissue_positions_list.csv",'/Volumes/MACPAN/空間轉錄組數據集/BreastCancer/V1_Breast_Cancer_Block_A_Section_2/spatial/tissue_positions_list.csv'),imgs = c("/Volumes/MACPAN/空間轉錄組數據集/BreastCancer/V1_Breast_Cancer_Block_A_Section_1/spatial/tissue_hires_image.png",'/Volumes/MACPAN/空間轉錄組數據集/BreastCancer/V1_Breast_Cancer_Block_A_Section_2/spatial/tissue_hires_image.png'),json = c("/Volumes/MACPAN/空間轉錄組數據集/BreastCancer/V1_Breast_Cancer_Block_A_Section_1/spatial/scalefactors_json.json",'/Volumes/MACPAN/空間轉錄組數據集/BreastCancer/V1_Breast_Cancer_Block_A_Section_2/spatial/scalefactors_json.json')) df?InputFromTable # 依然會過濾一些 se <- InputFromTable(infotable = df, min.gene.count = 100, min.gene.spots = 5,min.spot.count = 500,platform = "Visium")library(foreach) library(parallel) plt <- function(i){print(ggplot() +geom_histogram(data = se[[]], aes(get(i)), fill = "red", alpha = 0.7, color = "gray", bins = 50) +Seurat::DarkTheme() +ggtitle(paste0("Total", i , " per spots")))}pl = list() pl1 <- foreach::foreach(i = c('nFeature_RNA','nCount_RNA'),.packages = c("Seurat","ggplot2")) %dopar% plt(i)gene_attr <- data.frame(nUMI = Matrix::rowSums(se@assays$RNA@counts), nSpots = Matrix::rowSums(se@assays$RNA@counts > 0))plt2 <- function(i){print(ggplot() +geom_histogram(data = gene_attr, aes(get(i)), fill = "red", alpha = 0.7, color = "gray", bins = 50) +Seurat::DarkTheme() +ggtitle(paste0("Total", i , " per gene")))}pl2 <- foreach::foreach(i = c('nUMI','nSpots'),.packages = c("Seurat","ggplot2")) %dopar% plt2(i)print(cowplot::plot_grid(plotlist = c(pl1,pl2)))結果如下
 
總結
以上是生活随笔為你收集整理的macOS devtools安装github包失败解决的全部內容,希望文章能夠幫你解決所遇到的問題。
 
                            
                        - 上一篇: Honeywell 1900 条码阅读器
- 下一篇: 【Nginx系列】- Nginx源码复杂
