Learn R Programming

corto (version 1.3.1)

getregulon: getregulon - Flatten a Regulon Object into a Table

Description

Converts a regulon into a data frame of edges, one row per centroid-target pair, optionally written to a tab-separated file.

Usage

getregulon(
  regulon,
  tf_list = NULL,
  likelihood_threshold = 0,
  export = FALSE,
  filename = "regulon.tsv"
)

Value

A data frame with columns tf, target, correlation and likelihood

Arguments

regulon

A regulon object, as generated by corto()

tf_list

A character vector of centroid names to keep. Default is NULL, i.e. all centroids

likelihood_threshold

Minimum edge likelihood, between 0 and 1. Default is 0

export

A logical value. If TRUE the table is also written to file. Default is FALSE

filename

The file to write when export is TRUE. Default is "regulon.tsv"

Examples

Run this code
load(system.file("extdata","inmat.rda",package="corto",mustWork=TRUE))
load(system.file("extdata","centroids.rda",package="corto",mustWork=TRUE))
regulon<-corto(inmat,centroids=centroids,nbootstraps=10,p=1e-30,nthreads=2)
edges<-getregulon(regulon)
head(edges)

Run the code above in your browser using DataLab