在R中运行GDC_prepare时出现的问题

huangapple go评论118阅读模式
英文:

Problems when running GDC_prepare in R

问题

我尝试从GDC检索和准备一些数据,我正在运行以下代码,我是从这个YouTube视频中复制粘贴的:video

以下是代码:

  1. library(TCGAbiolinks)
  2. library(tidyverse)
  3. library(maftools)
  4. library(pheatmap)
  5. library(SummarizedExperiment)
  6. # 获取项目列表
  7. gdcprojects <- getGDCprojects()
  8. # 构建查询
  9. query_TCGA <- GDCquery(project = 'TCGA-BRCA',
  10. data.category = 'Transcriptome Profiling')
  11. output_query_TCGA <- getResults(query_TCGA)
  12. # 构建查询以检索基因表达数据
  13. query_TCGA <- GDCquery(project = 'TCGA-BRCA',
  14. data.category = 'Transcriptome Profiling',
  15. experimental.strategy = 'RNA-Seq',
  16. workflow.type = 'STAR - Counts',
  17. access = 'open',
  18. barcode = c('TCGA-LL-A73Y-01A-11R-A33J-07', 'TCGA-E2-A1IU-01A-11R-A14D-07', 'TCGA-AO-A03U-01B-21R-A10J-07'))
  19. getResults(query_TCGA)
  20. # 下载数据 - GDCdownload
  21. GDCdownload(query_TCGA)
  22. # 准备数据
  23. tcga_brca_data <- GDCprepare(query_TCGA)

在运行代码的最后一行之后,我收到以下错误消息:

  1. leted after 0 s
  2. Error in `map()`:
  3. i In index: 1.
  4. i With name: 1.
  5. Caused by error in `y[, 2:4]`:
  6. ! Can't subset columns past the end.
  7. i Locations 2, 3, and 4 don't exist.
  8. i There is only 1 column.
  9. Run `rlang::last_error()` to see where the error occurred.
  10. Warning messages:
  11. 1: One or more parsing issues, call `problems()` on your data frame for details, e.g.:
  12. dat <- vroom(...)
  13. problems(dat)
  14. 2: One or more parsing issues, call `problems()` on your data frame for details, e.g.:
  15. dat <- vroom(...)
  16. problems(dat)
  17. 3: One or more parsing issues, call `problems()` on your data frame for details, e.g.:
  18. dat <- vroom(...)
  19. problems(dat)

我不理解这个错误是什么原因,因为我正在使用与视频中相同的代码。

英文:

I'm trying to retrieve and prepare some data from GDC and I'm running the following code which I copy-pasted from this YouTube video:video.

Below is the code:

  1. library(TCGAbiolinks)
  2. library(tidyverse)
  3. library(maftools)
  4. library(pheatmap)
  5. library(SummarizedExperiment)
  6. # get a list of projects
  7. gdcprojects &lt;- getGDCprojects()
  8. # building a query
  9. query_TCGA &lt;- GDCquery(project = &#39;TCGA-BRCA&#39;,
  10. data.category = &#39;Transcriptome Profiling&#39;)
  11. output_query_TCGA &lt;- getResults(query_TCGA)
  12. # build a query to retrieve gene expression data ------------
  13. query_TCGA &lt;- GDCquery(project = &#39;TCGA-BRCA&#39;,
  14. data.category = &#39;Transcriptome Profiling&#39;,
  15. experimental.strategy = &#39;RNA-Seq&#39;,
  16. workflow.type = &#39;STAR - Counts&#39;,
  17. access = &#39;open&#39;,
  18. barcode = c(&#39;TCGA-LL-A73Y-01A-11R-A33J-07&#39;, &#39;TCGA-E2-A1IU-01A-11R-A14D-07&#39;,&#39;TCGA-AO-A03U-01B-21R-A10J-07&#39;))
  19. getResults(query_TCGA)
  20. # download data - GDCdownload
  21. GDCdownload(query_TCGA)
  22. # prepare data
  23. tcga_brca_data &lt;- GDCprepare(query_TCGA)

And after running the last line of code I get the following error message:

  1. leted after 0 s
  2. Error in `map()`:
  3. i In index: 1.
  4. i With name: 1.
  5. Caused by error in `y[, 2:4]`:
  6. ! Can&#39;t subset columns past the end.
  7. i Locations 2, 3, and 4 don&#39;t exist.
  8. i There is only 1 column.
  9. Run `rlang::last_error()` to see where the error occurred.
  10. Warning messages:
  11. 1: One or more parsing issues, call `problems()` on your data frame for details, e.g.:
  12. dat &lt;- vroom(...)
  13. problems(dat)
  14. 2: One or more parsing issues, call `problems()` on your data frame for details, e.g.:
  15. dat &lt;- vroom(...)
  16. problems(dat)
  17. 3: One or more parsing issues, call `problems()` on your data frame for details, e.g.:
  18. dat &lt;- vroom(...)
  19. problems(dat)

I do not understand what is causing this error since I'm using the same code as in the video.

答案1

得分: 0

跨贴并在https://support.bioconductor.org/p/9149780/上回答。

解决方案:更新软件包。

英文:

Cross-posted and answered at https://support.bioconductor.org/p/9149780/

Solution: Update packages.

huangapple
  • 本文由 发表于 2023年2月27日 04:38:26
  • 转载请务必保留本文链接:https://go.coder-hub.com/75574873.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定