R/AllGenerics.R
, R/method-extract_barcode.R
bc_create_BarcodeObj.Rd
Create a BarcodeObj object from extracted barcodes data
bc_create_BarcodeObj(x, sample_name = NULL, metadata = NULL, ordered = TRUE)
# S4 method for class 'matrix'
bc_create_BarcodeObj(x, sample_name = NULL, metadata = NULL)
# S4 method for class 'data.frame'
bc_create_BarcodeObj(x, sample_name = NULL, metadata = NULL)
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.
A character vector, optional, specifying the sample name.
A data.frame, optional, specifying the metadata of each sample. The row names of the metadata should be the same as the sample names.
A logical value. If the value is true, the return barcodes (UMI-barcode tags) are sorted by the read counts.
A BarcodeObj object.
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