java证书 查看cacer_R 语言关于 SSL 证书异常处理笔记

一、关于 TCGAbiolinks

TCGAbiolinks 是一个用于 TCGA 数据综合分析的 R/BioConductor 软件包,能够通过 GDC Application Programming Interface (API) 访问 National Cancer Institute (NCI) Genomic Data Commons (GDC),来搜索、下载和准备相关数据,以便在 R 中进行分析。

二、问题

神奇的是,今天在 R 操作 TCGAbiolinks 却遇到了一个极其棘手的问题:

library(TCGAbiolinks)

query 

data.category = "Transcriptome Profiling",

data.type = "Gene Expression Quantification",

workflow.type = "HTSeq - Counts")

67b502ec8f6c74deccb35769a802fefe.png

GDC server down, try to use this package later

拿着这个 error 去谷歌,看到的结果都是教你用 devtools 或者 TCGAbiolink 官网提供的方法从 github 重装一遍这个包:

devtools::install_github("BioinformaticsFMRP/TCGAbiolinks")

BiocManager::install("BioinformaticsFMRP/TCGAbiolinks")

9bb37f883b6bf882e1ef5eb2731d6e34.png然而这些方法都未能解决我的问题,下面是关于这个问题的一些探索。

三、源码分析

首先,我去 TCGAbiolink 中的源码看这个异常是在哪里导致的,在 R/internal.R 中发现:

b2aef89c19319dd79f28454e31c1a65d.png

> library(jsonlite)

> fromJSON("https://api.gdc.cancer.gov/status",simplifyDataFrame = TRUE)

Error in open.connection(con, "rb") :

SSL certificate problem: unable to get local issuer certificate

后来又看了一下 jsonlite 的 fromJSON 函数,发现它其实是基于 curl 包来实现获取,以及下载相关的数据。

The curl package provides bindings to the libcurl C library for R. The package supports retrieving data in-memory, downloading to disk, or streaming using the R “connection” interface. Some knowledge of curl is recommended to use this package. For a more user-friendly HTTP client, have a look at the httr package which builds on curl with HTTP specific tools and logic.

f1502381bc8fb303888b14b5e3488888.png

curl 去访问 https 的站点报错看了一下

curl 和

curl 命令都是支持 ssl 的:

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值