panviz: Convert pangenome into PanViz

Description Usage Arguments Details Value Methods (by class) See Also Examples

Description

This method contains the main functionality of PanVizGenerator. It takes the pangenome data and properly formats it, combines it with the PanViz code and creates the PanViz files needed for the visualization. Per default everything is consolidated into the PanViz.html file but data and code can also be destributed into separate files. Currently pangenome data from FindMyFriends is supported natively (And FindMyFriends support grouping based on other algorithms), while more general use is supported by supplying a pangenome matrix along with functional annotation of each row. A last option is to provide the file path to a csv file containing the pangenome matrix along with the functional annotation.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
panviz(object, ...)

## S4 method for signature 'character'
panviz(object, name = "name", go = "go", ec = "ec",
  ignore, location, consolidate = TRUE, showcase = FALSE, ...)

## S4 method for signature 'pgVirtual'
panviz(object, location, useDescription = TRUE,
  consolidate = TRUE, showcase = FALSE, ...)

## S4 method for signature 'matrix'
panviz(object, name, go, ec, location, consolidate = TRUE,
  showcase = FALSE, ...)

## S4 method for signature 'data.frame'
panviz(object, ...)

Arguments

object

The object containing the pangenome data. If supplied as pangenome matrix it is expected that rows are gene groups and columns are genomes.

...

Parameters passed along to the clustering and dimensionality reduction functions. See details.

name

Depending on object either the name of the column with the gene group names or a vector of gene group names. See details.

go

Depending on object either the name of the column with the gene group gene ontology annotation or a vector/list of gene group ontologies. See details.

ec

Depending on object either the name of the column with the gene group E.C. annotation or a vector/list of gene group enzyme numbers. See details.

ignore

Columns in the csv file to ignore, either given as column names or indexes

location

The path to write the resulting PanViz files to.

consolidate

Logical. Should all data and code be consolidated into the PanViz.html file or spread out to multiple files.

showcase

Logical. Should the resulting PanViz.html be opened in the default browser upon completion.

useDescription

Logical. Should the description column in orgInfo be used in favor of group names (if description is NA it falls back to group name)

Details

The calculation of mds/pca as well as the hierarchical clustering can be controlled with the use of dist (default: 'canberra') for setting the method used in the dist calls, clust (default: 'ward.D2') for setting the method used in the hclust calls, center (default: TRUE) to control whether variables should be centered prior to doing PCA and scale (default: TRUE) to control whether scaling should be performed prior to PCA.

When using panviz with a csv file the name, go and ec parameters should point to the columns in the csv file containing the respective information, either by name or index. If E.C. annotation is not given in the csv file it can be set to NA. For column with multiple possible values (go and ec) any delimiter can be used but ',', '.', and numbers (don't know why you would use numbers as delimiter anyway).

For panviz with a matrix or data.frame the name, go and ec parameters should contain the actual annotation as character vectors or lists of strings. For character vectors the same delimiting restrictions exists as for csv files described above. ec and name can be omitted. If name is missing the rownames of the matrix or data.frame will be used instead - if these are not present an error will be thrown. name, go and ec must match the number of rows in the pangenome matrix if given.

Value

NULL. This function is called for its side effects. If showcase=TRUE the resulting PanViz.html file will be opened in the default browser.

Methods (by class)

See Also

PanVizGenerator for a shiny interface to converting csv files.

Examples

1
2
3
4
if(interactive()) {
    exampleFile <- system.file('extdata', 'exampleData.csv')
    panviz(exampleFile, location = tempdir(), showcase = TRUE)
}

thomasp85/PanVizGenerator documentation built on May 31, 2019, 11:11 a.m.