Description Usage Arguments Value Examples
map_reads
is the primary workhorse of this package. It iterates through the reads_table,
finds the barcodes that are within 2 Hamming distances, and then computes the probability of
the read mapping to each barcode that is within 2 Hamming distances. Then, out of this list
of probabilities, it selects the first barcode with the greatest probability of being a match.
1 | map_reads(barcodes_table, reads_table, distance_threshold = 2)
|
barcodes_table |
The full table of reference barcodes, which contains a column titled |
reads_table |
The full table of reads, which contains a column titled |
distance_threshold |
Integer specifying the Hamming distance threshold for which we want to filter barcodes |
Returns the original reads table along with the barcode that was mapped and the probability of the map.
1 2 3 4 5 6 | library(dplyr)
library(SequenceMapper)
mapped_reads <- map_reads(reads_table = reads_table, barcodes_table = barcodes_table)
mapped_reads %>% group_by(mapped_barcodes) %>%
summarize(Number_Mapped = n(), Proportion_Mapped = n()/nrow(mapped_reads))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.