ayueme / easyTCGA

Make TCGA download and prepare easy!
Other
101 stars 12 forks source link

Error in `collect()`: #5

Closed Pigeongeon closed 4 months ago

Pigeongeon commented 4 months ago

--------------------------------------

----- easyTCGA DNA Methylation -------

--------------------------------------

rm(list = ls())# 删除所有已定义对象 getwd() [1] "C:/Users/wenpz/Documents" setwd("E:/AIDPS_HCC/2.ML_3set_70_Gene/GeoTcgaData/easyTCGA_DNAmethy")

-----加载R包------

library(easyTCGA)

-----下载DNA Methylation数据------

运行下载函数

getAnywhere(getmethybeta) # 使用getAnywhere查看函数代码 A single object matching ‘getmethybeta’ was found It was found in the following places package:easyTCGA namespace:easyTCGA with value

function (project) { if (!dir.exists("output_methy")) { dir.create("outputmethy") } message("=> Querying data. \n") query <- TCGAbiolinks::GDCquery(project = project, data.category = "DNA Methylation", data.type = "Methylation Beta Value", platform = "Illumina Human Methylation 450") message("=> Downloading data. \n") TCGAbiolinks::GDCdownload(query, files.per.chunk = 100) if (length(project) > 1) { project <- paste(project, collapse = "") } message("\n=> Preparing data.") TCGAbiolinks::GDCprepare(query, save = T, save.filename = paste0("output_methy/", project, "_methy_beta_SummarizedExperiment.rdata")) load(file = paste0("output_methy/", project, "_methy_beta_SummarizedExperiment.rdata")) clinicalSE <- as.data.frame(SummarizedExperiment::colData(data)) save(clinicalSE, file = paste0("output_methy/", project, "_clinicalSE.rdata")) probe_info <- as.data.frame(SummarizedExperiment::rowData(data)) save(probe_info, file = paste0("output_methy/", project, "_probe_info.rdata")) beta_expr <- SummarizedExperiment::assay(data) save(beta_expr, file = paste0("output_methy/", project, "_methy_beta_expr.rdata")) pd <- data.frame(Sample_Name = colnames(beta_expr), sample_type = ifelse(as.numeric(substr(colnames(beta_expr), 14, 15)) < 10, "tumor", "normal")) save(pd, file = paste0("output_methy/", project, "_pd.rdata")) message("\n=> Successful.") } <bytecode: 0x00000242dbd0d950>

> getmethybeta("TCGA-LIHC") => Querying data. -------------------------------------- o GDCquery: Searching in GDC database -------------------------------------- Genome of reference: hg38 -------------------------------------------- oo Accessing GDC. This might take a while... -------------------------------------------- ooo Project: TCGA-LIHC -------------------- oo Filtering results -------------------- ooo By platform ooo By data.type ---------------- oo Checking data ---------------- ooo Checking if there are duplicated cases ooo Checking if there are results for the query ------------------- o Preparing output ------------------- => Downloading data. Downloading data for project TCGA-LIHC Of the 430 files for download 430 already exist. All samples have been already downloaded => Preparing data. -------------------- oo Reading 430 files -------------------- |================================================================================================================================|100% Completed after 27 s -------------------- oo Merging 430 files -------------------- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Creating a SummarizedExperiment from DNA methylation input Accessing DNAm annotation from sesame package for: hg38 - HM450 Error in `collect()`: ! Failed to collect lazy table. Caused by error in `db_collect()`: ! Arguments in `...` must be used. ✖ Problematic argument: • ..1 = Inf ℹ Did you misspell an argument name? Run `rlang::last_trace()` to see where the error occurred. > rlang::last_trace() Error in `collect()`: ! Failed to collect lazy table. Caused by error in `db_collect()`: ! Arguments in `...` must be used. ✖ Problematic argument: • ..1 = Inf ℹ Did you misspell an argument name? --- Backtrace: ▆ 1. ├─easyTCGA::getmethybeta("TCGA-LIHC") 2. │ └─TCGAbiolinks::GDCprepare(...) 3. │ └─TCGAbiolinks:::readDNAmethylation(...) 4. │ └─TCGAbiolinks:::makeSEFromDNAMethylationMatrix(...) 5. │ └─TCGAbiolinks:::getMetPlatInfo(platform = met.platform, genome = genome) 6. │ └─ExperimentHub::ExperimentHub() 7. │ └─AnnotationHub::.Hub(...) 8. │ └─AnnotationHub:::.create_cache(...) 9. │ └─BiocFileCache::BiocFileCache(cache = cache, ask = ask) 10. │ └─BiocFileCache:::.sql_create_db(bfc) 11. │ └─BiocFileCache:::.sql_validate_version(bfc) 12. │ └─BiocFileCache:::.sql_schema_version(bfc) 13. │ ├─base::tryCatch(...) 14. │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers) 15. │ └─tbl(src, "metadata") %>% collect(Inf) 16. ├─dplyr::collect(., Inf) 17. └─dbplyr:::collect.tbl_sql(., Inf) 18. ├─base::withCallingHandlers(...) 19. └─dbplyr::db_collect(x$src$con, sql, n = n, warn_incomplete = warn_incomplete, ...)
ayueme commented 4 months ago

甲基化数据需要在线下载数据,你的网络不行,这个对网络要求很高,不是简单的翻墙就行了,你可以了解下sesamesesameData这两个包。

Pigeongeon commented 4 months ago

我刚才把dbplyr降级到2.0.0后成功了,因为数据是已经下载好了,主要是整理合并一直报错:> packageVersion("dbplyr") [1] ‘2.0.0’

谢谢博主的easyTCGA包,非常好用简单!

wenpeizhen1996

@. | ---- Replied Message ---- | From | @.> | | Date | 6/3/2024 13:12 | | To | @.> | | Cc | @.> , @.***> | | Subject | Re: [ayueme/easyTCGA] Error in collect(): (Issue #5) |

甲基化数据需要在线下载数据,你的网络不行,这个对网络要求很高,不是简单的翻墙就行了,你可以了解下sesame和sesameData这两个包。

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>