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 @@ -Overview timing problem
- - -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} - - -Overview timing problem
- - -\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. + +Overview timing problem
+ + +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} + + +Overview timing problem
+ +\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) +} +$$ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +