Search
Question: TCGAbiolinks GDCquery Error: Parsing problems
1
gravatar for Ramiro Magno
29 days ago by
Ramiro Magno80
CBMR, Faro, Portugal
Ramiro Magno80 wrote:

Using TCGAbiolinks 2.5.9.

It seems that the GDC API might have changed something because

GDCquery("TCGA-BRCA")

Returns:

o GDCquery: Searching in GDC database

Genome of reference: hg38 Warning: 40 parsing failures. row # A tibble: 5 x 5 col row col expected actual file expected actual 1 1 8 columns 71 columns '[https://gdc-api.nci.nih.gov/projects?size=1000&format=tsv](https://gdc-api.nci.nih.gov/projects?size=1000&format=tsv)' file 2 2 8 columns 71 columns '[https://gdc-api.nci.nih.gov/projects?size=1000&format=tsv](https://gdc-api.nci.nih.gov/projects?size=1000&format=tsv)' row 3 3 8 columns 71 columns '[https://gdc-api.nci.nih.gov/projects?size=1000&format=tsv](https://gdc-api.nci.nih.gov/projects?size=1000&format=tsv)' col 4 4 8 columns 71 columns '[https://gdc-api.nci.nih.gov/projects?size=1000&format=tsv](https://gdc-api.nci.nih.gov/projects?size=1000&format=tsv)' expected 5 5 8 columns 71 columns '[https://gdc-api.nci.nih.gov/projects?size=1000&format=tsv](https://gdc-api.nci.nih.gov/projects?size=1000&format=tsv)' ... ................. ... .............................................................................................. ........ .............................................................................................. ...... .................. [... truncated]

  |disease_type.2              |disease_type.5                      |disease_type.4       |disease_type.6               |
  |:---------------------------|:-----------------------------------|:--------------------|:----------------------------|
  |NA                          |NA                                  |NA                   |NA                           |
  |NA                          |NA                                  |NA                   |NA                           |
  |NA                          |NA                                  |NA                   |NA                           |
  |NA                          |NA                                  |NA                   |NA                           |
  |NA                          |NA                                  |NA                   |NA                           |
  |NA                          |NA                                  |NA                   |NA                           |
  |NA                          |NA                                  |NA                   |NA                           |
  |NA                          |NA                                  |NA                   |NA                           |
  |NA                          |NA                                  |NA                   |NA                           |
  |NA                          |NA                                  |NA                   |NA                           |
  |NA                          |NA                                  |NA                   |NA                           |
  |NA                          |NA                                  |NA                   |NA                           |
  |NA                          |NA                                  |NA                   |NA                           |
  |Thymic Epithelial Neoplasms |Complex Mixed and Stromal Neoplasms |Basal Cell Neoplasms |Ductal and Lobular Neoplasms |
  |NA                          |NA                                  |NA                   |NA                           |
  |NA                          |NA                                  |NA                   |NA                           |
  |NA                          |NA                                  |NA                   |NA                           |
  |NA                          |NA                                  |NA                   |NA                           |
  |NA                          |NA                                  |NA                   |NA                           |
  |NA                          |NA                                  |NA                   |NA                           |
  |NA                          |NA                                  |NA                   |NA                           |
  |NA                          |NA                                  |NA                   |NA                           |
  |NA                          |NA                                  |NA                   |NA                           |
  |NA                          |NA                                  |NA                   |NA                           |
  |NA                          |NA                                  |NA                   |NA                           |
  |NA                          |NA                                  |NA                   |NA                           |
  |NA                          |NA                                  |NA                   |NA                           |
  |NA                          |NA                                  |NA                   |NA                           |
  |NA                          |NA                                  |NA                   |NA                           |
  |NA                          |NA                                  |NA                   |NA                           |
  |NA                          |NA                                  |NA                   |NA                           |
  |NA                          |NA                                  |NA                   |NA                           |
  |NA                          |NA                                  |NA                   |NA                           |
  |NA                          |NA                                  |NA                   |NA                           |
  |NA                          |NA                                  |NA                   |NA                           |
  |NA                          |NA                                  |NA                   |NA                           |
  |NA                          |NA                                  |NA                   |NA                           |
  |NA                          |NA                                  |NA                   |NA                           |
  |NA                          |NA                                  |NA                   |NA                           |
  |NA                          |NA                                  |NA                   |NA                           |

Error in checkProjectInput(project) : Please set a valid project argument from the column id above. Project TCGA-BRCA was not found.
In addition: Warning messages:
1: Unnamed col_types should have the same length as `col_names`. Using smaller of the two.
2: In rbind(names(probs), probs_f) : number of columns of result is not a multiple of vector length (arg 1)
3: Unknown or uninitialised column: 'project_id'.
4: Unknown or uninitialised column: 'project_id'.
ADD COMMENTlink modified 25 days ago by maysa_taheir30 • written 29 days ago by Ramiro Magno80

It seems the problem is in the function getGDCprojects in file R/internal.R.

Simplifying the code in getGDCprojects to download json only seems to solve the issue:

#' @title Retrieve all GDC projects
#' @description
#'   getGDCprojects uses the following api to get projects
#'   https://gdc-api.nci.nih.gov/projects
#' @export
#' @import readr stringr
#' @examples
#' projects <- getGDCprojects()
#' @return A data frame with last GDC projects
getGDCprojects <- function(){
  
  url <- "https://gdc-api.nci.nih.gov/projects?size=1000&format=json"
  json <- fromJSON(content(GET(url), as = "text", encoding = "UTF-8"), simplifyDataFrame = TRUE)
  projects <- json$data$hits
  projects$tumor <- unlist(lapply(projects$project_id, function(x){unlist(str_split(x,"-"))[2]}))
  return(projects)
}
ADD REPLYlink modified 27 days ago • written 27 days ago by Ramiro Magno80
2
gravatar for maysa_taheir
25 days ago by
maysa_taheir30
maysa_taheir30 wrote:

had the same problem and fixed it by installing TCGAbiolinks through the devtools:

devtools::install_github("BioinformaticsFMRP/TCGAbiolinks")

it didn't work with me from the first time as indicated by others in this group and ended up with 

(1) uninstalled R and deleted all of its associated libraries.  Then reinstalled it 

(2) I  separately installed GenomeInfoData package as TCGAbiolinks package installation was every time interrupted by prompting this msg "There is no package called 'GenomeInfoData" , so I used 

source("https://bioconductor.org/biocLite.R")
biocLite("GenomeInfoDbData")

(3) I re-run the devtools::install_github("BioinformaticsFMRP/TCGAbiolinks") and the problem was finally  fixed

ADD COMMENTlink written 25 days ago by maysa_taheir30
1
gravatar for maysa_taheir
27 days ago by
maysa_taheir30
maysa_taheir30 wrote:

I'm having the same problem, any solutions pls

 

ADD COMMENTlink written 27 days ago by maysa_taheir30
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 313 users visited in the last hour