PrefilterVartrix: Prefilter variants by coverage in the vartrix matrices

View source: R/PrefilterVartrix.R

PrefilterVartrixR Documentation

Prefilter variants by coverage in the vartrix matrices

Description

Given a genotype object containing a list of vartrix matrices, and a minimal number of cells/barcodes for which variant data should be available, returns a list of vartrix matrices with filtered variants. If barcodes are given, start by restricting the matrices to these barcodes before filtering variants. The row order and rownames are kept consistent with the input during the subsetting. The subsetting is also applied to the entire genotype object, including reference genotypes and variant metadata. Stores the coverage information in genotype$coverage.

Usage

PrefilterVartrix(genotype, min.cells = 5, barcodes.keep = NA)

Arguments

genotype

A genotype object, containing vartrix matrices (including a VAR consensus matrix, named as such, used to compute coverage).

min.cells

numeric(1) the minimum number of cells for which there should be a genotype call for the variants to be kept.

barcodes.keep

character(n) A vector of cell barcodes to keep. NA to keep all. Default:NA.

Value

The filtered genotype object

Examples

MyFilteredGenotypeObject <- PrefilterVartrix(MyGenotypeObject, min.cells=10)

nbroguiere/burgertools documentation built on Jan. 30, 2024, 3:48 a.m.