<p><div><div><div><div data-show-faces="false" data-height="21" data-width="100" data-layout="button_count" data-send="true" data-href="https://www.r-bloggers.com/facilitating-exploratory-data-visualization-application-to-tcga-genomic-data/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="http://www.sthda.com/english/wiki/facilitating-exploratory-data-visualization-application-to-tcga-genomic-data"> Easy Guides</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<p></p>
<p>  </p>
<div>
<p></p>
<p>In genomic fields, it’s very common to explore the <strong>gene expression</strong> profile of one or a list of genes involved in a pathway of interest. Here, we present some helper functions in the <a rel="nofollow" href="http://www.sthda.com/english/rpkgs/ggpubr/" target="_blank">ggpubr R package</a> to facilitate <strong>exploratory data analysis</strong> (<strong>EDA</strong>) for life scientists.</p>
<div>
<img alt="Exploratory Data visualization: Gene Expression Data" src="https://i2.wp.com/www.sthda.com/sthda/RDoc/figure/ggpubr/exploratory-data-visualization-logo-1.png?w=450" data-recalc-dims="1">
<p>
Exploratory Data visualization: Gene Expression Data
</p>
</div>
<p>Standard <a rel="nofollow" href="http://www.sthda.com/english/wiki/data-visualization" target="_blank">graphical techniques</a> used in EDA, include:</p>
<ul>
<li>Box plot</li>
<li>Violin plot</li>
<li>Stripchart</li>
<li>Dot plot</li>
<li>Histogram and density plots</li>
<li>ECDF plot</li>
<li>Q-Q plot</li>
</ul>
<p>All these plots can be created using the <a rel="nofollow" href="http://ggplot2.tidyverse.org/reference/" target="_blank"><strong>ggplot2</strong> R package</a>, which is highly flexible.</p>
<p>However, to customize a ggplot, the syntax might appear opaque for a beginner and this raises the level of difficulty for researchers with no advanced R programming skills. If you’re not familiar with ggplot2 system, you can start by reading our <a rel="nofollow" href="http://www.sthda.com/english/wiki/ggplot2-essentials" target="_blank">Guide to Create Beautiful Graphics in R</a>.</p>
<div>
<p>
Previously, we described how to <a rel="nofollow" href="http://www.sthda.com/english/wiki/add-p-values-and-significance-levels-to-ggplots" target="_blank">Add P-values and Significance Levels to ggplots</a>. In this article, we present the <a rel="nofollow" href="http://www.sthda.com/english/rpkgs/ggpubr/" target="_blank">ggpubr package</a>, a wrapper around ggplot2, which provides some easy-to-use functions for creating ‘ggplot2’- based publication ready plots. We’ll use the ggpubr functions to visualize <strong>gene expression</strong> profile from <strong>TCGA</strong> genomic data sets.
</p>
</div>
<p><strong>Contents:</strong></p>
<div>
<ul>
<li><a rel="nofollow" href="http://www.sthda.com/english/wiki/facilitating-exploratory-data-visualization-application-to-tcga-genomic-data#prerequisites" target="_blank">Prerequisites</a></li>
<li><a rel="nofollow" href="http://www.sthda.com/english/wiki/facilitating-exploratory-data-visualization-application-to-tcga-genomic-data#gene-expression-data" target="_blank">Gene expression data</a></li>
<li><a rel="nofollow" href="http://www.sthda.com/english/wiki/facilitating-exploratory-data-visualization-application-to-tcga-genomic-data#box-plots" target="_blank">Box plots</a></li>
<li><a rel="nofollow" href="http://www.sthda.com/english/wiki/facilitating-exploratory-data-visualization-application-to-tcga-genomic-data#violin-plots" target="_blank">Violin plots</a></li>
<li><a rel="nofollow" href="http://www.sthda.com/english/wiki/facilitating-exploratory-data-visualization-application-to-tcga-genomic-data#stripcharts-and-dot-plots" target="_blank">Stripcharts and dot plots</a></li>
<li><a rel="nofollow" href="http://www.sthda.com/english/wiki/facilitating-exploratory-data-visualization-application-to-tcga-genomic-data#density-plots" target="_blank">Density plots</a></li>
<li><a rel="nofollow" href="http://www.sthda.com/english/wiki/facilitating-exploratory-data-visualization-application-to-tcga-genomic-data#histogram-plots" target="_blank">Histogram plots</a></li>
<li><a rel="nofollow" href="http://www.sthda.com/english/wiki/facilitating-exploratory-data-visualization-application-to-tcga-genomic-data#empirical-cumulative-density-function" target="_blank">Empirical cumulative density function</a></li>
<li><a rel="nofollow" href="http://www.sthda.com/english/wiki/facilitating-exploratory-data-visualization-application-to-tcga-genomic-data#quantile---quantile-plot" target="_blank">Quantile – Quantile plot</a></li>
<li><a rel="nofollow" href="http://www.sthda.com/english/wiki/facilitating-exploratory-data-visualization-application-to-tcga-genomic-data#infos" target="_blank">Infos</a></li>
</ul>
</div>
<div>
<h2>Prerequisites</h2>
<div>
<h3>ggpubr package</h3>
<p>Required R package: <a rel="nofollow" href="http://www.sthda.com/english/rpkgs/ggpubr" target="_blank">ggpubr (version >= 0.1.3)</a>.</p>
<ul>
<li>Install from <a rel="nofollow" href="https://cran.r-project.org/package=ggpubr" target="_blank">CRAN</a> as follow:</li>
</ul>
<pre><code>install.packages(&quot;ggpubr&quot;)</code></pre>
<ul>
<li>Or, install the latest developmental version from <a rel="nofollow" href="https://github.com/kassambara/ggpubr" target="_blank">GitHub</a> as follow:</li>
</ul>
<pre><code>if(!require(devtools)) install.packages(&quot;devtools&quot;)
devtools::install_github(&quot;kassambara/ggpubr&quot;)</code></pre>
<ul>
<li>Load ggpubr:</li>
</ul>
<pre><code>library(ggpubr)</code></pre>
</div>
<div>
<h3>TCGA data</h3>
<p><a rel="nofollow" href="https://cancergenome.nih.gov/" target="_blank">The Cancer Genome Atlas (TCGA) data</a> is a publicly available data containing clinical and genomic data across 33 cancer types. These data include gene expression, CNV profiling, SNP genotyping, DNA methylation, miRNA profiling, exome sequencing, and other types of data.</p>
<p>The <a rel="nofollow" href="https://github.com/RTCGA/RTCGA" target="_blank">RTCGA</a> R package, by Marcin Marcin Kosinski et al., provides a convenient solution to access to clinical and genomic data available in TCGA. Each of the data packages is a separate package, and must be installed (once) individually.</p>
<p>The following R code installs the core RTCGA package as well as the clinical and mRNA gene expression data packages.</p>
<pre><code># Load the bioconductor installer. 
source(&quot;https://bioconductor.org/biocLite.R&quot;)

# Install the main RTCGA package
biocLite(&quot;RTCGA&quot;)

# Install the clinical and mRNA gene expression data packages
biocLite(&quot;RTCGA.clinical&quot;)
biocLite(&quot;RTCGA.mRNA&quot;)</code></pre>
<p>To see the type of data available for each cancer type, use this:</p>
<pre><code>library(RTCGA)
infoTCGA()</code></pre>
<pre><code># A tibble: 38 x 13
     Cohort    BCR Clinical     CN   LowP Methylation   mRNA mRNASeq    miR miRSeq   RPPA    MAF rawMAF
 *   </code></pre></div></div></div>