发布日期:2024-09-08 18:00 点击次数:73
我的电脑内部有一千多个生物信息学多组学数据处理关联的r包萝莉 后入,最近三五年基本上莫得怎样装置过新的包,然而最近在一个新电脑内部进行视频号直播的时候发现底下的代码读取cel文献体式的affymetrix抒发量芯片的时候其实是会自动装置一个包:
library(oligo) celFiles <- list.celfiles('../cel_files/',listGzipped = T, full.name=TRUE) exon_data <- oligo::read.celfiles( celFiles )
如下所示:
> celFiles [1] "../cel_files//GSM756992_KS1-HG_U133A_2-2757.CEL.gz" [2] "../cel_files//GSM756993_KS1-HG_U133A_2-2871.CEL.gz" [3] "../cel_files//GSM756994_KS1-HG_U133A_2-2901.CEL.gz" [4] "../cel_files//GSM756995_KS1-HG_U133A_2-2905.CEL.gz" Loading required package: pd.hg.u133a.2Attempting to obtain 'pd.hg.u133a.2' from BioConductor website.Checking to see if your internet connection works...'getOption("repos")' replaces Bioconductor standard repositories, see'help("repositories", package = "BiocManager")' for details.Replacement repositories: CRAN: https://cran.rstudio.com/
假如你不使用bioconductor的镜像然而你又在中国大陆地区,就会遭遇底下的报错;
试开URL’https://bioconductor.org/packages/3.17/data/annotation/src/contrib/pd.hg.u133a.2_3.12.0.tar.gz'Content type 'application/gzip' length 9843108 bytes (9.4 MB)downloaded 6.3 MBError in download.file(url, destfile, method, mode = "wb", ...) : download from 'https://bioconductor.org/packages/3.17/data/annotation/src/contrib/pd.hg.u133a.2_3.12.0.tar.gz' failed此外: Warning messages:1: In download.file(url, destfile, method, mode = "wb", ...) : downloaded length 0 != reported length 02: In download.file(url, destfile, method, mode = "wb", ...) : URL 'https://mghp.osn.xsede.org/bir190004-bucket01/archive.bioconductor.org/packages/3.17/data/annotation/src/contrib/pd.hg.u133a.2_3.12.0.tar.gz': status was 'Transferred a partial file'Warning in download.packages(pkgs, destdir = tmpd, available = available, : 下载体式包'pd.hg.u133a.2’时出了问题载入需要的程辑包:pd.hg.u133a.2There was a problem during download or installation.Package 'pd.hg.u133a.2' cannot be loaded. Please, try again.Error in oligo::read.celfiles(celFiles) : The annotation package, pd.hg.u133a.2, could not be loaded.此外: Warning message:In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, : 不存在叫'pd.hg.u133a.2’这个名字的程辑包
在中国大陆,其实鸠合问题格外恶心的,下载一个 (9.4 MB)的包需要三五年的时候,并且不祥率会失败,比如我上头就只是是下载了 6.3 MB 是一个不完满的包,是以装置会失败。这个时候需要竖立一下时候问题:
getOption('timeout')options(timeout=10000)
就算是这么,各人也弗成能说去恭候三五年去装置一个r包,是以就需要镜像匡助你。假如你使用了传统的镜像地址,即是咱们一直保举的清华大学的镜像:
rm(list = ls()) options()$repos options()$BioC_mirror#options(BioC_mirror="https://mirrors.ustc.edu.cn/bioc/")options(BioC_mirror="http://mirrors.tuna.tsinghua.edu.cn/bioconductor/")options("repos" = c(CRAN="https://mirrors.tuna.tsinghua.edu.cn/CRAN/"))options()$repos options()$BioC_mirror
会发现,仍然是会报错,如下所示:
载入需要的程辑包:pd.hg.u133a.2Attempting to obtain 'pd.hg.u133a.2' from BioConductor website.Checking to see if your internet connection works...'getOption("repos")' replaces Bioconductor standard repositories, see 'help("repositories",package = "BiocManager")' for details.Replacement repositories: CRAN: https://mirrors.tuna.tsinghua.edu.cn/CRAN/Warning: 无法在貯藏處http://mirrors.tuna.tsinghua.edu.cn/bioconductor//packages/3.17/bioc/src/contrib中读写索引: 无法翻开URL'http://mirrors.tuna.tsinghua.edu.cn/bioconductor//packages/3.17/bioc/src/contrib/PACKAGES'Warning: 无法在貯藏處http://mirrors.tuna.tsinghua.edu.cn/bioconductor//packages/3.17/data/annotation/src/contrib中读写索引: 无法翻开URL'http://mirrors.tuna.tsinghua.edu.cn/bioconductor//packages/3.17/data/annotation/src/contrib/PACKAGES'Warning: 无法在貯藏處http://mirrors.tuna.tsinghua.edu.cn/bioconductor//packages/3.17/data/experiment/src/contrib中读写索引: 无法翻开URL'http://mirrors.tuna.tsinghua.edu.cn/bioconductor//packages/3.17/data/experiment/src/contrib/PACKAGES'Warning: 无法在貯藏處http://mirrors.tuna.tsinghua.edu.cn/bioconductor//packages/3.17/workflows/src/contrib中读写索引: 无法翻开URL'http://mirrors.tuna.tsinghua.edu.cn/bioconductor//packages/3.17/workflows/src/contrib/PACKAGES'Package 'pd.hg.u133a.2' was not found in the BioConductor repository.The 'pdInfoBuilder' package can often be used in situations like this.Error in oligo::read.celfiles(celFiles) : The annotation package, pd.hg.u133a.2, could not be loaded.
若是各人翻开上头的URL就会发现是;404 Not Found nginx/1.22.1 ,因为清华大学当今驱动知人善任资源了,别说是3.17了,哪怕是3.18齐不是主要的胜仗下载,目下(2024年05月26日 )能胜仗下载的 是 3.19,并且需要合营4.4版块的r,而我的电脑照旧4.3,是以就很无言。咱们的马拉松助教团队给各人整理了这个问题:
左证 Bioconductor 的安排,在 5 月 15 日,3.18 及此前版块的关联数据依然被存档,并从其同步起原中被移除。为省俭镜像站磁盘空间,清华源等也相应移除了这些文献。若是各人当今使用的R言语是 4.3 ,Bioconductor 版块是 3.18 ,那么使用 BiocManager::install 的时候可能会报错 Warning: unable to access index for repository *** ,cannot open URL ***
咱们稽查一下 :https://new.bioconductor.org/about/mirrors/ 官方网站,发现bioconductor有新的镜像选拔啦,如下所示的竖立:
options(BioC_mirror="https://mirrors.westlake.edu.cn/bioconductor")
不错看到就告捷了:
试开URL’https://mirrors.westlake.edu.cn/bioconductor/packages/3.17/data/annotation/src/contrib/pd.hg.u133a.2_3.12.0.tar.gz'Content type 'application/gzip' length 9843108 bytes (9.4 MB)downloaded 9.4 MB* installing *source* package 'pd.hg.u133a.2' ...** using staged installation** R** data** inst** byte-compile and prepare package for lazy loading** help*** installing help indices** building package indices** testing if installed package can be loaded from temporary location** testing if installed package can be loaded from final location** testing if installed package keeps a record of temporary installation path* DONE (pd.hg.u133a.2)下载的体式包在 'C:\Users\jimmy\AppData\Local\Temp\RtmpS0j9qK\downloaded_packages’里载入需要的程辑包:pd.hg.u133a.2载入需要的程辑包:RSQLite载入需要的程辑包:DBIPlatform design info loaded.
然而这个并不是暂劳永逸的搞定决策,因为西湖大学也有可能会把 bioconductor的 3.18以 及此前版块的关联bioconductor包文献数据存档,并从其同步起原中被移除,为省俭镜像站磁盘空间。
另外一个搞定决策,即是手动找到每个包的具体地址,使用底下的代码 :
草榴电影install.packages("https://mirrors.tuna.tsinghua.edu.cn/bioconductor/packages/release/data/annotation/src/contrib/BSgenome.Hsapiens.UCSC.hg19_1.4.3.tar.gz",type = 'source',repos = NULL)
不错看到清华大学内部的包照旧许多:https://mirrors.tuna.tsinghua.edu.cn/bioconductor/packages/release/data/annotation/src/contrib/ ,每个具体的包齐不错右键复制粘贴它们的真确下载地址哦:
图片
清华大学内部的包照旧许多文末友情宣传激烈提出你保举给身边的博士后以及年青生物学PI,多极少数据领路萝莉 后入,让他们的科研上一个台阶:
生物信息学马拉松讲课(买一得五) ,你的生物信息学初学课时隔5年,咱们的生信时间树VIP学徒不竭招生啦2024的分享作事器交个一又友福利价仍然是800千呼万唤始出来的独享生物信息学云作事器始终免费的生信进阶培训(线下) 本站仅提供存储作事,通盘本色均由用户发布,如发现存害或侵权本色,请点击举报。