Boolean networks allow us to give a mechanistic explanation to how cell types emerge from regulatory networks. However, inferring the regulatory network and its functions is complex problem, as the available information is often incomplete. `rGriffin`

uses available biological information (regulatory interactions, cell types, mutants) codified as a set of restrictions and returns the Boolean Networks that satisfy that restrictions. This Boolean networks can then be used to study the biological system.

The `rGriffin`

package is an R connector to `Griffin`

(Gene Regulatory Interaction Formulator For Inquiring Networks), a java library for inference and analysis of Boolean Network models. `Griffin`

takes as inputs biologically meaningful constraints and turns them into a symbolic representation. Using a SAT engine, `Griffin`

explores the Boolean Network search space, finding all satisfying assignments that are compatible with the specified constraints. The`rGriffin`

package includes a number of functions to interact with the BoolNet package.

rGriffin depends on R, Java, rJava, and BoolNet.

First, make sure you have R (>=3.1) and java installed. We recommend Oracle JDK 8.

Then install rJava, this can be done from CRAN. While rJava should be authomatically instaled with rGriffin, the installation of rJava is succeptible to mistakes, so it is best to install it first from the R console.

```
> install.packages(rJava)
```

Finally, install rgriffin from github using devtools

```
>devtools::install_github("mar-esther23/rgriffin")
```

To see more details about the installation in specific operative systems see the issues

Let us suppose a cell, we know that this cell has three proteins called **a**, **b** and **c**. We know that **a** activates **b** and that **b** and **c** inhibit each other. We also suspect that **b** and **c** **may** have positive self-regulatory loops. We can add this interactions to the table as “OPU” (optional, positive, unambiguous). This dataframe is the topology of the network.

Source | Target | Interaction ---|---|--- a | b | + b | c | - c | b | - b | b | OPU c | c | OPU

Suppose we also have some information of what cell types have been observed. For example, there is a cell type that expresses **b**, but not **a** or **c** and an other cell type that expresses **c**, but not **a** or **b**. There might exist a third cell type that has not been fully characterized where we know that the cell expresses no **a** or **c** but we have NO information on **b**. This dataframe is the attractors of the network.

a | b | c ---|---|--- 0 | 1 | 0 0 | 0 | 1 0 | * | 0

We can then use this information to create a query. `rGriffin`

can include other types of information like transition between cell type, cycles, transitions between cell types or mutant cell types.

```
genes = c('a','b','c')
inter = data.frame(source=c('a','b','c','b','c'),
target=c('b'','c','b','b','c'),
type=c('+','-','-','OPU','OPU'),
stringsAsFactors = F )
q = createGqueryGraph(inter, genes)
attr = data.frame(a=c(0,'*',0),
b=c(0,1,0),
c=c(0,0,1),
stringsAsFactors = F )
q = addGquerySteadyStates(q, attr)
```

Then we can use `Griffin`

to find the networks that behave according with our biological information.

```
nets = runGquery(q)
nets
```

```
"targets,factors\na,false\nb,((((((!a&b)&!c)|((!a&b)&c))|((a&!b)&!c))|((a&b)&!c))|((a&b)&c))\nc,(!b&c)\n",
"targets,factors\na,false\nb,((((((!a&b)&!c)|((a&!b)&!c))|((a&!b)&c))|((a&b)&!c))|((a&b)&c))\nc,(!b&c)\n",
"targets,factors\na,false\nb,(((((!a&b)&!c)|((a&!b)&!c))|((a&b)&!c))|((a&b)&c))\nc,(!b&c)\n",
"targets,factors\na,false\nb,((((!a&b)&!c)|((a&!b)&!c))|((a&b)&!c))\nc,(!b&c)\n",
"targets,factors\na,false\nb,((((!a&b)&!c)|((a&b)&!c))|((a&b)&c))\nc,(!b&c)\n"
```

There are multiple options to integrate `BoolNet`

and `rGriffin`

. The function `getNetTopology()`

can obtain the topology with interaction signs of a BoolNet network. The function `attractorToDataframe()`

can be used to export a BoolNet attractor as a dataframe that `rGriffin`

can use. The function `runGquery()`

includes the option `return=’BoolNet’`

, that return the inferred networks as `BoolNet`

networks.

The development of `Griffin`

began in 2013 as a PAPIIT (Programa de Apoyo a Proyectos de Investigación e Innovación Tecnológica) project to solve the inference of Boolean Network models for the Arabidopsis thaliana root stem cell niche. It continued in 2015 with support of Conacyt grant 221341.

In January, 2017 we organized a course in C3-UNAM to teach biologist how to use `Griffin`

. We received two main comments: the input format was too complicated and it was uncomfortable to use the output with other packages. After some consideration we decided to create an `R`

wrapper that could export and import `BoolNet`

networks. We selected `BoolNet`

as it has an good documentation and the package `BoolFilter`

had been designed to work with it.

The development of `rGriffin`

began during the EOBM 2017 in CUIB. For the following year we continued developing `rGriffin`

as our schedules allowed. There were multiple challenges during the development: defining user-friendly inputs, using `Rjava`

, and structuring the package. In August 2018, we attended the TIB2018-BCDW where we received valuable guidance from Martin Morgan and Benilton S Carvalho. It was during this workshop that the first version of `rGriffin`

was finished.

We hope to continue developing `Griffin`

and `rGriffin`

. If you have ideas, suggestions or bugs, please contact us at Github.

November 2020

```
// Dear programmer:
// When I wrote this code, only god and
// I knew how it worked.
// Now, only god knows it!
```

mar-esther23/rgriffin documentation built on Nov. 21, 2020, 7:42 p.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.