<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Plot evolutionary signatures across transcriptomes and RNA-seq transformations — PlotSignatureTransformed • myTAI</title><!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png"><link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png"><link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png"><link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png"><link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png"><link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.4.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.4.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Plot evolutionary signatures across transcriptomes and RNA-seq transformations — PlotSignatureTransformed"><meta name="description" content="PlotSignatureTransformed aims to statistically evaluate the
stability of ReductiveHourglassTest, FlatLineTest,
ReverseHourglassTest, EarlyConservationTest, or
LateConservationTest
(all based on TAI or TDI computations) against different
data transformations AND plot the resulting TAI profiles using PlotSignature.
The corresponding p-value quantifies the probability that a given TAI or TDI pattern (or any phylotranscriptomics pattern)
does not support the chosen test. A p-value &amp;lt; 0.05 indicates that the corresponding phylotranscriptomics pattern does
indeed support the chosen test."><meta property="og:description" content="PlotSignatureTransformed aims to statistically evaluate the
stability of ReductiveHourglassTest, FlatLineTest,
ReverseHourglassTest, EarlyConservationTest, or
LateConservationTest
(all based on TAI or TDI computations) against different
data transformations AND plot the resulting TAI profiles using PlotSignature.
The corresponding p-value quantifies the probability that a given TAI or TDI pattern (or any phylotranscriptomics pattern)
does not support the chosen test. A p-value &amp;lt; 0.05 indicates that the corresponding phylotranscriptomics pattern does
indeed support the chosen test."><meta property="og:image" content="https://drostlab.github.io/myTAI/logo.png"></head><body>
    <a href="#main" class="visually-hidden-focusable">Skip to contents</a>


    <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="light" aria-label="Site navigation"><div class="container">

    <a class="navbar-brand me-2" href="../index.html">myTAI</a>

    <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">2.0.0</small>


    <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
      <span class="navbar-toggler-icon"></span>
    </button>

    <div id="navbar" class="collapse navbar-collapse ms-3">
      <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li>
<li class="nav-item dropdown">
  <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button>
  <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/Advanced.html">Advanced Phylotranscriptomics Analyses</a></li>
    <li><a class="dropdown-item" href="../articles/Enrichment.html">Enrichment Analyses</a></li>
    <li><a class="dropdown-item" href="../articles/Expression.html">Gene Expression Analysis with `myTAI`</a></li>
    <li><a class="dropdown-item" href="../articles/Intermediate.html">Intermediate Phylotranscriptomics Analyses</a></li>
    <li><a class="dropdown-item" href="../articles/Introduction.html">Introduction to the myTAI package</a></li>
    <li><a class="dropdown-item" href="../articles/Phylostratigraphy.html">Discussing Genomic Phylostratigraphy</a></li>
  </ul></li>
<li class="nav-item"><a class="nav-link" href="../news/index.html">Changelog</a></li>
      </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search">
 <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li>
<li class="nav-item"><a class="external-link nav-link" href="https://github.com/drostlab/myTAI/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li>
      </ul></div>


  </div>
</nav><div class="container template-reference-topic">
<div class="row">
  <main id="main" class="col-md-9"><div class="page-header">
      <img src="../logo.png" class="logo" alt=""><h1>Plot evolutionary signatures across transcriptomes and RNA-seq transformations</h1>
      <small class="dont-index">Source: <a href="https://github.com/drostlab/myTAI/blob/HEAD/R/PlotSignatureTransformed.R" class="external-link"><code>R/PlotSignatureTransformed.R</code></a></small>
      <div class="d-none name"><code>PlotSignatureTransformed.Rd</code></div>
    </div>

    <div class="ref-description section level2">
    <p><em>PlotSignatureTransformed</em> aims to statistically evaluate the
stability of <code><a href="ReductiveHourglassTest.html">ReductiveHourglassTest</a></code>, <code><a href="FlatLineTest.html">FlatLineTest</a></code>,
<code><a href="ReverseHourglassTest.html">ReverseHourglassTest</a></code>, <code><a href="EarlyConservationTest.html">EarlyConservationTest</a></code>, or
<code><a href="LateConservationTest.html">LateConservationTest</a></code>
(all based on <code><a href="TAI.html">TAI</a></code> or <code><a href="TDI.html">TDI</a></code> computations) against different
data transformations AND plot the resulting TAI profiles using <code><a href="PlotSignature.html">PlotSignature</a></code>.
The corresponding p-value quantifies the probability that a given TAI or TDI pattern (or any phylotranscriptomics pattern)
does not support the chosen test. A p-value &lt; 0.05 indicates that the corresponding phylotranscriptomics pattern does
indeed support the chosen test.</p>
    </div>

    <div class="section level2">
    <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2>
    <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">PlotSignatureTransformed</span><span class="op">(</span></span>
<span>  <span class="va">ExpressionSet</span>,</span>
<span>  measure <span class="op">=</span> <span class="st">"TAI"</span>,</span>
<span>  TestStatistic <span class="op">=</span> <span class="st">"FlatLineTest"</span>,</span>
<span>  transforms <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"none"</span>, <span class="st">"sqrt"</span>, <span class="st">"log2"</span>, <span class="st">"rank"</span>, <span class="st">"squared"</span><span class="op">)</span>,</span>
<span>  modules <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span>  permutations <span class="op">=</span> <span class="fl">1000</span>,</span>
<span>  pseudocount <span class="op">=</span> <span class="fl">1</span>,</span>
<span>  p.value <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span>  shaded.area <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span>  xlab <span class="op">=</span> <span class="st">"Ontogeny"</span>,</span>
<span>  ylab <span class="op">=</span> <span class="st">"Transcriptome Index"</span>,</span>
<span>  main <span class="op">=</span> <span class="st">""</span>,</span>
<span>  lwd <span class="op">=</span> <span class="fl">4</span>,</span>
<span>  alpha <span class="op">=</span> <span class="fl">0.1</span>,</span>
<span>  y.ticks <span class="op">=</span> <span class="fl">3</span></span>
<span><span class="op">)</span></span></code></pre></div>
    </div>

    <div class="section level2">
    <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2>


<dl><dt id="arg-expressionset">ExpressionSet<a class="anchor" aria-label="anchor" href="#arg-expressionset"></a></dt>
<dd><p>a standard PhyloExpressionSet or DivergenceExpressionSet object.</p></dd>


<dt id="arg-measure">measure<a class="anchor" aria-label="anchor" href="#arg-measure"></a></dt>
<dd><p>type of transcriptome index that shall be computed. E.g.</p><ul><li><p><code>measure = "TAI"</code> (Transcriptome Age Index)</p></li>
<li><p><code>measure = "TDI"</code> (Transcriptome Divergence Index)</p></li>
<li><p><code>measure = "TPI"</code> (Transcriptome Polymorphism Index)</p></li>
</ul></dd>


<dt id="arg-teststatistic">TestStatistic<a class="anchor" aria-label="anchor" href="#arg-teststatistic"></a></dt>
<dd><p>a string defining the type of test statistics to be used to quantify the statistical significance the present phylotranscriptomics pattern.
Possible values can be:</p><ul><li><p><code>TestStatistic</code> = <code>"FlatLineTest"</code> : Statistical test for the deviation from a flat line</p></li>
<li><p><code>TestStatistic</code> = <code>"ReductiveHourglassTest"</code> : Statistical test for the existence of a hourglass shape (high-low-high pattern)</p></li>
<li><p><code>TestStatistic</code> = <code>"ReverseHourglassTest"</code> : Statistical test for the existence of a reverse hourglass pattern (low-high-low pattern)</p></li>
<li><p><code>TestStatistic</code> = <code>"EarlyConservationTest"</code> : Statistical test for the existence of a early conservation pattern (low-high-high pattern)</p></li>
<li><p><code>TestStatistic</code> = <code>"LateConservationTest"</code> : Statistical test for the existence of a late conservation pattern (high-high-low pattern)</p></li>
</ul></dd>


<dt id="arg-transforms">transforms<a class="anchor" aria-label="anchor" href="#arg-transforms"></a></dt>
<dd><p>a character vector of any valid function that transforms gene expression levels. Available options are:</p><ul><li><p><code>transforms = "none"</code> : No transformation (absolute expression)</p></li>
<li><p><code>transforms = "log2"</code> : Computes binary (i.e., base 2) logarithms, \(log_{2}{X}\).</p></li>
<li><p><code>transforms = "log"</code> : Computes natural logarithms, \(log_{e}{X}\).</p></li>
<li><p><code>transforms = "log10"</code> : Computes common logarithms (i.e., base 10), \(log_{10}{X}\).</p></li>
<li><p><code>transforms = "sqrt"</code> : Computes the (principle) square root, \(\sqrt{X}\).</p></li>
<li><p><code>transforms = "vst"</code> :  (Quickly) estimates dispersion trend and applies a variance stabilizing transformation (please make sure that the <span class="pkg">DESeq2</span> package is installed).</p></li>
<li><p><code>transforms = "rlog"</code> : (Robustly) estimates dispersion trend and applies a variance stabilizing transformation (please make sure that the <span class="pkg">DESeq2</span> package is installed).</p></li>
<li><p><code>transforms = "rank"</code> : Ranks genes from lowest to highest based on their expression levels, at each condition (e.g., developmental stage). The gene's expression value is replaced by its sample rank or average ranks in case of ties.</p></li>
<li><p><code>transforms = "squared"</code>: Computes the square, \(X^2\).</p></li>
</ul></dd>


<dt id="arg-modules">modules<a class="anchor" aria-label="anchor" href="#arg-modules"></a></dt>
<dd><p>a list storing three elements for the <code><a href="ReductiveHourglassTest.html">ReductiveHourglassTest</a></code>, <code><a href="EarlyConservationTest.html">EarlyConservationTest</a></code>, <code><a href="LateConservationTest.html">LateConservationTest</a></code>,
or <code><a href="ReverseHourglassTest.html">ReverseHourglassTest</a></code>: early, mid, and late.
Each element expects a numeric vector specifying the developmental stages
or experiments that correspond to each module. For example:</p><ul><li><p><code>module</code> = <code>list(early = 1:2, mid = 3:5, late = 6:7)</code> divides a dataset storing seven developmental stages into 3 modules.</p></li>
</ul></dd>


<dt id="arg-permutations">permutations<a class="anchor" aria-label="anchor" href="#arg-permutations"></a></dt>
<dd><p>a numeric value specifying the number of permutations to be performed for the <code><a href="FlatLineTest.html">FlatLineTest</a></code>, <code><a href="EarlyConservationTest.html">EarlyConservationTest</a></code>, <code><a href="LateConservationTest.html">LateConservationTest</a></code>, <code><a href="ReductiveHourglassTest.html">ReductiveHourglassTest</a></code> or <code><a href="ReverseHourglassTest.html">ReverseHourglassTest</a></code>.</p></dd>


<dt id="arg-pseudocount">pseudocount<a class="anchor" aria-label="anchor" href="#arg-pseudocount"></a></dt>
<dd><p>any valid number to add to the expression matrix prior to log transformations.</p></dd>


<dt id="arg-p-value">p.value<a class="anchor" aria-label="anchor" href="#arg-p-value"></a></dt>
<dd><p>a boolean value specifying whether the p-value of the test statistic shall be printed within the plot area.</p></dd>


<dt id="arg-shaded-area">shaded.area<a class="anchor" aria-label="anchor" href="#arg-shaded-area"></a></dt>
<dd><p>a boolean value specifying whether a shaded area shall
be drawn for the developmental stages defined to be the presumptive phylotypic period.</p></dd>


<dt id="arg-xlab">xlab<a class="anchor" aria-label="anchor" href="#arg-xlab"></a></dt>
<dd><p>label of x-axis.</p></dd>


<dt id="arg-ylab">ylab<a class="anchor" aria-label="anchor" href="#arg-ylab"></a></dt>
<dd><p>label of y-axis.</p></dd>


<dt id="arg-main">main<a class="anchor" aria-label="anchor" href="#arg-main"></a></dt>
<dd><p>figure title.</p></dd>


<dt id="arg-lwd">lwd<a class="anchor" aria-label="anchor" href="#arg-lwd"></a></dt>
<dd><p>line width.</p></dd>


<dt id="arg-alpha">alpha<a class="anchor" aria-label="anchor" href="#arg-alpha"></a></dt>
<dd><p>transparency of the shaded area (between [0,1]). Default is <code>alpha = 0.1</code>.</p></dd>


<dt id="arg-y-ticks">y.ticks<a class="anchor" aria-label="anchor" href="#arg-y-ticks"></a></dt>
<dd><p>number of ticks on the y-axis. Default is <code>ticks = 3</code>.</p></dd>

</dl></div>
    <div class="section level2">
    <h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2>
    <p>a ggplot object containing the following information
for each visualised transcriptome indices:
<code>p.value</code> : the p-value quantifying the statistical significance (depending on the chosen test) of the given phylotranscriptomics pattern.</p>
    </div>
    <div class="section level2">
    <h2 id="details">Details<a class="anchor" aria-label="anchor" href="#details"></a></h2>
    <p>Visualisation and assessment for the stability of data transforms on the permutation test of choice.
For details, please consult the main function <code><a href="PlotSignature.html">PlotSignature</a></code>,
as well as <code><a href="tf.html">tf</a></code>, <code><a href="ReductiveHourglassTest.html">ReductiveHourglassTest</a></code>,
<code><a href="FlatLineTest.html">FlatLineTest</a></code>, <code><a href="ReverseHourglassTest.html">ReverseHourglassTest</a></code>,
<code><a href="LateConservationTest.html">LateConservationTest</a></code> or <code><a href="EarlyConservationTest.html">EarlyConservationTest</a></code>.</p>
<p>In most cases, users can replace <code><a href="PlotSignature.html">PlotSignature</a></code> simply with
<code>PlotSignatureTransformed</code> to obtain the multi-panel plot with different
transformations to visualise the stability of the pattern observed with <code><a href="PlotSignature.html">PlotSignature</a></code>.</p>
    </div>
    <div class="section level2">
    <h2 id="references">References<a class="anchor" aria-label="anchor" href="#references"></a></h2>
    <p>Lotharukpong JS et al. (2023) (unpublished)</p>
    </div>
    <div class="section level2">
    <h2 id="see-also">See also<a class="anchor" aria-label="anchor" href="#see-also"></a></h2>
    <div class="dont-index"><p><code><a href="PlotSignature.html">PlotSignature</a></code>,<code><a href="tfStability.html">tfStability</a></code>,
<code><a href="FlatLineTest.html">FlatLineTest</a></code>, <code><a href="ReverseHourglassTest.html">ReverseHourglassTest</a></code>,
<code><a href="EarlyConservationTest.html">EarlyConservationTest</a></code>, <code><a href="ReductiveHourglassTest.html">ReductiveHourglassTest</a></code>,
<code><a href="LateConservationTest.html">LateConservationTest</a></code></p></div>
    </div>
    <div class="section level2">
    <h2 id="author">Author<a class="anchor" aria-label="anchor" href="#author"></a></h2>
    <p>Jaruwatana Sodai Lotharukpong</p>
    </div>

    <div class="section level2">
    <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2>
    <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="kw">if</span> <span class="op">(</span><span class="cn">FALSE</span><span class="op">)</span> <span class="op">{</span> <span class="co"># \dontrun{</span></span></span>
<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/utils/data.html" class="external-link">data</a></span><span class="op">(</span><span class="va">PhyloExpressionSetExample</span><span class="op">)</span></span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># Flat line test</span></span></span>
<span class="r-in"><span><span class="fu">PlotSignatureTransformed</span><span class="op">(</span>ExpressionSet <span class="op">=</span> <span class="va">PhyloExpressionSetExample</span>,</span></span>
<span class="r-in"><span>                    TestStatistic <span class="op">=</span> <span class="st">"FlatLineTest"</span>,</span></span>
<span class="r-in"><span>                    transforms <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"none"</span>, <span class="st">"log2"</span>, <span class="st">"sqrt"</span>, <span class="st">"rank"</span>, <span class="st">"squared"</span><span class="op">)</span><span class="op">)</span></span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># Reductive hourglass test</span></span></span>
<span class="r-in"><span><span class="fu">PlotSignatureTransformed</span><span class="op">(</span>ExpressionSet <span class="op">=</span> <span class="va">PhyloExpressionSetExample</span>,</span></span>
<span class="r-in"><span>                     TestStatistic <span class="op">=</span> <span class="st">"ReductiveHourglassTest"</span>,</span></span>
<span class="r-in"><span>                     transforms <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"none"</span>, <span class="st">"log2"</span>, <span class="st">"sqrt"</span>, <span class="st">"rank"</span>, <span class="st">"squared"</span><span class="op">)</span>,</span></span>
<span class="r-in"><span>                     modules <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>early <span class="op">=</span> <span class="fl">1</span><span class="op">:</span><span class="fl">2</span>, mid <span class="op">=</span> <span class="fl">3</span><span class="op">:</span><span class="fl">5</span>, late <span class="op">=</span> <span class="fl">6</span><span class="op">:</span><span class="fl">7</span><span class="op">)</span><span class="op">)</span></span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va"><a href="https://github.com/thelovelab/DESeq2" class="external-link">DESeq2</a></span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="fu">PlotSignatureTransformed</span><span class="op">(</span>ExpressionSet <span class="op">=</span> <span class="va">PhyloExpressionSetExample</span>,</span></span>
<span class="r-in"><span>                     TestStatistic <span class="op">=</span> <span class="st">"ReductiveHourglassTest"</span>,</span></span>
<span class="r-in"><span>                     transforms <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"none"</span>, <span class="st">"log2"</span>, <span class="st">"sqrt"</span>, <span class="st">"vst"</span>, <span class="st">"rank"</span>, <span class="st">"squared"</span><span class="op">)</span>,</span></span>
<span class="r-in"><span>                     modules <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>early <span class="op">=</span> <span class="fl">1</span><span class="op">:</span><span class="fl">2</span>, mid <span class="op">=</span> <span class="fl">3</span><span class="op">:</span><span class="fl">5</span>, late <span class="op">=</span> <span class="fl">6</span><span class="op">:</span><span class="fl">7</span><span class="op">)</span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="op">}</span> <span class="co"># }</span></span></span>
<span class="r-in"><span></span></span>
</code></pre></div>
    </div>
  </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2>
    </nav></aside></div>


    <footer><div class="pkgdown-footer-left">
  <p>Developed by Hajk-Georg Drost, Jaruwatana Sodai Lotharukpong, Nikola Kalábová, Kristian K Ullrich.</p>
</div>

<div class="pkgdown-footer-right">
  <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.0.</p>
</div>

    </footer></div>





  </body></html>

