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.

bc_messyBc(barcodeObj, isList = TRUE)

# S4 method for class '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 at most 3 columns: 1. umi_seq (optional): UMI sequence. 2. barcode_seq: barcode sequence. 3. count: how many reads a full sequence has.

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


 data(bc_obj)
# get the data in messyBc slot
# default the return value is a list
bc_messyBc(bc_obj)
#> $test1
#>                          reads_seq                    match_seq barcode_seq
#> 1   AATTCGATCGATCGAAGAGATCGATCGATC  TCGATCGATCGAAGAGATCGATCGATC        AGAG
#> 2   ACTTCGATCGATCGAAAAGATCGATCGATC  TCGATCGATCGAAAAGATCGATCGATC        AAAG
#> 3   GGATCGATCGATCGAAGAGATCGATCGATC  TCGATCGATCGAAGAGATCGATCGATC        AGAG
#> 4   AAATCGATCGATCGAAGAGATCGATCGATC  TCGATCGATCGAAGAGATCGATCGATC        AGAG
#> 5   TTTTCGATCGATCGAAAAGATCGATCGATC  TCGATCGATCGAAAAGATCGATCGATC        AAAG
#> 6   GGGTCGATCGATCGAAAAGATCGATCGATC  TCGATCGATCGAAAAGATCGATCGATC        AAAG
#> 7  CCTTCGATCGATCGAAGAAGATCGATCGATC TCGATCGATCGAAGAAGATCGATCGATC       AGAAG
#> 8  ACTTCGATCGATCGAACAAGATCGATCGATC TCGATCGATCGAACAAGATCGATCGATC       ACAAG
#> 9  CCCTCGATCGATCGAAGAAGATCGATCGATC TCGATCGATCGAAGAAGATCGATCGATC       AGAAG
#> 10  GGTTCGATCGATCGACGAGATCGATCGATC  TCGATCGATCGACGAGATCGATCGATC        CGAG
#>    count
#> 1     60
#> 2     30
#> 3     30
#> 4     14
#> 5     10
#> 6     10
#> 7      9
#> 8      6
#> 9      5
#> 10     4
#> 
#> $test2
#>                         reads_seq                    match_seq barcode_seq
#> 1  ACTTCGATCGATCGAAACGATCGATCGATC  TCGATCGATCGAAACGATCGATCGATC        AACG
#> 2  GGATCGATCGATCGAAGAGATCGATCGATC  TCGATCGATCGAAGAGATCGATCGATC        AGAG
#> 3  AAATCGATCGATCGAAGAGATCGATCGATC  TCGATCGATCGAAGAGATCGATCGATC        AGAG
#> 4  TTTTCGATCGATCGAAAAGATCGATCGATC  TCGATCGATCGAAAAGATCGATCGATC        AAAG
#> 5  GGGTCGATCGATCGAAAAGATCGATCGATC  TCGATCGATCGAAAAGATCGATCGATC        AAAG
#> 6  AATTCGATCGATCGAAGAGATCGATCGATC  TCGATCGATCGAAGAGATCGATCGATC        AGAG
#> 7 ACTTCGATCGATCGAACAAGATCGATCGATC TCGATCGATCGAACAAGATCGATCGATC       ACAAG
#> 8 CCCTCGATCGATCGAAGAAGATCGATCGATC TCGATCGATCGAAGAAGATCGATCGATC       AGAAG
#> 9  GGTTCGATCGATCGACGAGATCGATCGATC  TCGATCGATCGACGAGATCGATCGATC        CGAG
#>   count
#> 1    30
#> 2    30
#> 3    14
#> 4    10
#> 5    10
#> 6     9
#> 7     6
#> 8     5
#> 9     4
#> 

# The return value can be a data.frame
bc_messyBc(bc_obj, isList=FALSE)
#>     sample_name                       reads_seq                    match_seq
#>          <char>                          <char>                       <char>
#>  1:       test1  AATTCGATCGATCGAAGAGATCGATCGATC  TCGATCGATCGAAGAGATCGATCGATC
#>  2:       test1  ACTTCGATCGATCGAAAAGATCGATCGATC  TCGATCGATCGAAAAGATCGATCGATC
#>  3:       test1  GGATCGATCGATCGAAGAGATCGATCGATC  TCGATCGATCGAAGAGATCGATCGATC
#>  4:       test1  AAATCGATCGATCGAAGAGATCGATCGATC  TCGATCGATCGAAGAGATCGATCGATC
#>  5:       test1  TTTTCGATCGATCGAAAAGATCGATCGATC  TCGATCGATCGAAAAGATCGATCGATC
#>  6:       test1  GGGTCGATCGATCGAAAAGATCGATCGATC  TCGATCGATCGAAAAGATCGATCGATC
#>  7:       test1 CCTTCGATCGATCGAAGAAGATCGATCGATC TCGATCGATCGAAGAAGATCGATCGATC
#>  8:       test1 ACTTCGATCGATCGAACAAGATCGATCGATC TCGATCGATCGAACAAGATCGATCGATC
#>  9:       test1 CCCTCGATCGATCGAAGAAGATCGATCGATC TCGATCGATCGAAGAAGATCGATCGATC
#> 10:       test1  GGTTCGATCGATCGACGAGATCGATCGATC  TCGATCGATCGACGAGATCGATCGATC
#> 11:       test2  ACTTCGATCGATCGAAACGATCGATCGATC  TCGATCGATCGAAACGATCGATCGATC
#> 12:       test2  GGATCGATCGATCGAAGAGATCGATCGATC  TCGATCGATCGAAGAGATCGATCGATC
#> 13:       test2  AAATCGATCGATCGAAGAGATCGATCGATC  TCGATCGATCGAAGAGATCGATCGATC
#> 14:       test2  TTTTCGATCGATCGAAAAGATCGATCGATC  TCGATCGATCGAAAAGATCGATCGATC
#> 15:       test2  GGGTCGATCGATCGAAAAGATCGATCGATC  TCGATCGATCGAAAAGATCGATCGATC
#> 16:       test2  AATTCGATCGATCGAAGAGATCGATCGATC  TCGATCGATCGAAGAGATCGATCGATC
#> 17:       test2 ACTTCGATCGATCGAACAAGATCGATCGATC TCGATCGATCGAACAAGATCGATCGATC
#> 18:       test2 CCCTCGATCGATCGAAGAAGATCGATCGATC TCGATCGATCGAAGAAGATCGATCGATC
#> 19:       test2  GGTTCGATCGATCGACGAGATCGATCGATC  TCGATCGATCGACGAGATCGATCGATC
#>     barcode_seq count
#>          <char> <num>
#>  1:        AGAG    60
#>  2:        AAAG    30
#>  3:        AGAG    30
#>  4:        AGAG    14
#>  5:        AAAG    10
#>  6:        AAAG    10
#>  7:       AGAAG     9
#>  8:       ACAAG     6
#>  9:       AGAAG     5
#> 10:        CGAG     4
#> 11:        AACG    30
#> 12:        AGAG    30
#> 13:        AGAG    14
#> 14:        AAAG    10
#> 15:        AAAG    10
#> 16:        AGAG     9
#> 17:       ACAAG     6
#> 18:       AGAAG     5
#> 19:        CGAG     4
###