R/AllGenerics.R
, R/method-BarcodeObj.R
bc_cleanBc.Rd
cleanBc
slot of BarcodeObj object contains the processed barcode reads
frequency data. For more detail about the cleanBc
slot, see
BarcodeObj
. bc_cleanBc
is used to access
the `cleanBc` slot in the BarcodeObj
.
bc_cleanBc(barcodeObj, isList = TRUE)
# S4 method for class 'BarcodeObj'
bc_cleanBc(barcodeObj, isList = TRUE)
If a list
is requested, each list
element is a data.frame
for each sample. In a data.frame
, there are 2 columns 1.
barcode_seq
: barcode sequence 2. counts
: reads count, or UMI
count if the cleanBc
was created by bc_cure_umi
.
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.
data(bc_obj)
# Get the data in cleanBc slot
# default the return value is a list
bc_cleanBc(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_cleanBc(bc_obj, isList=FALSE)
#> sample_nmae 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
###