normalise: Normalise SNPs according to a reference frequency under a...

Description Usage Arguments Value

View source: R/mappingfunctions.R

Description

Normalise a SNP count matrix by an external reference frequency distribution by mean and standard deviation predicted under a binomial model.

Usage

1
normalise(rawdatmat, f, ploidy = 2, minfreq = NULL, meanimpute = FALSE)

Arguments

rawdatmat

A matrix of SNP counts of the alternative allele; of dimension N by L

f

A snp frequency vector of length L

ploidy

ploidy of the data (2=diploid) ; maximum that rawdatmat can take

minfreq

a thresholding for very raw SNPs in the reference, to prevent them from being over-weighted

meanimpute

(default FALSE) whether to mean impute missing data

Value

A matrix of size N by L which is rawdatmat zero meaned and with theoretical s.d. 1


danjlawson/pcapred documentation built on Oct. 7, 2021, 3:47 p.m.