autofit: Runs a TINC analysis.

View source: R/autofit.R

autofitR Documentation

Runs a TINC analysis.

Description

This function is a wrapper to run the main analysis of TINC.

The steps are as follows:

  • 1) Input data is loaded from a 'file', or from a 'dataframe'.

  • 2) Clonal mutations are estimated for the tumour, together with the tumour purity (Tumour in Tumour).

  • 3) From putative clonal mutations of the tumour, the Tumour in Normal contamination level is estimated.

An S3 object is returned that contains the results of the analysis.

Usage

autofit(
  input,
  cna,
  VAF_range_tumour = c(0, 0.7),
  cutoff_miscalled_clonal = 0.6,
  cutoff_lv_assignment = 0.75,
  N = 20000,
  FAST = FALSE
)

Arguments

input

A'dataframe' of the iput mutations. Must be in a certain format, see the vignette for more information.

cna

Copy Number data in the format of package CNAqc.

VAF_range_tumour

A range '[x, y]' so that only mutations with VAF in that range are actually used to determine the TIN/ TIT levels of the input.

cutoff_miscalled_clonal

An upper bound on the VAF of a cluster in the tumour data. Clusters above this value will be considered miscalled clonal clusters (e.g., due to LOH etc.).

cutoff_lv_assignment

Consider only latent variables with responsibilities above this cutoff.

N

If there are more than 'N' mutations in VAF range 'VAF_range_tumour', a random subset of size 'N' is retained.

FAST

If 'TRUE', it runs the analysis with reduced sampling power and accuracy. Use this to obtain a result for preliminary inspection of your data, and then run 'autofit' with this parameter set to 'FALSE'.

Value

An S3 object that contains the results of this analysis.

Examples


# Random
rt = random_TIN()

x = autofit(input = rt$data, cna = rt$cna, FAST = TRUE)

print(x)

# Fit in the package
data('fit_example', package = 'TINC')

print(fit_example)

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