diff --git a/NAMESPACE b/NAMESPACE index 5cfae4d..3c39f48 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -77,9 +77,13 @@ export(anchors2) export(arrange) export(as_ginteractions) export(count) +export(count_overlaps) +export(count_overlaps_directed) export(end1) export(end2) export(filter) +export(filter_by_non_overlaps) +export(filter_by_overlaps) export(find_overlaps) export(find_overlaps_directed) export(flank_downstream) diff --git a/R/count-overlaps.R b/R/count-overlaps.R index e20748e..af845af 100644 --- a/R/count-overlaps.R +++ b/R/count-overlaps.R @@ -5,7 +5,7 @@ #' When using `count_overlaps()` with a `PinnedGInteractions` object, #' only the pinned anchors are used to check for overlap with `y`. #' This is equivalent to specifying `use.region="both"` in -#' \code{\href{https://bioconductor.org/packages/release/bioc/vignettes/InteractionSet/inst/doc/interactions.html#27_Overlap_methods}{InteractionSet::countOverlaps()}}. +#' `InteractionSet::findOverlaps()`. #' #' @param x A (Pinned)GInteractions object #' @param y A GRanges object @@ -81,7 +81,7 @@ count_overlaps.PinnedGInteractions <- function( #' @rdname ginteractions-count-overlaps #' @export count_overlaps.GInteractions <- function( - x, y, maxgap = -1L, minoverlap = 0L, suffix = c(".x", ".y") + x, y, maxgap = -1L, minoverlap = 0L ) { InteractionSet::countOverlaps( @@ -99,7 +99,7 @@ count_overlaps.GInteractions <- function( #' @rdname ginteractions-count-overlaps #' @export count_overlaps_directed.PinnedGInteractions <- function( - x, y, maxgap = -1L, minoverlap = 0L, suffix = c(".x", ".y") + x, y, maxgap = -1L, minoverlap = 0L ) { InteractionSet::countOverlaps( @@ -121,7 +121,7 @@ count_overlaps_directed.PinnedGInteractions <- function( #' @rdname ginteractions-count-overlaps #' @export count_overlaps_directed.GInteractions <- function( - x, y, maxgap = -1L, minoverlap = 0L, suffix = c(".x", ".y") + x, y, maxgap = -1L, minoverlap = 0L ) { InteractionSet::countOverlaps( diff --git a/R/filter-overlaps.R b/R/filter-overlaps.R index 3d45b17..a15f956 100644 --- a/R/filter-overlaps.R +++ b/R/filter-overlaps.R @@ -5,7 +5,7 @@ #' When using `filter_by_overlaps()` with a `PinnedGInteractions` object, #' only the pinned anchors are used to check for overlap with `y`. #' This is equivalent to specifying `use.region="both"` in -#' \code{\href{https://bioconductor.org/packages/release/bioc/vignettes/InteractionSet/inst/doc/interactions.html#27_Overlap_methods}{InteractionSet::countOverlaps()}}. +#' `InteractionSet::findOverlaps()`. #' #' @param x A (Pinned)GInteractions object #' @param y A GRanges object @@ -81,7 +81,7 @@ filter_by_overlaps.PinnedGInteractions <- function( #' @rdname ginteractions-filter-overlaps #' @export filter_by_overlaps.GInteractions <- function( - x, y, maxgap = -1L, minoverlap = 0L, suffix = c(".x", ".y") + x, y, maxgap = -1L, minoverlap = 0L ) { IRanges::subsetByOverlaps( @@ -122,7 +122,7 @@ filter_by_non_overlaps.PinnedGInteractions <- function( #' @rdname ginteractions-filter-overlaps #' @export filter_by_non_overlaps.GInteractions <- function( - x, y, maxgap = -1L, minoverlap = 0L, suffix = c(".x", ".y") + x, y, maxgap = -1L, minoverlap = 0L ) { IRanges::subsetByOverlaps( diff --git a/R/find-overlaps.R b/R/find-overlaps.R index 088c6c5..623310f 100644 --- a/R/find-overlaps.R +++ b/R/find-overlaps.R @@ -13,7 +13,7 @@ #' When using `find_overlaps()` with a `PinnedGInteractions` object, #' only the pinned anchors are used to check for overlap with `y`. #' This is equivalent to specifying `use.region="both"` in -#' \code{\href{https://bioconductor.org/packages/release/bioc/vignettes/InteractionSet/inst/doc/interactions.html#27_Overlap_methods}{InteractionSet::findOverlaps()}}. +#' `InteractionSet::findOverlaps()`. #' #' @param x A (Pinned)GInteractions object #' @param y A GRanges object diff --git a/R/reexports-plyranges.R b/R/reexports-plyranges.R index 2009030..e6bc8b9 100644 --- a/R/reexports-plyranges.R +++ b/R/reexports-plyranges.R @@ -47,3 +47,23 @@ plyranges::find_overlaps #' @importFrom plyranges find_overlaps_directed #' @export plyranges::find_overlaps_directed + +#' @rdname reexports +#' @importFrom plyranges count_overlaps +#' @export +plyranges::count_overlaps + +#' @rdname reexports +#' @importFrom plyranges count_overlaps_directed +#' @export +plyranges::count_overlaps_directed + +#' @rdname reexports +#' @importFrom plyranges filter_by_overlaps +#' @export +plyranges::filter_by_overlaps + +#' @rdname reexports +#' @importFrom plyranges filter_by_non_overlaps +#' @export +plyranges::filter_by_non_overlaps diff --git a/man/ginteractions-count-overlaps.Rd b/man/ginteractions-count-overlaps.Rd index 7d2e3ca..3d4c27c 100644 --- a/man/ginteractions-count-overlaps.Rd +++ b/man/ginteractions-count-overlaps.Rd @@ -10,23 +10,11 @@ \usage{ \method{count_overlaps}{PinnedGInteractions}(x, y, maxgap = -1L, minoverlap = 0L) -\method{count_overlaps}{GInteractions}(x, y, maxgap = -1L, minoverlap = 0L, suffix = c(".x", ".y")) - -\method{count_overlaps_directed}{PinnedGInteractions}( - x, - y, - maxgap = -1L, - minoverlap = 0L, - suffix = c(".x", ".y") -) - -\method{count_overlaps_directed}{GInteractions}( - x, - y, - maxgap = -1L, - minoverlap = 0L, - suffix = c(".x", ".y") -) +\method{count_overlaps}{GInteractions}(x, y, maxgap = -1L, minoverlap = 0L) + +\method{count_overlaps_directed}{PinnedGInteractions}(x, y, maxgap = -1L, minoverlap = 0L) + +\method{count_overlaps_directed}{GInteractions}(x, y, maxgap = -1L, minoverlap = 0L) } \arguments{ \item{x}{A (Pinned)GInteractions object} @@ -48,7 +36,7 @@ Count overlaps between a query GInteractions and a GRanges When using \code{count_overlaps()} with a \code{PinnedGInteractions} object, only the pinned anchors are used to check for overlap with \code{y}. This is equivalent to specifying \code{use.region="both"} in -\code{\href{https://bioconductor.org/packages/release/bioc/vignettes/InteractionSet/inst/doc/interactions.html#27_Overlap_methods}{InteractionSet::countOverlaps()}}. +\code{InteractionSet::findOverlaps()}. } \examples{ diff --git a/man/ginteractions-filter-overlaps.Rd b/man/ginteractions-filter-overlaps.Rd index 98ee618..a7545f9 100644 --- a/man/ginteractions-filter-overlaps.Rd +++ b/man/ginteractions-filter-overlaps.Rd @@ -10,17 +10,11 @@ \usage{ \method{filter_by_overlaps}{PinnedGInteractions}(x, y, maxgap = -1L, minoverlap = 0L) -\method{filter_by_overlaps}{GInteractions}(x, y, maxgap = -1L, minoverlap = 0L, suffix = c(".x", ".y")) +\method{filter_by_overlaps}{GInteractions}(x, y, maxgap = -1L, minoverlap = 0L) \method{filter_by_non_overlaps}{PinnedGInteractions}(x, y, maxgap = -1L, minoverlap = 0L) -\method{filter_by_non_overlaps}{GInteractions}( - x, - y, - maxgap = -1L, - minoverlap = 0L, - suffix = c(".x", ".y") -) +\method{filter_by_non_overlaps}{GInteractions}(x, y, maxgap = -1L, minoverlap = 0L) } \arguments{ \item{x}{A (Pinned)GInteractions object} @@ -42,7 +36,7 @@ Filter GInteractions overlapping with a GRanges When using \code{filter_by_overlaps()} with a \code{PinnedGInteractions} object, only the pinned anchors are used to check for overlap with \code{y}. This is equivalent to specifying \code{use.region="both"} in -\code{\href{https://bioconductor.org/packages/release/bioc/vignettes/InteractionSet/inst/doc/interactions.html#27_Overlap_methods}{InteractionSet::countOverlaps()}}. +\code{InteractionSet::findOverlaps()}. } \examples{ diff --git a/man/ginteractions-find-overlaps.Rd b/man/ginteractions-find-overlaps.Rd index fb73b68..cd8bb76 100644 --- a/man/ginteractions-find-overlaps.Rd +++ b/man/ginteractions-find-overlaps.Rd @@ -62,7 +62,7 @@ have additional metadata columns corresponding to the metadata from \code{y}. When using \code{find_overlaps()} with a \code{PinnedGInteractions} object, only the pinned anchors are used to check for overlap with \code{y}. This is equivalent to specifying \code{use.region="both"} in -\code{\href{https://bioconductor.org/packages/release/bioc/vignettes/InteractionSet/inst/doc/interactions.html#27_Overlap_methods}{InteractionSet::findOverlaps()}}. +\code{InteractionSet::findOverlaps()}. } \examples{ diff --git a/man/reexports.Rd b/man/reexports.Rd index c4805cf..6227311 100644 --- a/man/reexports.Rd +++ b/man/reexports.Rd @@ -34,6 +34,10 @@ \alias{stretch} \alias{find_overlaps} \alias{find_overlaps_directed} +\alias{count_overlaps} +\alias{count_overlaps_directed} +\alias{filter_by_overlaps} +\alias{filter_by_non_overlaps} \title{Objects exported from other packages} \value{ Depending on the re-exported function @@ -49,6 +53,6 @@ below to see their documentation. \describe{ \item{dplyr}{\code{\link[dplyr]{arrange}}, \code{\link[dplyr]{count}}, \code{\link[dplyr]{filter}}, \code{\link[dplyr]{group_by}}, \code{\link[dplyr]{group_data}}, \code{\link[dplyr:group_data]{group_indices}}, \code{\link[dplyr:group_data]{group_keys}}, \code{\link[dplyr:group_data]{group_rows}}, \code{\link[dplyr:group_data]{group_size}}, \code{\link[dplyr:group_data]{group_vars}}, \code{\link[dplyr:group_data]{groups}}, \code{\link[dplyr]{mutate}}, \code{\link[dplyr:group_data]{n_groups}}, \code{\link[dplyr]{rename}}, \code{\link[dplyr]{select}}, \code{\link[dplyr]{slice}}, \code{\link[dplyr]{summarise}}, \code{\link[dplyr:summarise]{summarize}}, \code{\link[dplyr:count]{tally}}, \code{\link[dplyr:group_by]{ungroup}}} - \item{plyranges}{\code{\link[plyranges:ranges-anchor]{anchor}}, \code{\link[plyranges:ranges-anchor]{anchor_3p}}, \code{\link[plyranges:ranges-anchor]{anchor_5p}}, \code{\link[plyranges:ranges-anchor]{anchor_center}}, \code{\link[plyranges:ranges-anchor]{anchor_end}}, \code{\link[plyranges:ranges-anchor]{anchor_start}}, \code{\link[plyranges:ranges-overlaps]{find_overlaps}}, \code{\link[plyranges:ranges-overlaps]{find_overlaps_directed}}, \code{\link[plyranges]{stretch}}, \code{\link[plyranges:ranges-anchor]{unanchor}}} + \item{plyranges}{\code{\link[plyranges:ranges-anchor]{anchor}}, \code{\link[plyranges:ranges-anchor]{anchor_3p}}, \code{\link[plyranges:ranges-anchor]{anchor_5p}}, \code{\link[plyranges:ranges-anchor]{anchor_center}}, \code{\link[plyranges:ranges-anchor]{anchor_end}}, \code{\link[plyranges:ranges-anchor]{anchor_start}}, \code{\link[plyranges:ranges-count-overlaps]{count_overlaps}}, \code{\link[plyranges:ranges-count-overlaps]{count_overlaps_directed}}, \code{\link[plyranges:ranges-filter-overlaps]{filter_by_non_overlaps}}, \code{\link[plyranges:ranges-filter-overlaps]{filter_by_overlaps}}, \code{\link[plyranges:ranges-overlaps]{find_overlaps}}, \code{\link[plyranges:ranges-overlaps]{find_overlaps_directed}}, \code{\link[plyranges]{stretch}}, \code{\link[plyranges:ranges-anchor]{unanchor}}} }}