Differential expression analysis of TCGA data based on tumor staging
0
0
Entering edit mode
10 weeks ago
txtbookir ▴ 10

Hi everyone I wanted to analyze TCGA-BRCA data for identifying DEGs in different TNM stages (I to IV) between Normal and Tumor. How to change the following code to get the DEGs based on the staging?

CancerProject <- "TCGA-BRCA"
DataDirectory <- paste0("../GDC/",gsub("-","_",CancerProject))
FileNameData <- paste0(DataDirectory, "_","HTSeq_Counts",".rda")

query <- GDCquery(project = CancerProject,
              data.category = "Transcriptome Profiling",
              data.type = "Gene Expression Quantification", 
              workflow.type = "HTSeq - Counts")

samplesDown <- getResults(query,cols=c("cases"))

dataSmTP <- TCGAquery_SampleTypes(barcode = samplesDown,
                              typesample = "TP")

dataSmNT <- TCGAquery_SampleTypes(barcode = samplesDown,
                              typesample = "NT")


queryDown <- GDCquery(project = CancerProject, 
                  data.category = "Transcriptome Profiling",
                  data.type = "Gene Expression Quantification", 
                  workflow.type = "HTSeq - Counts",
                  barcode = c(dataSmTP, dataSmNT))

GDCdownload(query = queryDown,
        directory = DataDirectory)

dataPrep <- GDCprepare(query = queryDown, 
                   save = TRUE, 
                   directory =  DataDirectory,
                   save.filename = FileNameData)

dataPrep <- TCGAanalyze_Preprocessing(object = dataPrep, 
                                  cor.cut = 0.6,
                                  datatype = "HTSeq - Counts")                      

dataNorm <- TCGAanalyze_Normalization(tabDF = dataPrep,
                                  geneInfo = geneInfoHT,
                                  method = "gcContent") 

dataFilt <- TCGAanalyze_Filtering(tabDF = dataNorm,
                              method = "quantile", 
                              qnt.cut =  0.25)   

dataDEGs <- TCGAanalyze_DEA(mat1 = dataFilt[,dataSmTP],
                        mat2 = dataFilt[,dataSmNT],
                        Cond1type = "Tumor",
                        Cond2type = "Normal",
                        metadata = TRUE,
                        fdr.cut = 0.05 ,
                        logFC.cut = 1,
                        method = "glmLRT")
analysis DEG TCGA • 120 views
ADD COMMENT

Login before adding your answer.

Traffic: 1475 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