find_primer_matches | R Documentation |
Returns a data frame of index values for the two input vectors for each match, along with start and stop positions within each read and a count of base mismatches. There may be zero, one, or multiple output rows per input read.
find_primer_matches(
seqs_reads,
seqs_primers,
max_mismatches = cfg("max_mismatches")
)
seqs_reads |
character vector of read sequences |
seqs_primers |
character vector of primer sequences |
max_mismatches |
integer number of mismatches allowed when checking
primers against reads, or |
Indels are not supported. Partial matches are supported at the 3' end and are counted as mismatches.
If max_mismatches
is NA
, the best match for every read and primer
combination will be included in the output. If max_mismatches
is an
integer, at most one row will be provided for each read (for the first
discovered primer at or below that number of mismatches). In this mode the
primers are checked for perfect matches first and then re-checked in
decreasing order of abundance to find any imperfect matches. This means that
a search with a maximum mismatch count specified will be much faster than one
without, but could give counterintuitive results for some edge cases. For
example, with max mismatches of 10 and a read containing primer A at 5
mismatches and primer B at 8 mismatches, either A or B may be matched
depending on the relative abundance of perfect matches found elsewhere. In
practice, with dissimilar primer sequences and a low number of allowed
mismatches, this is unlikely to be a problem.
data frame of read and primer index pairs and match details
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.