get_neuron_AND_gate_hje: Get a AND neuron gate

View source: R/neuron_hjelmfelt.R

get_neuron_AND_gate_hjeR Documentation

Get a AND neuron gate

Description

This function returns an AND gate using neurons based on McCullogh-Pitts model (neurons returned by get_neuron_hje()). The two input neurons have the name i1 and i2, and the output neuron has the o name. This (with the gate name) determines the species names created for the CRNs that represent them.

Usage

get_neuron_AND_gate_hje(gate_name, input_cis, binding_inhibit = NULL)

Arguments

gate_name

The name of the gate

input_cis

A numeric vector representing the initial concentration of the inputs.

binding_inhibit

Boolean vector where each elements specifies whether the input with the same index will be an inhibitory binding or not. If no vector is passed, no binding will be inhibited. This parameter is passed to get_neuron_generic_gate_hje().

Value

A list representing the gate. To transform this representation into a CRN (to simulate with react(), for example) you have to use the function get_crn_from_neuron_gate_hje().

Examples

g         <- DNAr::get_neuron_AND_gate_hje('_AND', c(0.5, 1.5))
and_crn   <- DNAr::get_crn_from_neuron_gate_hje(g)
and_crn$t <- seq(0, 1, length.out = 100)
b         <- do.call(DNAr::react, and_crn)
DNAr::plot_behavior(b, c('A_ANDo'))

DanielKneipp/DNAr documentation built on Jan. 7, 2023, 12:42 p.m.