plot.combi {combi} | R Documentation

## Make multiplots of the data integration object

### Description

Make multiplots of the data integration object

### Usage

    ## S3 method for class 'combi'
    plot(x, ..., Dim = c(1, 2), samDf = NULL,
      samShape = NULL, samCol = NULL, featurePlot = "threshold",
      featNum = 15L, samColValues = NULL, manExpFactorTaxa = 0.975,
      featSize = switch(featurePlot, threshold = 2.5, points = samSize * 0.7,
      density = 0.35), crossSize = 4, manExpFactorVar = 0.975,
      varNum = nrow(x$alphas), varSize = 2.5, samSize = 1.75,
      featCols = c("darkblue", "darkgreen", "grey10", "turquoise4", "blue",
      "green", "grey", "cornflowerblue", "lightgreen", "grey75"),
      strokeSize = 0.05, warnMonotonicity = FALSE, returnCoords = FALSE,
      squarePlot = TRUE, featAlpha = 0.5, featShape = 20, xInd = 0,
      yInd = 0, checkOverlap = FALSE, shapeValues = (21:(21 +
      length(unique(samDf[[samShape]])))))

### Arguments

`x` | the fit
`...` | additional arguments, currently ignored
`Dim` | the dimensions to be plotted
`samDf` | a dataframe of sample variables
`samShape` | A variable name from samDf used to shape the samples
`samCol` | A variable name from samDf used to colour the samples
`featurePlot` | A character string, either "threshold", "points" or "density". See details
`featNum, varNum` | The number of features and variables to plot
`samColValues` | Colours for the samples
`manExpFactorTaxa, manExpFactorVar` | Expansion factors for taxa and variables, normally calculated natively
`featSize, crossSize, varSize, samSize, strokeSize` | Size parameters for the features (text, dots or density contour lines), central cross, variable labels, sample dots, sample strokes and feature contour lines
`featCols` | Colours for the features
`warnMonotonicity` | A boolean, should a warning be thrown when the feature proportions of compositional views do not all vary monotonically with all latent variables?
`returnCoords` | A boolean, should coordinates be returned, e.g. for use in thrird party software
`squarePlot` | A boolean, should the axes be square? Strongly recommended
`featAlpha` | Controls the transparacny of the features
`featShape` | Shape of feature dots when featurePlot = "points"
`xInd, yInd` | x and y indentations
`checkOverlap` | A boolean, should overlapping labels be omitted?
`shapeValues` | the shapes, as numeric values

### Details

It is usually impossible to plot all features with their labels. Therefore, he default option of the 'featurePlot' parameter is "threshold", whereby only the 'featNum" features furthest away from the origin are shown. Alternatively, the "points" or "density" options are available to plot all features as a point or density cloud, but without labels.

### Value

A ggplot object containing the plot

### Examples

    data(Zhang)

    #Unconstrained
    microMetaboInt = combi(
    list("microbiome" = zhangMicrobio, "metabolomics" = zhangMetabo),
    distributions = c("quasi", "gaussian"), compositional = c(TRUE, FALSE),
    logTransformGaussian = FALSE, verbose = TRUE)
    #Constrained
    microMetaboIntConstr = combi(
        list("microbiome" = zhangMicrobio, "metabolomics" = zhangMetabo),
        distributions = c("quasi", "gaussian"), compositional = c(TRUE, FALSE),
        logTransformGaussian = FALSE, covariates = zhangMetavars, verbose = TRUE)
        #Load the fits
    load(system.file("extdata", "zhangFits.RData", package = "combi"))
    plot(microMetaboInt)
    plot(microMetaboInt, samDf = zhangMetavars, samCol = "ABX")
    #Plot all features as points or density
    plot(microMetaboInt, samDf = zhangMetavars, samCol = "ABX",
    featurePlot = "points")
    plot(microMetaboInt, samDf = zhangMetavars, samCol = "ABX",
    featurePlot = "density")
    #Constrained
    plot(microMetaboIntConstr, samDf = zhangMetavars, samCol = "ABX")

[Package combi version 1.6.0 Index]