Create a BarcodeObj object from extracted barcodes data

bc_create_BarcodeObj(x, sample_name = NULL, metadata = NULL, ordered = TRUE)

# S4 method for matrix
bc_create_BarcodeObj(x, sample_name = NULL, metadata = NULL)

# S4 method for data.frame
bc_create_BarcodeObj(x, sample_name = NULL, metadata = NULL)

Arguments

x

The barcodes data, it can be matrix, data.frame with each row as a barcode each column as a sample. The row names should be given as the barcode sequences, and the column names can be given as the sample names.

sample_name

A character vector, optional, specifying the sample name.

metadata

A data.frame, optional, specifying the metadata of each sample. The row names of the metadata should be the same as the sample names.

ordered

A logical value. If the value is true, the return barcodes (UMI-barcode tags) are sorted by the read counts.

Value

A BarcodeObj object.

Examples

data(bc_obj)
m = bc_2matrix(bc_obj)
bc_create_BarcodeObj(m)
#> Bonjour le monde, This is a BarcodeObj.
#> ----------
#> It contains: 
#> ----------
#> @metadata: 0 field(s) available:
#> 
#> ----------
#> @messyBc: 2 sample(s) for raw barcodes:
#>     In sample $test1 there are: 4 Tags
#>     In sample $test2 there are: 5 Tags