feature.degree: Feature Degree Per Gene

Description Usage Arguments Examples

View source: R/tools.R

Description

This function allows you to calculate the in-degree and out-degree of genes that have a certain feature (e.g. transcription factors or tumor suppressor genes).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
feature.degree(
  x,
  genes,
  features = NULL,
  vertices = NULL,
  in.degree = TRUE,
  out.degree = TRUE,
  loops = FALSE,
  normalized = FALSE
)

Arguments

x

Graph object.

genes

Geneset with features.

features

Features you want to analyze. Default: all boolean features.

vertices

Vertices you want to analyze. Default: all vertices.

in.degree

Whether or not to analyze in-degree (optional). Default: TRUE.

out.degree

Whether or not to analyze out-degree (optional). Default: TRUE.

loops

Whether or not to consider loops (optional). Default: FALSE.

normalized

Whether or not to normalize degrees (optional). Default: FALSE.

Examples

1
2
3
4
mtx <- feature.degree(x, genes)
mtx <- feature.degree(x, genes, features=c('tf', 'target', 'tumor.suppressor'))
mtx <- feature.degree(x, genes, features='tumor.suppressor', in.degree=TRUE, out.degree=FALSE)
mtx <- feature.degree(x, genes, features='essential', vertices=c('ADRB1', 'HSF2'), normalized=TRUE)

rlebron-bioinfo/gnlearn documentation built on July 25, 2020, 12:38 p.m.