BioinformaticsFMRP / TCGAbiolinks

TCGAbiolinks
http://bioconductor.org/packages/devel/bioc/vignettes/TCGAbiolinks/inst/doc/index.html
289 stars 110 forks source link

GDCprepare Error in Ops.data.frame(y[, 1], x[[1]][, 1]) : ‘==’ only defined for equally-sized data frames #484

Closed swapnil-nis closed 2 years ago

swapnil-nis commented 2 years ago

Hi @tiagochst

I am trying to download DNA methylation data of TCGA-BRCA using TCGAbiolinks from few days; but, I am getting the same error every time while preparing the data with GDCprepare function. Please help me to resolve this issue as soon as possible. The R codes which I have used are appended below:

library(TCGAbiolinks) query.meth = GDCquery(project = "TCGA-BRCA", data.category = "DNA Methylation", legacy = F, platform = c("Illumina Human Methylation 450", "Illumina Human Methylation 27"))

GDCdownload(query.meth)

brca.meth = GDCprepare(query = query.meth, save = TRUE, save.filename = "brca_dmeth.rda")

|====================================================|100% Completed after 39 m

oo Merging 1234 files

Error in Ops.data.frame(y[, 1], x[[1]][, 1]) : ‘==’ only defined for equally-sized data frames

sessionInfo() R version 4.1.2 (2021-11-01) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 20.04.3 LTS

Matrix products: default BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.9.0 LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.9.0

locale: [1] LC_CTYPE=en_IN LC_NUMERIC=C LC_TIME=en_IN
[4] LC_COLLATE=en_IN LC_MONETARY=en_IN LC_MESSAGES=en_IN
[7] LC_PAPER=en_IN LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=en_IN LC_IDENTIFICATION=C

attached base packages: [1] stats graphics grDevices utils datasets methods base

other attached packages: [1] purrr_0.3.4 data.table_1.14.2 magrittr_2.0.1
[4] TCGAbiolinks_2.23.2

loaded via a namespace (and not attached): [1] MatrixGenerics_1.6.0 Biobase_2.54.0
[3] httr_1.4.2 tidyr_1.1.4
[5] vroom_1.5.7 bit64_4.0.5
[7] jsonlite_1.7.2 R.utils_2.11.0
[9] assertthat_0.2.1 stats4_4.1.2
[11] BiocFileCache_2.2.0 blob_1.2.2
[13] GenomeInfoDbData_1.2.7 progress_1.2.2
[15] pillar_1.6.4 RSQLite_2.2.9
[17] lattice_0.20-45 glue_1.6.0
[19] downloader_0.4 digest_0.6.29
[21] GenomicRanges_1.46.1 XVector_0.34.0
[23] rvest_1.0.2 colorspace_2.0-2
[25] Matrix_1.4-0 R.oo_1.24.0
[27] plyr_1.8.6 XML_3.99-0.8
[29] pkgconfig_2.0.3 biomaRt_2.50.1
[31] zlibbioc_1.40.0 scales_1.1.1
[33] tzdb_0.2.0 tibble_3.1.6
[35] KEGGREST_1.34.0 generics_0.1.1
[37] TCGAbiolinksGUI.data_1.14.0 IRanges_2.28.0
[39] ggplot2_3.3.5 ellipsis_0.3.2
[41] withr_2.4.3 cachem_1.0.6
[43] SummarizedExperiment_1.24.0 BiocGenerics_0.40.0
[45] cli_3.1.0 crayon_1.4.2
[47] memoise_2.0.1 R.methodsS3_1.8.1
[49] fansi_0.5.0 xml2_1.3.3
[51] tools_4.1.2 prettyunits_1.1.1
[53] hms_1.1.1 lifecycle_1.0.1
[55] matrixStats_0.61.0 stringr_1.4.0
[57] S4Vectors_0.32.3 munsell_0.5.0
[59] DelayedArray_0.20.0 AnnotationDbi_1.56.2
[61] Biostrings_2.62.0 compiler_4.1.2
[63] GenomeInfoDb_1.30.0 rlang_0.4.12
[65] grid_4.1.2 RCurl_1.98-1.5
[67] rappdirs_0.3.3 bitops_1.0-7
[69] gtable_0.3.0 DBI_1.1.2
[71] curl_4.3.2 R6_2.5.1
[73] knitr_1.37 dplyr_1.0.7
[75] fastmap_1.1.0 bit_4.0.4
[77] utf8_1.2.2 filelock_1.0.2
[79] readr_2.1.1 stringi_1.7.6
[81] parallel_4.1.2 Rcpp_1.0.7
[83] vctrs_0.3.8 png_0.1-7
[85] dbplyr_2.1.1 tidyselect_1.1.1
[87] xfun_0.29

tiagochst commented 2 years ago

@swapnil-nis I made some recent modifications to reduce memory usage. Due to that, the code above will not work.

You will need to prepare separately then merge.

library(TCGAbiolinks)
query.meth = GDCquery(
    project = "TCGA-BRCA", 
    data.category = "DNA Methylation", 
    legacy = F,
    barcode = c("TCGA-BH-A0BL","TCGA-BH-A0H5"),
    platform = c("Illumina Human Methylation 27")
)
GDCdownload(query.meth)

brca.meth.27k = GDCprepare(
    query = query.meth
)

query.meth = GDCquery(
    project = "TCGA-BRCA", 
    data.category = "DNA Methylation", 
    legacy = FALSE,
    barcode = c("TCGA-B6-A0WV","TCGA-A2-A3XV"),
    platform = c("Illumina Human Methylation 450")
)
GDCdownload(query.meth)

brca.meth.450 = GDCprepare(
    query = query.meth
)

merged <- merge(assay(brca.meth.450), assay(brca.meth.27k), by = 0 )
rownames(merged) <- merged$Row.names
merged$Row.names <- NULL
merged.se <- TCGAbiolinks:::makeSEFromDNAMethylationMatrix(merged)
swapnil-nis commented 2 years ago

Thank you @tiagochst. I prepared separately for both the platform and then merged.