m0_54759627 2021-04-10 23:16 采纳率: 33.3%
浏览 1289
已采纳

R语言下载完TCGA数据时,运行GDCprepare()函数时,总是报C盘临时文件夹的一个错误

 

 

代码如下:

library(pacman)
library(SummarizedExperiment)
library(TCGAbiolinks)
library(tidyverse)
library(magrittr)
library(data.table)
library(biomaRt)
 
 
 
projectPath = "D:/Project/sxkong_200415"  
dataPath = paste(projectPath, "Data", sep = "/")
if(!dir.exists(dataPath)) dir.create(dataPath)  
setwd(dataPath)
 
TCGAbiolinks:::getProjectSummary("TCGA-LIHC")
 
LIHC_query <- GDCquery(project = "TCGA-LIHC",
                       legacy = FALSE,
                       experimental.strategy = "RNA-Seq",
                       data.category = "Transcriptome Profiling",
                       data.type = "Gene Expression Quantification",
                       workflow.type = "HTSeq - FPKM-UQ")
 
GDCdownload(LIHC_query,files.per.chunk = 50)
 
dataAssy = GDCprepare(LIHC_query, summarizedExperiment = F)

R版本4.0.5  下载完数据运行 : dataAssy = GDCprepare(LIHC_query, summarizedExperiment = F)时,

出现以下错误

 

> dataAssy = GDCprepare(LIHC_query, summarizedExperiment = F,directory = "GDCdata")
|                                                                                        |  0%                      错误: 'C:\Users\神的孩~1\AppData\Local\Temp\RtmpMl9OQE\file8a46f293134' does not exist.
Error in if (value == n) { : 参数长度为零
> dataAssy = GDCprepare(LIHC_query, summarizedExperiment = F,directory = "GDCdata")
|                                                                                        |  0%                      错误: 'C:\Users\神的孩~1\AppData\Local\Temp\RtmpMl9OQE\file8a45b9d58fd' does not exist.
Error in if (value == n) { : 参数长度为零
> dataAssy = GDCprepare(LIHC_query, summarizedExperiment = F)
|                                                                                        |  0%                      错误: 'C:\Users\神的孩~1\AppData\Local\Temp\RtmpMl9OQE\file8a4798e51d6' does not exist.
Error in if (value == n) { : 参数长度为零

求大神指点,小白一个,鼓捣两天了,实在是没辙了T T

  • 写回答

3条回答 默认 最新

  • CSDN专家-孙老师 2021-04-11 10:41
    关注

    可能是下载的数不完整,或者数据存放路径有问题。建议先将dataPath这个部分代码注释掉,这样来写:

    BiocManager::install("TCGAbiolinks")
    library(TCGAbiolinks)
    ?GDCquery
    x<-getGDCprojects()$project_id
    
    TCGAbiolinks:::getProjectSummary("TCGA-LIHC")
    query<-GDCquery(project = "TCGA-LIHC",
                    legacy=F,
                    experimental.strategy ="RNA-Seq",
                    data.category = "Transcriptome Profiling",
                    data.type="Gene Expression Quantification",
                    workflow.type="HTSeq - FPKM-UQ")
    
    GDCdownload(query,files.per.chunk = 50)
    
    dataAssy = GDCprepare(query, summarizedExperiment = F)

    |=========================================================================|100%                      Completed after 47 s 

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥18 深度学习tensorflow1,ssdv1,coco数据集训练一个模型
  • ¥100 关于注册表摄像头和麦克风的问题
  • ¥30 代码本地运行正常,但是TOMCAT部署时闪退
  • ¥15 关于#python#的问题
  • ¥15 主机可以ping通路由器但是连不上网怎么办
  • ¥15 数据库一张以时间排好序的表中,找出多次相邻的那些行
  • ¥50 关于DynamoRIO处理多线程程序时候的问题
  • ¥15 kubeadm部署k8s出错
  • ¥15 Abaqus打不开cae文件怎么办?
  • ¥15 小程序准备上线,软件开发公司需要提供哪些资料给甲方