@@ -5,7 +5,7 @@ This project is currently under active development.

Repository structure

----------------------

This repository for our `GRaNIE` packages (**G**ene **R**egul**a**tory **N**etwork **I**nference including **E**nhancers) currently contains everything that is related to this project and is organized into the following 3 packages:

This repository for our *GRaNIE* packages (**G**ene **R**egul**a**tory **N**etwork **I**nference including **E**nhancers) currently contains everything that is related to this project and is organized into the following 3 packages:

-<code>GRaNIE</code>

-<code>GRaNIEdata</code> (example dataset that the Vignette uses)

...

...

@@ -16,7 +16,7 @@ The full documentation for the all packages is available at the following stable

**We are soon submitting our `GRaNIE` and the associated `GRaNIEData` for being included on `Bioconductor`. Once we are accepted and the package is included in the stable release of `Bioconductor`, we will update the installation guidelines in the documentation.**

**We are soon submitting our *GRaNIE* and the associated *GRaNIEData* for being included on *Bioconductor*. Once we are accepted and the package is included in the stable release of *Bioconductor*, we will update the installation guidelines in the documentation.**

<h3id="input_metadata">Sample metadata (optional but highly recommended)<aclass="anchor"aria-label="anchor"href="#input_metadata"></a>

</h3>

<p>Providing sample metadata is optional, but highly recommended - if available, the sample metadata is integrated into the PCA plots to understand where the variation in the data comes from and whether any of the metadata (e.g., age, sex, sequencing batch) is associated with the PCs from a PC, indicating a batch effect that needs to be addressed before running the <code>GRaNIE</code> pipeline.</p>

<p>The integration of sample metadata can be achieved in the <code><ahref="../reference/addData.html">addData()</a></code> function, see <code><ahref="../reference/addData.html">?addData</a></code> for more information.</p>

<p>The integration of sample metadata can be achieved in the <code><ahref="../reference/addData.html">addData()</a></code> function (click the link for more information).</p>

</div>

<divclass="section level3">

<h3id="input_HiC">Hi-C data (optional)<aclass="anchor"aria-label="anchor"href="#input_HiC"></a>

...

...

@@ -319,7 +318,7 @@

<olstyle="list-style-type: decimal">

<li>Multi-density plot across all samples (1 page)</li>

</ol>

<divclass="figure">

<divclass="figure"style="text-align: center">

<imgsrc="figs/PCA_peaks_raw/p-01.png"alt="<i>Multi-density plot for read counts across all samples</i>"width="80%"><pclass="caption">

<i>Multi-density plot for read counts across all samples</i>

<p>TF-peak diagnostic plots are available for each TF, and they currently look as follows:</p>

<divclass="figure">

<divclass="figure"style="text-align: center">

<imgsrc="figs/TFPeak_fdr_orig/p-25.png"alt="<i>TF-peak diagnostic plots for an example TF</i>"width="100%"><pclass="caption">

<i>TF-peak diagnostic plots for an example TF</i>

</p>

...

...

@@ -372,7 +371,7 @@

<strong>Summary heatmaps (files starting with <code>TF_classification_summaryHeatmap</code>)</strong>: <ahref="https://difftf.readthedocs.io/en/latest/chapter2.html#files-comparisontype-diagnosticplotsclassification1-pdf-and-comparisontype-diagnosticplotsclassification2-pdf"class="external-link">This is described in detail in the <code>diffTF</code> documentation.</a>

<strong>Summary stringency plots (files starting with <code>TF_classification_stringencyThresholds</code>)</strong>: <ahref="https://difftf.readthedocs.io/en/latest/chapter2.html#files-comparisontype-diagnosticplotsclassification1-pdf-and-comparisontype-diagnosticplotsclassification2-pdf"class="external-link">This is described in detail in the <code>diffTF</code> documentation.</a>

<strong>Density plots per TF (files starting with <code>TF_classification_densityPlotsForegroundBackground</code>)</strong>: Density plots for each TF, with one TF per page. The plot shows the foreground (red, labeled as <code>Motif</code>) and background (gray, labeled as <code>Non-motif</code>) densities of the correlation coefficient (either Pearson or Spearman, see x-axis label) from peaks with (foreground) or without (background) a (predicted) TFBS in the peak for the particular TF. The numbers in the parenthesis summarize the underlying total number of peaks.</li>

</ol>

<divclass="figure">

<divclass="figure"style="text-align: center">

<imgsrc="figs/AR_density_expr_real/p-06.png"alt="<i>Density plots per TF</i>"width="60%"><pclass="caption">

<i>Density plots per TF</i>

</p>

...

...

@@ -403,7 +402,7 @@

</h3>

<p>We provide a number of diagnostic plots for the peak-gene links that are imperative for understanding the biological system and GRN. In what follows, we describe them briefly, along with some notes on expected patterns, implications etc. Note that this section is subject to continuous change.</p>

<p>We currently offer a summary QC figure for the peak-gene connections that looks as follows:</p>

<p>For the <code>r+</code> / <code>r-</code> dimension and permuted data, the ratios should be close to 1 across all p-value bins, while for the real data, a high ratio is typically seen for small p-values. In general, the difference between the permuted and real bar should be large for small p-values and close to 1 for larger ones.</p>

<p>For the real / permuted dimension, what we want to see is again a high ratio for small p-value bins for the <code>r+</code> links, indicating that when comparing permuted vs real, there are many more small p-value links in real data as compared to permuted. This usually does not hold true for the <code>r-</code> links, though, as can be seen also from the plot: the gray bars are smaller and closer to 1 across the whole binned p-value range.</p>

<p>Lastly, we can also stratify the raw p-value distribution for <code>r+</code> and <code>r-</code> peak-gene connections according to different biological properties such as the peak-gene distance and others (see below). Here, we focus solely on the real data and additionally stratify the p-value distributions of peak-gene links by their genomic distance (measured as the distance of the middle of the peak to the TSS of the gene, in base pairs). For this, we bin the peak-gene distance equally into 10 bins, which results in the bins containing a non-equal number of data points but genomic distance is increased uniformly from bin to bin:</p>

<divclass="figure">

<divclass="figure"style="text-align: center">

<imgsrc="figs/peakGene_QC_all/p-2.png"alt="<i>Density of raw p-values, stratified by (1) peak-gene distance (using equally sized bins) and (2) `r+` / `r-` links</i>"width="80%"><pclass="caption">

<i>Density of raw p-values, stratified by (1) peak-gene distance (using equally sized bins) and (2) <code>r+</code> / <code>r-</code> links</i>

</p>

</div>

<p>We generally (hope to) see that for smaller peak-gene distances (in particular those that overlap, i.e., the peak and the gene are in direct vicinity or even overlapping), the difference between r+ and r- links is bigger as for more distant links. We also include the random links, for which no difference between r+ and r- links is visible, as expected for a well-calibrated background.</p>

<p>Let’s plot the same, but stratified by peak-gene distance and <code>r+</code> / <code>r-</code> within each plot instead:</p>

<divclass="figure">

<divclass="figure"style="text-align: center">

<imgsrc="figs/peakGene_QC_all/p-3.png"alt="<i>Density of raw p-values, stratified by (1) peak-gene distance (using equally sized bins) and (2) `r+` / `r-` links</i>"width="80%"><pclass="caption">

<i>Density of raw p-values, stratified by (1) peak-gene distance (using equally sized bins) and (2) <code>r+</code> / <code>r-</code> links</i>

<p>So far, we analyzed the raw p-value distribution in detail. Let’s focus now on the distribution of the correlation coefficient per se.</p>

<divclass="figure">

<divclass="figure"style="text-align: center">

<imgsrc="figs/peakGene_QC_all/p-4.png"alt="<i>Density of the correlation coefficient, stratified by (1) peak-gene distance (using equally sized bins)</i>"width="80%"><pclass="caption">

<i>Density of the correlation coefficient, stratified by (1) peak-gene distance (using equally sized bins)</i>

</p>

...

...

@@ -470,14 +469,14 @@

</ol>

<p>Both plot types compare the connectivity for the real and permuted data (denoted as <code>Network type</code> in the boxplot PDF), which allows a better judgment of the connectivity from the real data.</p>

<p>An example page for the summary heatmap looks like this:</p>

<divclass="figure">

<divclass="figure"style="text-align: center">

<imgsrc="figs/connectionsHeatmap/p-3.png"alt="<i>Example heatmap for the connection summary</i>"width="80%"><pclass="caption">

<i>Example heatmap for the connection summary</i>

</p>

</div>

<p>Here, two heatmaps are shown, one for real (top) and one for permuted (bottom) network. Each of them shows for different combinations of TF-peak and peak-gene FDRs (0.01 to 0.2) the number of unique node types for the given FDR combination (here: TFs).</p>

<p>Second, a multi-page summary PDF for the connections in form of a boxplot, as exemplified with the following Figure:</p>

<divclass="figure">

<divclass="figure"style="text-align: center">

<imgsrc="figs/connectionsBoxplot/p-04.png"alt="<i>Example boxplot for the connection summary</i>"width="80%"><pclass="caption">

<h2id="bug-reports-feature-requests-and-contact-information">Bug Reports, Feature Requests and Contact Information<aclass="anchor"aria-label="anchor"href="#bug-reports-feature-requests-and-contact-information"></a>

</h2>

<p>Please check out <strong><ahref="https://grp-zaugg.embl-community.io/GRaNIE"class="external-link">https://grp-zaugg.embl-community.io/GRaNIE</a></strong> for how to get in contact with us.</p>

<p>Please check out <strong><ahref="https://grp-zaugg.embl-community.io/GRaNIE"class="external-link">the main page</a></strong> for how to get in contact with us.</p>

<p>We got all the data in the right format, we can start with our <em>GRaNIE</em> analysis now! We start by specifying some parameters such as the genome assembly version the data have been produced with, as well as some optional object metadata that helps us to distinguish this <em>GRaNIE</em> object from others.</p>

<codeclass="sourceCode R"><spanclass="va">genomeAssembly</span><spanclass="op">=</span><spanclass="st">"hg38"</span><spanclass="co">#Either hg19, hg38 or mm10. Both peaks and RNA data must have the same genome assembly</span>

<spanclass="co"># Optional and arbitrary list with information and metadata that is stored</span>

<preclass="scroll-200"><code><spanclass="co">## INFO [2022-01-21 12:01:10] Empty GRN object created successfully. Type the object name (e.g., GRN) to retrieve summary information about it at any time.</span></code></pre>

<preclass="scroll-200"><code><spanclass="co">## INFO [2022-01-21 13:16:01] Empty GRN object created successfully. Type the object name (e.g., GRN) to retrieve summary information about it at any time.</span></code></pre>

<preclass="scroll-200"><code><spanclass="co">## INFO [2022-01-21 12:01:11] Normalize counts. Method: DESeq_sizeFactor, ID column: peakID</span>

<spanclass="co">## INFO [2022-01-21 12:01:17] Finished successfully. Execution time: 6 secs</span>

<spanclass="co">## INFO [2022-01-21 12:01:17] Normalize counts. Method: quantile, ID column: ENSEMBL</span>

<spanclass="co">## INFO [2022-01-21 12:01:18] Finished successfully. Execution time: 1 secs</span>

<spanclass="co">## INFO [2022-01-21 12:01:18] Subset RNA and peaks and keep only shared samples</span>

<spanclass="co">## INFO [2022-01-21 12:01:18] Number of samples for RNA before filtering: 29</span>

<spanclass="co">## INFO [2022-01-21 12:01:18] Number of samples for peaks before filtering: 31</span>

<spanclass="co">## INFO [2022-01-21 12:01:18] 29 samples (babk_D,bima_D,cicb_D,coyi_D,diku_D,eipl_D,eiwy_D,eofe_D,fafq_D,febc_D,fikt_D,guss_D,hayt_D,hehd_D,heja_D,hiaf_D,iill_D,kuxp_D,nukw_D,oapg_D,oevr_D,pamv_D,pelm_D,podx_D,qolg_D,sojd_D,vass_D,xugn_D,zaui_D) are shared between the peaks and RNA-Seq data</span>

<spanclass="co">## WARN [2022-01-21 12:01:18] The following samples from the peaks will be ignored for the classification due to missing overlap with RNA-Seq: uaqe_D,qaqx_D</span>

<spanclass="co">## INFO [2022-01-21 12:01:18] Number of samples for RNA after filtering: 29</span>

<spanclass="co">## INFO [2022-01-21 12:01:18] Number of samples for peaks data after filtering: 29</span>

<spanclass="co">## INFO [2022-01-21 12:01:18] Finished successfully. Execution time: 0.1 secs</span>

<spanclass="co">## INFO [2022-01-21 12:01:18] Produce 1 permutations of RNA-counts</span>

<spanclass="co">## INFO [2022-01-21 12:01:18] Shuffling columns 1 times</span>

<spanclass="co">## INFO [2022-01-21 12:01:18] Finished successfully. Execution time: 0 secs</span>

<spanclass="co">## INFO [2022-01-21 12:01:18] Parsing provided metadata...</span>

<spanclass="co">## INFO [2022-01-21 12:01:24] Check for overlapping peaks...</span>

<spanclass="co">## INFO [2022-01-21 12:01:26] Calculate statistics for each peak (mean and CV)</span>

<spanclass="co">## INFO [2022-01-21 12:01:26] Retrieve peak annotation using ChipSeeker. This may take a while</span>

<spanclass="co">## >> preparing features information... 2022-01-21 12:01:27</span>

<spanclass="co">## INFO [2022-01-21 12:02:02] Calculate GC-content for peaks... </span>

<spanclass="co">## INFO [2022-01-21 12:02:04] Finished successfully. Execution time: 2 secs</span>

<spanclass="co">## INFO [2022-01-21 12:02:04] Calculate statistics for each gene (mean and CV)</span></code></pre>

<preclass="scroll-200"><code><spanclass="co">## INFO [2022-01-21 13:16:02] Normalize counts. Method: DESeq_sizeFactor, ID column: peakID</span>

<spanclass="co">## INFO [2022-01-21 13:16:08] Finished successfully. Execution time: 6.1 secs</span>

<spanclass="co">## INFO [2022-01-21 13:16:08] Normalize counts. Method: quantile, ID column: ENSEMBL</span>

<spanclass="co">## INFO [2022-01-21 13:16:09] Finished successfully. Execution time: 1 secs</span>

<spanclass="co">## INFO [2022-01-21 13:16:09] Subset RNA and peaks and keep only shared samples</span>

<spanclass="co">## INFO [2022-01-21 13:16:09] Number of samples for RNA before filtering: 29</span>

<spanclass="co">## INFO [2022-01-21 13:16:09] Number of samples for peaks before filtering: 31</span>

<spanclass="co">## INFO [2022-01-21 13:16:09] 29 samples (babk_D,bima_D,cicb_D,coyi_D,diku_D,eipl_D,eiwy_D,eofe_D,fafq_D,febc_D,fikt_D,guss_D,hayt_D,hehd_D,heja_D,hiaf_D,iill_D,kuxp_D,nukw_D,oapg_D,oevr_D,pamv_D,pelm_D,podx_D,qolg_D,sojd_D,vass_D,xugn_D,zaui_D) are shared between the peaks and RNA-Seq data</span>

<spanclass="co">## WARN [2022-01-21 13:16:09] The following samples from the peaks will be ignored for the classification due to missing overlap with RNA-Seq: uaqe_D,qaqx_D</span>

<spanclass="co">## INFO [2022-01-21 13:16:09] Number of samples for RNA after filtering: 29</span>

<spanclass="co">## INFO [2022-01-21 13:16:09] Number of samples for peaks data after filtering: 29</span>

<spanclass="co">## INFO [2022-01-21 13:16:09] Finished successfully. Execution time: 0.1 secs</span>

<spanclass="co">## INFO [2022-01-21 13:16:09] Produce 1 permutations of RNA-counts</span>

<spanclass="co">## INFO [2022-01-21 13:16:09] Shuffling columns 1 times</span>

<spanclass="co">## INFO [2022-01-21 13:16:09] Finished successfully. Execution time: 0 secs</span>

<spanclass="co">## INFO [2022-01-21 13:16:09] Parsing provided metadata...</span>

<spanclass="co">## INFO [2022-01-21 13:16:15] Check for overlapping peaks...</span>

<spanclass="co">## INFO [2022-01-21 13:16:17] Calculate statistics for each peak (mean and CV)</span>

<spanclass="co">## INFO [2022-01-21 13:16:18] Retrieve peak annotation using ChipSeeker. This may take a while</span>

<spanclass="co">## >> preparing features information... 2022-01-21 13:16:19</span>

<spanclass="co">## INFO [2022-01-21 13:16:59] Calculate GC-content for peaks... </span>

<spanclass="co">## INFO [2022-01-21 13:17:02] Finished successfully. Execution time: 3 secs</span>

<spanclass="co">## INFO [2022-01-21 13:17:02] Calculate statistics for each gene (mean and CV)</span></code></pre>

<p>We can see from the output the details for the used normalization method, and the number of samples that are kept in the <em>GRaNIE</em> object. Here, all 29 samples from the RNA data are kept because they are also found in the peak data, while only 29 out of 31 samples from the peak data are also found in the RNA data, resulting in 29 shared samples overall. The RNA counts are also permuted, which will be the basis for all analysis and plots in subsequent steps that repeat the analysis for permuted data in addition to the real, non-permuted data.</p>

</div>

<divclass="section level3">

...

...

@@ -346,25 +343,25 @@ pre[class] {

<p>It is time for our first QC plots using the function <code><ahref="../reference/plotPCA_all.html">plotPCA_all()</a></code>! Now that we added peak and RNA data to the object, let’s check with a <em>Principal Component Analysis</em> (PCA) for both peak and RNA-seq data as well as the original input and the normalized data (unless normalization has been set to none, in which case they are identical to the original data) where the variation in the data comes from. If sample metadata has been provided in the <code><ahref="../reference/addData.html">addData()</a></code> function (something we strongly recommend), they are automatically added to the PCA plots by coloring the PCA results according to the provided metadata, so that potential batch effects can be examined and identified. For more details, see the R help (<code><ahref="../reference/plotPCA_all.html">?plotPCA_all</a></code>).</p>

<p>Note that while this step is recommended to do, it is fully optional from a workflow point of view.</p>

<codeclass="sourceCode R"><spanclass="va">GRN</span><spanclass="op">=</span><spanclass="fu">GRaNIE</span><spanclass="fu">::</span><spanclass="fu"><ahref="../reference/plotPCA_all.html">plotPCA_all</a></span><spanclass="op">(</span><spanclass="va">GRN</span>, type <spanclass="op">=</span><spanclass="fu"><ahref="https://rdrr.io/r/base/c.html"class="external-link">c</a></span><spanclass="op">(</span><spanclass="st">"rna"</span>, <spanclass="st">"peaks"</span><spanclass="op">)</span>, topn <spanclass="op">=</span><spanclass="fl">500</span>, forceRerun <spanclass="op">=</span><spanclass="cn">TRUE</span><spanclass="op">)</span></code></pre></div>

<preclass="scroll-200"><code><spanclass="co">## INFO [2022-01-21 12:02:06] </span>

<codeclass="sourceCode R"><spanclass="va">GRN</span><spanclass="op">=</span><spanclass="fu">GRaNIE</span><spanclass="fu">::</span><spanclass="fu"><ahref="../reference/plotPCA_all.html">plotPCA_all</a></span><spanclass="op">(</span><spanclass="va">GRN</span>, type <spanclass="op">=</span><spanclass="fu"><ahref="https://rdrr.io/r/base/c.html"class="external-link">c</a></span><spanclass="op">(</span><spanclass="st">"rna"</span>, <spanclass="st">"peaks"</span><spanclass="op">)</span>, topn <spanclass="op">=</span><spanclass="fl">500</span>, forceRerun <spanclass="op">=</span><spanclass="cn">TRUE</span><spanclass="op">)</span>

<spanclass="co">## INFO [2022-01-21 13:17:03] </span>

<spanclass="co">## Plotting PCA and metadata correlation of raw RNA data for all shared samples to file /g/scb2/zaugg/carnold/Projects/GRN_pipeline/src/GRaNIE/vignettes/output/plots/PCA_sharedSamples_RNA.raw.pdf... This may take a few minutes</span>

<spanclass="co">## INFO [2022-01-21 12:02:08] Prepare PCA. Count transformation: vst</span>

<spanclass="co">## INFO [2022-01-21 12:02:08] Writing to file /g/scb2/zaugg/carnold/Projects/GRN_pipeline/src/GRaNIE/vignettes/output/plots/PCA_sharedSamples_RNA.raw.pdf</span></code></pre>

<preclass="scroll-200"><code><spanclass="co">## INFO [2022-01-21 12:02:09] Performing and summarizing PCs across metadata for top 500 features</span></code></pre>

<preclass="scroll-200"><code><spanclass="co">## INFO [2022-01-21 12:02:12] </span>

<spanclass="co">## INFO [2022-01-21 13:17:05] Prepare PCA. Count transformation: vst</span>

<spanclass="co">## INFO [2022-01-21 13:17:05] Writing to file /g/scb2/zaugg/carnold/Projects/GRN_pipeline/src/GRaNIE/vignettes/output/plots/PCA_sharedSamples_RNA.raw.pdf</span>

<spanclass="co">## INFO [2022-01-21 13:17:07] Performing and summarizing PCs across metadata for top 500 features</span>

<spanclass="co">## INFO [2022-01-21 13:17:10] </span>

<spanclass="co">## Plotting PCA and metadata correlation of normalized RNA data for all shared samples to file /g/scb2/zaugg/carnold/Projects/GRN_pipeline/src/GRaNIE/vignettes/output/plots/PCA_sharedSamples_RNA.normalized.pdf... This may take a few minutes</span>

<spanclass="co">## INFO [2022-01-21 12:02:12] Prepare PCA. Count transformation: none</span>

<spanclass="co">## INFO [2022-01-21 12:02:12] Writing to file /g/scb2/zaugg/carnold/Projects/GRN_pipeline/src/GRaNIE/vignettes/output/plots/PCA_sharedSamples_RNA.normalized.pdf</span></code></pre>

<preclass="scroll-200"><code><spanclass="co">## INFO [2022-01-21 12:02:13] Performing and summarizing PCs across metadata for top 500 features</span></code></pre>

<preclass="scroll-200"><code><spanclass="co">## INFO [2022-01-21 12:02:16] Plotting PCA and metadata correlation of raw peaks data for all shared samples to file /g/scb2/zaugg/carnold/Projects/GRN_pipeline/src/GRaNIE/vignettes/output/plots/PCA_sharedSamples_peaks.raw.pdf... This may take a few minutes</span>

<spanclass="co">## INFO [2022-01-21 12:02:18] Prepare PCA. Count transformation: vst</span>

<spanclass="co">## INFO [2022-01-21 12:02:18] Writing to file /g/scb2/zaugg/carnold/Projects/GRN_pipeline/src/GRaNIE/vignettes/output/plots/PCA_sharedSamples_peaks.raw.pdf</span></code></pre>

<preclass="scroll-200"><code><spanclass="co">## INFO [2022-01-21 12:02:20] Performing and summarizing PCs across metadata for top 500 features</span></code></pre>

<preclass="scroll-200"><code><spanclass="co">## INFO [2022-01-21 12:02:23] Plotting PCA and metadata correlation of normalized peaks data for all shared samples to file /g/scb2/zaugg/carnold/Projects/GRN_pipeline/src/GRaNIE/vignettes/output/plots/PCA_sharedSamples_peaks.normalized.pdf... This may take a few minutes</span>

<spanclass="co">## INFO [2022-01-21 12:02:23] Prepare PCA. Count transformation: none</span>

<spanclass="co">## INFO [2022-01-21 12:02:23] Writing to file /g/scb2/zaugg/carnold/Projects/GRN_pipeline/src/GRaNIE/vignettes/output/plots/PCA_sharedSamples_peaks.normalized.pdf</span></code></pre>

<preclass="scroll-200"><code><spanclass="co">## INFO [2022-01-21 12:02:26] Performing and summarizing PCs across metadata for top 500 features</span></code></pre>

<spanclass="co">## INFO [2022-01-21 13:17:10] Prepare PCA. Count transformation: none</span>

<spanclass="co">## INFO [2022-01-21 13:17:10] Writing to file /g/scb2/zaugg/carnold/Projects/GRN_pipeline/src/GRaNIE/vignettes/output/plots/PCA_sharedSamples_RNA.normalized.pdf</span>

<spanclass="co">## INFO [2022-01-21 13:17:12] Performing and summarizing PCs across metadata for top 500 features</span>

<spanclass="co">## INFO [2022-01-21 13:17:14] Plotting PCA and metadata correlation of raw peaks data for all shared samples to file /g/scb2/zaugg/carnold/Projects/GRN_pipeline/src/GRaNIE/vignettes/output/plots/PCA_sharedSamples_peaks.raw.pdf... This may take a few minutes</span>

<spanclass="co">## INFO [2022-01-21 13:17:18] Prepare PCA. Count transformation: vst</span>

<spanclass="co">## INFO [2022-01-21 13:17:18] Writing to file /g/scb2/zaugg/carnold/Projects/GRN_pipeline/src/GRaNIE/vignettes/output/plots/PCA_sharedSamples_peaks.raw.pdf</span>

<spanclass="co">## INFO [2022-01-21 13:17:21] Performing and summarizing PCs across metadata for top 500 features</span>

<spanclass="co">## INFO [2022-01-21 13:17:24] Plotting PCA and metadata correlation of normalized peaks data for all shared samples to file /g/scb2/zaugg/carnold/Projects/GRN_pipeline/src/GRaNIE/vignettes/output/plots/PCA_sharedSamples_peaks.normalized.pdf... This may take a few minutes</span>

<spanclass="co">## INFO [2022-01-21 13:17:24] Prepare PCA. Count transformation: none</span>

<spanclass="co">## INFO [2022-01-21 13:17:24] Writing to file /g/scb2/zaugg/carnold/Projects/GRN_pipeline/src/GRaNIE/vignettes/output/plots/PCA_sharedSamples_peaks.normalized.pdf</span>

<spanclass="co">## INFO [2022-01-21 13:17:27] Performing and summarizing PCs across metadata for top 500 features</span></code></pre></div>

<p>We can see from the output that four PDF files have been produced, each of which plots the PCA results for the most variable 500, 1000, and 5000 features, respectively. For reasons of brevity and organization, we describe their interpretation and meaning in detail in the Introductory vignette and not here, however (click here for guidance and example plots).</p>

</div>

<divclass="section level3">

...

...

@@ -372,94 +369,94 @@ pre[class] {

</h3>

<p>Now it is time to add data for TFs and predicted TF binding sites (TFBS)! Our <em>GRaNIE</em> package requires pre-computed TFBS that need to be in a specific format (see the <ahref="packageDetails.html">Package Details Vignette</a> for details). In brief, a 6-column bed file must be present for each TF, with a specific file name that starts with the name of the TF, an arbitrary and optional suffix (here: “_TFBS”) and a particular file ending (supported are <em>bed</em> or <em>bed.gz</em>; here, we specify the latter). All these files must be located in a particular folder that the <code><ahref="../reference/addTFBS.html">addTFBS()</a></code> functions then searches in order to identify those files that match the specified patterns. We provide example TFBS for the 3 genome assemblies we support, see the comment below and the <ahref="packageDetails.html">Package Details Vignette</a> for details. After setting this up, we are ready to overlap the TFBS and the peaks by calling the function <code><ahref="../reference/overlapPeaksAndTFBS.html">overlapPeaksAndTFBS()</a></code>.</p>

<p>For more parameter details, see the R help (<code><ahref="../reference/addTFBS.html">?addTFBS</a></code> and <code><ahref="../reference/overlapPeaksAndTFBS.html">?overlapPeaksAndTFBS</a></code>).</p>

<spanclass="co">## INFO [2022-01-21 12:02:29] Use all TF from the database folder /media/carnold/DATADRIVE1/R/x86_64-pc-linux-gnu-library/4.1/GRaNIEData/extdata/TFBS_selected</span>

<spanclass="co">## INFO [2022-01-21 12:02:29] Reading file /media/carnold/DATADRIVE1/R/x86_64-pc-linux-gnu-library/4.1/GRaNIEData/extdata/TFBS_selected/translationTable.csv</span>

<spanclass="co">## INFO [2022-01-21 12:02:29] Finished successfully. Execution time: 0 secs</span>

<spanclass="co">## INFO [2022-01-21 12:02:29] Running the pipeline for 75 TF in total.</span></code></pre>

<spanclass="co">## INFO [2022-01-21 13:17:30] Use all TF from the database folder /media/carnold/DATADRIVE1/R/x86_64-pc-linux-gnu-library/4.1/GRaNIEData/extdata/TFBS_selected</span>

<spanclass="co">## INFO [2022-01-21 13:17:30] Reading file /media/carnold/DATADRIVE1/R/x86_64-pc-linux-gnu-library/4.1/GRaNIEData/extdata/TFBS_selected/translationTable.csv</span>

<spanclass="co">## INFO [2022-01-21 13:17:30] Finished successfully. Execution time: 0 secs</span>

<spanclass="co">## INFO [2022-01-21 13:17:30] Running the pipeline for 75 TF in total.</span></code></pre>

<preclass="scroll-200"><code><spanclass="co">## INFO [2022-01-21 12:02:29] Overlap peaks and TFBS using 1 cores. This may take a few minutes...</span>

<spanclass="co">## INFO [2022-01-21 12:02:31] Calculating intersection for TF AIRE.0.C finished. Number of overlapping TFBS after filtering: 295</span>

<spanclass="co">## INFO [2022-01-21 12:02:32] Calculating intersection for TF ANDR.0.A finished. Number of overlapping TFBS after filtering: 1182</span>

<spanclass="co">## INFO [2022-01-21 12:02:33] Calculating intersection for TF ANDR.1.A finished. Number of overlapping TFBS after filtering: 1007</span>

<spanclass="co">## INFO [2022-01-21 12:02:33] Calculating intersection for TF ANDR.2.A finished. Number of overlapping TFBS after filtering: 1385</span>

<spanclass="co">## INFO [2022-01-21 12:02:35] Calculating intersection for TF ARI3A.0.D finished. Number of overlapping TFBS after filtering: 390</span>

<spanclass="co">## INFO [2022-01-21 12:02:36] Calculating intersection for TF ARNT2.0.D finished. Number of overlapping TFBS after filtering: 1906</span>

<spanclass="co">## INFO [2022-01-21 12:02:37] Calculating intersection for TF ASCL1.0.A finished. Number of overlapping TFBS after filtering: 3454</span>

<spanclass="co">## INFO [2022-01-21 12:02:38] Calculating intersection for TF ASCL2.0.D finished. Number of overlapping TFBS after filtering: 2701</span>

<spanclass="co">## INFO [2022-01-21 12:02:38] Calculating intersection for TF ATF2.1.B finished. Number of overlapping TFBS after filtering: 918</span>

<spanclass="co">## INFO [2022-01-21 12:02:39] Calculating intersection for TF ATOH1.0.B finished. Number of overlapping TFBS after filtering: 2044</span>

<spanclass="co">## INFO [2022-01-21 12:02:40] Calculating intersection for TF BACH1.0.A finished. Number of overlapping TFBS after filtering: 2786</span>

<spanclass="co">## INFO [2022-01-21 12:02:41] Calculating intersection for TF BATF3.0.B finished. Number of overlapping TFBS after filtering: 1095</span>

<spanclass="co">## INFO [2022-01-21 12:02:43] Calculating intersection for TF BC11A.0.A finished. Number of overlapping TFBS after filtering: 10545</span>

<spanclass="co">## INFO [2022-01-21 12:02:44] Calculating intersection for TF BCL6.0.A finished. Number of overlapping TFBS after filtering: 1204</span>

<spanclass="co">## INFO [2022-01-21 12:02:44] Calculating intersection for TF BHA15.0.B finished. Number of overlapping TFBS after filtering: 3414</span>

<spanclass="co">## INFO [2022-01-21 12:02:45] Calculating intersection for TF BHE41.0.D finished. Number of overlapping TFBS after filtering: 1638</span>

<spanclass="co">## INFO [2022-01-21 12:02:46] Calculating intersection for TF BPTF.0.D finished. Number of overlapping TFBS after filtering: 1388</span>

<spanclass="co">## INFO [2022-01-21 12:02:47] Calculating intersection for TF BRCA1.0.D finished. Number of overlapping TFBS after filtering: 731</span>

<spanclass="co">## INFO [2022-01-21 12:02:48] Calculating intersection for TF CDX1.0.C finished. Number of overlapping TFBS after filtering: 778</span>

<spanclass="co">## INFO [2022-01-21 12:02:48] Calculating intersection for TF CDX2.0.A finished. Number of overlapping TFBS after filtering: 449</span>

<spanclass="co">## INFO [2022-01-21 12:02:49] Calculating intersection for TF CEBPA.0.A finished. Number of overlapping TFBS after filtering: 1327</span>

<spanclass="co">## INFO [2022-01-21 12:02:50] Calculating intersection for TF CENPB.0.D finished. Number of overlapping TFBS after filtering: 1057</span>

<spanclass="co">## INFO [2022-01-21 12:02:51] Calculating intersection for TF CLOCK.0.C finished. Number of overlapping TFBS after filtering: 1328</span>

<spanclass="co">## INFO [2022-01-21 12:02:52] Calculating intersection for TF CTCF.0.A finished. Number of overlapping TFBS after filtering: 8572</span>

<spanclass="co">## INFO [2022-01-21 12:02:53] Calculating intersection for TF CTCFL.0.A finished. Number of overlapping TFBS after filtering: 8586</span>

<spanclass="co">## INFO [2022-01-21 12:02:53] Calculating intersection for TF CUX2.0.D finished. Number of overlapping TFBS after filtering: 182</span>

<spanclass="co">## INFO [2022-01-21 12:02:54] Calculating intersection for TF DLX1.0.D finished. Number of overlapping TFBS after filtering: 192</span>

<spanclass="co">## INFO [2022-01-21 12:02:55] Calculating intersection for TF DLX2.0.D finished. Number of overlapping TFBS after filtering: 235</span>

<spanclass="co">## INFO [2022-01-21 12:02:56] Calculating intersection for TF DLX4.0.D finished. Number of overlapping TFBS after filtering: 127</span>

<spanclass="co">## INFO [2022-01-21 12:02:56] Calculating intersection for TF DLX6.0.D finished. Number of overlapping TFBS after filtering: 117</span>

<spanclass="co">## INFO [2022-01-21 12:02:57] Calculating intersection for TF DMBX1.0.D finished. Number of overlapping TFBS after filtering: 132</span>

<spanclass="co">## INFO [2022-01-21 12:02:58] Calculating intersection for TF DMRT1.0.D finished. Number of overlapping TFBS after filtering: 460</span>

<spanclass="co">## INFO [2022-01-21 12:02:59] Calculating intersection for TF E2F1.0.A finished. Number of overlapping TFBS after filtering: 3117</span>

<spanclass="co">## INFO [2022-01-21 12:02:59] Calculating intersection for TF E2F3.0.A finished. Number of overlapping TFBS after filtering: 1702</span>

<spanclass="co">## INFO [2022-01-21 12:03:00] Calculating intersection for TF E2F4.0.A finished. Number of overlapping TFBS after filtering: 4214</span>

<spanclass="co">## INFO [2022-01-21 12:03:01] Calculating intersection for TF E2F6.0.A finished. Number of overlapping TFBS after filtering: 5571</span>

<spanclass="co">## INFO [2022-01-21 12:03:02] Calculating intersection for TF E2F7.0.B finished. Number of overlapping TFBS after filtering: 4742</span>

<spanclass="co">## INFO [2022-01-21 12:03:03] Calculating intersection for TF COE1.0.A finished. Number of overlapping TFBS after filtering: 2350</span>

<spanclass="co">## INFO [2022-01-21 12:03:05] Calculating intersection for TF EGR1.0.A finished. Number of overlapping TFBS after filtering: 8727</span>

<spanclass="co">## INFO [2022-01-21 12:03:09] Calculating intersection for TF EGR2.0.A finished. Number of overlapping TFBS after filtering: 12510</span>

<spanclass="co">## INFO [2022-01-21 12:03:11] Calculating intersection for TF EGR2.1.A finished. Number of overlapping TFBS after filtering: 8788</span>

<spanclass="co">## INFO [2022-01-21 12:03:12] Calculating intersection for TF EHF.0.B finished. Number of overlapping TFBS after filtering: 4947</span>

<spanclass="co">## INFO [2022-01-21 12:03:13] Calculating intersection for TF ELF1.0.A finished. Number of overlapping TFBS after filtering: 3497</span>

<spanclass="co">## INFO [2022-01-21 12:03:14] Calculating intersection for TF ELF3.0.A finished. Number of overlapping TFBS after filtering: 5449</span>

<spanclass="co">## INFO [2022-01-21 12:03:14] Calculating intersection for TF ELK3.0.D finished. Number of overlapping TFBS after filtering: 2171</span>

<spanclass="co">## INFO [2022-01-21 12:03:15] Calculating intersection for TF ESR1.0.A finished. Number of overlapping TFBS after filtering: 1448</span>

<spanclass="co">## INFO [2022-01-21 12:03:16] Calculating intersection for TF ESR1.1.A finished. Number of overlapping TFBS after filtering: 1604</span>

<spanclass="co">## INFO [2022-01-21 12:03:17] Calculating intersection for TF ESR2.0.A finished. Number of overlapping TFBS after filtering: 1878</span>

<spanclass="co">## INFO [2022-01-21 12:03:20] Calculating intersection for TF ESR2.1.A finished. Number of overlapping TFBS after filtering: 3875</span>

<spanclass="co">## INFO [2022-01-21 12:03:20] Calculating intersection for TF ERR1.0.A finished. Number of overlapping TFBS after filtering: 1267</span>

<spanclass="co">## INFO [2022-01-21 12:03:22] Calculating intersection for TF ETS1.0.A finished. Number of overlapping TFBS after filtering: 6255</span>

<spanclass="co">## INFO [2022-01-21 12:03:23] Calculating intersection for TF ETS2.0.B finished. Number of overlapping TFBS after filtering: 7322</span>

<spanclass="co">## INFO [2022-01-21 12:03:24] Calculating intersection for TF ETV2.0.B finished. Number of overlapping TFBS after filtering: 6413</span>

<spanclass="co">## INFO [2022-01-21 12:03:25] Calculating intersection for TF ETV4.0.B finished. Number of overlapping TFBS after filtering: 5073</span>

<spanclass="co">## INFO [2022-01-21 12:03:27] Calculating intersection for TF ETV5.0.C finished. Number of overlapping TFBS after filtering: 10335</span>

<spanclass="co">## INFO [2022-01-21 12:03:27] Calculating intersection for TF FEZF1.0.C finished. Number of overlapping TFBS after filtering: 1030</span>

<spanclass="co">## INFO [2022-01-21 12:03:29] Calculating intersection for TF FLI1.1.A finished. Number of overlapping TFBS after filtering: 8982</span>

<spanclass="co">## INFO [2022-01-21 12:03:29] Calculating intersection for TF FOXA3.0.B finished. Number of overlapping TFBS after filtering: 485</span>

<spanclass="co">## INFO [2022-01-21 12:03:30] Calculating intersection for TF FOXB1.0.D finished. Number of overlapping TFBS after filtering: 257</span>

<spanclass="co">## INFO [2022-01-21 12:03:30] Calculating intersection for TF FOXC2.0.D finished. Number of overlapping TFBS after filtering: 676</span>

<spanclass="co">## INFO [2022-01-21 12:03:31] Calculating intersection for TF FOXD2.0.D finished. Number of overlapping TFBS after filtering: 240</span>

<spanclass="co">## INFO [2022-01-21 12:03:32] Calculating intersection for TF FOXD3.0.D finished. Number of overlapping TFBS after filtering: 958</span>

<spanclass="co">## INFO [2022-01-21 12:03:33] Calculating intersection for TF FOXF1.0.D finished. Number of overlapping TFBS after filtering: 441</span>

<spanclass="co">## INFO [2022-01-21 12:03:33] Calculating intersection for TF FOXO4.0.C finished. Number of overlapping TFBS after filtering: 392</span>

<spanclass="co">## INFO [2022-01-21 12:03:34] Calculating intersection for TF FOXP1.0.A finished. Number of overlapping TFBS after filtering: 435</span>

<spanclass="co">## INFO [2022-01-21 12:03:35] Calculating intersection for TF FOXP3.0.D finished. Number of overlapping TFBS after filtering: 358</span>

<spanclass="co">## INFO [2022-01-21 12:03:36] Calculating intersection for TF FUBP1.0.D finished. Number of overlapping TFBS after filtering: 1034</span>

<spanclass="co">## INFO [2022-01-21 12:03:37] Calculating intersection for TF EVI1.0.B finished. Number of overlapping TFBS after filtering: 243</span>

<spanclass="co">## INFO [2022-01-21 12:03:38] Calculating intersection for TF COT1.0.C finished. Number of overlapping TFBS after filtering: 4789</span>

<spanclass="co">## INFO [2022-01-21 12:03:39] Calculating intersection for TF COT1.1.C finished. Number of overlapping TFBS after filtering: 2968</span>

<spanclass="co">## INFO [2022-01-21 12:03:40] Calculating intersection for TF COT2.0.A finished. Number of overlapping TFBS after filtering: 1403</span>

<spanclass="co">## INFO [2022-01-21 12:03:41] Calculating intersection for TF COT2.1.A finished. Number of overlapping TFBS after filtering: 2539</span>

<spanclass="co">## INFO [2022-01-21 12:03:41] Calculating intersection for TF BRAC.0.A finished. Number of overlapping TFBS after filtering: 740</span>

<spanclass="co">## INFO [2022-01-21 12:03:42] Calculating intersection for TF AP2A.0.A finished. Number of overlapping TFBS after filtering: 2987</span>

<spanclass="co">## INFO [2022-01-21 12:03:43] Calculating intersection for TF AP2B.0.B finished. Number of overlapping TFBS after filtering: 4197</span>

<spanclass="co">## INFO [2022-01-21 12:03:43] Finished execution using 1 cores. TOTAL RUNNING TIME: 1.2 mins</span></code></pre>

<preclass="scroll-200"><code><spanclass="co">## INFO [2022-01-21 13:17:30] Overlap peaks and TFBS using 1 cores. This may take a few minutes...</span>

<spanclass="co">## INFO [2022-01-21 13:17:32] Calculating intersection for TF AIRE.0.C finished. Number of overlapping TFBS after filtering: 295</span>

<spanclass="co">## INFO [2022-01-21 13:17:34] Calculating intersection for TF ANDR.0.A finished. Number of overlapping TFBS after filtering: 1182</span>

<spanclass="co">## INFO [2022-01-21 13:17:34] Calculating intersection for TF ANDR.1.A finished. Number of overlapping TFBS after filtering: 1007</span>

<spanclass="co">## INFO [2022-01-21 13:17:35] Calculating intersection for TF ANDR.2.A finished. Number of overlapping TFBS after filtering: 1385</span>

<spanclass="co">## INFO [2022-01-21 13:17:37] Calculating intersection for TF ARI3A.0.D finished. Number of overlapping TFBS after filtering: 390</span>

<spanclass="co">## INFO [2022-01-21 13:17:38] Calculating intersection for TF ARNT2.0.D finished. Number of overlapping TFBS after filtering: 1906</span>

<spanclass="co">## INFO [2022-01-21 13:17:39] Calculating intersection for TF ASCL1.0.A finished. Number of overlapping TFBS after filtering: 3454</span>

<spanclass="co">## INFO [2022-01-21 13:17:40] Calculating intersection for TF ASCL2.0.D finished. Number of overlapping TFBS after filtering: 2701</span>

<spanclass="co">## INFO [2022-01-21 13:17:41] Calculating intersection for TF ATF2.1.B finished. Number of overlapping TFBS after filtering: 918</span>

<spanclass="co">## INFO [2022-01-21 13:17:42] Calculating intersection for TF ATOH1.0.B finished. Number of overlapping TFBS after filtering: 2044</span>

<spanclass="co">## INFO [2022-01-21 13:17:43] Calculating intersection for TF BACH1.0.A finished. Number of overlapping TFBS after filtering: 2786</span>

<spanclass="co">## INFO [2022-01-21 13:17:43] Calculating intersection for TF BATF3.0.B finished. Number of overlapping TFBS after filtering: 1095</span>

<spanclass="co">## INFO [2022-01-21 13:17:46] Calculating intersection for TF BC11A.0.A finished. Number of overlapping TFBS after filtering: 10545</span>

<spanclass="co">## INFO [2022-01-21 13:17:46] Calculating intersection for TF BCL6.0.A finished. Number of overlapping TFBS after filtering: 1204</span>

<spanclass="co">## INFO [2022-01-21 13:17:47] Calculating intersection for TF BHA15.0.B finished. Number of overlapping TFBS after filtering: 3414</span>

<spanclass="co">## INFO [2022-01-21 13:17:48] Calculating intersection for TF BHE41.0.D finished. Number of overlapping TFBS after filtering: 1638</span>

<spanclass="co">## INFO [2022-01-21 13:17:49] Calculating intersection for TF BPTF.0.D finished. Number of overlapping TFBS after filtering: 1388</span>

<spanclass="co">## INFO [2022-01-21 13:17:50] Calculating intersection for TF BRCA1.0.D finished. Number of overlapping TFBS after filtering: 731</span>

<spanclass="co">## INFO [2022-01-21 13:17:51] Calculating intersection for TF CDX1.0.C finished. Number of overlapping TFBS after filtering: 778</span>

<spanclass="co">## INFO [2022-01-21 13:17:52] Calculating intersection for TF CDX2.0.A finished. Number of overlapping TFBS after filtering: 449</span>

<spanclass="co">## INFO [2022-01-21 13:17:53] Calculating intersection for TF CEBPA.0.A finished. Number of overlapping TFBS after filtering: 1327</span>

<spanclass="co">## INFO [2022-01-21 13:17:54] Calculating intersection for TF CENPB.0.D finished. Number of overlapping TFBS after filtering: 1057</span>

<spanclass="co">## INFO [2022-01-21 13:17:55] Calculating intersection for TF CLOCK.0.C finished. Number of overlapping TFBS after filtering: 1328</span>

<spanclass="co">## INFO [2022-01-21 13:17:57] Calculating intersection for TF CTCF.0.A finished. Number of overlapping TFBS after filtering: 8572</span>

<spanclass="co">## INFO [2022-01-21 13:17:58] Calculating intersection for TF CTCFL.0.A finished. Number of overlapping TFBS after filtering: 8586</span>

<spanclass="co">## INFO [2022-01-21 13:17:59] Calculating intersection for TF CUX2.0.D finished. Number of overlapping TFBS after filtering: 182</span>

<spanclass="co">## INFO [2022-01-21 13:17:59] Calculating intersection for TF DLX1.0.D finished. Number of overlapping TFBS after filtering: 192</span>

<spanclass="co">## INFO [2022-01-21 13:18:00] Calculating intersection for TF DLX2.0.D finished. Number of overlapping TFBS after filtering: 235</span>

<spanclass="co">## INFO [2022-01-21 13:18:01] Calculating intersection for TF DLX4.0.D finished. Number of overlapping TFBS after filtering: 127</span>

<spanclass="co">## INFO [2022-01-21 13:18:01] Calculating intersection for TF DLX6.0.D finished. Number of overlapping TFBS after filtering: 117</span>

<spanclass="co">## INFO [2022-01-21 13:18:02] Calculating intersection for TF DMBX1.0.D finished. Number of overlapping TFBS after filtering: 132</span>

<spanclass="co">## INFO [2022-01-21 13:18:02] Calculating intersection for TF DMRT1.0.D finished. Number of overlapping TFBS after filtering: 460</span>

<spanclass="co">## INFO [2022-01-21 13:18:03] Calculating intersection for TF E2F1.0.A finished. Number of overlapping TFBS after filtering: 3117</span>

<spanclass="co">## INFO [2022-01-21 13:18:04] Calculating intersection for TF E2F3.0.A finished. Number of overlapping TFBS after filtering: 1702</span>

<spanclass="co">## INFO [2022-01-21 13:18:05] Calculating intersection for TF E2F4.0.A finished. Number of overlapping TFBS after filtering: 4214</span>

<spanclass="co">## INFO [2022-01-21 13:18:06] Calculating intersection for TF E2F6.0.A finished. Number of overlapping TFBS after filtering: 5571</span>

<spanclass="co">## INFO [2022-01-21 13:18:07] Calculating intersection for TF E2F7.0.B finished. Number of overlapping TFBS after filtering: 4742</span>

<spanclass="co">## INFO [2022-01-21 13:18:08] Calculating intersection for TF COE1.0.A finished. Number of overlapping TFBS after filtering: 2350</span>

<spanclass="co">## INFO [2022-01-21 13:18:10] Calculating intersection for TF EGR1.0.A finished. Number of overlapping TFBS after filtering: 8727</span>

<spanclass="co">## INFO [2022-01-21 13:18:13] Calculating intersection for TF EGR2.0.A finished. Number of overlapping TFBS after filtering: 12510</span>

<spanclass="co">## INFO [2022-01-21 13:18:15] Calculating intersection for TF EGR2.1.A finished. Number of overlapping TFBS after filtering: 8788</span>

<spanclass="co">## INFO [2022-01-21 13:18:16] Calculating intersection for TF EHF.0.B finished. Number of overlapping TFBS after filtering: 4947</span>

<spanclass="co">## INFO [2022-01-21 13:18:17] Calculating intersection for TF ELF1.0.A finished. Number of overlapping TFBS after filtering: 3497</span>

<spanclass="co">## INFO [2022-01-21 13:18:18] Calculating intersection for TF ELF3.0.A finished. Number of overlapping TFBS after filtering: 5449</span>

<spanclass="co">## INFO [2022-01-21 13:18:19] Calculating intersection for TF ELK3.0.D finished. Number of overlapping TFBS after filtering: 2171</span>

<spanclass="co">## INFO [2022-01-21 13:18:20] Calculating intersection for TF ESR1.0.A finished. Number of overlapping TFBS after filtering: 1448</span>

<spanclass="co">## INFO [2022-01-21 13:18:21] Calculating intersection for TF ESR1.1.A finished. Number of overlapping TFBS after filtering: 1604</span>

<spanclass="co">## INFO [2022-01-21 13:18:21] Calculating intersection for TF ESR2.0.A finished. Number of overlapping TFBS after filtering: 1878</span>

<spanclass="co">## INFO [2022-01-21 13:18:23] Calculating intersection for TF ESR2.1.A finished. Number of overlapping TFBS after filtering: 3875</span>

<spanclass="co">## INFO [2022-01-21 13:18:23] Calculating intersection for TF ERR1.0.A finished. Number of overlapping TFBS after filtering: 1267</span>

<spanclass="co">## INFO [2022-01-21 13:18:24] Calculating intersection for TF ETS1.0.A finished. Number of overlapping TFBS after filtering: 6255</span>

<spanclass="co">## INFO [2022-01-21 13:18:26] Calculating intersection for TF ETS2.0.B finished. Number of overlapping TFBS after filtering: 7322</span>

<spanclass="co">## INFO [2022-01-21 13:18:27] Calculating intersection for TF ETV2.0.B finished. Number of overlapping TFBS after filtering: 6413</span>

<spanclass="co">## INFO [2022-01-21 13:18:28] Calculating intersection for TF ETV4.0.B finished. Number of overlapping TFBS after filtering: 5073</span>

<spanclass="co">## INFO [2022-01-21 13:18:30] Calculating intersection for TF ETV5.0.C finished. Number of overlapping TFBS after filtering: 10335</span>

<spanclass="co">## INFO [2022-01-21 13:18:30] Calculating intersection for TF FEZF1.0.C finished. Number of overlapping TFBS after filtering: 1030</span>

<spanclass="co">## INFO [2022-01-21 13:18:32] Calculating intersection for TF FLI1.1.A finished. Number of overlapping TFBS after filtering: 8982</span>

<spanclass="co">## INFO [2022-01-21 13:18:32] Calculating intersection for TF FOXA3.0.B finished. Number of overlapping TFBS after filtering: 485</span>

<spanclass="co">## INFO [2022-01-21 13:18:33] Calculating intersection for TF FOXB1.0.D finished. Number of overlapping TFBS after filtering: 257</span>

<spanclass="co">## INFO [2022-01-21 13:18:34] Calculating intersection for TF FOXC2.0.D finished. Number of overlapping TFBS after filtering: 676</span>

<spanclass="co">## INFO [2022-01-21 13:18:34] Calculating intersection for TF FOXD2.0.D finished. Number of overlapping TFBS after filtering: 240</span>

<spanclass="co">## INFO [2022-01-21 13:18:35] Calculating intersection for TF FOXD3.0.D finished. Number of overlapping TFBS after filtering: 958</span>

<spanclass="co">## INFO [2022-01-21 13:18:36] Calculating intersection for TF FOXF1.0.D finished. Number of overlapping TFBS after filtering: 441</span>

<spanclass="co">## INFO [2022-01-21 13:18:37] Calculating intersection for TF FOXO4.0.C finished. Number of overlapping TFBS after filtering: 392</span>

<spanclass="co">## INFO [2022-01-21 13:18:38] Calculating intersection for TF FOXP1.0.A finished. Number of overlapping TFBS after filtering: 435</span>

<spanclass="co">## INFO [2022-01-21 13:18:38] Calculating intersection for TF FOXP3.0.D finished. Number of overlapping TFBS after filtering: 358</span>

<spanclass="co">## INFO [2022-01-21 13:18:40] Calculating intersection for TF FUBP1.0.D finished. Number of overlapping TFBS after filtering: 1034</span>

<spanclass="co">## INFO [2022-01-21 13:18:40] Calculating intersection for TF EVI1.0.B finished. Number of overlapping TFBS after filtering: 243</span>

<spanclass="co">## INFO [2022-01-21 13:18:42] Calculating intersection for TF COT1.0.C finished. Number of overlapping TFBS after filtering: 4789</span>

<spanclass="co">## INFO [2022-01-21 13:18:43] Calculating intersection for TF COT1.1.C finished. Number of overlapping TFBS after filtering: 2968</span>

<spanclass="co">## INFO [2022-01-21 13:18:44] Calculating intersection for TF COT2.0.A finished. Number of overlapping TFBS after filtering: 1403</span>

<spanclass="co">## INFO [2022-01-21 13:18:46] Calculating intersection for TF COT2.1.A finished. Number of overlapping TFBS after filtering: 2539</span>

<spanclass="co">## INFO [2022-01-21 13:18:46] Calculating intersection for TF BRAC.0.A finished. Number of overlapping TFBS after filtering: 740</span>

<spanclass="co">## INFO [2022-01-21 13:18:47] Calculating intersection for TF AP2A.0.A finished. Number of overlapping TFBS after filtering: 2987</span>

<spanclass="co">## INFO [2022-01-21 13:18:48] Calculating intersection for TF AP2B.0.B finished. Number of overlapping TFBS after filtering: 4197</span>

<spanclass="co">## INFO [2022-01-21 13:18:48] Finished execution using 1 cores. TOTAL RUNNING TIME: 1.3 mins</span></code></pre>

<p>We see from the output that 75 TFs have been found in the specified input folder, and the number of TFBS that overlap our peaks for each of them. We now successfully added our TFs and TFBS to the <em>GRaNIE</em> object.</p>

</div>

<divclass="section level3">

...

...

@@ -475,32 +472,32 @@ pre[class] {

<p>For RNA-seq, we currently support the analogous filter as for open chromatin for normalized mean counts as explained above (<em>minNormalizedMeanRNA</em>).</p>

<p>The default values are usually suitable for bulk data and should result in the removal of very few peaks / genes; however, for single-cell data, lowering them may more reasonable. The output will print clearly how many peaks and genes have been filtered, so you can rerun the function with different values if needed.</p>

<p>For more parameter details, see the R help (<code><ahref="../reference/filterData.html">?filterData</a></code>).</p>

<preclass="scroll-200"><code><spanclass="co">## INFO [2022-01-21 12:03:44] FILTER PEAKS</span>

<spanclass="co">## INFO [2022-01-21 12:03:44] Number of peaks before filtering : 75000</span>

<spanclass="co">## INFO [2022-01-21 12:03:44] Filter peaks by CV: Min = 0</span>

<spanclass="co">## INFO [2022-01-21 12:03:44] Filter peaks by mean: Min = 5</span>

<spanclass="co">## INFO [2022-01-21 12:03:44] Number of peaks after filtering : 64008</span>

<spanclass="co">## INFO [2022-01-21 12:03:44] Finished successfully. Execution time: 0.1 secs</span>

<spanclass="co">## INFO [2022-01-21 12:03:44] Filter and sort peaks and remain only those on the following chromosomes: chr1,chr2,chr3,chr4,chr5,chr6,chr7,chr8,chr9,chr10,chr11,chr12,chr13,chr14,chr15,chr16,chr17,chr18,chr19,chr20,chr21,chr22,chrX,chrY</span>

<spanclass="co">## INFO [2022-01-21 12:03:44] Filter and sort peaks by size and remain only those smaller than : 10000</span>

<spanclass="co">## INFO [2022-01-21 12:03:44] Number of peaks before filtering: 75000</span>

<spanclass="co">## INFO [2022-01-21 12:03:44] Number of peaks after filtering : 75000</span>

<spanclass="co">## INFO [2022-01-21 12:03:44] Finished successfully. Execution time: 0.3 secs</span>

<spanclass="co">## INFO [2022-01-21 12:03:44] Collectively, filter 10992 out of 75000 peaks.</span>

<spanclass="co">## INFO [2022-01-21 12:03:44] Number of remaining peaks: 64008</span>

<spanclass="co">## INFO [2022-01-21 12:03:44] FILTER RNA-seq</span>

<spanclass="co">## INFO [2022-01-21 12:03:44] Number of genes before filtering : 61534</span>

<spanclass="co">## INFO [2022-01-21 12:03:44] Filter genes by CV: Min = 0</span>

<spanclass="co">## INFO [2022-01-21 12:03:44] Filter genes by mean: Min = 1</span>

<spanclass="co">## INFO [2022-01-21 12:03:44] Number of genes after filtering : 18924</span>

<spanclass="co">## INFO [2022-01-21 12:03:45] Finished successfully. Execution time: 0.1 secs</span>

<spanclass="co">## INFO [2022-01-21 12:03:45] Number of rows in total: 35033</span>

<spanclass="co">## INFO [2022-01-21 12:03:45] Flagged 16211 rows because the row mean was smaller than 1</span></code></pre>

<preclass="scroll-200"><code><spanclass="co">## INFO [2022-01-21 13:18:49] FILTER PEAKS</span>

<spanclass="co">## INFO [2022-01-21 13:18:49] Number of peaks before filtering : 75000</span>

<spanclass="co">## INFO [2022-01-21 13:18:49] Filter peaks by CV: Min = 0</span>

<spanclass="co">## INFO [2022-01-21 13:18:49] Filter peaks by mean: Min = 5</span>

<spanclass="co">## INFO [2022-01-21 13:18:49] Number of peaks after filtering : 64008</span>

<spanclass="co">## INFO [2022-01-21 13:18:49] Finished successfully. Execution time: 0.1 secs</span>

<spanclass="co">## INFO [2022-01-21 13:18:49] Filter and sort peaks and remain only those on the following chromosomes: chr1,chr2,chr3,chr4,chr5,chr6,chr7,chr8,chr9,chr10,chr11,chr12,chr13,chr14,chr15,chr16,chr17,chr18,chr19,chr20,chr21,chr22,chrX,chrY</span>

<spanclass="co">## INFO [2022-01-21 13:18:49] Filter and sort peaks by size and remain only those smaller than : 10000</span>

<spanclass="co">## INFO [2022-01-21 13:18:49] Number of peaks before filtering: 75000</span>

<spanclass="co">## INFO [2022-01-21 13:18:49] Number of peaks after filtering : 75000</span>

<spanclass="co">## INFO [2022-01-21 13:18:49] Finished successfully. Execution time: 0.4 secs</span>

<spanclass="co">## INFO [2022-01-21 13:18:49] Collectively, filter 10992 out of 75000 peaks.</span>

<spanclass="co">## INFO [2022-01-21 13:18:49] Number of remaining peaks: 64008</span>

<spanclass="co">## INFO [2022-01-21 13:18:50] FILTER RNA-seq</span>

<spanclass="co">## INFO [2022-01-21 13:18:50] Number of genes before filtering : 61534</span>

<spanclass="co">## INFO [2022-01-21 13:18:50] Filter genes by CV: Min = 0</span>

<spanclass="co">## INFO [2022-01-21 13:18:50] Filter genes by mean: Min = 1</span>

<spanclass="co">## INFO [2022-01-21 13:18:50] Number of genes after filtering : 18924</span>