bc_messyBc: Accesses messyBc slot in the BarcodeObj object

Description Usage Arguments Value Examples

Description

messyBc slot of BarcodeObj object contains the raw barcode reads frequency data. For more detail about the messyBc slot, see BarcodeObj. bc_messyBc is used to access the 'messyBc' slot in the BarcodeObj.

Usage

1
2
3
4
bc_messyBc(barcodeObj, isList = TRUE)

## S4 method for signature 'BarcodeObj'
bc_messyBc(barcodeObj, isList = TRUE)

Arguments

barcodeObj

A BarcodeObj objects.

isList

A logical value, if TRUE (default), the return is a list with each sample as an element. Otherwise, the function will return a data.frame contains the data from all the samples with a column named sample_name to keep the sample information.

Value

If a list is requested, in the list each element is a data.frame corresponding to the successive samples. Each data.frame has 5 columns: 1. reads_seq: full read sequence before parsing. 2. match_seq: the sequence matched by pattern given to bc_extract. 3. umi_seq (optional): UMI sequence. 4. barcode_seq: barcode sequence. 5. count: how many reads a full sequence has. In this table, barcode_seq value can be duplicated, as two different full read sequences can contain the same barcode sequence, due to the diversity of the UMI or mutations in the constant region.

#' If a data.frame is requested, the data.frame in the list described above are combined into one data.frame by row, with an extra column named sample_name for identifying sample.

Examples

1
2
3
4
5
6
7
8
 data(bc_obj)
# get the data in messyBc slot
# default the return value is a list
bc_messyBc(bc_obj)

# the return value can be a data.frame
bc_messyBc(bc_obj, isList=FALSE)
###

wenjie1991/CellBarocde documentation built on Dec. 23, 2021, 5:11 p.m.