amplicanFilter {amplican} | R Documentation

## Filter Events Overlapping Primers, PRIMER DIMERS and Low Alignment Score Events.

### Description

Very often alignments return deletions that are not real deletions, but rather artifact of incomplete reads eg.:

    ACTGAAAAA------- <- this "deletion" should be filtered
    ACTG----ACTGACTG

We call them Events Overlapping Primers and filter them together with reads that are potentially PRIMER DIMERS. This filter will also remove all events coming from reads with low alignment score - potential Off-targets.

### Usage

    amplicanFilter(aln, cfgT, PRIMER_DIMER)

### Arguments

`aln` | (data.frame) Should contain events from alignments in GRanges style with columns eg. seqnames, width, start, end.
`cfgT` | (data.frame) Needs columns Forward_Primer, ReversePrimer and Amplicon.
`PRIMER_DIMER` | (numeric) Value specifying buffer for PRIMER DIMER detection. For a given read it will be recognized as PRIMER DIMER when alignment will introduce gap of size bigger than: `length of amplicon - (lengths of PRIMERS + PRIMER_DIMER value)`

### Value

(aln) Reduced by events classified as PRIMER DIMER or overlapping primers.

### See Also

`findPD` and `findEOP`

Other analysis steps: `amplicanAlign()`, `amplicanConsensus()`, `amplicanMap()`, `amplicanNormalize()`, `amplicanOverlap()`, `amplicanPipelineConservative()`, `amplicanPipeline()`, `amplicanReport()`, `amplicanSummarize()`

### Examples

    file_path <- system.file("extdata", "results", "alignments",
                             "raw_events.csv", package = "amplican")
    aln <- data.table::fread(file_path)
    cfgT <- data.table::fread(
      system.file("extdata", "results", "config_summary.csv",
                  package = "amplican"))
    amplicanFilter(aln, cfgT, 30)

[Package amplican version 1.16.0 Index]