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

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 怎样采集或者其它途径拿到全国最新个体工商户数据
  • ¥20 我是一名大学生,想学习java是自学还是报培训班呢
  • ¥15 pycharm该如何爬取网易云歌曲下的评论?
  • ¥15 java调用sap webservice问题
  • ¥20 如何完全复现何恺明resnet论文里的结果,有代码吗,获得论文中的结果(如下图)
  • ¥15 mysql如果表行行数小于1000条还需要分区吗
  • ¥20 有关matlab自定义特殊算符的问题
  • ¥15 第15届蓝桥杯选拔赛斗鱼养殖场
  • ¥15 在vivado的FIFO使用中,FIFO有没有提供可以输出内部存储空间状态的端口?
  • ¥15 C++ QT内存数据匹配对比指导