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

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条)

报告相同问题?

悬赏问题

  • ¥15 输入的char字符转为int类型,不是对应的ascall码,如何才能使之转换为对应ascall码?或者使输入的char字符可以正常与其他字符比较?
  • ¥15 解决websocket跟c#客户端通信
  • ¥30 Python调用dll文件输出Nan重置dll状态
  • ¥15 浮动div的高度控制问题。
  • ¥66 换电脑后应用程序报错
  • ¥50 array数据同步问题
  • ¥15 pic16F877a单片机的外部触发中断程序仿真失效
  • ¥15 Matlab插值拟合差分微分规划图论
  • ¥15 keil5 target not created
  • ¥15 C/C++数据与算法请教