首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >运行GDCprepare(query, save=FALSE)时错误?

运行GDCprepare(query, save=FALSE)时错误?

提问于 2022-04-28 11:58:49
回答 1关注 0查看 444

运行prepare的时候提示column有问题 下面是我运行的代码 有什么解决办法么

> query <- GDCquery(project = "TCGA-BRCA",

+                   data.category = "Transcriptome Profiling",

+                   data.type = "Gene Expression Quantification", 

+                   workflow.type = "STAR - Counts")

> queryFt <- GDCquery(project = "TCGA-BRCA",

+                   data.category = "Transcriptome Profiling",

+                   data.type = "Gene Expression Quantification", 

+                   workflow.type = "STAR - Counts")

> samplesDown <- getResults(queryFt,cols=c("cases"))

> dataSmTP <- TCGAquery_SampleTypes(barcode = samplesDown,

+                                   typesample = "TP")

> dataSmNT <- TCGAquery_SampleTypes(barcode = samplesDown,

+                                   typesample = "NT")

> dataSmTP_short <- dataSmTP[1:100]

> dataSmNT_short <- dataSmNT[1:100]

> queryDownSd <- GDCquery(project = "TCGA-BRCA", 

+                       data.category = "Transcriptome Profiling",

+                       data.type = "Gene Expression Quantification", 

+                       workflow.type = "STAR - Counts", 

+                       barcode = c(dataSmTP_short, dataSmNT_short))

> GDCdownload(query = queryDownSd, files.per.chunk = 10)

在运行下面这一步时提示error,是不是因为最早sampleDown时只取了case?

> dataPrep1 <- GDCprepare(query = queryDownSd, save = FALSE)

Error in `vectbl_as_col_location()`:

! Can't subset columns past the end.

i Locations 2, 3, and 4 don't exist.

i There is only 1 column.

Run `rlang::last_error()` to see where the error occurred.

There were 50 or more warnings (use warnings() to see the first 50)

> rlang::last_error()

<error/vctrs_error_subscript_oob>

Error in `vectbl_as_col_location()`:

! Can't subset columns past the end.

i Locations 2, 3, and 4 don't exist.

i There is only 1 column.

---

Backtrace:

  1. TCGAbiolinks::GDCprepare(query = queryDownSd, save = FALSE)

  6. purrr::map_dfc(., .f = function(y) y[, 2:4])

  7. purrr::map(.x, .f, ...)

  8. TCGAbiolinks .f(.x[[i]], ...)

 12. tibble:::`[.tbl_df`(y, , 2:4)

 13. tibble:::vectbl_as_col_location(...)

Run `rlang::last_trace()` to see the full context.

> rlang::last_trace()

<error/vctrs_error_subscript_oob>

Error in `vectbl_as_col_location()`:

! Can't subset columns past the end.

i Locations 2, 3, and 4 don't exist.

i There is only 1 column.

---

Backtrace:

     x

  1. +-TCGAbiolinks::GDCprepare(query = queryDownSd, save = FALSE)

  2. | \-TCGAbiolinks:::readTranscriptomeProfiling(...)

  3. |   +-base::suppressMessages(...)

  4. |   | \-base::withCallingHandlers(...)

  5. |   \-x %>% map_dfc(.f = function(y) y[, 2:4])

  6. \-purrr::map_dfc(., .f = function(y) y[, 2:4])

  7.   \-purrr::map(.x, .f, ...)

  8.     \-TCGAbiolinks .f(.x[[i]], ...)

  9.       +-y[, 2:4]

 10.       +-readr:::`[.spec_tbl_df`(y, , 2:4)

 11.       +-base::NextMethod(`[`)

 12.       \-tibble:::`[.tbl_df`(y, , 2:4)

 13.         \-tibble:::vectbl_as_col_location(...)

 14.           +-tibble:::subclass_col_index_errors(...)

 15.           | \-base::withCallingHandlers(...)

 16.           \-vctrs::vec_as_location(j, n, names)

 17.             \-vctrs `<fn>`()

 18.               \-vctrs:::stop_subscript_oob(...)

 19.                 \-vctrs:::stop_subscript(...)

 20.                   \-rlang::abort(...)

回答

和开发者交流更多问题细节吧,去 写回答
相关文章

相似问题

相关问答用户
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档