<!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 the Transcriptome Age Index or Transcriptome Divergence Index — PlotPattern • 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 the Transcriptome Age Index or Transcriptome Divergence Index — PlotPattern"><meta name="description" content="Function to plot the TAI or TDI of a given PhyloExpressionSet or DivergenceExpressionSet object.
This function plot the TAI or TDI of a given PhyloExpressionSet or DivergenceExpressionSet object."><meta property="og:description" content="Function to plot the TAI or TDI of a given PhyloExpressionSet or DivergenceExpressionSet object.
This function plot the TAI or TDI of a given PhyloExpressionSet or DivergenceExpressionSet object."><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 the Transcriptome Age Index or Transcriptome Divergence Index</h1>
      <small class="dont-index">Source: <a href="https://github.com/drostlab/myTAI/blob/HEAD/R/PlotPattern.R" class="external-link"><code>R/PlotPattern.R</code></a></small>
      <div class="d-none name"><code>PlotPattern.Rd</code></div>
    </div>

    <div class="ref-description section level2">
    <p>Function to plot the TAI or TDI of a given PhyloExpressionSet or DivergenceExpressionSet object.
This function plot the <code><a href="TAI.html">TAI</a></code> or <code><a href="TDI.html">TDI</a></code> of a given PhyloExpressionSet or DivergenceExpressionSet object.</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">PlotPattern</span><span class="op">(</span></span>
<span>  <span class="va">ExpressionSet</span>,</span>
<span>  TestStatistic <span class="op">=</span> <span class="st">"FlatLineTest"</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>  lillie.test <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span>  digits.ylab <span class="op">=</span> <span class="fl">4</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>  y.ticks <span class="op">=</span> <span class="fl">4</span>,</span>
<span>  custom.perm.matrix <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span>  <span class="va">...</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-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: <code>TestStatistic</code> = <code>"FlatLineTest"</code> : Statistical test for the deviation from a flat line.
<code>TestStatistic</code> = <code>"ReductiveHourglassTest"</code> : Statistical test for the existence of a hourglass shape (high-low-high pattern).
<code>TestStatistic</code> = <code>"EarlyConservationTest"</code> : Statistical test for the existence of a earlyconservation pattern (low-high-high pattern).</p></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> or <code><a href="EarlyConservationTest.html">EarlyConservationTest</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,
<code>module</code> = <code>list(early = 1:2, mid = 3:5, late = 6:7)</code> devides a dataset storing seven developmental stages into 3 modules.</p></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> or <code><a href="ReductiveHourglassTest.html">ReductiveHourglassTest</a></code>.</p></dd>


<dt id="arg-lillie-test">lillie.test<a class="anchor" aria-label="anchor" href="#arg-lillie-test"></a></dt>
<dd><p>a boolean value specifying whether the Lilliefors Kolmogorov-Smirnov Test shall be performed.</p></dd>


<dt id="arg-digits-ylab">digits.ylab<a class="anchor" aria-label="anchor" href="#arg-digits-ylab"></a></dt>
<dd><p>a numeric value specifying the number of digits shown for the TAI or TDI values on the y-axis.</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-y-ticks">y.ticks<a class="anchor" aria-label="anchor" href="#arg-y-ticks"></a></dt>
<dd><p>a numeric value specifying the number of ticks to be drawn on the y-axis.</p></dd>


<dt id="arg-custom-perm-matrix">custom.perm.matrix<a class="anchor" aria-label="anchor" href="#arg-custom-perm-matrix"></a></dt>
<dd><p>a custom <code><a href="bootMatrix.html">bootMatrix</a></code> (permutation matrix) to perform the underlying test statistic visualized by <code>PlotPattern</code>. Default is <code>custom.perm.matrix = NULL</code>.</p></dd>


<dt id="arg--">...<a class="anchor" aria-label="anchor" href="#arg--"></a></dt>
<dd><p>default plot parameters.</p></dd>

</dl></div>
    <div class="section level2">
    <h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2>
    <p>a plot visualizing the phylotranscriptomic pattern of a given PhyloExpressionSet or DivergenceExpressionSet object.</p>
<p>The corresponding <em>p-value</em> of the test statistic is named as follows:</p>
<p><code>p_flt</code> = p-value of the corresponding <code><a href="FlatLineTest.html">FlatLineTest</a></code></p>
<p><code>p_rht</code> = p-value of the corresponding <code><a href="ReductiveHourglassTest.html">ReductiveHourglassTest</a></code></p>
<p><code>p_ect</code> = p-value of the corresponding <code><a href="EarlyConservationTest.html">EarlyConservationTest</a></code></p>
    </div>
    <div class="section level2">
    <h2 id="details">Details<a class="anchor" aria-label="anchor" href="#details"></a></h2>
    <p>This function computes a permutation test quantifying the statistical significance of the prensent phylotranscriptomics pattern.
The user can choose between the <code><a href="FlatLineTest.html">FlatLineTest</a></code>, <code><a href="ReductiveHourglassTest.html">ReductiveHourglassTest</a></code>, or <code><a href="EarlyConservationTest.html">EarlyConservationTest</a></code>.
The <code><a href="FlatLineTest.html">FlatLineTest</a></code> tests for any significant deviation from a flat line.
Each period or stage that significantly deviates from a flat line, might be governed by stronger selective pressure (in terms of natural selection) compared to other stages or periods of development.
The <code><a href="ReductiveHourglassTest.html">ReductiveHourglassTest</a></code> specificly tests for the statistical significance of a molecular hourglass pattern (high-low-high pattern) with prior biological knowlegde.
The corresponding p-value that is printed within the plot (by default) specifies the statistical significance of the chosen test statistic.</p>
<p>The <code><a href="EarlyConservationTest.html">EarlyConservationTest</a></code> specificly tests for the statistical significance of a low-high-high pattern (monotonically increasing function)
with prior biological knowlegde.
The corresponding p-value that is printed within the plot (by default) specifies the statistical significance of the chosen test statistic.</p>
<p>The x-axis denotes the developmental series (time course / experiments / ontogeny) of the input ExpressionSet and the y-axis
denotes the corresponding mean transcriptome age value (<code><a href="TAI.html">TAI</a></code> or <code><a href="TDI.html">TDI</a></code>) of the given ExpressionSet.</p>
<p>Furthermore, the grey lines above and below the actual phylotranscriptomics pattern denotes the standard deviations of <code><a href="TAI.html">TAI</a></code> or <code><a href="TDI.html">TDI</a></code>
values that have been estimated from the <code><a href="bootMatrix.html">bootMatrix</a></code>.
A low mean transcriptome age value denotes an evolutionary older transcriptome being active during the corresponding periods,
whereas a high mean transcriptome age value denotes an evolutionary younger transcriptome being active during the corresponding periods.
For mean transcriptome divergence, a low mean transcriptome divergence value denotes a more conserved transcriptome
being active (between two species), whereas a high mean transcriptome divergence value denotes a more divergent transcriptome
being active (between two species) - in terms of protein-sequence substitution rates.</p>
<p>This function is useful to fastly plot the <code><a href="TAI.html">TAI</a></code> or <code><a href="TDI.html">TDI</a></code>
profile of a given PhyloExpressionSet or DivergenceExpressionSet object and
the statistical significance of the corresponding pattern.
Internally the function calls several graphics functions,
such as <code><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></code>, <code><a href="https://rdrr.io/r/graphics/axis.html" class="external-link">axis</a></code>, and <code><a href="https://rdrr.io/r/graphics/legend.html" class="external-link">legend</a></code>.
For the ellipsis argument <code><a href="https://rdrr.io/r/base/dots.html" class="external-link">...</a></code> all graphics specific arguments can be defined.
Internally the function specific arguments for e.g. <code><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></code>, <code><a href="https://rdrr.io/r/graphics/axis.html" class="external-link">axis</a></code>,
and <code><a href="https://rdrr.io/r/graphics/legend.html" class="external-link">legend</a></code> will be detected and are passed to the corresponding function.</p>
<p>Hence, when calling the function <code>PlotPattern</code>, one can specify arguments
for <code><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></code> and <code><a href="https://rdrr.io/r/graphics/axis.html" class="external-link">axis</a></code> and <code><a href="https://rdrr.io/r/graphics/legend.html" class="external-link">legend</a></code>
as <code><a href="https://rdrr.io/r/base/dots.html" class="external-link">...</a></code>.</p>
<p>In case prior biological knowledge is present for a specific period of development,
the <code>shaded.area</code> argument can be set to <code>TRUE</code> and the function will use
the values stored in the <code>mid</code> argument to draw a shaded area within the corresponding period of development.</p>
    </div>
    <div class="section level2">
    <h2 id="references">References<a class="anchor" aria-label="anchor" href="#references"></a></h2>
    <p>Domazet-Loso T and Tautz D. (2010). <em>A phylogenetically based transcriptome age index mirrors ontogenetic divergence patterns</em>. Nature (468): 815-818.</p>
<p>Quint M et al. (2012). <em>A transcriptomic hourglass in plant embryogenesis</em>. Nature (490): 98-101.</p>
<p>Drost HG et al. (2015) Mol Biol Evol. 32 (5): 1221-1231 doi:10.1093/molbev/msv012.</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="TAI.html">TAI</a></code>, <code><a href="TDI.html">TDI</a></code>, <code><a href="FlatLineTest.html">FlatLineTest</a></code>,
 <code><a href="ReductiveHourglassTest.html">ReductiveHourglassTest</a></code>, <code><a href="EarlyConservationTest.html">EarlyConservationTest</a></code>,
 <code><a href="PlotSignature.html">PlotSignature</a></code></p></div>
    </div>
    <div class="section level2">
    <h2 id="author">Author<a class="anchor" aria-label="anchor" href="#author"></a></h2>
    <p>Hajk-Georg Drost</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></span>
<span class="r-in"><span><span class="co"># load PhyloExpressionSet</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"># only visualize the TAI profile without any test statistics...</span></span></span>
<span class="r-in"><span><span class="co"># this is equavalent to performing: plot(TAI(PhyloExpressionSetExample), type = "l", lwd = 6)</span></span></span>
<span class="r-in"><span><span class="fu">PlotPattern</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="cn">NULL</span>,</span></span>
<span class="r-in"><span>            type          <span class="op">=</span> <span class="st">"l"</span>,</span></span>
<span class="r-in"><span>            xlab          <span class="op">=</span> <span class="st">"Ontogeny"</span>,</span></span>
<span class="r-in"><span>            ylab          <span class="op">=</span> <span class="st">"TAI"</span>,</span></span>
<span class="r-in"><span>            lwd           <span class="op">=</span> <span class="fl">9</span><span class="op">)</span></span></span>
<span class="r-plt img"><img src="PlotPattern-1.png" alt="" width="700" height="433"></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># the simplest example of plotting the TAI profile of a given PhyloExpressionSet:</span></span></span>
<span class="r-in"><span><span class="co"># In this case (default) the FlatLineTest will be performed to quantify</span></span></span>
<span class="r-in"><span><span class="co"># the statistical significance of the present TAI pattern and will be drawn as 'p = ... '</span></span></span>
<span class="r-in"><span><span class="co"># in the plot</span></span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="fu">PlotPattern</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>            permutations  <span class="op">=</span> <span class="fl">100</span>, </span></span>
<span class="r-in"><span>            type          <span class="op">=</span> <span class="st">"l"</span>, </span></span>
<span class="r-in"><span>            xlab          <span class="op">=</span> <span class="st">"Ontogeny"</span>, </span></span>
<span class="r-in"><span>            ylab          <span class="op">=</span> <span class="st">"TAI"</span>, </span></span>
<span class="r-in"><span>            lwd           <span class="op">=</span> <span class="fl">9</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [ Number of Eigen threads that are employed on your machine: 12 ]</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [ Computing age assignment permutations for test statistic ... ]</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 
[=========================================] 100%   </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [ Computing variances of permuted transcriptome signatures ... ]</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Total runtime of your permutation test: 0.015  seconds.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> </span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> -&gt; We recommended using at least 20000 permutations to achieve a sufficient permutation test.</span>
<span class="r-plt img"><img src="PlotPattern-2.png" alt="" width="700" height="433"></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># an example performing the ReductiveHourglassTest and printing the p-value</span></span></span>
<span class="r-in"><span><span class="co"># and shaded area of the presumptive phylotypic period into the plot</span></span></span>
<span class="r-in"><span><span class="co"># Here the 'p = ...' denotes the p-value that is returned by the ReductiveHourglassTest</span></span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="fu">PlotPattern</span><span class="op">(</span></span></span>
<span class="r-in"><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>            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></span>
<span class="r-in"><span>            permutations  <span class="op">=</span> <span class="fl">100</span>, </span></span>
<span class="r-in"><span>            p.value       <span class="op">=</span> <span class="cn">TRUE</span>, </span></span>
<span class="r-in"><span>            shaded.area   <span class="op">=</span> <span class="cn">TRUE</span>, </span></span>
<span class="r-in"><span>            xlab          <span class="op">=</span> <span class="st">"Ontogeny"</span>, </span></span>
<span class="r-in"><span>            ylab          <span class="op">=</span> <span class="st">"TAI"</span>, </span></span>
<span class="r-in"><span>            type          <span class="op">=</span> <span class="st">"l"</span>, </span></span>
<span class="r-in"><span>            lwd           <span class="op">=</span> <span class="fl">9</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [ Number of Eigen threads that are employed on your machine: 12 ]</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [ Computing age assignment permutations for test statistic ... ]</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 
[=========================================] 100%   </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [ Computing variances of permuted transcriptome signatures ... ]</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> </span>
<span class="r-plt img"><img src="PlotPattern-3.png" alt="" width="700" height="433"></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># testing for early conservation model </span></span></span>
<span class="r-in"><span><span class="fu">PlotPattern</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">"EarlyConservationTest"</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></span>
<span class="r-in"><span>            permutations   <span class="op">=</span> <span class="fl">100</span>,</span></span>
<span class="r-in"><span>            p.value        <span class="op">=</span> <span class="cn">TRUE</span>, </span></span>
<span class="r-in"><span>            shaded.area    <span class="op">=</span> <span class="cn">TRUE</span>, </span></span>
<span class="r-in"><span>            xlab           <span class="op">=</span> <span class="st">"Ontogeny"</span>, </span></span>
<span class="r-in"><span>            ylab           <span class="op">=</span> <span class="st">"TAI"</span>, </span></span>
<span class="r-in"><span>            type           <span class="op">=</span> <span class="st">"l"</span>, </span></span>
<span class="r-in"><span>            lwd            <span class="op">=</span> <span class="fl">9</span><span class="op">)</span></span></span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> The phylotranscriptomic pattern may not follow an early conservation pattern (low-mid-high or low-high-high).</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [ Number of Eigen threads that are employed on your machine: 12 ]</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [ Computing age assignment permutations for test statistic ... ]</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 
[=========================================] 100%   </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [ Computing variances of permuted transcriptome signatures ... ]</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> </span>
<span class="r-plt img"><img src="PlotPattern-4.png" alt="" width="700" height="433"></span>
<span class="r-in"><span>            </span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co"># use your own permutation matrix</span></span></span>
<span class="r-in"><span><span class="va">custom_perm_matrix</span> <span class="op">&lt;-</span> <span class="fu"><a href="bootMatrix.html">bootMatrix</a></span><span class="op">(</span><span class="va">PhyloExpressionSetExample</span>,<span class="fl">100</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [ Number of Eigen threads that are employed on your machine: 12 ]</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [ Computing age assignment permutations for test statistic ... ]</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 
[=========================================] 100%   </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [ Computing variances of permuted transcriptome signatures ... ]</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> </span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="fu">PlotPattern</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>            custom.perm.matrix <span class="op">=</span> <span class="va">custom_perm_matrix</span>, </span></span>
<span class="r-in"><span>            type               <span class="op">=</span> <span class="st">"l"</span>, </span></span>
<span class="r-in"><span>            xlab               <span class="op">=</span> <span class="st">"Ontogeny"</span>, </span></span>
<span class="r-in"><span>            ylab               <span class="op">=</span> <span class="st">"TAI"</span>, </span></span>
<span class="r-in"><span>            lwd                <span class="op">=</span> <span class="fl">9</span><span class="op">)</span></span></span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> </span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> -&gt; We recommended using at least 20000 permutations to achieve a sufficient permutation test.</span>
<span class="r-plt img"><img src="PlotPattern-5.png" alt="" width="700" height="433"></span>
<span class="r-in"><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>

