Package 'varnisch'

Title: What the Package Does (One Line, Title Case)
Description: What the package does (one paragraph).
Authors: Igor Dolgalev [aut, cre]
Maintainer: Igor Dolgalev <[email protected]>
License: MIT + file LICENSE
Version: 0.0.0.9000
Built: 2025-01-22 04:43:06 UTC
Source: https://github.com/igordot/varnisch

Help Index


Convert a specialized single-cell data object to a data frame

Description

Turn a specialized single-cell data object (Seurat or SingleCellExperiment) into a more simplified "tidy" data frame. In tidy data, each column is a variable and each observation is a row.

Usage

flatten_object(x, features = NULL, assay = "RNA", slot = "data", n_dims = 3)

Arguments

x

An object.

features

A vector of features/genes to include in the data frame.

assay

The object assay name for feature abundance.

slot

The object slot name for feature abundance.

n_dims

An integer scalar specifying the maximum number of dimensions to return.

Value

A tibble, which is a data frame with class tbl_df.


Generate a generic scatter plot

Description

Create a scatter plot to display the relationship between two continuous variables. This is essentially a wrapper for ggplot2::geom_point().

Usage

plot_scatter(
  data,
  x,
  y,
  color_by,
  smooth = FALSE,
  range = c(0.01, 0.99),
  title = "",
  aspect_ratio = 1
)

Arguments

data

A data frame.

x

.

y

.

color_by

Column metadata field(s) or feature(s) to color by.

smooth

A logical scalar. Smooth values. Helps to visualize expression patterns in a plot with many overlapping points.

range

A vector of 2 values indicating the minimum and maximum percentiles for the color range. Helps to visualize expression patterns when extreme outliers are present. For example, c(0, 0.99) will not expand the color scale above 99th percentile.

title

Plot title.

aspect_ratio

Aspect ratio of the panel.

Value

A ggplot object.