writeQuaternaryGIF {CytoSimplex}R Documentation

Create GIF image for dynamic rotating view of 3D quaternary simplex plot

Description

Create GIF image for dynamic rotating view of 3D quaternary simplex plot

Usage

writeQuaternaryGIF(
  x,
  ...,
  cluster = NULL,
  gifPath = "quaternary.gif",
  tmpDir = tempdir(),
  fps = 10,
  degreePerFrame = 10
)

Arguments

x

Input object that plotQuaternary accepts.

...

All other arguments needed for plotQuaternary. Must be specified with exact argument names instead of a positional manner.

cluster

One cluster that exists in clusterVar, if users need to view the plot for specific group. Default NULL plot all cells.

gifPath

Output GIF image file path. Default "quaternary.gif"

tmpDir

A temprorary directory to store all PNG files for all perspectives created. Default tempdir().

fps

Number of frame per second, must be a factor of 100. Default 10.

degreePerFrame

Number of degree that the tetrahedron is rotated per frame. Default 10.

Value

No object is returned. The tmpDir folder will be created with 360 / degreePerFrame PNG image files in it. A GIF image file will be created at gifPath.

Examples

gene <- selectTopFeatures(rnaRaw, rnaCluster, c("RE", "OS", "CH", "ORT"))

writeQuaternaryGIF(rnaRaw, clusterVar = rnaCluster, features = gene,
                   vertices = c("RE", "OS", "CH", "ORT"),
                   gifPath = paste0(tempfile(), ".gif"))


[Package CytoSimplex version 0.1.1 Index]