z.comp: Z-score computation

Description Usage Arguments Details Value Author(s)

View source: R/z.comp.R

Description

Z-score computation from bin count and/or mean/sd metrics on the reference samples.

Usage

1
2
z.comp(bc.f, norm.stats.f, files.df, z.poisson = FALSE, nb.cores = 1,
  chunk.size = 10000, append = FALSE, recomp.msd = FALSE)

Arguments

bc.f

the path to the normalized bin count file.

norm.stats.f

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

files.df

a data.frame with the file paths.

z.poisson

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

nb.cores

the number of cores to use.

chunk.size

the chunk size. Default is 1e4. If NULL, no chunks are used.

append

should the Z-scores be appended to existing files. Default is FALSE.

recomp.msd

Should the mean/SD be recomputed and written to 'norm.stats.f' ? Default is FALSE. Most of the times you don't want that but it's useful when combining discordant mapping.

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 list with

z

a data.frame with the Z-scores if 'bc.f' was a data.frame. NULL otherwise.

fc

a data.frame with the fold-changes if 'bc.f' was a data.frame. NULL otherwise.

msd

a data.frame with the mean-sd information if 'bc.f' was a data.frame. NULL otherwise.

z.poisson

was Normal-Poisson hybrid Z-score score computed.

Author(s)

Jean Monlong


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