plyinteractions provides a consistent interface for importing genomic
interactions from pairs and bedpe files into GInteractions objects
in R and for manipulating them using a tidy grammar.
plyranges
operates on genomic ranges (e.g. implemented as GRanges
objects in Bioconductor) and introduces a tidy grammar for manipulating
them. Genomic interactions (implemented as GInteractions
objects in Bioconductor) are more complex than genomic ranges in that each
observation (row) corresponds to a pair of two genomic ranges, each one
with its own metadata. plyinteractions extends plyranges syntax to
manipulate genomic interactions in R using dplyr verbs and tidy operations.
The grammar of tidy genomic data transformation defined in
plyranges
and available for GInteractions currently supports:
dplyr verbs (for GInteractions and GroupedGInteractions):
group_by;summarize;tally and count;mutate;filter using
<data-masking>
and logical expressions;select
using <tidy-select> arguments;slice;arrange using categorical/numerical
variables.plyranges verbs (for PinnedGInteractions and AnchoredPinnedGInteractions):
stretch;anchor_* functions to control how stretching is performed;shift;GRanges from specific anchors of genomic interactions with flank.Note: In the genomic interaction field, the "anchor" term typically
refers to the two genomic loci brought together into an interaction. In
plyranges, the term anchor is used to specify which "part" of a genomic
locus is fixed (e.g. "5p", 3p", "center") and, incidently, which one can be modified
by plyranges verbs.
For more details on GInteractions "anchors" vs. plyranges anchoring
system, read
this section from our vignette.
Overlapping operations (for GInteractions and PinnedGInteractions):
find_overlapscount_overlapsfilter_by_overlaps and filter_by_non_overlaps
join_overlap_leftplyinteractions can be currently be installed from GitHub:
BiocManager::install("tidyomics/plyinteractions")
plyinteractions
Read vignette("plyinteractions") for more details.
Please note that this project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.
plyinteractions package is heavily based on plyranges. It adapts a
number of functions and methods defined in that package, and would not have
been developed without the seminal work from Stuart Lee, Dianne Cook and Michael
Lawrence:
This package is largely inspired by the tidyverse: