mirror of
https://github.com/johrpan/ubigen.git
synced 2025-10-26 11:47:24 +01:00
Export plot functions
This commit is contained in:
parent
a6f0a64c2c
commit
2f24812c90
5 changed files with 71 additions and 3 deletions
|
|
@ -1,7 +1,10 @@
|
|||
# Generated by roxygen2: do not edit by hand
|
||||
|
||||
export(analyze)
|
||||
export(box_plot)
|
||||
export(overview_plot)
|
||||
export(rank_genes)
|
||||
export(run_app)
|
||||
export(scores_plot)
|
||||
import(data.table)
|
||||
import(shiny)
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@
|
|||
#' @param sample_proportion Proportion of rows to use as the shown sample.
|
||||
#'
|
||||
#' @return A `plotly` figure.
|
||||
#' @noRd
|
||||
#'
|
||||
#' @export
|
||||
overview_plot <- function(ranked_data,
|
||||
highlighted_genes = NULL,
|
||||
sample_proportion = 0.05) {
|
||||
|
|
@ -67,7 +68,8 @@ overview_plot <- function(ranked_data,
|
|||
#' @param highlighted_genes Genes that will be compared.
|
||||
#'
|
||||
#' @return A `plotly` figure.
|
||||
#' @noRd
|
||||
#'
|
||||
#' @export
|
||||
box_plot <- function(ranked_data, highlighted_genes) {
|
||||
data <- data.table::copy(ranked_data)
|
||||
data[, group := data.table::fifelse(
|
||||
|
|
@ -96,7 +98,8 @@ box_plot <- function(ranked_data, highlighted_genes) {
|
|||
#' `NULL`, all ranks will be shown.
|
||||
#'
|
||||
#' @return A `plotly` figure for rendering.
|
||||
#' @noRd
|
||||
#'
|
||||
#' @export
|
||||
scores_plot <- function(ranked_data, highlighted_genes = NULL, ranks = 1000) {
|
||||
data <- if (is.null(ranks)) {
|
||||
ranked_data
|
||||
|
|
|
|||
19
man/box_plot.Rd
Normal file
19
man/box_plot.Rd
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/plots.R
|
||||
\name{box_plot}
|
||||
\alias{box_plot}
|
||||
\title{Create a plot comparing some genes with the overall ranking.}
|
||||
\usage{
|
||||
box_plot(ranked_data, highlighted_genes)
|
||||
}
|
||||
\arguments{
|
||||
\item{ranked_data}{The ranking to visualize.}
|
||||
|
||||
\item{highlighted_genes}{Genes that will be compared.}
|
||||
}
|
||||
\value{
|
||||
A \code{plotly} figure.
|
||||
}
|
||||
\description{
|
||||
Create a plot comparing some genes with the overall ranking.
|
||||
}
|
||||
21
man/overview_plot.Rd
Normal file
21
man/overview_plot.Rd
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/plots.R
|
||||
\name{overview_plot}
|
||||
\alias{overview_plot}
|
||||
\title{Create a plot showing an overview over the provided ranking.}
|
||||
\usage{
|
||||
overview_plot(ranked_data, highlighted_genes = NULL, sample_proportion = 0.05)
|
||||
}
|
||||
\arguments{
|
||||
\item{ranked_data}{The ranking to visualize.}
|
||||
|
||||
\item{highlighted_genes}{Genes that will be marked.}
|
||||
|
||||
\item{sample_proportion}{Proportion of rows to use as the shown sample.}
|
||||
}
|
||||
\value{
|
||||
A \code{plotly} figure.
|
||||
}
|
||||
\description{
|
||||
Create a plot showing an overview over the provided ranking.
|
||||
}
|
||||
22
man/scores_plot.Rd
Normal file
22
man/scores_plot.Rd
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/plots.R
|
||||
\name{scores_plot}
|
||||
\alias{scores_plot}
|
||||
\title{Create plot showing the distribution of scores using \code{plotly}.}
|
||||
\usage{
|
||||
scores_plot(ranked_data, highlighted_genes = NULL, ranks = 1000)
|
||||
}
|
||||
\arguments{
|
||||
\item{ranked_data}{Data on genes with precomputed ranks.}
|
||||
|
||||
\item{highlighted_genes}{Genes that will be marked.}
|
||||
|
||||
\item{ranks}{How may ranks the x-axis should include. If this parameter is
|
||||
\code{NULL}, all ranks will be shown.}
|
||||
}
|
||||
\value{
|
||||
A \code{plotly} figure for rendering.
|
||||
}
|
||||
\description{
|
||||
Create plot showing the distribution of scores using \code{plotly}.
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue