### Install TCGAbiolinks from GitHub Source: https://github.com/bioinformaticsfmrp/tcgabiolinks/blob/master/README.md Installation procedure for the latest development versions of TCGAbiolinks and associated GUI data from the GitHub repository. ```R if (!requireNamespace("BiocManager", quietly = TRUE)) install.packages("BiocManager") BiocManager::install("BioinformaticsFMRP/TCGAbiolinksGUI.data") BiocManager::install("BioinformaticsFMRP/TCGAbiolinks") ``` -------------------------------- ### Install TCGAbiolinks Package Source: https://context7.com/bioinformaticsfmrp/tcgabiolinks/llms.txt Instructions for installing the TCGAbiolinks package from Bioconductor or GitHub. This is the prerequisite step for accessing all package functionality. ```r if (!requireNamespace("BiocManager", quietly = TRUE)) install.packages("BiocManager") BiocManager::install("TCGAbiolinks") BiocManager::install("BioinformaticsFMRP/TCGAbiolinksGUI.data") BiocManager::install("BioinformaticsFMRP/TCGAbiolinks") ``` -------------------------------- ### Install TCGAbiolinks via Bioconductor Source: https://github.com/bioinformaticsfmrp/tcgabiolinks/blob/master/README.md Standard installation procedure for the TCGAbiolinks package using the BiocManager utility. This ensures all dependencies are correctly resolved. ```R if (!requireNamespace("BiocManager", quietly = TRUE)) install.packages("BiocManager") BiocManager::install("TCGAbiolinks") ``` -------------------------------- ### Retrieve Molecular Subtypes for TCGA Cancers Source: https://context7.com/bioinformaticsfmrp/tcgabiolinks/llms.txt Fetches published molecular subtype classifications for various TCGA cancer types, as defined by TCGA consortium papers. It supports retrieving subtypes for individual cancer types or all available cancers, and also includes a function to get Pan-Cancer Atlas subtypes. ```r # Get molecular subtypes for a specific cancer subtypes_brca <- TCGAquery_subtype(tumor = "brca") # Supported tumors include: # ACC, BLCA, BRCA, CESC, CHOL, COAD, ESCA, GBM, HNSC, KICH, KIRC, KIRP, # LGG, LIHC, LUAD, LUSC, PAAD, PCPG, PRAD, READ, SARC, SKCM, STAD, THCA, UCEC, UCS, UVM # Get subtypes for all available cancers all_subtypes <- TCGAquery_subtype(tumor = "all") # Get Pan-Cancer Atlas subtypes pancan_subtypes <- PanCancerAtlas_subtypes() ``` -------------------------------- ### Prepare Data with GDCprepare Source: https://context7.com/bioinformaticsfmrp/tcgabiolinks/llms.txt Converts downloaded raw data files into structured R objects like SummarizedExperiment or data frames. This step includes metadata integration and allows for saving the processed results to disk. ```r data_exp <- GDCprepare( query = query_exp, directory = "GDCdata", summarizedExperiment = TRUE ) library(SummarizedExperiment) expression_matrix <- assay(data_exp, "unstranded") sample_info <- colData(data_exp) gene_info <- rowRanges(data_exp) data_met <- GDCprepare( query = query_met, directory = "GDCdata", summarizedExperiment = TRUE ) maf_data <- GDCprepare( query = query_mut, directory = "GDCdata" ) data_exp <- GDCprepare( query = query_exp, save = TRUE, save.filename = "TCGA_BRCA_expression.rda", directory = "GDCdata" ) ``` -------------------------------- ### GDCprepare - Prepare Downloaded Data Source: https://context7.com/bioinformaticsfmrp/tcgabiolinks/llms.txt Reads downloaded GDC files and converts them into analysis-ready R objects. ```APIDOC ## POST GDCprepare ### Description Assembles downloaded data files into a SummarizedExperiment object or data frame. ### Method POST ### Parameters #### Request Body - **query** (object) - Required - The query object used for the download. - **directory** (string) - Required - Directory where files were downloaded. - **summarizedExperiment** (boolean) - Optional - Whether to return a SummarizedExperiment object. - **save** (boolean) - Optional - Whether to save the result to an .rda file. ### Request Example ```r data <- GDCprepare(query = query_exp, directory = "GDCdata", summarizedExperiment = TRUE) ``` ### Response #### Success Response (200) - **object** (SummarizedExperiment/data.frame) - The prepared data ready for downstream analysis. ``` -------------------------------- ### Download GDC Data with GDCdownload Source: https://context7.com/bioinformaticsfmrp/tcgabiolinks/llms.txt Shows how to download data files identified by a query object. It supports multiple methods including direct API calls and the GDC client tool, with options for chunked downloads and token-based authentication for controlled access data. ```r GDCdownload( query = query_exp, method = "api", directory = "GDCdata" ) GDCdownload( query = query_exp, method = "client", directory = "GDCdata" ) GDCdownload( query = query_exp, method = "api", directory = "GDCdata", files.per.chunk = 50 ) GDCdownload( query = query_exp, method = "client", token.file = "gdc-user-token.txt", directory = "GDCdata" ) ``` -------------------------------- ### Complete TCGAbiolinks Analysis Workflow Source: https://context7.com/bioinformaticsfmrp/tcgabiolinks/llms.txt Demonstrates the end-to-end process of querying, downloading, preparing, normalizing, and performing differential expression analysis on TCGA data. ```r library(TCGAbiolinks) library(SummarizedExperiment) query <- GDCquery( project = "TCGA-BRCA", data.category = "Transcriptome Profiling", data.type = "Gene Expression Quantification", workflow.type = "STAR - Counts", sample.type = c("Primary Tumor", "Solid Tissue Normal") ) GDCdownload(query) data <- GDCprepare(query) clinical <- GDCquery_clinic("TCGA-BRCA", type = "clinical") tumor <- TCGAquery_SampleTypes(colnames(data), "TP") normal <- TCGAquery_SampleTypes(colnames(data), "NT") dataNorm <- TCGAanalyze_Normalization( tabDF = assay(data, "unstranded"), geneInfo = geneInfo, method = "geneLength" ) dataFilt <- TCGAanalyze_Filtering( tabDF = dataNorm, method = "quantile", qnt.cut = 0.25 ) DEGs <- TCGAanalyze_DEA( mat1 = dataFilt[, normal], mat2 = dataFilt[, tumor], Cond1type = "Normal", Cond2type = "Tumor", fdr.cut = 0.01, logFC.cut = 1 ) ansEA <- TCGAanalyze_EAcomplete( TFname = "BRCA DEGs", RegulonList = rownames(DEGs) ) ``` -------------------------------- ### Query GDC Data with GDCquery Source: https://context7.com/bioinformaticsfmrp/tcgabiolinks/llms.txt Demonstrates how to search the GDC database for specific cancer data types, including gene expression, DNA methylation, and mutations. The function returns a query object that serves as the foundation for subsequent download and preparation steps. ```r library(TCGAbiolinks) query_exp <- GDCquery( project = "TCGA-BRCA", data.category = "Transcriptome Profiling", data.type = "Gene Expression Quantification", workflow.type = "STAR - Counts" ) query_met <- GDCquery( project = "TCGA-GBM", data.category = "DNA Methylation", platform = "Illumina Human Methylation 450", sample.type = c("Primary Tumor", "Solid Tissue Normal") ) query_mut <- GDCquery( project = "TCGA-COAD", data.category = "Simple Nucleotide Variation", data.type = "Masked Somatic Mutation" ) query_cnv <- GDCquery( project = "TCGA-ACC", data.category = "Copy Number Variation", data.type = "Copy Number Segment" ) query_specific <- GDCquery( project = "TARGET-AML", data.category = "Transcriptome Profiling", data.type = "Gene Expression Quantification", workflow.type = "STAR - Counts", barcode = c("TARGET-20-PADZCG-04A-01R", "TARGET-20-PARJCR-09A-01R") ) getResults(query_exp) ``` -------------------------------- ### Perform Complete Enrichment Analysis (EA) Source: https://context7.com/bioinformaticsfmrp/tcgabiolinks/llms.txt Conducts comprehensive Gene Ontology (GO) and pathway enrichment analysis on a list of genes using Fisher's exact test. It supports Biological Process, Molecular Function, and Cellular Component GO terms, as well as pathways. Results can be visualized using bar plots. ```r # Get list of differentially expressed genes Genelist <- rownames(dataDEGsFiltLevel) # Run complete enrichment analysis ansEA <- TCGAanalyze_EAcomplete( TFname = "DEA genes Normal Vs Tumor", RegulonList = Genelist ) # Access results for each category # ansEA$ResBP # Biological Process # ansEA$ResMF # Molecular Function # ansEA$ResCC # Cellular Component # ansEA$ResPat # Pathways # Visualize enrichment results with bar plots TCGAvisualize_EAbarplot( tf = rownames(ansEA$ResBP), GOBPTab = ansEA$ResBP, GOCCTab = ansEA$ResCC, GOMFTab = ansEA$ResMF, PathTab = ansEA$ResPat, nRGTab = Genelist, nBar = 10, filename = "EA_barplot.pdf" ) ``` -------------------------------- ### Create Oncoprints with TCGAvisualize_oncoprint Source: https://context7.com/bioinformaticsfmrp/tcgabiolinks/llms.txt Visualizes mutation patterns across samples using OncoPrint. It can display mutation frequencies and integrate clinical annotations. ```r TCGAvisualize_oncoprint( mut = maf_data, genes = c("TP53", "PIK3CA", "APC", "KRAS", "BRAF"), filename = "oncoprint.pdf", rm.empty.columns = TRUE, show.row.barplot = TRUE, color = c("background" = "#CCCCCC", "DEL" = "purple", "INS" = "yellow", "SNP" = "brown") ) TCGAvisualize_oncoprint( mut = maf_data, genes = maf_data$Hugo_Symbol[1:20], annotation = clinical[, c("bcr_patient_barcode", "gender", "vital_status")], annotation.position = "bottom", filename = "oncoprint_annotated.pdf" ) ``` -------------------------------- ### GDCdownload - Download GDC Data Source: https://context7.com/bioinformaticsfmrp/tcgabiolinks/llms.txt Downloads the data files identified by a GDCquery object from the GDC portal. ```APIDOC ## POST GDCdownload ### Description Downloads data files from GDC based on the provided query object. ### Method POST ### Parameters #### Request Body - **query** (object) - Required - The query object returned by GDCquery. - **method** (string) - Optional - Download method: "api" or "client". - **directory** (string) - Optional - Local directory to save files. - **token.file** (string) - Optional - Path to GDC user token for controlled access data. ### Request Example ```r GDCdownload(query = query_exp, method = "api", directory = "GDCdata") ``` ``` -------------------------------- ### Download Clinical Data with GDCquery_clinic Source: https://context7.com/bioinformaticsfmrp/tcgabiolinks/llms.txt Downloads clinical information (demographics, diagnoses, treatments, etc.) from the GDC API. It can return a data frame or save the data as a CSV file. Dependencies include the GDC API. Inputs are project name and data type. Outputs are a data frame or a CSV file. ```r # Get clinical data for a TCGA project clinical <- GDCquery_clinic( project = "TCGA-BRCA", type = "clinical", save.csv = FALSE ) # View available clinical columns colnames(clinical) # Includes: submitter_id, age_at_diagnosis, vital_status, days_to_death, # days_to_last_follow_up, gender, race, tumor_stage, etc. # Get biospecimen information biospecimen <- GDCquery_clinic( project = "TCGA-BRCA", type = "biospecimen" ) # Save clinical data to CSV clinical_saved <- GDCquery_clinic( project = "TCGA-LUAD", type = "clinical", save.csv = TRUE # Saves as TCGA-LUAD_clinical.csv ) ``` -------------------------------- ### Create Customizable Heatmaps Source: https://context7.com/bioinformaticsfmrp/tcgabiolinks/llms.txt Generates customizable heatmaps for gene expression or methylation data. This function leverages the ComplexHeatmap package to allow for detailed annotations of samples and genes, providing a powerful visualization tool for high-dimensional omics data. ```r # Example usage for TCGAvisualize_Heatmap would go here. # This function typically requires expression/methylation data and annotations. # TCGAvisualize_Heatmap(data, col_annotation, row_annotation, ...) ``` -------------------------------- ### Create Starburst Plots with TCGAvisualize_starburst Source: https://context7.com/bioinformaticsfmrp/tcgabiolinks/llms.txt Creates a starburst plot to compare DNA methylation and gene expression changes, identifying genes with correlated epigenetic and transcriptional shifts. ```r result <- TCGAvisualize_starburst( met = hypo_hyper, exp = dataDEGsFiltLevel, group1 = "Tumor", group2 = "Normal", exp.p.cut = 0.01, met.p.cut = 0.01, logFC.cut = 1, diffmean.cut = 0.2, genome = "hg38", met.platform = "Illumina Human Methylation 450", names = TRUE, filename = "starburst.pdf" ) ``` -------------------------------- ### Manage Active Menu State with JavaScript Source: https://github.com/bioinformaticsfmrp/tcgabiolinks/blob/master/vignettes/include/after_body.html This JavaScript code snippet dynamically manages the active state of a navigation menu based on the current page's URL. It ensures the correct menu item is highlighted to reflect the user's current location. It relies on jQuery for DOM manipulation. ```javascript $(document).ready(function () { // active menu var href = window.location.pathname; href = href.substr(href.lastIndexOf('/') + 1); if (href === '') href = './'; $('a[href="' + href + '"]' ).parent().addClass('active'); }); ``` -------------------------------- ### Perform Survival Analysis with TCGAbiolinks Source: https://context7.com/bioinformaticsfmrp/tcgabiolinks/llms.txt This snippet demonstrates how to filter clinical data based on patient barcodes and perform survival analysis using the TCGAanalyze_survival function. It assumes the existence of 'clinical' and 'tumor' objects in the R environment. ```R clinical_matched <- clinical[clinical$bcr_patient_barcode %in% substr(tumor, 1, 12), ] clinical_matched$expression_group <- "High" TCGAanalyze_survival(clinical_matched, clusterCol = "expression_group") ``` -------------------------------- ### GDCquery - Query GDC Data Source: https://context7.com/bioinformaticsfmrp/tcgabiolinks/llms.txt Searches the GDC database for genomic data files based on project, category, type, and sample filters. ```APIDOC ## POST GDCquery ### Description Searches the GDC database to find available data files matching specified criteria. ### Method POST (Internal GDC API wrapper) ### Parameters #### Query Parameters - **project** (string) - Required - The TCGA or TARGET project ID (e.g., "TCGA-BRCA"). - **data.category** (string) - Required - The category of data (e.g., "Transcriptome Profiling"). - **data.type** (string) - Optional - Specific data type within the category. - **workflow.type** (string) - Optional - The processing pipeline used. - **barcode** (vector) - Optional - Specific sample barcodes to filter by. ### Request Example ```r query <- GDCquery(project = "TCGA-BRCA", data.category = "Transcriptome Profiling", data.type = "Gene Expression Quantification") ``` ### Response #### Success Response (200) - **query_object** (object) - A GDCquery object containing the search results. ``` -------------------------------- ### Create Heatmaps with TCGAvisualize_Heatmap Source: https://context7.com/bioinformaticsfmrp/tcgabiolinks/llms.txt Generates heatmaps for gene expression or methylation data. It supports sample annotation, clustering, and Z-score scaling for expression data. ```r TCGAvisualize_Heatmap( data = dataFilt[1:50, ], col.metadata = data.frame( patient = substr(colnames(dataFilt), 1, 12), type = ifelse(grepl("-01", colnames(dataFilt)), "Tumor", "Normal") ), col.colors = list(type = c("Tumor" = "red", "Normal" = "blue")), type = "expression", scale = "row", show_row_names = TRUE, show_column_names = FALSE, cluster_rows = TRUE, cluster_columns = TRUE, filename = "heatmap.pdf" ) TCGAvisualize_Heatmap( data = assay(data_met)[1:100, ], type = "methylation", color.levels = c("blue", "white", "red"), filename = "methylation_heatmap.pdf" ) ``` -------------------------------- ### Apply Bootstrap Table Styles with JavaScript Source: https://github.com/bioinformaticsfmrp/tcgabiolinks/blob/master/vignettes/include/after_body.html This JavaScript code snippet applies Bootstrap table styling to Pandoc-generated tables. It targets table rows with the class 'header' and applies 'table table-condensed' classes to the parent table element for improved presentation. It requires jQuery. ```javascript $(document).ready(function () { $('tr.header').parent('thead').parent('table').addClass('table table-condensed'); }); ``` -------------------------------- ### Normalize RNA-Seq Data with TCGAanalyze_Normalization Source: https://context7.com/bioinformaticsfmrp/tcgabiolinks/llms.txt Normalizes RNA-Seq count data using EDASeq package methods. It supports normalization by gene length or GC content to account for technical variations. Requires gene information and expression data (tabDF). Outputs normalized expression matrix. ```r # Load gene information (included in package) data("geneInfo") # For arrays data("geneInfoHT") # For RNA-Seq # Normalize by gene length (recommended for RNA-Seq) dataNorm <- TCGAanalyze_Normalization( tabDF = assay(data_exp), geneInfo = geneInfo, method = "geneLength" ) # Normalize by GC content dataNorm_gc <- TCGAanalyze_Normalization( tabDF = assay(data_exp), geneInfo = geneInfo, method = "gcContent" ) ``` -------------------------------- ### Differential Expression Analysis with TCGAanalyze_DEA Source: https://context7.com/bioinformaticsfmrp/tcgabiolinks/llms.txt Performs differential expression analysis (DEA) between two groups of samples (e.g., tumor vs. normal) using either edgeR or limma pipelines. It identifies differentially expressed genes based on fold change and FDR cutoffs. Requires sample group matrices and analysis parameters. ```r # Separate tumor and normal samples samplesNT <- TCGAquery_SampleTypes(colnames(dataFilt), typesample = c("NT")) samplesTP <- TCGAquery_SampleTypes(colnames(dataFilt), typesample = c("TP")) # DEA using edgeR exactTest (default) dataDEGs <- TCGAanalyze_DEA( mat1 = dataFilt[, samplesNT], mat2 = dataFilt[, samplesTP], Cond1type = "Normal", Cond2type = "Tumor", pipeline = "edgeR", method = "exactTest", fdr.cut = 0.01, logFC.cut = 1 ) # DEA using edgeR glmLRT method dataDEGs_glm <- TCGAanalyze_DEA( mat1 = dataFilt[, samplesNT], mat2 = dataFilt[, samplesTP], Cond1type = "Normal", Cond2type = "Tumor", pipeline = "edgeR", method = "glmLRT", fdr.cut = 0.01, logFC.cut = 1 ) # DEA using limma pipeline dataDEGs_limma <- TCGAanalyze_DEA( mat1 = dataFilt[, samplesNT], mat2 = dataFilt[, samplesTP], Cond1type = "Normal", Cond2type = "Tumor", pipeline = "limma", voom = TRUE, fdr.cut = 0.01, logFC.cut = 1 ) # View results: logFC, logCPM, PValue, FDR head(dataDEGs) ``` -------------------------------- ### Perform Gene-based Survival Analysis (KM) Source: https://context7.com/bioinformaticsfmrp/tcgabiolinks/llms.txt Conducts univariate Kaplan-Meier survival analysis for a list of genes to identify those associated with patient survival based on their expression levels. It requires clinical data and a gene expression matrix, allowing for threshold customization for high and low expression groups. ```r # Prepare gene expression matrix (log2 transformed) dataBRCAcomplete <- log2(dataFilt + 1) # Run survival analysis for gene list tabSurvKM <- TCGAanalyze_SurvivalKM( clinical_patient = clinical, dataGE = dataBRCAcomplete, Genelist = rownames(dataBRCAcomplete)[1:100], Survresult = FALSE, p.cut = 0.05, ThreshTop = 0.67, # Upper quantile for "high" expression ThreshDown = 0.33, # Lower quantile for "low" expression group1 = normal_samples, group2 = tumor_samples ) # View genes associated with survival head(tabSurvKM) # Columns: Cancer Deaths, Mean Normal, Mean Tumor Top/Down, pvalue ``` -------------------------------- ### Filter Samples by Type with TCGAquery_SampleTypes Source: https://context7.com/bioinformaticsfmrp/tcgabiolinks/llms.txt Filters TCGA/TARGET barcodes to select samples matching specified tissue types (e.g., primary tumor, normal tissue). This is crucial for separating sample groups for downstream analysis. It takes a vector of barcodes and desired sample types as input, returning filtered barcodes. ```r # Get sample barcodes from prepared data barcodes <- colnames(data_exp) # Select primary tumor samples (TP = Primary Tumor, code 01) tumor_samples <- TCGAquery_SampleTypes( barcode = barcodes, typesample = c("TP") ) # Select normal tissue samples (NT = Solid Tissue Normal, code 11) normal_samples <- TCGAquery_SampleTypes( barcode = barcodes, typesample = c("NT") ) # Select multiple sample types tumor_recurrent <- TCGAquery_SampleTypes( barcode = barcodes, typesample = c("TP", "TR") # Primary and Recurrent tumors ) # Common tissue type codes: # TP - Primary solid Tumor (01) # TR - Recurrent solid Tumor (02) # NT - Solid Tissue Normal (11) # NB - Blood Derived Normal (10) # TM - Metastatic (06) ``` -------------------------------- ### Perform Survival Analysis Source: https://context7.com/bioinformaticsfmrp/tcgabiolinks/llms.txt Generates Kaplan-Meier survival curves with log-rank test p-values. This function requires clinical data containing vital status and survival time information. It allows for survival analysis based on different clinical variables and provides options for risk tables and confidence intervals. ```r # Prepare clinical data with grouping variable clinical$group <- ifelse( clinical$age_at_diagnosis > 60, "Older", "Younger" ) # Create survival plot by age group TCGAanalyze_survival( data = clinical, clusterCol = "group", main = "Survival by Age Group", legend = "Age Group", filename = "survival_age.pdf", risk.table = TRUE, pvalue = TRUE, conf.int = TRUE ) # Survival analysis with custom colors TCGAanalyze_survival( data = clinical, clusterCol = "gender", main = "Survival by Gender", color = c("pink", "lightblue"), filename = "survival_gender.pdf", risk.table = FALSE, conf.int = FALSE, xlim = c(0, 3000) ) ``` -------------------------------- ### Create Volcano Plots with TCGAVisualize_volcano Source: https://context7.com/bioinformaticsfmrp/tcgabiolinks/llms.txt Generates volcano plots to identify significant genes in differential expression or methylation studies based on fold change and p-value thresholds. ```r TCGAVisualize_volcano( x = dataDEGs$logFC, y = dataDEGs$FDR, x.cut = 1, y.cut = 0.01, title = "DEA Tumor vs Normal", xlab = expression(paste(Log[2], "FoldChange")), filename = "volcano_expression.pdf" ) TCGAVisualize_volcano( x = dataDEGsFiltLevel$logFC, y = dataDEGsFiltLevel$FDR, x.cut = 2, y.cut = 0.001, names = rownames(dataDEGsFiltLevel), show.names = "significant", names.fill = TRUE, filename = "volcano_labeled.pdf" ) ``` -------------------------------- ### Annotate DEGs with Expression Levels using TCGAanalyze_LevelTab Source: https://context7.com/bioinformaticsfmrp/tcgabiolinks/llms.txt Enhances the results of differential expression analysis by adding mean expression values for each condition (e.g., normal and tumor). This helps in evaluating the biological significance of differentially expressed genes alongside their statistical significance. It takes DEG results and expression data as input. -------------------------------- ### Filter Low Expression Genes with TCGAanalyze_Filtering Source: https://context7.com/bioinformaticsfmrp/tcgabiolinks/llms.txt Filters out lowly expressed genes from expression data to reduce noise and improve statistical power. It offers methods like quantile-based filtering and variance-based filtering, or custom thresholds. Takes normalized expression data and filtering parameters as input. ```r # Filter genes by quantile (keep genes with mean above 25th percentile) dataFilt <- TCGAanalyze_Filtering( tabDF = dataNorm, method = "quantile", qnt.cut = 0.25 ) # Filter by variance (keep top 75% most variable genes) dataFilt_var <- TCGAanalyze_Filtering( tabDF = dataNorm, method = "varFilter", var.cutoff = 0.75 ) # Filter with custom eta and fold change thresholds dataFilt_custom <- TCGAanalyze_Filtering( tabDF = dataNorm, method = "filter1", eta = 0.05, foldChange = 1 ) ``` -------------------------------- ### Identify Differentially Methylated CpGs (DMC) Source: https://context7.com/bioinformaticsfmrp/tcgabiolinks/llms.txt Identifies differentially methylated CpG sites between two sample groups (e.g., Tumor vs. Normal) using the Wilcoxon rank-sum test. It generates a volcano plot to visualize the results and returns a table with methylation statistics, including adjusted p-values and mean methylation differences. ```r # Prepare methylation SummarizedExperiment with groups colData(data_met)$group <- c( rep("Tumor", sum(grepl("-01", colnames(data_met)))), rep("Normal", sum(grepl("-11", colnames(data_met)))) ) # Find differentially methylated CpGs hypo_hyper <- TCGAanalyze_DMC( data = data_met, groupCol = "group", group1 = "Tumor", group2 = "Normal", p.cut = 0.01, diffmean.cut = 0.2, cores = 4, plot.filename = "methylation_volcano.pdf" ) # Results include: mean per group, diffmean, p.value, p.value.adj, status # Status: "Hypermethylated in Tumor", "Hypomethylated in Tumor", "Not Significant" ``` -------------------------------- ### Add Expression Level Information to DEG Results Source: https://context7.com/bioinformaticsfmrp/tcgabiolinks/llms.txt Adds expression level information (mean expression for tumor and normal samples) to a filtered differential gene expression (DEG) results table. This function helps in understanding the magnitude of expression changes for DEGs. ```r dataDEGsFiltLevel <- TCGAanalyze_LevelTab( FC_FDR_table_mRNA = dataDEGs, typeCond1 = "Tumor", typeCond2 = "Normal", TableCond1 = dataFilt[, samplesTP], TableCond2 = dataFilt[, samplesNT] ) # Results include: mRNA, logFC, FDR, Tumor (mean), Normal (mean), Delta head(dataDEGsFiltLevel) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.