Description Usage Arguments Value Examples
Merges bin-wise data, calculates the p-values for putative interactions under the negative binomial model. Regroups putative interactions by bait rather than by distance bin.
1 | split_baits(bins, residuals, log_file = NA)
|
bins |
List of data tables containing putative interactions that are binned by distance. |
residuals |
List containing residuals (adjusted read counts) for each bin (matching the interaction order). |
log_file |
Path to a log file. |
Data table with p-values, residuals and putative interaction attributes that can be sorted or split by bait ID.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | base = system.file("extdata",package="peaky")
interactions_file = paste0(base,"/counts.tsv")
fragments_file = paste0(base,"/fragments.bed")
interactions = data.table::fread(interactions_file)
fragments = data.table::fread(fragments_file)
## Not run:
BI = bin_interactions(interactions, fragments, bins=5)
models = by(BI$interactions, BI$interactions$dist.bin, model_bin, subsample_size=1000)
residuals = lapply(models, "[[", "residuals")
bins = split(BI$interactions, BI$interactions$dist.bin)
split_baits(bins, residuals)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.