Get started
get-started.Rmd
library(hawkesGenomics)
Example
We are going to analyse a subset of the replication origin on the chromosme 1 of hg19.
library(hawkesGenomics)
preprocess data
beds <- preprocess_bed(
files = c(
system.file("extdata", "oris.bed.gz", package = "hawkesGenomics"),
system.file("extdata", "CGI.bed.gz", package = "hawkesGenomics"),
system.file("extdata", "G4plus.bed.gz", package = "hawkesGenomics")
),
names = c("Oris", "CGI", "G4plus")
)
beds
#> # A tibble: 3 × 5
#> # Groups: files [3]
#> files names interval_size beds preprocess_beds
#> <chr> <chr> <dbl> <list> <chr>
#> 1 /home/runner/work/_temp/Library/… G4pl… 25.6 <tibble> /tmp/Rtmpl3saV…
#> 2 /home/runner/work/_temp/Library/… CGI 766. <tibble> /tmp/Rtmpl3saV…
#> 3 /home/runner/work/_temp/Library/… Oris 883. <tibble> /tmp/Rtmpl3saV…
hawkes computation
res <- compute_hawkes_histogram(
files = beds$preprocess_beds,
names = beds$names,
K = 5,
delta = 1e4
)
plot data
plot_histogram(res, K = 5, delta = 1e4)
plot_convolution(res, width = beds$interval_size, K = 5, delta = 1e4)