Skip to contents

This builds a redeemR S4 object by:

  1. filtering cells by median coverage (qualifiedCellCut),

  2. filtering variants by cell-count and VAF (Cellcut, VAFcut),

  3. initializing all slots (GTsummary.ini, V.ini, GTsummary.filtered, V.fitered, etc.),

  4. running Make_matrix() to build count matrices,

  5. and performing binomial noise removal.

Usage

Create_redeemR_model(
  VariantsGTSummary = VariantsGTSummary,
  qualifiedCellCut = 10,
  VAFcut = 1,
  Cellcut = 2
)

Arguments

VariantsGTSummary

A data.frame produced by redeemR.read.trim(), with attributes

  • thr (threshold),

  • depth (output of DepthSummary()),

  • (optionally) edge_trim, path, combined, suffix.

qualifiedCellCut

Numeric; minimum median mitochondrial coverage for a cell to be kept (default 10).

VAFcut

Numeric in (0,1]; only variants with variant allele frequency <= VAFcut are considered (default 1).

Cellcut

Integer >= 1; only variants seen in at least Cellcut cells are kept (default 2).

Value

An object of S4 class redeemR, with slots

  • GTsummary.ini, V.ini: the unfiltered genotype & variant tables

  • GTsummary.filtered, V.fitered: the post-filter tables

  • CellMeta, DepthSummary, HomoVariants, UniqueV, para, attr, ... and with count matrices in @Cts.Mtx / @Cts.Mtx.bi populated.

Examples

if (FALSE) {
  vgtsum <- redeemR.read.trim("path/to/data", thr="S", edge_trim=9)
  rObj   <- Create_redeemR_model(vgtsum, qualifiedCellCut=10, VAFcut=0.5, Cellcut=3)
  summary(rObj)
}