Description Usage Arguments Value Examples
View source: R/myGRoverlapFunctions.R
Find the overlaps of GRangesList items to have only once each indice of each GRanges maximizing the sum of scores or normed scores.
1 2 | filterByScore(myGRsToOverlap, mAll = NULL, colWithScore = "score",
useNormScore = T, verbose = F)
|
myGRsToOverlap |
a GRangesList with items to overlap |
mAll |
a dataframe obtained with findAllOverlap with all possible overlaps between items of GRangeList (default is NULL). |
colWithScore |
the name of the column in the meta columns of the GRanges of the GRList to use to choose the best overlap (default is '"score"“). |
useNormScore |
a boolean to specify if the score of each GRanges should be normalized so the sum of all scores is 1 before summing between the overlaps to maximize. |
verbose |
logical (default is 'FALSE'). |
a dataframe with column names which correspond to the names of the GRanges items of the GRList. Each indice of each GRanges will be present. When indices from different columns are on the same row, this means that the specified GRanges overlap (at least with another one).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | gr1 <- GenomicRanges::GRanges(seqnames = "chr1",
ranges = IRanges::IRanges(start = c(1, 11, 199),
end = c(10, 12, 200)),
score = c(20, 30, 100))
gr2 <- GenomicRanges::GRanges(seqnames = "chr1",
ranges = IRanges::IRanges(start = c(5, 101),
end = c(15, 102)),
score = c(60, 90))
gr3 <- GenomicRanges::GRanges(seqnames = "chr1",
ranges = IRanges::IRanges(start = c(1, 100),
end = c(4, 120)),
score = c(1, 2))
grL <- list(first = gr1, second = gr2, third = gr3)
filterByScore(grL, useNormScore = TRUE)
filterByScore(grL, useNormScore = FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.