knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)
library(TINC)

Analysis pipeline

The TINC pipelines requires to run a single function: autofit.

Results can then be inspected using two report functions (see below).

Example simulated inputs

TIN provides a function to generate a random dataset to test the tool. The input TIN and TIT parameters can be specified.

Note: the sampler generates VAFs using MOBSTER, and then samples some clonal mutations and contaminates the normal. This process is noisy and might return slightly lower values for the actual TIT estimate. The best setup to test TINC is with a simulated BAM file - e.g., created via BAMSurgeon.

set.seed(1234)

# Sample data from a tumour with 80% purity, and 10% contamination in the normal
sampled_data = random_TIN(TIT = .8, TIN = 0.1)

print(sampled_data)

The sampler generates random SNVs, and plain diploid CNA segments. These segments are not real and span just through each one of the simulated SNVs.

Data mappings - done internally by TINC - are also available via the load_TINC_input function.

load_TINC_input(x = sampled_data$data, cna = sampled_data$cna)

TINC fits the data via the autofit function.

A flag FAST sets faster set of parameters to determine TIN and TIT scores - we usually this for prototyping analyses and then turn it to FALSE.

# Autofit function
TINC_fit = autofit(sampled_data$data, cna = NULL, FAST = TRUE)

Summary of the results (with an S3 object)

print(TINC_fit)

Plot the results (with an S3 object).

plot(TINC_fit)

# Analogous to
# plot_simple_report(TINC_fit)

Or make a more detailed report

plot_full_page_report(TINC_fit)

A similar fit object is available inside the package (called fit_example).



caravagn/TINC documentation built on April 28, 2024, 7:42 a.m.