02 从头开始atac项目 ubuntu20 install r4.2 Linux系统环境配置 服务器版本的rstudio r install in linux /ubuntu/centos

40 篇文章 11 订阅

Ubuntu Packages For R - Brief Instructionshttps://cran.r-project.org/bin/linux/ubuntu/

使用的是阿里云的ubuntu20系统,

1 首先下载基础软件,与配置 

下载conda 下载r-base

Installation — conda 23.1.0 documentationhttps://docs.conda.io/projects/conda/en/23.1.x/user-guide/install/index.html

Miniconda — conda documentation

bash  Anaconda3-5.3.0-Linux-x86_64.sh

    5  source .bashrc 
    6  ls
    7  ls -lha
    8  wget https://repo.anaconda.com/archive/Anaconda3-5.3.0-Linux-x86_64.sh
    9  bash  Anaconda3-5.3.0-Linux-x86_64.sh
   10  ls
   11  mkdir yll
   12  ls
   13  cd yll/
   14  ls
   15  sudo apt-get install r-base
   16  sudo gedit  /etc/apt/sources.list
   17  ## This software is not part of Ubuntu, but is offered by third-party
   18  ## developers who want to ship their latest software.
   19  deb http://extras.ubuntu.com/ubuntu natty main
   20  deb-src http://extras.ubuntu.com/ubuntu natty main
   21  deb http://archive.canonical.com/Ubuntu maverick partner
   22  deb-src http://archive.canonical.com/Ubuntu maverick partner
   23  deb http://ftp.ctex.org/mirrors/CRAN/bin/linux/ubuntu maverick/(添加这一行)
   24  # 更新软件源:
   25  sudo apt-get update
   26  sudo apt-get install r-base
   27  history

更新r中所有的r包       update.packages(ask = FALSE)
 

#这个版本有点低

sudo apt-get install r-cran-rjson

z这个连接非常好用 最新版的r
Ubuntu Packages For R - Brief Instructionshttps://cran.r-project.org/bin/linux/ubuntu/

报错

install.packages("ComplexHeatmap")
Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
Warning message:
package ‘ComplexHeatmap’ is not available (for R version 3.6.3) 

如何在 Ubuntu 20.04 上安装 R-阿里云开发者社区R 是一门开源编程语言和自由的环境,主要用于统计分析、绘图。它由 R 基金会支持,主要用于统计分析。它主要被数据统计和分析师们用来开发统计软件,并用来进行数据分析。https://developer.aliyun.com/article/765216#:~:text=%E5%A6%82%E4%BD%95%E5%9C%A8%20Ubuntu%2020.04%20%E4%B8%8A%E5%AE%89%E8%A3%85%20R%201%20%E4%B8%80%E3%80%81%E5%89%8D%E6%8F%90%E6%9D%A1%E4%BB%B6%20%E5%9C%A8%E7%BB%A7%E7%BB%AD%E8%BF%99%E7%AF%87%E6%8C%87%E5%8D%97%E4%B9%8B%E5%89%8D%EF%BC%8C%E8%AF%B7%E7%A1%AE%E4%BF%9D%E4%BD%A0%E6%BB%A1%E8%B6%B3%E4%B8%8B%E9%9D%A2%E7%9A%84%E5%89%8D%E6%8F%90%E6%9D%A1%E4%BB%B6%EF%BC%9A,%E4%B8%8A%E5%AE%89%E8%A3%85%20R%EF%BC%8C%E4%BB%A5%E5%8F%8A%20%E5%A6%82%E4%BD%95%E7%BC%96%E8%AF%91%E5%AE%89%E8%A3%85%20R%20%E8%BD%AF%E4%BB%B6%E5%8C%85%E3%80%82%20%E5%A6%82%E6%9E%9C%E4%BD%A0%E6%9C%89%E4%BB%BB%E4%BD%95%E7%96%91%E9%97%AE%EF%BC%8C%E8%AF%B7%E9%80%9A%E8%BF%87%E4%BB%A5%E4%B8%8B%E6%96%B9%E5%BC%8F%E8%81%94%E7%B3%BB%E6%88%91%E4%BB%AC%EF%BC%9A%20%E5%BE%AE%E4%BF%A1%3A%20

 how to  install r in linux

R Installation and AdministrationR Installation and Administrationicon-default.png?t=N176https://cran.r-project.org/doc/manuals/r-release/R-admin.htmlInstallation of R 4.2 on Ubuntu 22.04.1 LTS and tips for spatial packages | R-bloggersYou can read the original post in its original format on Rtask website by ThinkR here: Installation of R 4.2 on Ubuntu 22.04.1 LTS and tips for spatial packages It is again this time in your Ubuntu user’s life where you plan to upgrade your server installation from Ubuntu 20.04 to Ubuntu 22.04 LTS. Indeed, the first point release 22.04.1 is now there, and you’d like somebody else to try it for you before loosing all your work. Let me do it for you ! We will also use This post is better presented on its original ThinkR website here: Installation of R 4.2 on Ubuntu 22.04.1 LTS and tips for spatial packageshttps://www.r-bloggers.com/2022/08/installation-of-r-4-2-on-ubuntu-22-04-1-lts-and-tips-for-spatial-packages/

2 配置r中的基础包,并安装archr 

这里安装devtools时候 有很多的坑 太惨!!   全部是因为ubuntu20少了很多包,需要使用apt-get逐个安装

R --version

有个小技巧,就是看报错 ,看缺少哪些配置包 configuration file

缺少 的包 大多是这样:libjpeg-dev

sudo apt-get install  libfreetype6-dev libpng-dev libtiff5-dev  

我还补充了如下包

sudo apt-get install libgsl-dev
sudo apt-get install liblapack-dev
sudo apt-get install liblas

sudo apt-get install libcairo2-dev

sudo apt-get install libxi-dev

   17  sudo apt-get install libxml2-dev
   18  sudo apt-get install libcurl4-gnutls-dev
   19  sudo apt-get install r-base-dev
   20  sudo apt install build-essential libcurl4-gnutls-dev libxml2-dev libssl-dev
   21  sudo apt-get install libomp-dev
   22  原文链接:https://blog.csdn.net/qq_52813185/article/details/124827023
   23  sudo apt-get install libboost-dev
   24  sudo apt-get update
  # 25  sudo apt-get install libboost-all-dev
   26  sudo apt-get install libboost-all-dev --fix-missing
   27  sudo apt-get install libfontconfig1-dev
   28  sudo apt-get install libharfbuzz-dev libfribidi-dev
   29  sudo apt-get install libfreetype6-dev libpng-dev libtiff5-dev libjpeg-dev 

sudo apt-get install libbz2-dev

Analyzing single-cell regulatory chromatin in R. • ArchR 这几个包装了3小时

ERROR: dependencies ‘motifmatchr’, ‘chromVAR’, ‘ComplexHeatmap’ are not available for package ‘ArchR’

BiocManager::install("motifmatchr")
 

R

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

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

devtools::install_github("GreenleafLab/ArchR", ref="master", repos = BiocManager::repositories())



library(ArchR)
ArchR::installExtraPackages()

sudo apt-get install libxi-dev 

if (!requireNamespace("devtools", quietly = TRUE))
    install.packages("devtools")
devtools::install_github("stuart-lab/signac", ref = "develop")
# 安装bioconductor包
# Install bioconductor
if (!requireNamespace("BiocManager", quietly = TRUE))
    install.packages("BiocManager")
BiocManager::install()

# 安装Signac包
# Current release
install.packages("Signac")
# Development version
install.packages("devtools")
devtools::install_github("timoast/signac", ref = "develop")

BiocManager::install(“biovizBase”)


#安装参考基因组的注释信息
# Human
BiocManager::install(c('BSgenome.Hsapiens.UCSC.hg19', 'EnsDb.Hsapiens.v75'))
# Mouse
BiocManager::install(c('BSgenome.Mmusculus.UCSC.mm10', 'EnsDb.Mmusculus.v79'))

Ubuntu20系统中, R version 4.2.2 Patched (2022-11-10 r83330) -- "Innocent and Trusting" 如何更新所有的r包并自动安装依赖包

update.packages(ask = FALSE, dependencies = TRUE)
 


Rstudio-server的安装与使用 | KeepNotes blog


GitHub - macs3-project/MACS: MACS -- Model-based Analysis of ChIP-SeqMACS -- Model-based Analysis of ChIP-Seq. Contribute to macs3-project/MACS development by creating an account on GitHub.https://github.com/macs3-project/MACS/

安装macsMACS/INSTALL.md at master · macs3-project/MACS · GitHubMACS -- Model-based Analysis of ChIP-Seq. Contribute to macs3-project/MACS development by creating an account on GitHub.https://github.com/macs3-project/MACS/blob/master/docs/INSTALL.md

GitHub - CostaLab/scopen: scOpen: single-cell open chromatin analysis via NMF modellingscOpen: single-cell open chromatin analysis via NMF modelling - GitHub - CostaLab/scopen: scOpen: single-cell open chromatin analysis via NMF modellinghttps://github.com/CostaLab/scopen 安装scopen 注意python为3.6-3.9 其他的不行

几个入门教程

https://github.com/CostaLab/scopen/blob/master/vignettes/epiScanpy.ipynbhttps://github.com/CostaLab/scopen/blob/master/vignettes/epiScanpy.ipynb

A Brief Tutorial of ArchR • ArchRhttps://www.archrproject.com/articles/Articles/tutorial.html

 scopen/signac_pbmc.Rmd at 6be56fac6470e5b6ecdc5a2def25eb60ed6a1bcc · CostaLab/scopen · GitHubscOpen: single-cell open chromatin analysis via NMF modelling - scopen/signac_pbmc.Rmd at 6be56fac6470e5b6ecdc5a2def25eb60ed6a1bcc · CostaLab/scopenhttps://github.com/CostaLab/scopen/blob/6be56fac6470e5b6ecdc5a2def25eb60ed6a1bcc/vignettes/signac_pbmc.Rmd

RStudio Server - Posithttps://posit.co/download/rstudio-server/https://support.posit.co/hc/en-us/articles/200552306-Getting-Startedhttps://support.posit.co/hc/en-us/articles/200552306-Getting-Started

243-遇到不省心的Rstudio Server安装R包总是失败怎么办? | BIOINFOPLANET

 Rstudio Server 不同R版本配置和切换 - 腾讯云开发者社区-腾讯云Rstudio Desktop for Windows/Mac 切换不同R版本非常简单,Tools→Global Options→General→Basic→R...https://cloud.tencent.com/developer/article/1819222

Rstudio-server的安装与使用 | KeepNotes blog

3.2 Rstudio Server的切换配置

查看RStudio Server的一些常用命令 :

(我是又复制了一遍到这里,因为后面切换版本要时不时用到shell里面的操作,而不是仅仅在网页版干瞪眼)

sudo rstudio-server verify-installation #查看安装是否正常
sudo rstudio-server start               #启动RStudio-server
sudo rstudio-server status              #查看RStudio-server
sudo rstudio-server stop                #关闭RStudio-server
sudo rstudio-server restart             #重启RStudio-server

 Rstudio-server的安装与使用 | KeepNotes blog为什么要安装Rstudio-server: 老式笔记本在R处理一些较大数据时越来越力不从心了,有时因为运行一些R脚本,会导致笔记本的卡死 最近在学习甲基化芯片分析,在ubuntu的R中使用ChAMP包分析数据时遇无法打开GUI的问题,这时就需要有一个可视化界面 在处理一些复杂数据时,服务器上的R能有效加快运算速度;但我已经习惯了在IDE环境(windows Rstudio)上的书写代码,无法忍https://www.bioinfo-scrounger.com/archives/435/https://support.posit.co/hc/en-us/articles/200552316-Configuring-the-Serverhttps://support.posit.co/hc/en-us/articles/200552316-Configuring-the-Server

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

生信小博士

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值