build_sif_table_from_rule {CellNOptR} | R Documentation

## Build a SIF table from a logic rule written in a string

### Description

Build a SIF table from a logic rule written in a string

### Usage

    build_sif_table_from_rule(rule_str, target, last_and_num = 0)

### Arguments

`rule_str` | String containing the rule to be parsed
`target` | Name of the node affected by the rule
`last_and_num` | If the rule contains 'and' gates, their numeration will start after the number provided here (default is 0)

### Value

data.frame with the network structure derived from the rule. The column 'sif_str' contains the string that can be written to a file and then read with 'readSIF()' in order to load a CellNOpt compatible network.

### Examples

    CellNOptR:::build_sif_table_from_rule("B & (C | D)", "A", last_and_num=2)

    test_rule <- list()
    test_rule[[1]] <- "AMP_ATP | (ATM & ATR) | HIF1 | !(EGFR | FGFR3)"
    test_rule[[2]] <- "A & ((B | C) & !(D & E))"
    test_rule[[3]] <- "A & B | C"
    test_rule[[4]] <- "A & B & C"
    test_rule[[5]] <- "A & (B | C)"
    test_rule[[6]] <- "(A | B) & (C | D)"
    test_rule[[7]] <- "!(C & D) | (E & F)"
    test_rule[[8]] <- "(A | B) & (C | !D) & (E | F)"
    parsed_rule <- list()
    for (i in c(1:length(test_rule))){
      parsed_rule[[i]] <- CellNOptR:::build_sif_table_from_rule(test_rule[[i]], "T")
    }

[Package CellNOptR version 1.32.0 Index]