diff --git a/README.Rmd b/README.Rmd
index 199786c..08426c3 100644
--- a/README.Rmd
+++ b/README.Rmd
@@ -19,7 +19,7 @@ knitr::opts_chunk$set(
-# lineaGT
+# tickTack
tickTack is a package to infer kinetic parameters of an evolving population whose size is observed at discrete intervals of time. The tool is able to
diff --git a/README.md b/README.md
index 2f60623..4785614 100644
--- a/README.md
+++ b/README.md
@@ -7,7 +7,7 @@
-# lineaGT
+# tickTack
tickTack is a package to infer kinetic parameters of an evolving
population whose size is observed at discrete intervals of time. The
diff --git a/man/figures/logo.png b/man/figures/logo.png
index b0ebb05..237833b 100644
Binary files a/man/figures/logo.png and b/man/figures/logo.png differ
diff --git a/man/figures/tickTack.png b/man/figures/tickTack.png
deleted file mode 100644
index 237833b..0000000
Binary files a/man/figures/tickTack.png and /dev/null differ
diff --git a/pkgdown/favicon/apple-touch-icon.png b/pkgdown/favicon/apple-touch-icon.png
index e20bc80..18e8cf0 100644
Binary files a/pkgdown/favicon/apple-touch-icon.png and b/pkgdown/favicon/apple-touch-icon.png differ
diff --git a/pkgdown/favicon/favicon-96x96.png b/pkgdown/favicon/favicon-96x96.png
index c8d47c1..776ff7c 100644
Binary files a/pkgdown/favicon/favicon-96x96.png and b/pkgdown/favicon/favicon-96x96.png differ
diff --git a/pkgdown/favicon/favicon.ico b/pkgdown/favicon/favicon.ico
index 3c281e1..3ba078b 100644
Binary files a/pkgdown/favicon/favicon.ico and b/pkgdown/favicon/favicon.ico differ
diff --git a/pkgdown/favicon/favicon.svg b/pkgdown/favicon/favicon.svg
index 214e207..506e225 100644
--- a/pkgdown/favicon/favicon.svg
+++ b/pkgdown/favicon/favicon.svg
@@ -1,3 +1,29 @@
-
\ No newline at end of file
diff --git a/pkgdown/favicon/web-app-manifest-192x192.png b/pkgdown/favicon/web-app-manifest-192x192.png
index 7ceec0f..b3aa15b 100644
Binary files a/pkgdown/favicon/web-app-manifest-192x192.png and b/pkgdown/favicon/web-app-manifest-192x192.png differ
diff --git a/pkgdown/favicon/web-app-manifest-512x512.png b/pkgdown/favicon/web-app-manifest-512x512.png
index 4067d21..5029589 100644
Binary files a/pkgdown/favicon/web-app-manifest-512x512.png and b/pkgdown/favicon/web-app-manifest-512x512.png differ
diff --git a/vignettes/a3_Understanding_single_segment_timing.Rmd b/vignettes/a3_Understanding_single_segment_timing.Rmd
index 5453a4a..9e74492 100644
--- a/vignettes/a3_Understanding_single_segment_timing.Rmd
+++ b/vignettes/a3_Understanding_single_segment_timing.Rmd
@@ -23,11 +23,12 @@ The timing results are obtained in the following steps:
The clonal peaks are calculated using the `get_clonal_peaks` function. The function computes the theoretical VAF peaks based on the karyotype and tumor purity.
They are computed using the following equation:
-\[
+$$
\text{Peak}_i = \frac{M_i \cdot P}{(N_{\text{tot}} \cdot P) + 2 \cdot (1 - P)}
-\]
+$$
Where:
+
- \( M_i \): The multiplicity of the allele of interest (e.g., the major allele or a single copy for heterozygosity).
- \( P \): The tumor purity (a value between 0 and 1).
- \( N_{\text{tot}} \): The total number of copies in the karyotype (e.g., sum of the major and minor alleles).
@@ -39,16 +40,17 @@ Where:
- The **denominator**, \( (N_{\text{tot}} \cdot P) + 2 \cdot (1 - P) \), normalizes the peak to account for contributions from both tumor and normal diploid cells in the sample.
#### Example Calculation
-For a karyotype \( k = "2:1" \) (major allele = 2, minor allele = 1) and tumor purity \( P = 0.4 \):
+For a karyotype $k = \text{2:1}$ (major allele = 2, minor allele = 1) and tumor purity $P = 0.4$:
1. \( N_{\text{tot}} = 2 + 1 = 3 \).
-2. Compute peaks for \( M_i = 1 \) (single allele) and \( M_i = 2 \) (major allele):
- \[
+2. Compute peaks for \( M_i = 1 \) (single allele) and \( M_i = 2 \) (major allele)
+
+ $$
\text{Peak}_1 = \frac{1 \cdot 0.4}{(3 \cdot 0.4) + 2 \cdot (1 - 0.4)} = \frac{0.4}{1.2 + 1.2} = 0.1667
- \]
- \[
+ $$
+ $$
\text{Peak}_2 = \frac{2 \cdot 0.4}{(3 \cdot 0.4) + 2 \cdot (1 - 0.4)} = \frac{0.8}{1.2 + 1.2} = 0.3333
- \]
+ $$
### Step 2: Filtering Mutations
diff --git a/vignettes/tickTack.Rmd b/vignettes/tickTack.Rmd
index 4bb15e8..52e1a67 100644
--- a/vignettes/tickTack.Rmd
+++ b/vignettes/tickTack.Rmd
@@ -1,287 +1,284 @@
----
-title: "tickTack"
-output: rmarkdown::html_vignette
-vignette: >
- %\VignetteIndexEntry{tickTack}
- %\VignetteEngine{knitr::rmarkdown}
- %\VignetteEncoding{UTF-8}
----
-
-```{r, include = FALSE}
-knitr::opts_chunk$set(
- collapse = TRUE,
- comment = "#>"
-)
-
-options(crayon.enabled=F)
-```
-
-## Overview
-
-`tickTack` requires as input a `CNAqc` object with attributes `cna`, `mutations` and `metadata`.
-The main input for the tool are:
-
-- the read counts from somatic mutations such as single-nucleotide variants (SNVs) in the mutation attribute;
-- allele-specific copy number segments (CNAs) for clonal segments must be encoded in the cna attribute;
-- a tumor purity estimate in the metadata.
-
-The tool uses chromosome coordinates to map mutations to segments. The conversion of relative to absolute genome coordinates requires to fix a reference genome build; supported reference is GRCh38/hg17 that is also supported in CNAqc.
-
-`tickTack` can be used to:
-
-- time the genomic segments affected by a Copy Number event, obtaining one clock per segment
-- time multiple CNAs in a hierarchical fashion, identifying $K$ clocks that cluster some segemnts together.
-
-The following concepts are used to infer copy number timing.
-
-### VAF peaks
-
-The point mutations that are present on the duplicated region are duplicated in copy with the segment. Therefore we can use the proportion of mutations happede before and after the Copy Number event distinguishing between mutations in single copy and double copies.
-
-
-
-
-Therefore, for a single segment the value of the clock associated with the Copy Number event is obtained as a transformation from the proportions of mutations in single and double copy.
-The following quantities need to be considered:
-
-
-\begin{itemize}
- \item $N_m$ : number of mutations with multiplicity $m$;
- \item $\rho$ : mutation rate, indicates how many mutations occur per unit of time;
- \item $\tau$ : pseudo-time;
-\end{itemize}
-
-
-
-
-
-\subsubsection{2:1}
-
-In the case of a trisomy without LOH, we can consider the fact that, before $\tau$, 1 chromosome will accumulate mutations that will duplicate, while the other will accumulate mutations that will remain in single copy. On the other hand, after $\tau$, both chromosomes will accumulate mutations which will remain in single copy. Therefore one can write the system:
-
-\begin{align}
- \begin{cases}
- N_2 = \rho \tau
- N_1 = \rho \tau + 3\rho(1 - \tau) \nonumber
- \end{cases}
-\end{align}
-
-Using the first one to obtain $\rho$ and inserting into the second one, the solution for $\tau$ becomes:
-
-\begin{equation}
- N_1 = N_2 + \frac{3N_2}{\tau}(1-\tau) \hspace{2mm} \rightarrow \hspace{2mm} N_1 + 2N_2 = \frac{3N_2}{\tau} \hspace{2mm} \rightarrow \hspace{2mm} \tau = \frac{3N_2}{N_1 + 2N_2}
-\end{equation}
-
-\subsubsection{2:0 and 2:2}
-
-The case of the CNLOH and of the segment doubling can be treated together. In fact, in the first case, before $\tau$ the mutations that will duplicate accumulate on a single chromosome and after $\tau$ the mutations that will remain in a single copy accumulate on two chromosomes. The system therefore becomes:
-
-\begin{align}
- \begin{cases}
- N_2 = \rho \tau
- N_1 = 2\rho(1 - \tau) \nonumber
- \end{cases}
-\end{align}
-
-A very similar things happens in the case of the 2:2, with the only difference that the number of chromosomes accumulating a certain type of mutation will be double, both after and before $\tau$. Hence, the system becomes:
-
-\begin{align}
- \begin{cases}
- N_2 = 2\rho \tau
- N_1 = 4\rho(1 - \tau) \nonumber
- \end{cases}
-\end{align}
-
-Therefore, the two system can be solved similarly (you can simply drop a factor of 2 in the second case). The solution for $\tau$ easily becomes:
-
-\begin{equation}
- N_1 = \frac{2N_2(1-\tau)}{\tau} \hspace{2mm} \rightarrow \hspace{2mm} \tau(N_1 + 2N_2) = 2N_2 \hspace{2mm} \rightarrow \hspace{2mm} \tau = \frac{2N_2}{2N_2 + N_1}
-\end{equation}
-
-
-
-### Clonal CNAs
-
-Consider:
-
-- mutations sitting on a segment $nA:nB$;
-- tumour purity $\pi$;
-- a healthy diploid normal;
-
-Since the proportion of all reads from the tumour is $\pi(n_A+n_B)$, and from the normal is $2(1-\pi)$. Then, muations present in $m$ copies of the tumour genome should peak at VAF value
-
-\[
-v_m(c) = \dfrac{m \pi c}{
-2 (1 - \pi) + \pi (n_A+n_B)
-} \, .
-\]
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+---
+title: "tickTack"
+output: rmarkdown::html_vignette
+vignette: >
+ %\VignetteIndexEntry{tickTack}
+ %\VignetteEngine{knitr::rmarkdown}
+ %\VignetteEncoding{UTF-8}
+---
+
+```{r, include = FALSE}
+knitr::opts_chunk$set(
+ collapse = TRUE,
+ comment = "#>"
+)
+
+options(crayon.enabled=F)
+```
+
+## Overview
+
+`tickTack` requires as input a `CNAqc` object with attributes `cna`, `mutations` and `metadata`.
+The main input for the tool are:
+
+- the read counts from somatic mutations such as single-nucleotide variants (SNVs) in the mutation attribute;
+- allele-specific copy number segments (CNAs) for clonal segments must be encoded in the cna attribute;
+- a tumor purity estimate in the metadata.
+
+The tool uses chromosome coordinates to map mutations to segments. The conversion of relative to absolute genome coordinates requires to fix a reference genome build; supported reference is GRCh38/hg17 that is also supported in CNAqc.
+
+`tickTack` can be used to:
+
+- time the genomic segments affected by a Copy Number event, obtaining one clock per segment
+- time multiple CNAs in a hierarchical fashion, identifying $K$ clocks that cluster some segemnts together.
+
+The following concepts are used to infer copy number timing.
+
+### VAF peaks
+
+The point mutations that are present on the duplicated region are duplicated in copy with the segment. Therefore we can use the proportion of mutations happede before and after the Copy Number event distinguishing between mutations in single copy and double copies.
+
+
+
+
+Therefore, for a single segment the value of the clock associated with the Copy Number event is obtained as a transformation from the proportions of mutations in single and double copy.
+The following quantities need to be considered:
+
+
+\begin{itemize}
+ \item $N_m$ : number of mutations with multiplicity $m$;
+ \item $\rho$ : mutation rate, indicates how many mutations occur per unit of time;
+ \item $\tau$ : pseudo-time;
+\end{itemize}
+
+
+
+
+\subsubsection{2:1}
+
+In the case of a trisomy without LOH, we can consider the fact that, before $\tau$, 1 chromosome will accumulate mutations that will duplicate, while the other will accumulate mutations that will remain in single copy. On the other hand, after $\tau$, both chromosomes will accumulate mutations which will remain in single copy. Therefore one can write the system:
+
+\begin{align}
+ \begin{cases}
+ N_2 = \rho \tau
+ N_1 = \rho \tau + 3\rho(1 - \tau) \nonumber
+ \end{cases}
+\end{align}
+
+Using the first one to obtain $\rho$ and inserting into the second one, the solution for $\tau$ becomes:
+
+$$
+ N_1 = N_2 + \frac{3N_2}{\tau}(1-\tau) \hspace{2mm} \rightarrow \hspace{2mm} N_1 + 2N_2 = \frac{3N_2}{\tau} \hspace{2mm} \rightarrow \hspace{2mm} \tau = \frac{3N_2}{N_1 + 2N_2}
+$$
+
+\subsubsection{2:0 and 2:2}
+
+The case of the CNLOH and of the segment doubling can be treated together. In fact, in the first case, before $\tau$ the mutations that will duplicate accumulate on a single chromosome and after $\tau$ the mutations that will remain in a single copy accumulate on two chromosomes. The system therefore becomes:
+
+\begin{align}
+ \begin{cases}
+ N_2 = \rho \tau
+ N_1 = 2\rho(1 - \tau) \nonumber
+ \end{cases}
+\end{align}
+
+A very similar things happens in the case of the 2:2, with the only difference that the number of chromosomes accumulating a certain type of mutation will be double, both after and before $\tau$. Hence, the system becomes:
+
+\begin{align}
+ \begin{cases}
+ N_2 = 2\rho \tau
+ N_1 = 4\rho(1 - \tau) \nonumber
+ \end{cases}
+\end{align}
+
+Therefore, the two system can be solved similarly (you can simply drop a factor of 2 in the second case). The solution for $\tau$ easily becomes:
+
+$$
+ N_1 = \frac{2N_2(1-\tau)}{\tau} \hspace{2mm} \rightarrow \hspace{2mm} \tau(N_1 + 2N_2) = 2N_2 \hspace{2mm} \rightarrow \hspace{2mm} \tau = \frac{2N_2}{2N_2 + N_1}
+$$
+
+### Clonal CNAs
+
+Consider:
+
+- mutations sitting on a segment $nA:nB$;
+- tumour purity $\pi$;
+- a healthy diploid normal;
+
+Since the proportion of all reads from the tumour is $\pi(n_A+n_B)$, and from the normal is $2(1-\pi)$. Then, muations present in $m$ copies of the tumour genome should peak at VAF value
+
+$$
+v_m(c) = \dfrac{m \pi c}{
+2 (1 - \pi) + \pi (n_A+n_B)
+}
+$$
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+