FilterCellMutation: Filter out low expressed gene and high dropout cells based on...

Description Usage Arguments Value Author(s) Examples

View source: R/DENDRO_helper.R

Description

This function filter out low expressed gene (cut.off.VAF) and high dropout cells (cut.off.sd) based on read counts and plot out the summary distributions.

Usage

1
FilterCellMutation(X, N, Z, Info = NULL, label = NULL, cut.off.VAF = 0.05, cut.off.sd = 5, plot = TRUE)

Arguments

X

An matrix contains variants allele read counts across cell (column) and loci (row).

N

An matrix contains total allele read counts across cell (column) and loci (row).

Z

An mutation indicator matrix (1 for mutation, 0 for normal) across cell (column) and loci (row).

Info

Mutation loci information. Matrix with row number same to number of loci and column number > 1. This is optional. Default NULL

label

An integer 1D vector that decide the label color by type. The label can be assigned due to piror information such as individuals or site. Default NULL, where no color label.

cut.off.VAF

Variant allele frequency (VAF, sum(Z)/length(Z) ) filter threshold. Variants with variants allele frequency less than cut.off.VAF (too rare) or greater than 1-cut.off.VAF (too common) are filtered out. Default 0.05

cut.off.sd

Cell total expression (sum(N)) filter threshold. Cells with total expression less than mean(N)-cut.off.sd*sd(N) (too small) or greater than mean(N)+cut.off.sd*sd(N) (double or triplet) are filtered out. Default 5

plot

TRUE or FALSE, decide whether to plot the distribution and cut off (red line). Default value is TRUE.

Value

List of filtered matrix

X

Input X after filtering

N

Input N after filtering

Z

Input Z after filtering

Info

Input Info after filtering

label

Input label after filtering

Author(s)

Zilu Zhou

Examples

1
2
data("DENDRO_demo")
demo_qc = FilterCellMutation(demo$X,demo$N,demo$Z,demo$Info,demo$label)

zhouzilu/DENDRO documentation built on May 21, 2020, 8 p.m.