Bioconductor / GenomicDataCommons

Provide R access to the NCI Genomic Data Commons portal.
http://bioconductor.github.io/GenomicDataCommons/
83 stars 23 forks source link

TCGAtranslateID issue #57

Closed cherlynty closed 6 years ago

cherlynty commented 6 years ago

Hi,
I have tried to use the TCGAtranslateID function to convert file_ids to barcodes, but have failed (it was successful previously). Could you kindly assist me with the code?

Cherlyn

This is the error: Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ‘select’ for signature ‘"gdc_files"’ 11. stop(gettextf("unable to find an inherited method for function %s for signature %s", sQuote(fdef@generic), sQuote(cnames)), domain = NA) 10. (function (classes, fdef, mtable) { methods <- .findInheritedMethods(classes, fdef, mtable) if (length(methods) == 1L) ... 9. select(., "cases.samples.submitter_id") 8. function_list[i] 7. freduce(value, _function_list) 6. _fseq(_lhs) 5. eval(quote(_fseq(_lhs)), env, env) 4. eval(quote(_fseq(_lhs)), env, env) 3. withVisible(eval(quote(_fseq(_lhs)), env, env)) 2. files(legacy = legacy) %>% filter(~file_id %in% file_ids) %>% select("cases.samples.submitter_id") %>% results_all() 1.TCGAtranslateID(ge_manifest_miRNA$id).

session info: R version 3.5.0 (2018-04-23) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 7 x64 (build 7601) Service Pack 1

Matrix products: default

locale: [1] LC_COLLATE=English_Singapore.1252 LC_CTYPE=English_Singapore.1252
[3] LC_MONETARY=English_Singapore.1252 LC_NUMERIC=C
[5] LC_TIME=English_Singapore.1252

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

other attached packages: [1] org.Hs.eg.db_3.6.0 biomaRt_2.36.1 GO.db_3.6.0
[4] AnnotationDbi_1.42.1 IRanges_2.14.10 S4Vectors_0.18.2
[7] Biobase_2.40.0 BiocGenerics_0.26.0 GenomicDataCommons_1.5.3 [10] magrittr_1.5 stringr_1.3.1 stringi_1.1.7
[13] dplyr_0.7.5 edgeR_3.22.2 limma_3.36.1
[16] BiocInstaller_1.30.0

loaded via a namespace (and not attached): [1] Rcpp_0.12.17 locfit_1.5-9.1 lattice_0.20-35
[4] prettyunits_1.0.2 assertthat_0.2.0 rprojroot_1.3-2
[7] digest_0.6.15 R6_2.2.2 GenomeInfoDb_1.16.0
[10] backports_1.1.2 RSQLite_2.1.1 evaluate_0.10.1
[13] httr_1.3.1 pillar_1.2.3 zlibbioc_1.26.0
[16] rlang_0.2.1 progress_1.1.2 lazyeval_0.2.1
[19] curl_3.2 blob_1.1.1 Matrix_1.2-14
[22] rmarkdown_1.10 splines_3.5.0 BiocParallel_1.14.1
[25] readr_1.1.1 RCurl_1.95-4.10 bit_1.1-14
[28] DelayedArray_0.6.0 compiler_3.5.0 base64enc_0.1-3
[31] pkgconfig_2.0.1 htmltools_0.3.6 tidyselect_0.2.4
[34] SummarizedExperiment_1.10.1 tibble_1.4.2 GenomeInfoDbData_1.1.0
[37] matrixStats_0.53.1 XML_3.98-1.11 bitops_1.0-6
[40] rappdirs_0.3.1 grid_3.5.0 jsonlite_1.5
[43] DBI_1.0.0 XVector_0.20.0 remotes_1.1.1
[46] bindrcpp_0.2.2 xml2_1.2.0 tools_3.5.0
[49] bit64_0.9-7 glue_1.2.0 purrr_0.2.5
[52] hms_0.4.2 yaml_2.1.19 GenomicRanges_1.32.3
[55] memoise_1.1.0 knitr_1.20 bindr_0.1.1

seandavi commented 6 years ago

I'm not sure what TCGAtranslateIDs function you are using, but this gist is perhaps going to be helpful:

https://gist.github.com/seandavi/f79bd539573c8d4dca6e95fea3ec1075

Let me know if that doesn't do the trick for you.

LiNk-NY commented 6 years ago

@cherlynty Just to chime in, this functionality is available in TCGAutils::UUIDtoBarcode. Thanks to Sean's helpful script with some modifications.

seandavi commented 6 years ago

I didn't want to step on toes, but the TCGAutils solution is the better way to go!

cherlynty commented 6 years ago

Hi both, thanks for the response, I have managed translate the ids using LiNk-NY's script. Just a heads up, I have previously used similar script from the gist but tried to source from legacy.