Description Usage Arguments Details Value Author(s) See Also Examples
Align a quality-based sequence to a known reference.
1 2 | qualityAlign(sequences, reference, gapOpening=5, gapExtension=1,
edit.only=FALSE, BPPARAM=SerialParam())
|
sequences |
A QualityScaledDNAStringSet of observed barcode sequences, usually one of the subsequences from |
reference |
A character vector or DNAStringSet containing the reference sequence. |
gapOpening |
A numeric scalar specifying the gap opening penalty. |
gapExtension |
A numeric scalar specifying the gap extension penalty. |
edit.only |
Logical scalar specifying whether the edit distances should be reported without alignment strings. |
BPPARAM |
A BiocParallelParam object specifying whether alignment should be parallelized. |
This provides an alternative to quality-aware alignment with pairwiseAlignment
when one of the sequences is known.
A DataFrame containing:
score
:Numeric, the alignment score to the assigned barcode.
edit
:Integer, the edit distance of the alignment.
reference
:Character, the alignment string for the reference sequence.
Only reported when edit.only=FALSE
.
sequence
:Character, the alignment string for each query sequence.
Only reported when edit.only=FALSE
.
Each row corresponds to an entry in sequences
.
Aaron Lun
barcodeAlign
and adaptorAlign
, which operate on similar principles.
1 2 3 4 5 6 7 8 9 10 11 | ref <- "CAGCTGGACGATCAGCTCGATGCGACTGTGTGCATCG"
queries <- c("CAGGACGATCAGCTCGACGACTAGTGTGCATCGA",
"CCTAAAGGACGATCAGCTCGATCTGTGTGCATCAAGA")
# Adding some qualities.
qquals <- lapply(nchar(queries), runif)
qquals <- do.call(c, lapply(qquals, as, "PhredQuality"))
queries <- QualityScaledDNAStringSet(queries, qquals)
# Assigning reads to individual barcodes.
align <- qualityAlign(queries, ref)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.