remove_clones_below_threshold.Rd
Removes clones with counts strictly less than the specified threshold.
remove_clones_below_threshold(count_data, threshold, count_column)
A data.table containing clone barcodes and their counts. One row per clone barcode.
A numeric value indicating the minimum count required for a clone barcode to be retained.
A character string specifying the column name for clone barcode counts.
A data.table with clones above the threshold.
library(data.table)
toy_clone_counts <- data.table(
sample_name = c(rep("test1", 2), rep("test2", 3)),
read_count = c(1, 5, 10, 15, 20),
clone_barcodes = c("ACGT", "CATG", "CATG", "ACGT", "ATGC")
)
remove_clones_below_threshold(
count_data = toy_clone_counts,
threshold = 2,
count_column = "read_count"
)
#> sample_name read_count clone_barcodes
#> 1: test1 5 CATG
#> 2: test2 10 CATG
#> 3: test2 15 ACGT
#> 4: test2 20 ATGC