<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD Journal Publishing DTD v2.3 20070202//EN" "journalpublishing.dtd">
<article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" article-type="research-article">
<front>
<journal-meta>
<journal-id journal-id-type="publisher-id">Front. Genet.</journal-id>
<journal-title>Frontiers in Genetics</journal-title>
<abbrev-journal-title abbrev-type="pubmed">Front. Genet.</abbrev-journal-title>
<issn pub-type="epub">1664-8021</issn>
<publisher>
<publisher-name>Frontiers Media S.A.</publisher-name>
</publisher>
</journal-meta>
<article-meta>
<article-id pub-id-type="doi">10.3389/fgene.2016.00225</article-id>
<article-categories>
<subj-group subj-group-type="heading">
<subject>Genetics</subject>
<subj-group>
<subject>Technology Report</subject>
</subj-group>
</subj-group>
</article-categories>
<title-group>
<article-title>Extending the R Library <italic>PROPER</italic> to Enable Power Calculations for Isoform-Level Analysis with <italic>EBSeq</italic></article-title>
</title-group>
<contrib-group>
<contrib contrib-type="author" corresp="yes">
<name><surname>Gaye</surname> <given-names>Amadou</given-names></name>
<xref ref-type="author-notes" rid="fn001"><sup>&#x0002A;</sup></xref>
<uri xlink:href="http://loop.frontiersin.org/people/335148/overview"/>
</contrib>
</contrib-group>
<aff><institution>Metabolic, Cardiovascular and Inflammatory Disease Genomics Branch, National Human Genome Research Institute</institution> <country>Bethesda, MD, USA</country></aff>
<author-notes>
<fn fn-type="edited-by"><p>Edited by: Herbert Pang, University of Hong Kong, Hong Kong</p></fn>
<fn fn-type="edited-by"><p>Reviewed by: Claudia Angelini, Istituto per le Applicazioni del Calcolo Mauro Picone (CNR), Italy; Yan Guo, Vanderbilt University, USA</p></fn>
<fn fn-type="corresp" id="fn001"><p>&#x0002A;Correspondence: Amadou Gaye <email>amadou.gaye&#x00040;nih.gov</email></p></fn>
<fn fn-type="other" id="fn002"><p>This article was submitted to Bioinformatics and Computational Biology, a section of the journal Frontiers in Genetics</p></fn></author-notes>
<pub-date pub-type="epub">
<day>10</day>
<month>01</month>
<year>2017</year>
</pub-date>
<pub-date pub-type="collection">
<year>2016</year>
</pub-date>
<volume>7</volume>
<elocation-id>225</elocation-id>
<history>
<date date-type="received">
<day>29</day>
<month>09</month>
<year>2016</year>
</date>
<date date-type="accepted">
<day>15</day>
<month>12</month>
<year>2016</year>
</date>
</history>
<permissions>
<copyright-statement>Copyright &#x000A9; 2017 Gaye.</copyright-statement>
<copyright-year>2017</copyright-year>
<copyright-holder>Gaye</copyright-holder>
<license xlink:href="http://creativecommons.org/licenses/by/4.0/"><p>This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) or licensor are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.</p></license>
</permissions>
<abstract><p>RNA-Sequencing (RNA-Seq) has become a routine technology for investigating gene expression differences in comparative transcriptomic studies. Differential expression (DE) analysis of the isoforms of genes is just emerging now that expression (read counts) can be estimated with higher accuracy at the isoform level. Estimating the statistical power that can be achieved with a specific number of repeats is a key step in RNA-Seq analysis. The R library proper was developed to provide realistic empirical power analysis. However, proper uses differential expression methods more suited for power calculation of gene-level expression data. We propose extensions to this tool that would allow for power analysis which takes into account the specificities of isoforms expression. This was achieved by enabling the use of <italic>EBSeq</italic>, a DE approach well-tailored for isoform-level expression, as an additional analysis method within <italic>PROPER</italic>. The new extensions and exemplar code for their usage are freely available online at: <ext-link ext-link-type="uri" xlink:href="https://github.com/agaye/proper_extension">https://github.com/agaye/proper_extension</ext-link></p></abstract>
<kwd-group>
<kwd>mRNA</kwd>
<kwd>isoforms</kwd>
<kwd>statistical power</kwd>
<kwd>differential expression analysis</kwd>
<kwd>transcription</kwd>
<kwd>genetic</kwd>
</kwd-group>
<counts>
<fig-count count="1"/>
<table-count count="1"/>
<equation-count count="0"/>
<ref-count count="7"/>
<page-count count="5"/>
<word-count count="2984"/>
</counts>
</article-meta>
</front>
<body>
<sec sec-type="intro" id="s1">
<title>Introduction</title>
<p>PROspective Power Evaluation (<italic>PROPER</italic>) (Wu et al., <xref ref-type="bibr" rid="B7">2015</xref>) is an R library developed for power calculations in RNA-seq differential expression (DE) analysis. It allows one to determine the probability of finding a true variation in expression between two groups (e.g., cases and controls). In addition to the usual parameters included in power estimation such as sample size, effect size, and within-group variance, <italic>PROPER</italic> takes into account other keys characteristics of count data that influence power including the distribution of the mean expression level, the sequencing depth and the threshold for filtering out molecules. By not treating these critical factors as fixed input, the tool avoids strong assumptions such as exchangeability between genes and hence provides more realistic statistical power estimations (Wu et al., <xref ref-type="bibr" rid="B7">2015</xref>) than other methods and closed-form solutions. <italic>PROPER</italic> uses existing DE analysis methods including <italic>edgeR</italic> (Robinson et al., <xref ref-type="bibr" rid="B5">2010</xref>), <italic>DESeq</italic> (Anders and Huber, <xref ref-type="bibr" rid="B1">2010</xref>; Love et al., <xref ref-type="bibr" rid="B3">2014</xref>), and <italic>DSS</italic> (Wu et al., <xref ref-type="bibr" rid="B6">2013</xref>). However, these methods are better suited for gene-level (the summed expression of the distinct isoforms of a transcript) DE analysis because they were not designed to accommodate the differential uncertainty in isoform expression estimation (Leng et al., <xref ref-type="bibr" rid="B2">2013</xref>). A useful extension to <italic>PROPER</italic> would be to include in its machinery a tool such as <italic>EBSeq</italic> that takes into account specificities of isoform-level expression data. <italic>EBSeq</italic> uses an empirical Bayesian approach to model a number of features observed in RNA-seq. This tool is more suited for isoform level inference because it accommodates isoform expression estimation uncertainty by modeling the differential variability observed in distinct groups of isoforms (Leng et al., <xref ref-type="bibr" rid="B2">2013</xref>) and takes into account colinearity between isoforms originating from the same transcript. In <italic>EBSeq</italic>, a posterior probability of being differentially expressed (PPDE) is computed as measure of statistical significance.</p>
</sec>
<sec sec-type="materials and methods" id="s2">
<title>Materials and methods</title>
<p>We amended two functions of <italic>PROPER</italic> (<monospace>runSims</monospace> and <monospace>powerPlot</monospace>) and wrote two additional functions (<monospace>run.EBSeq</monospace> and <monospace>plotFDR</monospace>) to enable power calculations that require <italic>EBSeq</italic> and to add new functionality.</p>
<sec>
<title>runSims</title>
<p>This is the simulation function of the package <italic>PROPER</italic>; it carries out simulations for a specified number of runs and for a given sample size (two groups of equal size). At each run, a dataset which has the characteristics of the data being investigated is generated and analyzed, i.e., transcripts differentially expressed between the two groups are detected, using one of the differential expression (DE) analysis methods currently available in <italic>PROPER</italic> (<italic>edgeR, DSS</italic> and <italic>DEseq</italic>). After each run the names of the transcripts differentially expressed are returned along with their <italic>p</italic>-value, log fold change and FDR.</p>
<p>The extensions we are proposing consist of changing the argument/parameter that specifies the DE method to add <italic>EBSeq</italic> to the list of methods and altering the core of the function to enable DE analysis using <italic>EBSeq</italic>. Since for isoform analysis, unlike gene-level analysis, isoform names are required in addition to the gene name, we inserted a check to ensure this requirement is met to prevent the function from crashing if input tables similar to those for <italic>edgeR, DEseq</italic>, and <italic>DSS</italic> are provided while <italic>EBSeq</italic> is specified as DE analysis method.</p>
<p>In the implementation of <italic>EBSeq</italic> we enabled within <monospace>runSims</monospace>, transcripts significantly differentially expressed are those with PPDE &#x02265; (1&#x02013;alpha) where alpha (type I error rate) is set to 0.05; a value that can be changed in the code we provided. In this setting significance is based on alpha so that all transcripts with FDR &#x02264; alpha are considered significantly differentially expressed and FDR is similar to the idea of bonferroni correction. However it is important to note that <italic>EBSeq</italic> does not require extra multiple test adjustment since it uses a single large model to test all transcripts simultaneously rather than a model testing one gene at a time (Leng et al., <xref ref-type="bibr" rid="B2">2013</xref>). Alpha is also called target FDR which in the setting we described is based on a hard threshold. <italic>EBSeq</italic> offers the possibility to compute a soft threshold via the function <monospace>crit_fun</monospace> described in its <ext-link ext-link-type="uri" xlink:href="https://www.rdocumentation.org/packages/EBSeq/versions/1.12.0">R manual</ext-link>.</p>
</sec>
<sec>
<title>run.EBSeq</title>
<p>This is the function we wrote to carry out <italic>EBSeq</italic> isoform analysis within <italic>runSims</italic>. It is analogous to the other three functions that can be called to run DE analysis using <italic>egdeR, DEseq</italic>, and <italic>DSS</italic>. The function analyzes the simulated isoform expression data and outputs a matrix with all the transcript, <italic>p</italic>-values, log fold changes, FDR values, and other statistics. This information is then subsequently passed on respectively to <monospace>comparePower</monospace>, <monospace>powerPlot</monospace> and <monospace>plotFDR</monospace> to evaluate power and generate graphs. <monospace>comparePower</monospace> is central to <italic>PROPER</italic> as it is the function that computes power by evaluating the success rate over the multiple simulation runs. Success rate is determined by comparing the <italic>p</italic>-values to the specified type I error rate (alpha) to reject to null hypothesis. More details about this function are available from <italic>PROPER</italic> tutorial document.</p>
</sec>
<sec>
<title>powerplot and plotFDR</title>
<p>Our changes to the function <monospace>powerPlot</monospace> consisted mainly in amendments to allow for the plotting of just one curve instead of multiple curves (one per sample size considered) and minor additions related to the visualization of the curves. The function <monospace>plotFDR</monospace> is similar to <monospace>powerPlot</monospace> save it plots FDR curves. There is a function of the same name in <italic>PROPER</italic> and hopefully, the code we generated can be integrated into that function to enable the additional features we introduced.</p>
</sec>
</sec>
<sec sec-type="conclusions" id="s3">
<title>Conclusions</title>
<p>We extended the package <italic>PROPER</italic> to allow for transcript isoform analysis and have a more comprehensive tool. It is important to note that for this work we made sure we followed the strategy and nomenclature of the authors of <italic>PROPER</italic> as to not disrupt their excellent work and to make potential future integration of the new functions into their R library easy; and this is the very reason why we kept our code basic as more complexity for increased flexibility could render future integrative more cumbersome. However, until that integration takes place the current functions can be used as standalone scripts that call elements required from <italic>PROPER</italic> and <italic>EBSeq</italic> to carry out statistical power analysis for isoform-level RNA-seq expression data. We also provide a succinct tutorial as a guide for using the new functions. The code in the guide on section guide to using the extensions of this manuscript and the rest of the material (scripts and functions) are available from GitHub at: <ext-link ext-link-type="uri" xlink:href="https://github.com/agaye/PROPER_Extension">https://github.com/agaye/PROPER_Extension</ext-link></p>
</sec>
<sec id="s4">
<title>Guide to using the extensions</title>
<sec>
<title>Preamble</title>
<p>The aim of this short guide is to demonstrate the use of the new extensions to compute statistical power for isoform expression data using the <italic>EBSeq</italic> approach. An excellent <italic>PROPER</italic> tutorial is available online at: <ext-link ext-link-type="uri" xlink:href="https://www.bioconductor.org/packages/devel/bioc/vignettes/PROPER/inst/doc/PROPER.pdf">https://www.bioconductor.org/packages/devel/bioc/vignettes/PROPER/inst/doc/PROPER.pdf</ext-link></p>
<p>This documentation along with the <ext-link ext-link-type="uri" xlink:href="https://www.bioconductor.org/packages/release/bioc/manuals/PROPER/man/PROPER.pdf">R manual of the <italic>PROPER</italic> package</ext-link> provides a detailed explanation of the parameters we set in the code on this document. Therefore, the arguments required by <italic>PROPER</italic> functions used in this tutorial will not be explained with great details. Similarly we refer the user to <italic>EBSeq</italic> documentation (<ext-link ext-link-type="uri" xlink:href="https://www.rdocumentation.org/packages/EBSeq/versions/1.12.0">https://www.rdocumentation.org/packages/EBSeq/versions/1.12.0</ext-link>) for a deeper understanding of that method.</p>
<p>The data used in this guide (see Supplementary Material Datasheet <xref ref-type="supplementary-material" rid="SM1">1</xref>) and the scenario investigated are just meant for demonstration and are by no means biologically meaningful. They are only meant to help understand the formats of the input data and the steps to evaluate statistical power and visualize the results.</p>
<p>It is important to note that a real world analysis typically includes more than 10,000 genes and a <italic>PROPER</italic> analysis of such large data can be computationally slow. For example an analysis of 15,000 genes undertaken with 50 simulation runs on a machine with 8GB memory took 2 hours to complete. This is because, in addition to the iterative process of <italic>PROPER</italic>, each model fit in <italic>EBSeq</italic> takes 2 or more iterations to reach convergence. The high computational cost represents a limitation; but we believe this weakness is worth the more realistic results achieved through this approach.</p>
</sec>
<sec>
<title>Input data</title>
<p>The data simulated and analyzed is a matrix where the first 2 columns of the table hold isoforms and transcripts IDs. The process is stopped and a message printed on screen if the information in these 2 columns is missing while the user has specified <italic>EBSeq</italic> as DE analysis method. For the extensions presented in the manuscript to run, the names of the first two columns must be &#x0201C;transcript_id&#x0201D; and &#x0201C;gene_id&#x0201D; and the IDs in the first column must be unique; here we used UCSC IDs but other names such as RefSeq IDs are also valid. The rest of the columns holds sample IDs. As shown below, rows store isoform expression values for the samples in the columns.</p>
<p>The toy data used in this demonstration (Table <xref ref-type="table" rid="T1">1</xref>) consist of the expression of 208 isoforms across 8 samples (2 groups: 4 cases and 4 controls). The first 4 samples (ID1 to ID4) represent to control group whilst ID5 to ID10 are the case group. <italic>PROPER</italic> requires an equal size for the 2 groups (e.g., cases and controls).</p>
<table-wrap position="float" id="T1">
<label>Table 1</label>
<caption><p><bold>Six of the 8 columns and first 5 rows (5 isoforms of 2 transcripts) of the toy data</bold>.</p></caption>
<table frame="hsides" rules="groups">
<thead><tr>
<th valign="top" align="left"><bold>Transcript_id</bold></th>
<th valign="top" align="left"><bold>Gene_id</bold></th>
<th valign="top" align="center"><bold>ID1</bold></th>
<th valign="top" align="center"><bold>ID2</bold></th>
<th valign="top" align="center"><bold>ID3</bold></th>
<th valign="top" align="center"><bold>ID4</bold></th>
<th valign="top" align="center"><bold>ID5</bold></th>
<th valign="top" align="center"><bold>ID6</bold></th>
</tr>
</thead>
<tbody>
<tr>
<td valign="top" align="left">uc003ceg.2</td>
<td valign="top" align="left"><ext-link ext-link-type="DDBJ/EMBL/GenBank" xlink:href="AZI2">AZI2</ext-link></td>
<td valign="top" align="center">42</td>
<td valign="top" align="center">35</td>
<td valign="top" align="center">30</td>
<td valign="top" align="center">13</td>
<td valign="top" align="center">29</td>
<td valign="top" align="center">24</td>
</tr>
<tr>
<td valign="top" align="left">uc011axd.1</td>
<td valign="top" align="left"><ext-link ext-link-type="DDBJ/EMBL/GenBank" xlink:href="AZI2">AZI2</ext-link></td>
<td valign="top" align="center">31</td>
<td valign="top" align="center">72</td>
<td valign="top" align="center">23</td>
<td valign="top" align="center">29</td>
<td valign="top" align="center">37</td>
<td valign="top" align="center">49</td>
</tr>
<tr>
<td valign="top" align="left">uc003ceb.3</td>
<td valign="top" align="left"><ext-link ext-link-type="DDBJ/EMBL/GenBank" xlink:href="AZI2">AZI2</ext-link></td>
<td valign="top" align="center">1085</td>
<td valign="top" align="center">1190</td>
<td valign="top" align="center">843</td>
<td valign="top" align="center">707</td>
<td valign="top" align="center">806</td>
<td valign="top" align="center">948</td>
</tr>
<tr>
<td valign="top" align="left">uc003yky.3</td>
<td valign="top" align="left"><ext-link ext-link-type="DDBJ/EMBL/GenBank" xlink:href="AZIN1">AZIN1</ext-link></td>
<td valign="top" align="center">3622</td>
<td valign="top" align="center">4095</td>
<td valign="top" align="center">2857</td>
<td valign="top" align="center">2750</td>
<td valign="top" align="center">2866</td>
<td valign="top" align="center">3458</td>
</tr>
<tr>
<td valign="top" align="left">uc003ykx.3</td>
<td valign="top" align="left"><ext-link ext-link-type="DDBJ/EMBL/GenBank" xlink:href="AZIN1">AZIN1</ext-link></td>
<td valign="top" align="center">2043</td>
<td valign="top" align="center">1943</td>
<td valign="top" align="center">1500</td>
<td valign="top" align="center">981</td>
<td valign="top" align="center">1206</td>
<td valign="top" align="center">1569</td>
</tr>
</tbody>
</table>
</table-wrap>
<p>Along with this table we provide 3 variables (AveLogCPM, logDispersion, libCount) which represent respectively the log average Count Per Million [average expression of each isoform, CPM &#x0003D; count/sum (counts) x 1 million] log taqwise (genewise) dispersion (dispersion value for each isoform) and the depth of the data (the total count for each sample). This information gives the characteristics of &#x0201C;real&#x0201D; data (actually some hypothetical data) we are analyzing. As already mentioned these parameters are explained with ample details in the <italic>PROPER</italic> tutorial and Manual. For this tutorial we obtained the characteristics of our data from a pilot analysis but as explained by Wu et al. one may also set these parameters based on literature or other sources.</p>
</sec>
<sec>
<title>Power analysis</title>
<p>In <italic>PROPER</italic>, power analysis is carried out in 3 steps: First the simulation scenario is set up then the simulated data are generated with the characteristics of the real data and finally the power is evaluated.</p>
<p>Let us begin by loading the R libraries and functions required. We load the package <italic>edgeR</italic> because we use the Trimmed mean of M-values normalization (TMM) method embedded in that library to normalize the data in the <italic>EBSeq</italic> analysis step.</p>
<preformat>
&#x000A0;&#x000A0;&#x0003E;&#x000A0;library(PROPER)
&#x000A0;&#x000A0;&#x0003E;&#x000A0;library(EBSeq)
&#x000A0;&#x000A0;&#x0003E;&#x000A0;library(edgeR)
&#x000A0;&#x000A0;&#x0003E;&#x000A0;source(&#x00022;run.EBSeq.R&#x00022;)
&#x000A0;&#x000A0;&#x0003E;&#x000A0;source(&#x00022;runSims_ag.R&#x00022;)
&#x000A0;&#x000A0;&#x0003E;&#x000A0;source(&#x00022;plotPower_ag.R&#x00022;)
&#x000A0;&#x000A0;&#x0003E;&#x000A0;source(&#x00022;plotFDR_ag.R&#x00022;)
</preformat>
<p>Now we load the characteristics of our &#x0201C;real&#x0201D; data and the estimated log fold change of the differentially expressed isoforms which represent a proportion (propDE) of 6% of all the isoforms.</p>
<p>In a real world power analysis it is probably better to obtain these characteristics and a rough estimate of the number of differentially transcripts and their fold change difference from the real data by running a preliminary DE analysis. In such case the analyst can:</p>
<list list-type="order">
<list-item><p>Estimate dispersion for each transcript (&#x0201C;genewise&#x0201D; dispersion); this is possible by using for example the empirical Bayes strategy (McCarthy et al., <xref ref-type="bibr" rid="B4">2012</xref>) implemented in <italic>edgeR</italic>. Dispersion outliers should not be considered in the results or should be interpreted with caution because outlying dispersion can indicate low quality.</p></list-item>
<list-item><p>Compute the average expression of each transcript by fitting a binomial generalized log-linear model to the expression data (read counts); in such model the dispersion parameter takes the dispersion values calculated as explained in (1). This is possible using the implementation, in <italic>edgeR</italic>, of generalized linear model, GLM (McCarthy et al., <xref ref-type="bibr" rid="B4">2012</xref>).</p></list-item>
<list-item><p>Obtain an estimate of the number of DE transcripts and their log fold change difference from the results of the GLM fit in <italic>edgeR</italic> or from a preliminary DE analysis in <italic>EBSeq</italic>.</p></list-item>
</list>
<preformat>
&#x000A0;&#x000A0;&#x0003E;&#x000A0;load(&#x00022;toy_data.RData&#x00022;)
&#x000A0;&#x000A0;&#x0003E;&#x000A0;load(&#x00022;AveLogCPM.RData&#x00022;)
&#x000A0;&#x000A0;&#x0003E;&#x000A0;load(&#x00022;logDispersion.RData&#x00022;)
&#x000A0;&#x000A0;&#x0003E;&#x000A0;load(&#x00022;libCount.RData&#x00022;)
&#x000A0;&#x000A0;&#x0003E;&#x000A0;load(&#x00022;logFC.RData&#x00022;)
&#x000A0;&#x000A0;&#x0003E;&#x000A0;propDE&#x000A0; &#x0003C;-&#x000A0;0.06
&#x000A0;
</preformat>
<p>Set the simulation i.e. generate an object that stores the parameters of the simulations.</p>
<preformat>
&#x000A0;&#x000A0;&#x0003E;&#x000A0;mm&#x000A0; &#x0003C;-&#x000A0;RNAseq.SimOptions.2grp(
&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;Ngenes&#x000A0;=&#x000A0;dim(toy_expr)[1],
&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;lBaselineExpr&#x000A0;=&#x000A0;AveLogCPM,
&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;seqDepth&#x000A0;=&#x000A0;libCount,
&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;lOD&#x000A0;=&#x000A0;logDispersion,
&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;p.DE=propDE,&#x000A0;lfc=logFC,
&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;sim.seed=123)
</preformat>
<p>We now can run the simulation, generating n datasets, where n is the number of simulation runs, and analyzing each dataset. We set the number of runs to 20 but in real world example one should select at least 50 runs and the larger the number of runs the more reliable the results are. The argument &#x0201C;Nreps&#x0201D; represents the number of case-control pairs (4 in the toy data). The function returns <italic>p</italic>-values and FDR values for each simulation run.</p>
<preformat>
&#x000A0;&#x000A0;runSimsResults&#x000A0; &#x0003C;-&#x000A0;runSims_ag(Nreps=4,
&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;sim.opts=mm,
&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;DEmethod=&#x00022;EBSeq&#x00022;,
&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;isoforms=toy_data[,c(1,2)],
&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;nsims=20)
</preformat>
<p>Finally power is evaluated across all the runs and the results graphically displayed. The arguments and output of the below function are described in details in the <ext-link ext-link-type="uri" xlink:href="https://www.bioconductor.org/packages/release/bioc/manuals/PROPER/man/PROPER.pdf">R manual for <italic>PROPER</italic></ext-link>; briefly: The function returns overall and marginal values for power, type I error rate and FDR. In this example we used only the arguments relevant for the isoform analysis process ran by calling <italic>run.EBSeq</italic> from within this function; DE significance is based on FDR and the cut-off for significance is 0.05. We assess power for each expression strata (<monospace>stratify.by</monospace> &#x0003D; <monospace>&#x0201C;expr&#x0201D;</monospace>) and all the expression strata we specified (<monospace>strata</monospace>) are considered (<monospace>strata.filtered</monospace> &#x0003D; <monospace>0</monospace>).</p>
<preformat>
&#x000A0;&#x000A0;powers&#x000A0; &#x0003C;-&#x000A0;comparePower(
&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;runSimsResults,
&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;alpha.type&#x000A0;=&#x000A0;&#x00022;fdr&#x00022;,
&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;alpha.nominal&#x000A0;=&#x000A0;0.05,
&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;stratify.by=&#x00022;expr&#x00022;,
&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;filter.by=&#x00022;none&#x00022;,
&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;strata=c(0,5,10,2^(1:6)&#x0002A;10,Inf),
&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;&#x000A0;strata.filtered=0)
</preformat>
<p>Finally we visualize the results by generating a graph with 2 plots (Figure <xref ref-type="fig" rid="F1">1</xref>), one for power and one for FDR. If the parameter &#x0201C;error bar&#x0201D; is set to &#x0201C;TRUE&#x0201D; uncertainty bars are displayed around the estimates in the plot. For this demonstration we used a very small dataset which results in large uncertainty that might cause R to throw a warning message if the argument is set to &#x0201C;TRUE.&#x0201D;</p>
<preformat>
&#x000A0;&#x000A0;pdf(&#x00022;myPlots.pdf&#x00022;,&#x000A0;width=10,&#x000A0;height=7)
&#x000A0;&#x000A0;par(mfcol=c(1,2),&#x000A0;oma&#x000A0;=&#x000A0;c(0,&#x000A0;0,&#x000A0;2,&#x000A0;0))
&#x000A0;&#x000A0;plotPower_ag(powers,&#x000A0;error.bar=FALSE)
&#x000A0;&#x000A0;plotFDR(powers,&#x000A0;error.bar=FALSE)
&#x000A0;&#x000A0;dev.off()
</preformat>
<fig id="F1" position="float">
<label>Figure 1</label>
<caption><p><bold>Plots of the evaluated power and FDR for each of the six expression strata considered</bold>.</p></caption>
<graphic xlink:href="fgene-07-00225-g0001.tif"/>
</fig>
<p>The code in this tutorial was run using R version 3.2.1, <italic>PROPER</italic> version 1.0.0, <italic>EBSeq</italic> version 1.10.0 and <italic>edgeR</italic> version 3.8.6.</p>
</sec>
</sec>
<sec id="s5">
<title>Author contributions</title>
<p>AG conducted the research and drafted the article.</p>
<sec>
<title>Conflict of interest statement</title>
<p>The author declares that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.</p>
</sec>
</sec>
</body>
<back>
<ack><p>Dr. Sharon K. Davis (National Human Genome Research Institute, National Institutes of Health, Bethesda, MD, USA) and Dr. Gary G. Gibbons (National Heart Lung and Blood Institute, National Institutes of Health, Bethesda, MD, USA). This research was supported by the Intramural Research Program of the National Human Genome Research Institute, National Institutes of Health.</p>
</ack>
<sec sec-type="supplementary-material" id="s6">
<title>Supplementary material</title>
<p>The Supplementary Material for this article can be found online at: <ext-link ext-link-type="uri" xlink:href="http://journal.frontiersin.org/article/10.3389/fgene.2016.00225/full#supplementary-material">http://journal.frontiersin.org/article/10.3389/fgene.2016.00225/full#supplementary-material</ext-link></p>
<supplementary-material xlink:href="DataSheet1.ZIP" id="SM1" mimetype="application/zip" xmlns:xlink="http://www.w3.org/1999/xlink"/>
</sec>
<ref-list>
<title>References</title>
<ref id="B1">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Anders</surname> <given-names>S.</given-names></name> <name><surname>Huber</surname> <given-names>W.</given-names></name></person-group> (<year>2010</year>). <article-title>Differential expression analysis for sequence count data</article-title>. <source>Genome Biol.</source> <volume>11</volume>:<fpage>R106</fpage>. <pub-id pub-id-type="doi">10.1186/gb-2010-11-10-r106</pub-id><pub-id pub-id-type="pmid">20979621</pub-id></citation>
</ref>
<ref id="B2">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Leng</surname> <given-names>N.</given-names></name> <name><surname>Dawson</surname> <given-names>J. A.</given-names></name> <name><surname>Thomson</surname> <given-names>J. A.</given-names></name> <name><surname>Ruotti</surname> <given-names>V.</given-names></name> <name><surname>Rissman</surname> <given-names>A. I.</given-names></name> <name><surname>Smits</surname> <given-names>B. M.</given-names></name> <etal/></person-group>. (<year>2013</year>). <article-title>EBSeq: an empirical Bayes hierarchical model for inference in RNA-seq experiments</article-title>. <source>Bioinformatics</source> <volume>29</volume>, <fpage>1035</fpage>&#x02013;<lpage>1043</lpage>. <pub-id pub-id-type="doi">10.1093/bioinformatics/btt087</pub-id><pub-id pub-id-type="pmid">23428641</pub-id></citation>
</ref>
<ref id="B3">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Love</surname> <given-names>M. I.</given-names></name> <name><surname>Huber</surname> <given-names>W.</given-names></name> <name><surname>Anders</surname> <given-names>S.</given-names></name></person-group> (<year>2014</year>). <article-title>Moderated estimation of fold change and dispersion for RNA-seq data with DESeq2</article-title>. <source>Genome Biol.</source> <volume>15</volume>, <fpage>550</fpage>. <pub-id pub-id-type="doi">10.1186/s13059-014-0550-8</pub-id><pub-id pub-id-type="pmid">25516281</pub-id></citation>
</ref>
<ref id="B4">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>McCarthy</surname> <given-names>D. J.</given-names></name> <name><surname>Chen</surname> <given-names>Y.</given-names></name> <name><surname>Smyth</surname> <given-names>G. K.</given-names></name></person-group> (<year>2012</year>). <article-title>Differential expression analysis of multifactor RNA-Seq experiments with respect to biological variation</article-title>. <source>Nucleic Acids Res.</source> <volume>40</volume>, <fpage>4288</fpage>&#x02013;<lpage>4297</lpage>. <pub-id pub-id-type="doi">10.1093/nar/gks042</pub-id><pub-id pub-id-type="pmid">22287627</pub-id></citation>
</ref>
<ref id="B5">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Robinson</surname> <given-names>M. D.</given-names></name> <name><surname>McCarthy</surname> <given-names>D. J.</given-names></name> <name><surname>Smyth</surname> <given-names>G. K.</given-names></name></person-group> (<year>2010</year>). <article-title>edgeR: a Bioconductor package for differential expression analysis of digital gene expression data</article-title>. <source>Bioinformatics</source> <volume>26</volume>, <fpage>139</fpage>&#x02013;<lpage>140</lpage>. <pub-id pub-id-type="doi">10.1093/bioinformatics/btp616</pub-id><pub-id pub-id-type="pmid">19910308</pub-id></citation>
</ref>
<ref id="B6">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Wu</surname> <given-names>H.</given-names></name> <name><surname>Wang</surname> <given-names>C.</given-names></name> <name><surname>Wu</surname> <given-names>Z.</given-names></name></person-group> (<year>2013</year>). <article-title>A new shrinkage estimator for dispersion improves differential expression detection in RNA-seq data</article-title>. <source>Biostatistics</source> <volume>14</volume>, <fpage>232</fpage>&#x02013;<lpage>243</lpage>. <pub-id pub-id-type="doi">10.1093/biostatistics/kxs033</pub-id><pub-id pub-id-type="pmid">23001152</pub-id></citation>
</ref>
<ref id="B7">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Wu</surname> <given-names>H.</given-names></name> <name><surname>Wang</surname> <given-names>C.</given-names></name> <name><surname>Wu</surname> <given-names>Z.</given-names></name></person-group> (<year>2015</year>). <article-title>PROPER: comprehensive power evaluation for differential expression using RNA-seq</article-title>. <source>Bioinformatics</source> <volume>31</volume>, <fpage>233</fpage>&#x02013;<lpage>241</lpage>. <pub-id pub-id-type="doi">10.1093/bioinformatics/btu640</pub-id><pub-id pub-id-type="pmid">25273110</pub-id></citation>
</ref>
</ref-list>
</back>
</article>