View source: R/distance_filter.R
distance_filter | R Documentation |
Filters a list of barcode combinations for a given distance metric (hamming or seqlev) and threshold in order to produce a list of barcodes satisfying the distance constraints.
distance_filter(index_df, combinations_m, metric, d)
index_df |
A dataframe containing barcodes identifiers, corresponding DNA sequences along with GC content and presence of homopolymers. |
combinations_m |
A matrix of compatible barcode combinations. |
metric |
The type of distance (hamming or seqlev or phaseshift). |
d |
The minimum value of the distance. |
The "hamming" distance is suitable for correcting substitution errors. The "seqlev" distance is suitable for correcting both substitution and insertion/deletion errors.
A filtered matrix containing the identifiers of the barcodes satisfying the distance constraints.
Buschmann, T. 2015. The Systematic Design and Application of Robust DNA Barcodes.
Buschmann, T. 2017. DNABarcodes: an R package for the systematic construction of DNA sample tags. Bioinformatics 33, 920–922.
get_all_combinations
,
get_random_combinations
barcodes <- DNABarcodeCompatibility::IlluminaIndexes
m <- get_all_combinations(barcodes, 2, 4)
distance_filter(barcodes, m, "hamming", 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.