prepare_detergent: This is the frist stage and involves preparing the Panel of...

Description Usage Arguments Value Author(s)

View source: R/dryclean.R

Description

This function takes in gRanges outputs from fragCounter and extracts GC corrected read count data and carries rPCA decomposition on the matrix thus created. The normal samples used to form the PON can be selected randomly or by clustering the genomic bacground or all samples can be used.

Usage

1
2
3
4
prepare_detergent(normal.table.path = NA, use.all = TRUE,
  choose.randomly = FALSE, choose.by.clustering = FALSE,
  number.of.samples = 50, save.pon = FALSE, path.to.save = NA,
  verbose = TRUE, num.cores = 1, tolerance = 1e-04)

Arguments

normal.table.path

character path to data.table containing two columns "sample" and "normal_cov". See manual for details

use.all

boolean (default == TRUE). If all normal samples are to be used for creating PON

choose.randomly

boolean (default == FALSE). If a random subset of normal samples are to be used for creating PON.

choose.by.clustering

boolean (default == FALSE). Clusters normal samples based on the genomic background and takes a random sample from within the clusters.

number.of.samples

interger (default == 50). If choose.by.clustering == TRUE, this is the number of clusters at which to cut tree.

save.pon

boolean (default == FALSE). If PON needs to be saved.

path.to.save

charater (default == NA). Path to save the PON created if save.pon == TRUE.

verbose

boolean (default == TRUE). Outputs progress.

num.cores

interger (default == 1). Number of cores to use for parallelization

tolerance

numeric (default == 0.0001). Tolerance for error for batch rPCA. We suggest keeping this value.

Value

prepare_detergent returns a list containing the following components:

L

array_like;
low-rank component; (m, n) dimensional array.

S

array_like;
sparse component; (m, n) dimensional array.

k

numeric;
estimated rank of the matrix; used in the online implementation.

U.hat

array_like;
left singular vectors of L; (m, k) dimensional array.

V.hat

array_like;
right singular vectors of L; (n, k) dimensional array.

sigma.hat

array_like;
singular values; vector of length (k).

Author(s)

Aditya Deshpande


kcygan/dryclean documentation built on Feb. 13, 2020, 12:34 a.m.