Remove secondary alignments from a pafr alignment

filter_secondary_alignments(ali, remove_inversions = FALSE)

Arguments

ali

Genomic alignment in pafr or tbl_df format, as returned by read_paf

remove_inversions

logical If TRUE, also remove inversions (tp flag 'I' or 'i') from the alignment

Examples

ali <- read_paf( system.file("extdata", "fungi.paf", package="pafr") ) ali
#> pafr object with 2501 alignments (36.5Mb) #> 8 query seqs #> 8 target seqs #> 11 tags: NM, ms, AS, nn, tp, cm, s1, s2, dv, cg, zd
filter_secondary_alignments(ali)
#> pafr object with 2162 alignments (34.1Mb) #> 8 query seqs #> 8 target seqs #> 11 tags: NM, ms, AS, nn, tp, cm, s1, s2, dv, cg, zd