doc_function: Mock function used to document all main function.

View source: R/utils.R

doc_functionR Documentation

Mock function used to document all main function.

Description

Mock function used to document all main function.

Arguments

sample

Seurat | A Seurat object, generated by CreateSeuratObject.

font.size

numeric | Overall font size of the plot. All plot elements will have a size relationship with this font size.

font.type

character | Base font family for the plot. One of:

  • mono: Mono spaced font.

  • serif: Serif font family.

  • sans: Default font family.

legend.type

character | Type of legend to display. One of:

  • normal: Default legend displayed by ggplot2.

  • colorbar: Redefined colorbar legend, using guide_colorbar.

legend.position

character | Position of the legend in the plot. One of:

  • top: Top of the figure.

  • bottom: Bottom of the figure.

  • left: Left of the figure.

  • right: Right of the figure.

  • none: No legend is displayed.

legend.framewidth, legend.tickwidth

numeric | Width of the lines of the box in the legend.

legend.framecolor

character | Color of the lines of the box in the legend.

legend.tickcolor

character | Color of the ticks of the box in the legend.

legend.length, legend.width

numeric | Length and width of the legend. Will adjust automatically depending on legend side.

plot.title, plot.subtitle, plot.caption

character | Title, subtitle or caption to use in the plot.

assay

character | Assay to use. Defaults to the current assay.

slot

character | Data slot to use. Only one of: counts, data, scale.data. Defaults to "data".

reduction

character | Reduction to use. Can be the canonical ones such as "umap", "pca", or any custom ones, such as "diffusion". If you are unsure about which reductions you have, use Seurat::Reductions(sample). Defaults to "umap" if present or to the last computed reduction if the argument is not provided.

viridis.palette

character | A capital letter from A to H or the scale name as in scale_fill_viridis.

raster

logical | Whether to raster the resulting plot. This is recommendable if plotting a lot of cells.

raster.dpi

numeric | Pixel resolution for rasterized plots. Defaults to 1024. Only activates on Seurat versions higher or equal than 4.1.0.

plot_cell_borders

logical | Whether to plot border around cells.

border.size

numeric | Width of the border of the cells.

border.color

character | Color for the border of the heatmap body.

na.value

character | Color value for NA.

axis.text.x.angle

numeric | Degree to rotate the X labels. One of: 0, 45, 90.

xlab, ylab

character | Titles for the X and Y axis.

pt.size

numeric | Size of the dots.

verbose

logical | Whether to show extra comments, warnings,etc.

flip

logical | Whether to invert the axis of the displayed plot.

group.by

character | Metadata variable to group the output by. Has to be a character of factor column.

split.by

character | Secondary metadata variable to further group (split) the output by. Has to be a character of factor column.

colors.use

named_vector | Named vector of valid color representations (either name of HEX codes) with as many named colors as unique values of group.by. If group.by is not provided, defaults to the unique values of Idents. If not provided, a color scale will be set by default.

legend.title

character | Title for the legend.

legend.icon.size

numeric | Size of the icons in legend.

legend.byrow

logical | Whether the legend is filled by row or not.

legend.ncol

numeric | Number of columns in the legend.

legend.nrow

numeric | Number of rows in the legend.

plot_marginal_distributions

logical | Whether to plot marginal distributions on the figure or not.

marginal.type

character | One of:

  • density: Compute density plots on the margins.

  • histogram: Compute histograms on the margins.

  • boxplot: Compute boxplot on the margins.

  • violin: Compute violin plots on the margins.

  • densigram: Compute densigram plots on the margins.

marginal.size

numeric | Size ratio between the main and marginal plots. A value of 5 means that the main plot is 5 times bigger than the marginal plots.

marginal.group

logical | Whether to group the marginal distribution by group.by or current identities.

enforce_symmetry

logical | Return a symmetrical plot axes-wise or continuous color scale-wise, when applicable.

column_title

character | Title for the columns of the heatmaps. Only works with single heatmaps.

row_title

character | Title for the rows of the heatmaps. Only works with single heatmaps.

cluster_cols

logical | Cluster the columns or rows of the heatmaps.

cluster_rows

logical | Cluster the rows or rows of the heatmaps.

column_names_rot

numeric | Degree in which to rotate the column labels.

row_names_rot

numeric | Degree in which to rotate the row labels.

cell_size

numeric | Size of each cell in the heatmap.

input_gene_list

named_list | Named list of lists of genes to be used as input.

column_title_rot

numeric | Degree in which to rotate the column titles.

row_title_rot

numeric | Degree in which to rotate the row titles.

column_names_side

character | Side to put the column names. Either left or right.

row_names_side

character | Side to put the row names. Either left or right.

column_title_side

character | Side to put the column titles Either left or right.

row_title_side

character | Side to put the row titles Either left or right.

heatmap.legend.length, heatmap.legend.width

numeric | Width and length of the legend in the heatmap.

heatmap.legend.framecolor

character | Color of the edges and ticks of the legend in the heatmap.

scale_direction

numeric | Direction of the viridis scales. Either -1 or 1.

heatmap_gap

numeric | Gap in cm between heatmaps.

legend_gap

numeric | Gap in cm between legends.

cells.highlight, idents.highlight

character | Vector of cells/identities to focus into. The identities have to much those in Seurat::Idents(sample) The rest of the cells will be grayed out. Both parameters can be used at the same time.

ncol

numeric | Number of columns used in the arrangement of the output plot using "split.by" parameter.

dims

numeric | Vector of 2 numerics indicating the dimensions to plot out of the selected reduction. Defaults to c(1, 2) if not specified.

feature

character | Feature to represent.

features

character | Features to represent.

use_viridis

logical | Whether to use viridis color scales.

viridis.direction

numeric | Either 1 or -1. Controls how the gradient of viridis scale is formed.

plot.grid

logical | Whether to plot grid lines.

grid.color

character | Color of the grid in the plot. In heatmaps, color of the border of the cells.

grid.type

character | One of the possible linetype options:

  • blank.

  • solid.

  • dashed.

  • dotted.

  • dotdash.

  • longdash.

  • twodash.

plot.axes

logical | Whether to plot axes or not.

individual.titles, individual.subtitles, individual.captions

character | Vector. Title, subtitle or caption to use in the plot when multiple features are passed on. Use NA to keep the original title.

legend.title.position

character | Position for the title of the legend. One of:

  • top: Top of the legend.

  • bottom: Bottom of the legend.

  • left: Left of the legend.

  • right: Right of the legend.

repel

logical | Whether to repel the text labels.

plot_density_contour

logical | Whether to plot density contours in the UMAP.

contour.position

character | Whether to plot density contours on top or at the bottom of the visualization layers, thus overlapping the clusters/cells or not.

contour.color

character | Color of the density lines.

contour.lineend

character | Line end style (round, butt, square).

contour.linejoin

character | Line join style (round, mitre, bevel).

contour_expand_axes

numeric | To make the contours fit the plot, the limits of the X and Y axis are expanding a given percentage from the min and max values for each axis. This controls such percentage.

label

logical | Whether to plot the cluster labels in the UMAP. The cluster labels will have the same color as the cluster colors.

label.color

character | Color of the labels in the plot.

label.fill

character | Color to fill the labels. Has to be a single color, that will be used for all labels. If NULL, the colors of the clusters will be used instead.

label.size

numeric | Size of the labels in the plot.

label.box

logical | Whether to plot the plot labels as geom_text (FALSE) or geom_label (TRUE).

min.overlap

numeric | Filter the output result to the terms which are supported by this many genes.

GO_ontology

character | GO ontology to use. One of:

  • BP: For Biological Process.

  • MF: For Molecular Function.

  • CC: For Cellular Component.

genes

character | Vector of gene symbols to query for functional annotation.

org.db

OrgDB | Database object to use for the query.

disable_white_in_viridis

logical | Remove the white in viridis color scale when viridis.direction is set to -1.

number.breaks

numeric | Controls the number of breaks in continuous color scales of ggplot2-based plots.

strip.spacing

numeric | Controls the size between the different facets.

strip.text.color

character | Color of the strip text.

strip.text.angle

numeric | Rotation of the strip text (angles).

diverging.palette

character | Type of symmetrical color palette to use. Out of the diverging palettes defined in brewer.pal.

diverging.direction

numeric | Either 1 or -1. Direction of the divering palette. This basically flips the two ends.

subsample

numeric | Number of cells to subset for the analysis. NA will use all. Cells are selected at random.

plot.title.face, plot.subtitle.face, plot.caption.face, axis.title.face, axis.text.face, legend.title.face, legend.text.face

character | Controls the style of the font for the corresponding theme element. One of:

  • plain: For normal text.

  • italic: For text in itallic.

  • bold: For text in bold.

  • bold.italic: For text both in itallic and bold.

flavor

character | One of: Seurat, UCell. Compute the enrichment scores using AddModuleScore or AddModuleScore_UCell.

features.order

character | Should the gene sets be ordered in a specific way? Provide it as a vector of characters with the same names as the names of the gene sets.

groups.order

named_list | Should the groups in theheatmaps be ordered in a specific way? Provide it as a named list (as many lists as values in group.by) with the order for each of the elements in the groups.

interpolate

logical | Smoothes the output heatmap, saving space on disk when saving the image. However, the image is not as crisp.

viridis.palette.pvalue, viridis.palette.logfc, viridis.palette.expression

character | Viridis color palettes for the p-value, logfc and expression heatmaps. A capital letter from A to H or the scale name as in scale_fill_viridis.

nbin

numeric | Number of bins to use in AddModuleScore.

ctrl

numeric | Number of genes in the control set to use in AddModuleScore.

min.cutoff, max.cutoff

numeric | Set the min/max ends of the color scale. Any cell/group with a value lower than min.cutoff will turn into min.cutoff and any cell with a value higher than max.cutoff will turn into max.cutoff. In FeaturePlots, provide as many values as features. Use NAs to skip a feature.

border.density

numeric | Controls the number of cells used when plot_cell_borders = TRUE. Value between 0 and 1. It computes a 2D kernel density and based on this cells that have a density below the specified quantile will be used to generate the cluster contour. The lower this number, the less cells will be selected, thus reducing the overall size of the plot but also potentially preventing all the contours to be properly drawn.

sequential.palette

character | Type of sequential color palette to use. Out of the sequential palettes defined in brewer.pal.

sequential.palette.pvalue, sequential.palette.expression, sequential.palette.logfc

character | Sequential palettes for p-value, logfc and expression heatmaps. Type of sequential color palette to use. Out of the sequential palettes defined in brewer.pal.

sequential.direction

numeric | Direction of the sequential color scale. Either 1 or -1.

return_object

logical | Returns the Seurat object with the modifications performed in the function. Nomally, this contains a new assay with the data that can then be used for any other visualization desired.

statistic

character | DecoupleR statistic to use. One of:

  • wmean: For weighted mean.

  • norm_wmean: For normalized weighted mean.

  • corr_wmean: For corrected weighted mean.

cluster

logical | Whether to perform clustering of rows and columns.

Value

Nothing. This is a mock function.

Examples


# This a mock function that stores the documentation for many other functions.
# It is not intended for user usage.

SCpubr documentation built on Oct. 11, 2023, 5:15 p.m.