R/fragsize.R
getFragmentsDistribution.Rd
This function takes fragments and compute the distribution of their sizes over a set or multiple sets of GRanges.
GRanges object containing paired-end fragments. See importPEBamFiles for more details on how to create such object.
GRanges, can be a list of different sets of GRanges.
numeric vector of length 2, how the GRanges should be extended.
numeric vector of length 2, only consider fragments within this window of sizes.
Integer, apply a moving average of this size
Integer, number of threads used to compute fragment size distribution
A list of tbl, one for each .bam file.
data(bam_test)
data(ce11_proms)
df <- getFragmentsDistribution(
bam_test,
ce11_proms,
extend_granges = c(-500, 500)
)
#> Warning: NAs introduced by coercion
#> Warning: NAs introduced by coercion
#> Warning: NAs introduced by coercion
head(df)
#> class x y
#> 1 granges 1 NA
#> 2 granges 2 0
#> 3 granges 3 0
#> 4 granges 4 0
#> 5 granges 5 0
#> 6 granges 6 0
which.max(df$y)
#> [1] 147