get_phenotype_id_from_logic_operation {avidaR}R Documentation

Get phenotype from logic operations

Description

Get the phenotype encoded by the genome of a digital organism that is specified by a unique combination of logic operations.

Usage

get_phenotype_id_from_logic_operation(
  logic_operation,
  phenotype_binary = FALSE,
  triplestore
)

Arguments

logic_operation

List of logical functions from the following set: "equals", "exclusive-or", "not-or", "and-not", "or", "orn-not", "and", "not-and", "not".

phenotype_binary

Logical value (TRUE/FALSE) to show/hide the phenotype in binary notation (FALSE by default).

triplestore

Object of class triplestore_access which manages database access.

Value

Data frame. Columns: "phenotype_id", "phenotype_binary" (optional).

Examples


# Create triplestore object
avidaDB <- triplestore_access$new()

# Set access options
avidaDB$set_access_options(
  url = "https://graphdb.fortunalab.org",
  user = "public_avida",
  password = "public_avida",
  repository = "avidaDB_test"
)

# Single logic operation
get_phenotype_id_from_logic_operation(
  logic_operation = "not-or",
  triplestore = avidaDB
)

# More than one logic operation
ops <- c("equals", "exclusive or", "not-or", "and-not", "or", "orn-not")

get_phenotype_id_from_logic_operation(
  logic_operation = ops,
  phenotype_binary = TRUE,
  triplestore = avidaDB
)


[Package avidaR version 1.2.0 Index]