filter_homovars: Filter homozygous variants

Description Usage Arguments Details Value Examples

Description

filter_homovars removes variants for which a large proportion of cells with imbalanced expression is imbalanced towards the same allele

Usage

1
filter_homovars(acset, alpha = 0.1, mono_ase = 0.1)

Arguments

acset

An acset list which must contain "refcount" and "altcount" elements with allele counts, see new_acset.

alpha

A numeric specifying the significance level of the binomial test, where the test compares the number of cells expressing each allele in an imbalanced "monoallelic" manner.

mono_ase

A numeric between 0 and 1 specifying the allele specific expression level at which to deem an allele monoallelically expressed.

Details

The function removes variants which tend to express the same allele in a large proportion of cells, that is, the allelic expression is stable across cells rather than random with respect to which allele is the most highly expressed. The purpose of this filter is to reduce the number of variants that have falsely been called as heterozygous variants but are actually homozygous. Use with caution as a heterozygous variants can indeed have imbalanced expression towards the same allele in the majority of cells. A cell is deemed to have imbalanced allelic expression if its allele-specific expression, ase, is < mono_ase or >(1 - mono_ase), where ase = alternative allele count / (alternative allele count + reference allele count). If the number of cells expressing one allele in such an imbalanced manner is significantly greater than the number of cells expressing the other allele the variant is removed (binomial test).

Value

acset An acset list subsetted on variants that pass the filter.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
##load dataset
invisible(marinov)
acset = new_acset(featdata = marinov[['featdata']], refcount =
marinov[['refcount']], altcount = marinov[['altcount']], phenodata =
marinov[['phenodata']])

##Remove variants having monoallelic expression of the same allele in a
##large proportion of cells
alpha = 0.1
mono_ase = 0.1
acset_filt = filter_homovars(acset, alpha, mono_ase)

edsgard/scphaser documentation built on May 15, 2019, 11:02 p.m.