tn.test.sample: Single sample targeted normalization and test

Description Usage Arguments Details Value Author(s)

View source: R/tn.test.sample.R

Description

Bin counts from one sample are normalized following instructions from a previous targeted-normalization run.

Usage

1
2
3
4
tn.test.sample(test.sample, files.df, cont.sample, bc.ref.f = NULL,
  norm.stats.f, write.out.file = TRUE, compress.index = TRUE,
  z.poisson = FALSE, aberrant.cases = FALSE, append = FALSE,
  col.file = "bc.gc.gz")

Arguments

test.sample

the name of the sample to test.

files.df

a data.frame with the information about the files to use. Columns 'sample' and 'bc.gc.bg' are required and should be present after running 'initFileNames' function. Files should exist if 'correct.GC' was run.

cont.sample

the name of the sample used as control for the normalization.

bc.ref.f

the path to the input file used for targeted normalization ('tn.norm').

norm.stats.f

the name of the file with the statistic of the targeted normalization run.

write.out.file

should the result be written in files (from 'z' and 'fc' columns in 'files.df'). Default is TRUE.

compress.index

should the output files be compressed and indexed. Default is TRUE.

z.poisson

Should the Z-score be computed as an normal-poisson hybrid (see Details). Default is FALSE.

aberrant.cases

if TRUE (default) a more robust (but sligthly longer) normalization is performed on cases to deal with potential large chromosomal aberrations. In practice, it is recommended for cancer but can be turned off if less than ~20 to be affected.

append

should the results be appended to existing files. Default is FALSE.

col.file

the column name in 'files.df' which inform which file contains the bin counts to use. Default is 'bc.gc.gz'.

Details

The Z-score is computed by substracting the bin count by the average bin count across the reference samples and dividing by their standard deviation. If 'z.poisson' is TRUE, a score using Poisson distribution is also computed, using the average bin count as an estimator of the lambda. Then the score with the lowest absolute value is kept. This hybrid Z-score is to be used when some regions have low coverage where it is more robust to use Poisson assumptions.

Value

a data.frame with columns :

chr, start, end

the location of the bin

bc

the normalized bin count

z

the Z-scores

fc

the fold-change compared to the average bin count in the reference samples

Author(s)

Jean Monlong


jmonlong/PopSV documentation built on Sept. 15, 2019, 9:29 p.m.