cemitool {CEMiTool} | R Documentation

## Full gene co-expression analysis

### Description

Defines co-expression modules and runs several different analyses.

### Usage

    cemitool(
      expr,
      annot,
      gmt,
      interactions,
      filter = TRUE,
      filter_pval = 0.1,
      apply_vst = FALSE,
      n_genes,
      eps = 0.1,
      cor_method = c("pearson", "spearman"),
      cor_function = "cor",
      network_type = "unsigned",
      tom_type = "signed",
      set_beta = NULL,
      force_beta = FALSE,
      sample_name_column = "SampleName",
      class_column = "Class",
      merge_similar = TRUE,
      rank_method = "mean",
      ora_pval = 0.05,
      gsea_scale = TRUE,
      gsea_min_size = 15,
      gsea_max_size = 1000,
      min_ngen = 30,
      diss_thresh = 0.8,
      plot = TRUE,
      plot_diagnostics = TRUE,
      order_by_class = TRUE,
      center_func = "mean",
      directed = FALSE,
      verbose = FALSE
    )

### Arguments

`expr` | Gene expression `data.frame`.
`annot` | Sample annotation `data.frame`.
`gmt` | A data.frame containing two columns, one with pathways and one with genes
`interactions` | A data.frame containing two columns with gene names.
`filter` | Logical. If TRUE, will filter expression data.
`filter_pval` | P-value threshold for filtering. Default `0.1`.
`apply_vst` | Logical. If TRUE, will apply Variance Stabilizing Transform before filtering genes. Currently ignored if parameter `filter` is FALSE.
`n_genes` | Number of genes left after filtering.
`eps` | A value for accepted R-squared interval between subsequent beta values. Default is 0.1.
`cor_method` | A character string indicating which correlation coefficient is to be computed. One of `"pearson"` or `"spearman"`. Default is `"pearson"`.
`cor_function` | A character string indicating the correlation function to be used. Supported functions are currently 'cor' and 'bicor'. Default is `"cor"`
`network_type` | A character string indicating if network type should be computed as `"signed"` or `"unsigned"`. Default is `"unsigned"`
`tom_type` | A character string indicating if the TOM type should be computed as `"signed"` or `"unsigned"`. Default is `"signed"`
`set_beta` | A value to override the automatically selected beta value. Default is NULL.
`force_beta` | Whether or not to automatically force a beta value based on number of samples. Default is FALSE.
`sample_name_column` | A character string indicating the sample column name of the annotation table.
`class_column` | A character string indicating the class column name of the annotation table.
`merge_similar` | Logical. If `TRUE`, merge similar modules.
`rank_method` | Character string indicating how to rank genes. Either "mean" (the default) or "median".
`ora_pval` | P-value for overrepresentation analysis. Default `0.05`.
`gsea_scale` | If TRUE, apply z-score transformation for GSEA analysis. Default is `TRUE`
`gsea_min_size` | Minimum size of gene sets for GSEA analysis. Default is `15`
`gsea_max_size` | Maximum size of gene sets for GSEA analysis. Default is `1000`
`min_ngen` | Minimal number of genes per submodule. Default `30`.
`diss_thresh` | Module merging correlation threshold for eigengene similarity. Default `0.8`.
`plot` | Logical. If `TRUE`, plots all figures.
`plot_diagnostics` | Logical. If `TRUE`, creates diagnostic plots. Overwritten if plot=FALSE.
`order_by_class` | Logical. If `TRUE`, samples in profile plot are ordered by the groups defined by the class_column slot in the sample annotation file. Ignored if there is no sample_annotation file. Default `TRUE`.
`center_func` | Character string indicating the centrality measure to show in the plot. Either 'mean' (the default) or 'median'.
`directed` | Logical. If `TRUE`, the igraph objects in interactions slot will be directed.
`verbose` | Logical. If `TRUE`, reports analysis steps.

### Value

Object of class `CEMiTool`

### Examples

    # Get example expression data
    data(expr0)
    # Run CEMiTool analyses
    cem <- cemitool(expr=expr0)
    # Run CEMiTool applying Variance Stabilizing Transformation to data
    cem <- cemitool(expr=expr0, apply_vst=TRUE)
    # Run CEMiTool with additional processing messages
    cem <- cemitool(expr=expr0, verbose=TRUE)

    ## Not run:
    # Run full CEMiTool analysis
    ## Get example sample annotation data
    data(sample_annot)
    ## Read example pathways file
    gmt_fname <- system.file("extdata", "pathways.gmt", package = "CEMiTool")
    gmt_in <- read_gmt(gmt_fname)
    ## Get example interactions file
    int_df <- read.delim(system.file("extdata", "interactions.tsv", package = "CEMiTool"))
    ## Run CEMiTool
    cem <- cemitool(expr=expr0, annot=sample_annot, gmt=gmt_in,
        interactions=int_df, verbose=TRUE, plot=TRUE)

    # Create report as html file
    generate_report(cem, directory = "./Report", output_format="html_document")

    # Write analysis results into files
    write_files(cem, directory="./Tables", force=TRUE)

    # Save all plots
    save_plots(cem, "all", directory="./Plots")

    ## End(Not run)

[Package CEMiTool version 1.18.1 Index]