call_mutations_indels: Call mutations from read positions

View source: R/call_mutations_indels.R

call_mutations_indelsR Documentation

Call mutations from read positions

Description

@description This function evaluates the presence (calls) of individual mutations, including insertions and deletions (INDELs), from a predefined list. It processes given mutation and read position data frames to call mutations based on the specified models and parameters.

Usage

call_mutations_indels(
  mutations_df,
  read_positions_df,
  read_positions_df_indels,
  model,
  model_indels,
  beta,
  beta_indels,
  alpha = 0.05,
  use_turboem = TRUE,
  calculate_confidence_intervals = FALSE,
  batch_size = NULL
)

Arguments

mutations_df

A data frame containing the mutation information.

read_positions_df

A data frame containing read position information for base substitution mutations.

read_positions_df_indels

A data frame containing read position information for INDELs.

model

The model used for calling base substitution mutations.

model_indels

The model used for calling INDEL mutations.

beta

Coefficients or parameters for the base substitution model.

beta_indels

Coefficients or parameters for the INDEL model.

alpha

Significance level for mutation detection; default is 0.05.

use_turboem

Logical; if TRUE, use the TurboEM algorithm for faster computation.

calculate_confidence_intervals

Logical; if TRUE, calculate confidence intervals for the estimated tumor fraction.

batch_size

Number of positions to process at a time; if NULL, all positions are processed together.

Value

A data.frame() with information about the individual mutation calls, including:

chr, genomic_pos

The genomic position of the mutation.

ref, alt

The reference and alternative allele.

EM_converged

If the EM algorithm converged.

EM_steps, fpeval, objfeval

Number of steps and function evaluations by the EM algorithm.

tf_est

The estiamted tumor fraction (allele fraction).

tf_min, tf_max

The confidence interval of tf_est.

exp_count

The expected count of the alternative allele under the error (null) model.

count

The count of the alternative allele.

coverage

The coverage used by the model (only referenceredas with and alternative allele).

full_coverage

The total coverage of the position (for reference).

obs_freq

The observed frequency of the alternative allele.

ll_0, ll_A

The value of the log-likelihood function under the null (tf=0) and alternative (tf>0) hypothesis.

Q_val, df, p_val

The chisq test statistic, degrees of freedom and p-value of the statistical test.

mutation_detected

Whether the mutation was detected at the supplied alpha level.

See Also

call_cancer(), train_dreams_model()


JakobPedersenLab/dreams documentation built on Feb. 2, 2024, 3:14 p.m.