R/biocExplore.R

Defines functions biocExplore

Documented in biocExplore

#' Explore Bioconductor packages interactively
#' @description Explore Bioconductor packages through an interactive bubble plot. Click on bubbles to bring up additional information about the package. Size and proximity to center of a bubble is based on the downloads the package has in the past month.
#' @param top maximum number of packages displayed in any biocView
#' @param ... parameters passed to \code{htmlwidgets::createWidget()}
#'
#' @importFrom htmlwidgets createWidget
#'
#' @return A bubble plot of Bioconductor packages
#'
#' @export
biocExplore <- function(top = 500L, ...) {
    if(!is.numeric(top) || top < 1){
        stop("top must be >= 1")
    }
    # instruction messages
    message("- Hover over bubbles to see full name and lifetime downloads")
    message("- Click on bubbles to see more information about package")
    message("- Use filter to filter by biocViews")

    data <- list(
        data = get_bioc_data(),
        top = top
    )

    settings <- list(
    )

    x <- list(
        data = data,
        settings = settings
    )

    # create the widget
    # create widget
    htmlwidgets::createWidget(
        name = 'bioc_explore',
        package = 'BiocPkgTools',
        x = x,
        ...
    )
}

Try the BiocPkgTools package in your browser

Any scripts or data that you put into this service are public.

BiocPkgTools documentation built on April 15, 2021, 6:01 p.m.