Gdcprepare() error.
0
0
Entering edit mode
2.7 years ago

I’m really struggling with this and I need urgent help.

I keep running the following code but after the gdcprepare function, it either crashes my computer or freezes the console. I have no idea what to do, someone please help.

library("TCGAbiolinks", quietly = T)
library("limma", quietly = T)
library("edgeR", quietly = T)
library("glmnet", quietly = T)
library("factoextra", quietly = T)
library("FactoMineR", quietly = T)
library("caret", quietly = T)
library("SummarizedExperiment", quietly = T)
library("gplots", quietly = T)
library("survival", quietly = T)
library("survminer", quietly = T)
library("RColorBrewer", quietly = T)
library("gProfileR", quietly = T)
library("genefilter", quietly = T)

## Acess GDC and get info on projects

GDCprojects = getGDCprojects()

View(GDCprojects[c("project_id", "name")])

# get details of the Kidney cancer project
TCGAbiolinks:::getProjectSummary("TCGA-KIRC")

## Query GDC for RNAseq data from KIRC dataset for primary tumor and normal tissue
query_TCGA_KIRC = GDCquery(
  project = "TCGA-KIRC",
  data.category = "Transcriptome Profiling",
  access = "open",
  experimental.strategy = "RNA-Seq",
  workflow.type = "HTSeq - Counts",
  sample.type =c("Primary Tumor", "Solid Tissue Normal"))

#      make results as table
all_res = getResults(query_TCGA_KIRC) 
colnames(all_res)

# how many samples in each sample type
table(factor(all_res$sample_type)) 

## Download the files specified in the query.

GDCdownload(query = query_TCGA_KIRC) # rerun if download fails


### Prepare the downloaded data and other associated data into an object
## load the actual RNASeq data into R
## both clinical and expression data will be present in this object

tcga_data = GDCprepare(query_TCGA_KIRC)
View(tcga_data)

# Clinical data can be accessed using the colData() function
colnames(colData(tcga_data))

table(tcga_data@colData$primary_diagnosis)  
table(tcga_data@colData$vital_status)
table(tcga_data@colData$definition)

# RNAseq data can be accessed using the assay() function
dim(assay(tcga_data))     # gene expression matrices.
head(assay(tcga_data)[,1:6]) # expression of first 6 genes and first 6 samples
head(rowData(tcga_data))     # ensembl id and gene id of the first 6 genes. 


# Save the data as a file
saveRDS(object = tcga_data,
        file = "tcga_data.RDS",
        compress = FALSE)
Gdcprepare • 1.1k views
ADD COMMENT
0
Entering edit mode

Are you running this on RStudio? Does the GDCprepare run to completion or does the crash happen before it's done running?

ADD REPLY

Login before adding your answer.

Traffic: 1971 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6