Description Usage Arguments Value Examples
remove positional read duplicates from data.table
1 | .remove_duplicates(reads_dt, max_dupes)
|
reads_dt |
a data.table containing read span information. required columns are which_label, start, end, and strand. |
max_dupes |
integer >= 1, the maximum allowed duplicates per position. |
data.table with reads in excess of max_dupes removed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | library(data.table)
n = 4
dt = data.table(
which_label = seq_len(n),
seqnames = "chr1",
strand = c("+", "-"),
start = seq_len(n),
end = seq_len(n) + 10
)
dt[, width := end - start + 1]
make_dupes = seq_len(nrow(dt))
make_dupes = rep(make_dupes, make_dupes)
dt = dt[make_dupes]
lapply(1: n, function(x)peakrefine:::.remove_duplicates(dt, max_dupes = x))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.