创建 BioCyc SmartTable
biocyc_create_smart_table.Rd
此函数用于创建一个新的 BioCyc SmartTable
Details
For json input files, parameters are encoded as part of the file format.
JSON Structure for SmartTable Data Retrieval and Creation
JSON file structure:
name (optional) - name field of SmartTable
description (optional) - description field of SmartTable
Contents of the short form, which is for creating a single column of values only:
type: an object class that values will be coerced into for the given database into the SmartTable
pgdb: an org id for the database in which SmartTable objects will reside and be coerced with the given type
values: an array of strings, which will be coerced into objects for the SmartTable in a single column
Contents of the long form, which is for creating multiple columns of values:
columns: a list (JSON array) of columns, each of which is:
name (optional): a string that will be the name of the column
type: an object class that values will be coerced into for the SmartTable
rows: a JSON array, each element is a dictionary mapping column ids to values. Each value corresponds to one cell in the SmartTable and contains:
value: a string, number, or frameid: , pgdb: which will be coerced into an object for the SmartTable
JSON examples:
// Short form
{"name": "sample short-form group",
"description": "sample short-form description",
"pgdb": "ECOLI",
"type": "Genes",
"values": ["trpA", "trpB"]
}
// long form (2 columns)
{"name": "sample long-form group",
"description": "This is a longer form of JSON used with a SmartTable.",
"columns": [{"name": "Gene", "type": "Genes"}, {"name": "Expression Level"}]
"rows": [{{"frameid": "EG11204", "pgdb": "ECOLI"}, "1.3"},
{{"frameid": "EG11205", "pgdb": "ECOLI"}, "-2.2"}]
}