R/ContigCellDB-methods.R
cash-ContigCellDB-method.Rd
Modification to members will trigger various forms of equalization.
See equalize_ccdb()
for details.
# S4 method for ContigCellDB
$(x, name)
# S4 method for ContigCellDB
$(x, name) <- value
A ContigCellDB object
a slot of a ContigCellDB object (one of c('contig_tbl', 'cell_tbl', 'contig_pk', 'cell_pk', 'cluster_tbl', 'cluster_pk')
)
The value assigned to a slot of ContigCellDB object
Update or return a slot of ContigCellDB()
data(ccdb_ex)
ccdb_ex$contig_tbl
#> # A tibble: 1,508 × 22
#> anno_file pop sample barcode is_cell contig_id high_confidence length chain
#> <chr> <chr> <chr> <chr> <lgl> <chr> <lgl> <dbl> <chr>
#> 1 /Users/a… b6 4 AAAGTA… TRUE AAAGTAGT… TRUE 611 TRB
#> 2 /Users/a… b6 4 AAAGTA… TRUE AAAGTAGT… TRUE 609 TRB
#> 3 /Users/a… b6 4 AAAGTA… TRUE AAAGTAGT… TRUE 538 TRA
#> 4 /Users/a… b6 4 AACCAT… TRUE AACCATGC… TRUE 799 TRA
#> 5 /Users/a… b6 4 AACTGG… TRUE AACTGGTG… TRUE 634 TRB
#> 6 /Users/a… b6 4 AACTGG… TRUE AACTGGTG… TRUE 923 TRA
#> 7 /Users/a… b6 4 AAGCCG… TRUE AAGCCGCA… TRUE 693 TRB
#> 8 /Users/a… b6 4 AAGTCT… TRUE AAGTCTGG… TRUE 658 TRB
#> 9 /Users/a… b6 4 AAGTCT… TRUE AAGTCTGG… TRUE 558 TRA
#> 10 /Users/a… b6 4 ACACCA… TRUE ACACCAAA… TRUE 614 TRB
#> # … with 1,498 more rows, and 13 more variables: v_gene <chr>, d_gene <chr>,
#> # j_gene <chr>, c_gene <chr>, full_length <lgl>, productive <chr>,
#> # cdr3 <chr>, cdr3_nt <chr>, reads <dbl>, umis <dbl>, raw_clonotype_id <chr>,
#> # raw_consensus_id <chr>, celltype <chr>
ccdb_ex$cell_tbl
#> # A tibble: 832 × 3
#> pop sample barcode
#> <chr> <chr> <chr>
#> 1 b6 4 AAAGTAGTCGCGCCAA-1
#> 2 b6 4 AACCATGCATTTGCCC-1
#> 3 b6 4 AACTGGTGTCTGATCA-1
#> 4 b6 4 AAGCCGCAGTAAGTAC-1
#> 5 b6 4 AAGTCTGGTTCAACCA-1
#> 6 b6 4 ACACCAAAGTCCAGGA-1
#> 7 b6 4 ACATGGTAGTGTTTGC-1
#> 8 b6 4 ACCCACTTCCACGACG-1
#> 9 b6 4 ACGCCAGGTCCGAATT-1
#> 10 b6 4 ACGCCAGTCCAATGGT-1
#> # … with 822 more rows
ccdb_ex$cluster_tbl
#> # A tibble: 0 × 0
data(ccdb_ex)
ccdb_ex$contig_pk = c("sample","barcode","contig_id") # 'pop' is technically redundant with 'sample'
# Take a subset of ccdb_ex
ccdb_ex
#> ContigCellDB of 1508 contigs; 832 cells; and 0 clusters.
#> Contigs keyed by sample, barcode, contig_id; cells keyed by pop, sample, barcode.
ccdb_ex$contig_tbl = dplyr::filter(ccdb_ex$contig_tbl, pop == 'b6')
ccdb_ex
#> ContigCellDB of 767 contigs; 832 cells; and 0 clusters.
#> Contigs keyed by sample, barcode, contig_id; cells keyed by pop, sample, barcode.