Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/check-bioc-devel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,8 @@ jobs:
dir('check', 'tar.gz$', full.names = TRUE),
`quit-with-status` = TRUE,
`no-check-R-ver` = TRUE,
`no-check-bioc-help` = TRUE
`no-check-bioc-help` = TRUE,
`no-check-version-num` = TRUE
)
shell: Rscript {0}

Expand Down
23 changes: 17 additions & 6 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,28 @@ Package: plotgardener
Title: Coordinate-Based Genomic Visualization Package for R
Version: 1.15.1
Date: 2024-06-28
Author: Nicole Kramer [aut, cre], Eric S. Davis [aut], Craig Wenger [aut],
Sarah Parker [ctb], JP Flores [ctb], Erika Deoudes [art], Michael Love [ctb],
Douglas H. Phanstiel [aut, cre, cph]
Maintainer: Nicole Kramer <nekramer27@gmail.com>,
Douglas Phanstiel <douglas_phanstiel@med.unc.edu>
Authors@R: c(
person("Nicole", "Kramer", email = "nekramer27@gmail.com",
role = c("aut", "cre"),
comment = c(ORCID = "0000-0001-9617-9671")),
person("Eric S.", "Davis", email = "esdavis@live.unc.edu",
role = "aut",
comment = c(ORCID = "0000-0003-4051-3217")),
person("Craig", "Wenger", email = "craig.wenger@gmail.com",
role = "aut",
comment = c(ORCID = "0000-0002-7361-8456")),
person("Sarah", "Parker", email = "sarmae@live.unc.edu", role = "ctb"),
person("JP", "Flores", email = "jflores@unc.edu", role = "ctb"),
person("Erika", "Deoudes", email = "ed@erikadudes.com", role = "art"),
person("Michael", "Love", email = "milove@email.unc.edu", role = "ctb"),
person("Douglas H.", "Phanstiel", email = "douglas_phanstiel@med.unc.edu",
role = c("aut", "cph")))
Description:
Coordinate-based genomic visualization package for R. It grants users
the ability to programmatically produce complex, multi-paneled figures. Tailored for
genomics, plotgardener allows users to visualize large complex genomic datasets and
provides exquisite control over how plots are placed and arranged on a page.
Depends: R (>= 4.1.0)
Depends: R (>= 4.2.0)
License: MIT + file LICENSE
URL: https://phanstiellab.github.io/plotgardener, https://github.com/PhanstielLab/plotgardener
Encoding: UTF-8
Expand Down
2 changes: 1 addition & 1 deletion R/annoDomains.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#' @param half Character value specifying which half of hic plots
#' to annotate. Triangle Hi-C plots will always default to the entirety of
#' the triangular plot. Default value is \code{half = "inherit"}. Options are:
#' \itemize{
#' \describe{
#' \item{\code{"inherit"}: }{Domains will be annotated on the \code{half}
#' inherited by the input Hi-C plot.}
#' \item{\code{"both"}: }{Domains will be annotated on both halves of the
Expand Down
4 changes: 2 additions & 2 deletions R/annoGenomeLabel.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#' and coordinate labels. Default value is \code{margin = unit(1, "mm")}.
#' @param scale A character value indicating the scale of the coordinates
#' along the genome label. Default value is \code{scale = "bp"}. Options are:
#' \itemize{
#' \describe{
#' \item{\code{"bp"}: }{base pairs.}
#' \item{\code{"Kb"}: }{kilobase pairs. 1 kilobase pair is equal to
#' 1000 base pairs.}
Expand All @@ -51,7 +51,7 @@
#' add genome label. Sequence information will not be displayed along a y-axis.
#' Default value is \code{axis = "x"}.
#' Options are:
#' \itemize{
#' \describe{
#' \item{\code{"x"}: }{Genome label will be plotted along the x-axis.}
#' \item{\code{"y"}: }{Genome label will be plotted along the y-axis.
#' This is typically used for a square Hi-C plot made with
Expand Down
2 changes: 1 addition & 1 deletion R/annoHeatmapLegend.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#' @param plot Heatmap-style plot object to add heatmap legend for.
#' @param orientation A string specifying legend orientation.
#' Default value is \code{orientation = "v"}. Options are:
#' \itemize{
#' \describe{
#' \item{\code{"v"}: }{Vertical legend orientation.}
#' \item{\code{"h"}: }{Horizontal legend orientation.}
#' }
Expand Down
4 changes: 2 additions & 2 deletions R/annoPixels.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@
#' positions.
#' @param type Character value specifying type of annotation.
#' Default value is \code{type = "box"}. Options are:
#' \itemize{
#' \describe{
#' \item{\code{"box"}: }{Boxes are drawn around each pixel.}
#' \item{\code{"circle"}: }{Circles are drawn around each pixel.}
#' \item{\code{"arrow"}: }{Arrows are drawn pointing to each pixel.}
#' }
#' @param half Character value specifying which half of hic plots
#' to annotate. Triangle Hi-C plots will always default to the entirety of
#' the triangular plot. Default value is \code{half = "inherit"}. Options are:
#' \itemize{
#' \describe{
#' \item{\code{"inherit"}: }{Pixels will be annotated on the \code{half}
#' inherited by the input Hi-C plot.}
#' \item{\code{"both"}: }{Pixels will be annotated on both halves of the
Expand Down
10 changes: 5 additions & 5 deletions R/annoSegments.R
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@
#' Default value is \code{lty = 1}.
#' @param lineend A character value specifying line end style.
#' Default value is \code{lineend = "butt"}. Options are:
#' \itemize{
#' \item{\code{"round"}: Segment ends are rounded.}
#' \item{\code{"butt"}: Segment ends end exactly where ended.}
#' \item{\code{"square"}: Segment ends are squared.}
#' \describe{
#' \item{\code{"round"}: }{Segment ends are rounded.}
#' \item{\code{"butt"}: }{Segment ends end exactly where ended.}
#' \item{\code{"square"}: }{Segment ends are squared.}
#' }
#' @param linejoin A character value specifying line join style.
#' Default value is \code{linejoin = "mitre"}. Options are:
#' \itemize{
#' \describe{
#' \item{\code{"round"}: }{Line joins are rounded.}
#' \item{\code{"mitre"}: }{Line joins are sharp corners.}
#' \item{\code{"bevel"}: }{Line joins are flattened corners.}
Expand Down
2 changes: 1 addition & 1 deletion R/annoXaxis.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#' If not logical, must be the same length as the \code{at} argument.
#' @param main A logical value indicating whether to draw the x-axis at the
#' bottom of the plot. Default value is \code{main = TRUE}. Options are:
#' \itemize{
#' \describe{
#' \item{\code{TRUE}: }{x-axis is drawn at the bottom of the plot.}
#' \item{\code{FALSE}: }{x-axis is drawn at the top of the plot.}
#' }
Expand Down
2 changes: 1 addition & 1 deletion R/annoYaxis.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#' If not logical, must be the same length as the \code{at} argument.
#' @param main A logical value indicating whether to draw the y-axis at
#' the left of the plot. Default value is \code{main = TRUE}. Options are:
#' \itemize{
#' \describe{
#' \item{\code{TRUE}: }{y-axis is drawn at the left of the plot.}
#' \item{\code{FALSE}: }{y-axis is drawn at the right of the plot.}
#' }
Expand Down
4 changes: 2 additions & 2 deletions R/plotGenomeLabel.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
#' and coordinate labels. Default value is \code{margin = unit(1, "mm")},
#' @param scale A character value indicating the scale of the coordinates
#' along the genome label. Default value is \code{scale = "bp"}. Options are:
#' \itemize{
#' \describe{
#' \item{\code{"bp"}: }{base pairs.}
#' \item{\code{"Kb"}: }{kilobase pairs. 1 kilobase pair is equal to
#' 1000 base pairs.}
Expand All @@ -59,7 +59,7 @@
#' add genome label. Sequence information will not be displayed along a y-axis.
#' Default value is \code{axis = "x"}.
#' Options are:
#' \itemize{
#' \describe{
#' \item{\code{"x"}: }{Genome label will be plotted along the x-axis.}
#' \item{\code{"y"}: }{Genome label will be plotted along the y-axis.
#' This is typically used for a square Hi-C plot made with
Expand Down
2 changes: 1 addition & 1 deletion R/plotHicRectangle.R
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
#' @param matrix Character value indicating the type of matrix to output for
#' .hic files.
#' Default value is \code{matrix = "observed"}. Options are:
#' \itemize{
#' \describe{
#' \item{\code{"observed"}: }{Observed counts.}
#' \item{\code{"oe"}: }{Observed/expected counts.}
#' \item{\code{"log2oe"}: }{Log2 transformed observed/expected counts.}
Expand Down
4 changes: 2 additions & 2 deletions R/plotHicSquare.R
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
#' @param matrix Character value indicating the type of matrix to output for
#' .hic files.
#' Default value is \code{matrix = "observed"}. Options are:
#' \itemize{
#' \describe{
#' \item{\code{"observed"}: }{Observed counts.}
#' \item{\code{"oe"}: }{Observed/expected counts.}
#' \item{\code{"log2oe"}: }{Log2 transformed observed/expected counts.}
Expand Down Expand Up @@ -74,7 +74,7 @@
#' or \code{"bottom"}. For off-diagonal or interchromosomal plotting,
#' options are \code{"top"} or \code{"bottom"}.
#' Default value is \code{half = "both"}.
#' \itemize{
#' \describe{
#' \item{\code{"both"}: }{Both diagonal halves.}
#' \item{\code{"top"}: }{Half above the diagonal.}
#' \item{\code{"bottom"}: }{Half below the diagonal.}
Expand Down
2 changes: 1 addition & 1 deletion R/plotHicTriangle.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
#' @param matrix Character value indicating the type of matrix to output for
#' .hic files.
#' Default value is \code{matrix = "observed"}. Options are:
#' \itemize{
#' \describe{
#' \item{\code{"observed"}: }{Observed counts.}
#' \item{\code{"oe"}: }{Observed/expected counts.}
#' \item{\code{"log2oe"}: }{Log2 transformed observed/expected counts.}
Expand Down
2 changes: 1 addition & 1 deletion R/plotIdeogram.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#' @param orientation Character value indicating the orientation
#' of the ideogram. Default value is \code{orientation = "h"}.
#' Options are:
#' \itemize{
#' \describe{
#' \item{\code{"v"}: }{Vertical ideogram orientation.}
#' \item{\code{"h"}: }{Horizontal ideogram orientation.}
#' }
Expand Down
2 changes: 1 addition & 1 deletion R/plotLegend.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#' @param lty The line types for lines appearing in the legend.
#' @param orientation A string specifying legend orientation.
#' Default value is \code{orientation = "v"}. Options are:
#' \itemize{
#' \describe{
#' \item{\code{"v"}: }{Vertical legend orientation.}
#' \item{\code{"h"}: }{Horizontal legend orientation.}
#' }
Expand Down
2 changes: 1 addition & 1 deletion R/plotManhattan.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#' @param data Data to be plotted, as a character value specifying a
#' file path of GWAS data, a dataframe, or a \link[GenomicRanges]{GRanges}
#' object. Each of these data types must have the following columns:
#' \itemize{
#' \describe{
#' \item{\code{"chrom"}: }{Chromosome names. This column must be a character.}
#' \item{\code{"pos"}: }{Chromosomal position. This column must be
#' an integer or numeric.}
Expand Down
2 changes: 1 addition & 1 deletion R/plotMultiSignal.R
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
#' Default value is \code{baseline.lwd = 1}.
#' @param orientation A string specifying signal track orientations.
#' Default value is \code{orientation = "h"}. Options are:
#' \itemize{
#' \describe{
#' \item{\code{"v"}: }{Vertical signal track orientations, where signal tracks
#' will be stacked from left to right.}
#' \item{\code{"h"}: }{Horizontal signal track orientations, where signal tracks
Expand Down
2 changes: 1 addition & 1 deletion R/plotPairs.R
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
#' \link[plotgardener]{colorby} object specifying the color of the lines
#' outlining paired range elements. Default value is \code{linecolor = NA}.
#' Special options include:
#' \itemize{
#' \describe{
#' \item{\code{NA}: }{No line color.}
#' \item{\code{"fill"}: }{Same color as \code{fill}.}
#' }
Expand Down
4 changes: 2 additions & 2 deletions R/plotPairsArches.R
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
#' Default value is \code{assembly = "hg38"}.
#' @param style Character value describing the style of arches.
#' Default value is \code{style = "2D"}. Options are:
#' \itemize{
#' \describe{
#' \item{\code{"2D"}: }{Arches will be drawn in a 2-dimensional style.}
#' \item{\code{"3D"}: }{Arches will be drawn in a 3-dimensional style.}
#' }
Expand All @@ -60,7 +60,7 @@
#' \link[plotgardener]{colorby} object specifying the color of the lines
#' outlining arches. Default value is \code{linecolor = NA}.
#' Special options include:
#' \itemize{
#' \describe{
#' \item{\code{NA}: }{No line color.}
#' \item{\code{"fill"}: }{Same color as \code{fill}.}
#' }
Expand Down
4 changes: 2 additions & 2 deletions R/plotRanges.R
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@
#' \link[plotgardener]{colorby} object specifying the color of the lines
#' outlining range elements. Default value is \code{linecolor = NA}.
#' Special options include:
#' \itemize{
#' \describe{
#' \item{\code{NA}: }{No line color.}
#' \item{\code{"fill"}: }{Same color as \code{fill}.}
#' } .
#' @param order A character value specifying how to order pileup data
#' before assigning rows. Default value is \code{order = "width"}. Options
#' include:
#' \itemize{
#' \describe{
#' \item{\code{"width"}: }{Ordered by decreasing width of elements.}
#' \item{\code{"random"}: }{Ordered randomly in each function call.}
#' } .
Expand Down
10 changes: 5 additions & 5 deletions R/plotSegments.R
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@
#' Default value is \code{lty = 1}.
#' @param lineend A character value specifying line end style.
#' Default value is \code{lineend = "butt"}. Options are:
#' \itemize{
#' \item{\code{"round"}: Segment ends are rounded.}
#' \item{\code{"butt"}: Segment ends end exactly where ended.}
#' \item{\code{"square"}: Segment ends are squared.}
#' \describe{
#' \item{\code{"round"}: }{Segment ends are rounded.}
#' \item{\code{"butt"}: }{Segment ends end exactly where ended.}
#' \item{\code{"square"}: }{Segment ends are squared.}
#' }
#' @param linejoin A character value specifying line join style.
#' Default value is \code{linejoin = "mitre"}. Options are:
#' \itemize{
#' \describe{
#' \item{\code{"round"}: }{Line joins are rounded.}
#' \item{\code{"mitre"}: }{Line joins are sharp corners.}
#' \item{\code{"bevel"}: }{Line joins are flattened corners.}
Expand Down
2 changes: 1 addition & 1 deletion R/plotSignal.R
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
#' Default value is \code{baseline.lwd = 1}.
#' @param orientation A string specifying signal track orientation.
#' Default value is \code{orientation = "h"}. Options are:
#' \itemize{
#' \describe{
#' \item{\code{"v"}: }{Vertical signal track orientation.}
#' \item{\code{"h"}: }{Horizontal signal track orientation.}
#' }
Expand Down
2 changes: 1 addition & 1 deletion R/plotTranscripts.R
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
#' @param labels A character value describing the format of
#' transcript text labels. Default value is \code{labels = "trancript"}.
#' Options are:
#' \itemize{
#' \describe{
#' \item{\code{NULL}: }{No labels.}
#' \item{\code{"transcript"}: }{Transcript name labels.}
#' \item{\code{"gene"}: }{Gene name labels.}
Expand Down
2 changes: 2 additions & 0 deletions R/plotgardener.R
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,5 @@
#' @importFrom GenomeInfoDb keepStandardChromosomes
#' @importFrom GenomicRanges makeGRangesFromDataFrame
"_PACKAGE"

utils::globalVariables(c("name", "width", "strand"))
2 changes: 1 addition & 1 deletion R/readBigwig.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#' @param chromend Integer end position on chromosome.
#' @param strand A character value specifying strand.
#' Default value is \code{strand = "*"}. Options are:
#' \itemize{
#' \describe{
#' \item{\code{"+"}: }{Plus strand.}
#' \item{\code{"-"}: }{Minus strand.}
#' \item{\code{"*"}: }{Plus and minus strands.}
Expand Down
24 changes: 20 additions & 4 deletions R/readCool.R
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
#' Check for .(m)cool file and contents
#' @author Sarah Parker
#'
#'
#' @param file Path to .(m)cool file
#'
#'
#' @return A character string, either \code{".cool"} or \code{".mcool"},
#' indicating the file type. Aborts with an error if the file is not a
#' valid .(m)cool file.
#'
#' @importFrom glue glue glue_collapse
#' @importFrom rlang abort
#' @importFrom rhdf5 H5Fis_hdf5 h5ls
Expand Down Expand Up @@ -236,6 +240,9 @@ readCoolChroms <- function(file, resolution = NULL){
#' @param file Path to .(m)cool file
#' @param chromstart Chromstart of region
#' @param chromend Chromend of region
#'
#' @return A numeric value specifying the automatically determined resolution
#' in base pairs.
.coolAutoResolution <- function(file, chromstart, chromend){

fileResolutions <- readCoolBpResolutions(file)
Expand Down Expand Up @@ -300,6 +307,9 @@ readCoolChroms <- function(file, resolution = NULL){
#' @param file Path to .(m)cool file
#' @param chrom Chromosome of region; can also be altchromosome
#' @param resolution Resolution to read chromsome info from
#'
#' @return A list of length two containing the chromosome start position (1)
#' and the chromosome length.
.coolRegion <- function(file, chrom, resolution){

chromInfo <- readCoolChroms(file, resolution = resolution)
Expand All @@ -319,7 +329,10 @@ readCoolChroms <- function(file, resolution = NULL){
#' @param end1bin Bin where end1 starts
#' @param start2bin Bin for chr2 starts
#' @param end2bin Bin for end2 starts
#'
#'
#' @return An integer vector of pixel indices corresponding to interactions
#' within the specified bin chunk, or \code{NA} if none are found.
#'
#' @importFrom rhdf5 h5read
.pullBinChunks <- function(binChunk, file, bin_offsets, binChunkSize,
datasetPath, end1bin,
Expand Down Expand Up @@ -357,7 +370,10 @@ readCoolChroms <- function(file, resolution = NULL){
#' @param altchromend User-inputted alt chromend.
#' @param norm User-inputted normalization.
#' @param resolution Resolution, either user-inputted or determined by 'auto'.
#'
#'
#' @return Called for side effects (input validation). Aborts with an
#' informative error if any inputs are invalid.
#'
#' @importFrom glue glue
#' @importFrom rlang abort
.checkCoolErrors <- function(file, chrom, chromstart, chromend, zrange,
Expand Down
Loading
Loading