plots: Refactor and improve

This commit is contained in:
Elias Projahn 2021-12-02 17:23:18 +01:00
parent f997b5fdd7
commit a347bf0ad4
5 changed files with 125 additions and 138 deletions

View file

@ -4,16 +4,13 @@
\alias{plot_boxplot}
\title{Visualize a ranking by comparing gene sets in a boxplot.}
\usage{
plot_boxplot(ranking, gene_sets = NULL, labels = NULL)
plot_boxplot(ranking, gene_sets = NULL)
}
\arguments{
\item{ranking}{The ranking to visualize.}
\item{gene_sets}{A list of gene sets (containing vectors of gene IDs) that
will be shown as separate boxes.}
\item{labels}{Labels for the gene sets. This is required if gene sets are
given and has to have the same length.}
\item{gene_sets}{A named list of gene sets (containing vectors of gene IDs)
that will be shown as separate boxes. The names will be used as labels.}
}
\description{
This function requires the package \code{plotly}.

View file

@ -4,18 +4,13 @@
\alias{plot_positions}
\title{Plot gene positions.}
\usage{
plot_positions(species_ids, gene_sets, labels, use_positions = FALSE)
plot_positions(species_ids, gene_sets)
}
\arguments{
\item{species_ids}{IDs of species to show in the plot.}
\item{gene_sets}{A list of gene sets (containing vectors of gene IDs) that
will be highlighted in the plot.}
\item{labels}{Labels for the gene sets. This is required if gene sets are
given and has to have the same length.}
\item{use_positions}{Whether to display positions instead of distances.}
will be highlighted in the plot. The names will be used as labels.}
}
\description{
This function requires the package \code{plotly}.

View file

@ -4,19 +4,16 @@
\alias{plot_scores}
\title{Plot a ranking as a scatter plot of scores.}
\usage{
plot_scores(ranking, gene_sets = NULL, labels = NULL, max_rank = NULL)
plot_scores(ranking, gene_sets = NULL, max_rank = NULL)
}
\arguments{
\item{ranking}{The ranking to visualize.}
\item{gene_sets}{A list of gene sets (containing vectors of gene IDs) that
will be highlighted in the plot.}
\item{gene_sets}{A named list of gene sets (containing vectors of gene IDs)
that will be highlighted in the plot. The names will be used in the legend.}
\item{labels}{Labels for the gene sets. This is required if gene sets are
given and has to have the same length.}
\item{max_rank}{The maximum rank of the highlighted genes. All genes that
are ranked lower will appear greyed out.}
\item{max_rank}{The maximum rank of included genes. All genes that are ranked
lower will appear greyed out.}
}
\description{
This function requires the package \code{plotly}.