Learn R Programming

poolHelper (version 1.1.0)

filterMinor: Filter sites according to a minor-allele reads threshold

Description

Removes sites from matrices with counts of reads. If a site has less minor-allele reads than min.minor across all populations, that site is removed from the data.

Usage

filterMinor(reference, alternative, coverage, min.minor)

Value

a list with three named entries:

reference

a list with one entry per locus. Each entry is a matrix with the number of reference allele reads. Each column represents a different site.

alternative

a list with one entry per locus. Each entry is a matrix with the number of alternative allele reads. Each column represents a different site.

total

a list with one entry per locus. Each entry is a matrix with the total depth of coverage. Each column represents a different site.

Arguments

reference

a matrix with the number of reads with the reference allele. Each row should be a different population and each column a different site.

alternative

a matrix with the number of reads with the alternative allele. Each row should be a different population and each column a different site.

coverage

is a matrix of total coverage. Each row of the matrix should be a different population and each column a different site. Thus, each entry of the matrix contains the total number of observed reads for that population at a given site.

min.minor

is an integer representing the minimum allowed number of minor-allele reads. Sites that, across all populations, have less minor-allele reads than this threshold will be removed from the data.