Filter out miscellaneous unwanted values from data

filter_misc(dat, SNP_only = TRUE, group_Alt = TRUE, drop_irregular = TRUE)

Arguments

dat

MIP data. The data must have the following variables:

  • Ref : Character for reference allele nucleotide

  • Alt : Character for alternative allele nucelotide

  • Coverage : The total read coverage as numerics

  • Barcode_Count : The total barocdes recovered

SNP_only

Boolean detailing if subsetting should remove all cases where the ALT allele is longer than 1 nucleotide. Default = `TRUE`

group_Alt

Boolean detailing whether all ALT alleles should be grouped together. Default = `TRUE`

drop_irregular

Boolean detailing whether irregular data should be removed. This includes non integer barcode counts and any instances where there is less coverage than barcode counts. Default = `TRUE`

Details

`filter_misc` takes a raw dataset and applies a series of filters that enable the removal of non-standarad ALT allele calls and long ALT calls. It also enables the filtering of irregular data, such as data with non integer counts of barcodes or more barcode counts than coverage.

Examples

dat <- dummy_data() dat2 <- filter_misc(dat) dim(dat2)[1] < dim(dat)[1]
#> [1] TRUE