splitByBarcode: Split DNAStringSet object using first X number of bases...

Description Usage Arguments Value See Also Examples

View source: R/hiReadsProcessor.R

Description

Given a character vector of barcodes/MID to sample association and a DNAStringSet object, the function splits/demultiplexes the DNAStringSet object by first few bases dictated by length of barcodes/MID supplied. This is an accessory function used by findBarcodes

Usage

1
2
splitByBarcode(barcodesSample, dnaSet, trimFrom = NULL,
  showStats = FALSE, returnUnmatched = FALSE)

Arguments

barcodesSample

a character vector of barcodes to sample name associations. Ex: c("ACATCCAT"="Sample1", "GAATGGAT"="Sample2",...)

dnaSet

DNAStringSet object to evaluate.

trimFrom

integer value serving as start point to trim the sequences from. This is calculated internally length barcode+1. Default is NULL.

showStats

boolean flag denoting whether to show decoding statistics per sample & barcode. Default is FALSE.

returnUnmatched

boolean flag denoting whether to return unmatched reads. Default is FALSE.

Value

DNAStringSet object split by sample name found in barcodesSample.

See Also

findBarcodes, dereplicateReads, replicateReads

Examples

1
2
3
4
5
dnaSet <- DNAStringSet(c("read1" = "ACATCCATAGAGCTACGACGACATCGACATA",
"read2"="GAATGGATGACGACTACAGCACGACGAGCAGCTACT",
"read3"="GAATGGATGCGCTAAGAAGAGA", "read4"="ACATCCATTCTACACATCT"))
splitByBarcode(c("ACATCCAT" = "Sample1", "GAATGGAT" = "Sample2"), dnaSet,
showStats=TRUE)

hiReadsProcessor documentation built on Nov. 8, 2020, 5:43 p.m.