attractorToDataframe: Convert a BoolNet attractor to dataframe.

Description Usage Arguments Value Examples

View source: R/BNP_Dataframe.R

Description

If Booleans converts a BoolNet attractor to data frame with nodes displayed in Boolean format. First column is the attractor number, second is the number of state inside the attractor, the rest of the columns correspond to each node. If not Boolean it converts a BoolNet attractor to dataframe with properties as columns. The rownames correspond to the int value of each attractor, in the case of cycles the state are joined by sep. Each property of attr$attractors corresponds to a dataframe column. If the property has elements with length > 1 it converts them to a string and joins them with sep.

Usage

1
2
attractorToDataframe(attr, sep = "/", node.names = NULL,
  Boolean = FALSE)

Arguments

attr

BoolNet attractor object

sep

string to join elements with length > 1, default "/"

node.names

node names, by default taken from attractor object

Boolean

return attractor in Boolean or integer format, default FALSE

Value

If Boolean=TRUE return dataframe, each column corresponds to the numebr of attractor, state, or node. If Boolean=FALSE return dataframe, each column corresponds to a property of the attractor

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
attr <- getAttractors(cellcycle)
attractorToDataframe(attr)
#              involvedStates basinSize
#1                        162       512
#2 25/785/849/449/389/141/157       512

attractorToDataframe(attr, Boolean=TRUE)
#   attractor state CycD Rb E2F CycE CycA p27 Cdc20 Cdh1 UbcH10 CycB
#1         1     1    0  1   0    0    0   1     0    1      0    0
#2         2     1    1  0   0    1    1   0     0    0      0    0
#3         2     2    1  0   0    0    1   0     0    0      1    1
#4         2     3    1  0   0    0    1   0     1    0      1    1
#5         2     4    1  0   0    0    0   0     1    1      1    0
#6         2     5    1  0   1    0    0   0     0    1      1    0
#7         2     6    1  0   1    1    0   0     0    1      0    0
#8         2     7    1  0   1    1    1   0     0    1      0    0

mar-esther23/boolnet-perturb documentation built on April 21, 2020, 9:11 a.m.