barcodeAlign: Determine barcode identity

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Determine the barcode identity for each read, based on alignment to a set of reference sequences.

Usage

1
2
barcodeAlign(sequences, barcodes, gapOpening=5, gapExtension=1, 
    BPPARAM=SerialParam())

Arguments

sequences

A QualityScaledDNAStringSet of observed barcode sequences, usually one of the subsequences from adaptorAlign.

barcodes

A character vector or DNAStringSet containing the reference barcode sequences.

gapOpening

A numeric scalar specifying the gap opening penalty.

gapExtension

A numeric scalar specifying the gap extension penalty.

BPPARAM

A BiocParallelParam object specifying whether alignment should be parallelized.

Details

Each entry of sequences is expected to contain the read subsequence that was aligned to the (usually ambiguous) barcode region of the adaptor in adaptorAlign. These represent observed barcodes that are aligned to the reference set of known barcode sequences. The read corresponding to each entry of sequences is assigned to the reference barcode to which the subsequence aligns best.

Value

A DataFrame containing:

barcode:

Integer, the index of the best-matching barcode in barcodes to which each read is assigned.

score:

Numeric, the alignment score to the assigned barcode.

gap:

Numeric, the difference of score from the alignment score to the next best-matching barcode.

Each row corresponds to an entry in sequences.

Author(s)

Aaron Lun

See Also

adaptorAlign to generate subsequences.

getBarcodeThresholds to determine a suitable threshold for score.

Examples

1
2
3
4
5
6
7
8
example(adaptorAlign)

# Assigning reads to individual barcodes.
debarcoded <- barcodeAlign(out$adaptor1$subseq$Sub1, 
    barcodes=c("AAAAAAAA", "TTTTTTTT", "CCCCCCCCC", "GGGGGGGG"),
    gapOpening=metadata(out$adaptor1)$gapOpening,
    gapExtension=metadata(out$adaptor1)$gapExtension)
debarcoded

MarioniLab/sarlacc documentation built on May 13, 2019, 12:51 p.m.