Skip to contents

Visualize factor expression and gene loading

Usage

plotGeneLoadings(
  object,
  markerTable,
  useFactor,
  useDimRed = NULL,
  nLabel = 15,
  nPlot = 30,
  ...
)

plotGeneLoadingRank(
  object,
  markerTable,
  useFactor,
  nLabel = 15,
  nPlot = 30,
  ...
)

Arguments

object

A liger object with valid factorization result.

markerTable

Returned result of getFactorMarkers.

useFactor

Integer index for which factor to visualize.

useDimRed

Name of the variable storing dimensionality reduction result in the cellMeta slot. Default "UMAP".

nLabel

Integer, number of top genes to be shown with text labels. Default 15.

nPlot

Integer, number of top genes to be shown in the loading rank plot. Default 30.

...

Additional plot theme setting arguments passed to .ggScatter and .ggplotLigerTheme.

Examples

result <- getFactorMarkers(pbmcPlot, "ctrl", "stim")
#> ! Factor 7 did not appear as max in any cell in either dataset
#> 
plotGeneLoadings(pbmcPlot, result, useFactor = 2)
#>  Plotting feature "Factor_2" on 600 cells
#>  Plotting feature "Factor_2" on 600 cells ... done
#>