plot_clusters: Plot clusters data

Description Usage Arguments Value

Description

This function plots data for individual clusters and landmarks and has different behaviours depending on whether the clusters represent individual or multiple samples (i.e. wether they were generated using scfeatures::cluster_fcs_files or scfeatures::cluster_fcs_files_groups)

Usage

1
2
3
plot_clusters(G, clusters, col.names, working.dir, plot.type,
  pool.clusters = FALSE, pool.samples = FALSE,
  samples.to.plot = NULL, facet.by = "Sample")

Arguments

G

An igraph graph object

clusters

A numeric vector representing the indices of the vertices of G to plot (i.e. the clusters)

col.names

A character vector of variables to plot (these must correspond to the columns in the original clusters data)

working.dir

The working directory. Must contain two subdirectories named clusters_data and landmarks_data. The latter is only necessary if G contains nodes of type landmark (i.e. it represents a Scaffold map)

plot.type

Either "Boxplot" or "Scatterplot". The type of plot

pool.clusters

Whether to pool the clusters data. If this is FALSE each cluster is plotted separately

pool.samples

Whether to pool data from different samples. If this is FALSE each sample is plotted separately

samples.to.plot

The samples to be plotted. This option is only used if pool.samples == FALSE and G does not have a sample vertex property (i.e. the vertices were generated using scfeatures::cluster_fcs_files_groups, and as such they represent multiple samples). In such cases, if this option is NULL, the pooled data is plotted, otherwise only data for the corresponding samples is plotted. If instead the nodes (i.e. the clusters) represent single samples the samples to be plotted are selected from the sample vertex property of the corresponding nodes

facet.by

In cases where multiple samples are plotted, whether the plots should be faceted by "Sample" or by "Variable"

Value

Returns a ggplot2 plot object


ParkerICI/panorama documentation built on May 24, 2019, 4:08 p.m.