Login

Phenotype table

RESOURCE
Typing name :  RESOURCE.gws_gena.PhenotypeTable Brick :  gws_gena v Parent : 

Phenotype table

Phenotype table

The phenotype table is similar to the flux table but the fluxes are related to entities (metabolite, biomass) instead of reactions. Qualitative observations are described by upper and lower bound only

  • The first column is the list of entity ids. They uniquely identify each reaction of a network.
  • The next columns are:
    • target: the value of the flux measured experimentally (e.g. mol/gDW/h) [required]
    • upper_bound: the upper bound of the flux (e.g. mol/gDW/h) [required]
    • lower_bound: the lower bound of the flux (e.g. mol/gDW/h) [required]
    • confidence_score: the confidence score of the flux [required]

For example:

entity chebi_id target lower_bound lower_bound confidence_score
biomass biomass 0 1000 1.0
2-oxoglutarate CEHBI:16810 0 1000 1.0
glutamine CHEBI:18050 1.23 0 2.0 1.0

Views

rvResourceView.resource_view_spreadsheetTABULAR - view_as_table()Default view
View as a table
SMART INTERACTIVE PLOT - smart_view()
Generate an interactive plot using an AI (OpenAI).
VIEW RESOURCE - view_as_json()
View the complete resource as json

Functions






























































































__INIT__

Constructor, please do not overwrite this method, use the init method instead Leave the constructor without parameters.

Parameters:
dataUnion[pandas.core.frame.DataFrame, numpy.ndarray, list]
row_namesList
column_namesList
row_tagsList
column_tagsList
format_header_namesbool
ADD_COLUMN

Add a new column to the Dataframe.

Parameters:
namestr
dataUnion[list, pandas.core.series.Series]
indexint
ADD_COLUMN_TAG_BY_INDEX

Add a {key, value} tag to a column at a given index

Parameters:
column_indexint
keystr
valuestr
ADD_COLUMN_TAG_BY_NAME

Add a {key, value} tag to a column

Parameters:
column_namestr
keystr
valuestr
ADD_ROW

Add a row to the Dataframe.

Parameters:
namestr str
dataUnion[list, pandas.core.series.Series] list
indexint
ADD_ROW_TAG_BY_INDEX

Add a {key, value} tag to a row at a given index

Parameters:
row_indexint
keystr
valuestr
ADD_ROW_TAG_BY_NAME

Add a {key, value} tag to a row

Parameters:
row_namestr
keystr
valuestr
ADD_TECHNICAL_INFO

Add a technical information to the resource

Parameters:
technical_infoTechnicalInfo
CHECK_COLUMN_EXISTS

Raise an exception if the column doesn't exist

Parameters:
namestr
case_sensitivebool
CHECK_RESOURCE

You can redefine this method to define custom logic to check this resource. If there is a problem with the resource, return a string that define the error, otherwise return None This method is called on output resources of a task. If there is an error returned, the task will be set to error and next proceses will not be run. It is also call when uploading a resource (usually for files or folder), if there is an error returned, the resource will not be uploaded

Return type:
Union[str, NoneType]
CHECK_ROW_EXISTS

Method that raises an exception if the row doesn't exist.

Parameters:
namestr
case_sensitivebool
CLONE

Clone the resource to create a new instance with a new id It copies the RFields

Return type:
Table
COLUMN_EXISTS
Parameters:
namestr
case_sensitivebool
Return type:
bool
COPY_COLUMN_TAGS_BY_INDEX

Copy column tag from source_table to self matching by index

Parameters:
source_tableTable source table to copy tags from
from_indexint int, optional
to_indexint int, optional
COPY_COLUMN_TAGS_BY_NAME

Copy column tag from source_table to self matching by name

Parameters:
source_tableTable source table to copy tags from
COPY_ROW_TAGS_BY_INDEX

Copy row tag from source_table to self matching by index

Parameters:
source_tableTable source table to copy tags from
from_indexint int, optional
to_indexint int, optional
COPY_ROW_TAGS_BY_NAME

Copy row tag from source_table to self matching by name

Parameters:
source_tableTable source table to copy tags from
CREATE_SUB_TABLE

Create a new table from a dataframe and a meta

Parameters:
dataframeDataFrame
row_tagsList
column_tagsList
Return type:
Table
CREATE_SUB_TABLE_FILTERED_BY_COLUMNS

Create a sub Table based on a subset Dataframe of this original table filtered by columns It copies the tags of this table into the new table based on column names that matched between filtered_df and this dataframe.

Parameters:
filtered_dfDataFrame
Return type:
Table
CREATE_SUB_TABLE_FILTERED_BY_ROWS

Create a sub Table based on a subset Dataframe of this original table filtered by rows. It copies the tags of this table into the new table based on row names that matched between filtered_df and this dataframe.

Parameters:
filtered_dfDataFrame
Return type:
Table
EQUALS
Parameters:
oobject
Return type:
bool
FILTER_OUT_BY_COLUMN_NAMES
Parameters:
filtersList
Return type:
Table
FILTER_OUT_BY_ROW_NAMES
Parameters:
filtersList
Return type:
Table
FILTER_OUT_BY_TAGS
Parameters:
axisLiteral[0, 1, 'index', 'columns']
tagsList
Return type:
Table
GENERATE_NEW_COLUMN_NAME

Generates a column name that is unique in the Dataframe base on name. If the column name doesn't exist, return name, otherwise return name_1 or name_2, ...

Parameters:
namestr
Return type:
str
GET_AVAILABLE_COLUMN_TAGS

Get the complete list of column tags with list of values for each

Return type:
Dict
GET_AVAILABLE_ROW_TAGS

Get the complete list of row tags with list of values for each

Return type:
Dict
GET_CELL_VALUE_AT

Get the value of a cell at a given index

Parameters:
row_indexint
column_indexint
Return type:
Any
GET_CHEBI_IDS
Return type:
list
GET_COLUMN_AS_DATAFRAME

Get a column as a dataframe

Parameters:
column_namestr
skip_nan_empty
Return type:
DataFrame
GET_COLUMN_AS_LIST

Get a column as a list

Parameters:
column_namestr
skip_nan_empty
Return type:
list
GET_COLUMN_DATA

Returns the column data of the Dataframe with the given name.

Parameters:
column_namestr
skip_nanbool
Return type:
List
GET_COLUMN_INFO
Parameters:
column_namestr
Return type:
TableColumnInfo
GET_COLUMN_NAMES

Get the column names

Parameters:
from_indexint
to_indexint
Return type:
List
GET_COLUMN_NAMES_BY_POSITIONS

Function to retrieve the column names based on row positions

Parameters:
positionsList
Return type:
List
GET_COLUMN_POSITION_FROM_NAME
Parameters:
column_namestr
Return type:
int
GET_COLUMN_TAGS
Parameters:
from_indexint
to_indexint
none_if_emptybool
Return type:
List
GET_COLUMN_TAGS_BY_INDEX
Parameters:
column_indexint
Return type:
Dict
GET_COLUMN_TAGS_BY_NAME
Parameters:
column_namestr
Return type:
Dict
GET_COLUMN_TYPE
Parameters:
column_name_empty
Return type:
TableColumnType
GET_COLUMNS_INFO
Parameters:
from_indexint
to_indexint
Return type:
List
GET_CONFIDENCE_SCORES
Return type:
list
GET_DATA
Return type:
DataFrame
GET_DEFAULT_NAME

You can redefine this method to set a name of the resource. When saving the resource the name will be saved automatically This can be useful to distinguish this resource from another one or to search for the resource

Return type:
str
GET_ENTITY_NAMES
Return type:
list
GET_LOWER_BOUNDS
Return type:
list
GET_ROW_DATA

Returns the row data of the Dataframe with the given index.

Parameters:
row_namestr
skip_nabool
Return type:
List
GET_ROW_INFO
Parameters:
row_namestr
Return type:
TableHeaderInfo
GET_ROW_NAMES

Get the row names

Parameters:
from_indexint
to_indexint
Return type:
List
GET_ROW_NAMES_BY_POSITIONS

Function to retrieve the row names based on row positions

Parameters:
positionsList
Return type:
List
GET_ROW_POSITION_FROM_NAME

Get the position of a row from its name

Parameters:
row_namestr
Return type:
int
GET_ROW_TAG_BY_NAME
Parameters:
row_namestr
Return type:
Dict
GET_ROW_TAGS
Parameters:
from_indexint
to_indexint
none_if_emptybool
Return type:
List
GET_ROW_TAGS_BY_INDEX
Parameters:
row_indexint
Return type:
Dict
GET_ROWS_INFO
Parameters:
from_indexint
to_indexint
Return type:
List
GET_TAGS

Get tags

Parameters:
axisLiteral[0, 1, 'index', 'columns']
Return type:
List
GET_TARGETS
Return type:
list
GET_TECHNICAL_INFO

Get the technical information of the resource

Parameters:
keystr
Return type:
TechnicalInfo
GET_UPPER_BOUNDS
Return type:
list
INFER_OBJECTS

Call infer_objects on the underlying dataframe, it modifies the table dataframe.

Return type:
Table
INIT

This can be overwritten to perform custom initialization of the resource. This method is called just after the init (constructor) of the resource. The default values of RFields are set before this method is called.

REMOVE_COLUMN

Remove a column from the Dataframe.

Parameters:
column_namestr str
REMOVE_ROW

Remove a row from the Dataframe.

Parameters:
row_namestr str
ROW_EXISTS
Parameters:
namestr
case_sensitivebool
Return type:
bool
SELECT_BY_COLUMN_NAMES
Parameters:
filtersList
Return type:
Table
SELECT_BY_COLUMN_POSITIONS
Parameters:
positionsList
Return type:
Table
SELECT_BY_COLUMN_TAGS

Select table columns matching a list of tags

Example of search tags are:

  • tags = [ {"key1": "value1"} ] to select columns having a tag {"key1": "value1"}
  • tags = [ {"key1": "value1", "key2": "value2"} ] to select columns having tags {"key1": "value1"} AND {"key2": "value2"}
  • tags = [ {"key1": "value1"}, {"key2": "value2"} ] to select columns having tags {"key1": "value1"} OR {"key2": "value2"}
  • tags = [ {"key1": "value1", "key2": "value2"}, {"key3": "value3"} ] to select columns having tags ({"key1": "value1"} AND {"key2": "value2"}) OR {"key2": "value2"}
  • AND and OR logics can further be combined to perform complex selects
Parameters:
tagsList List[dict]
Return type:
Table
SELECT_BY_COORDS

Create a new table from coords. It includes the to_row_id and to_column_id

Parameters:
from_row_idint
from_column_idint
to_row_idint
to_column_idint
Return type:
Table
SELECT_BY_ROW_NAMES
Parameters:
filtersList
Return type:
Table
SELECT_BY_ROW_POSITIONS
Parameters:
positionsList
Return type:
Table
SELECT_BY_ROW_TAGS

Select table rows matching a list of tags

Example of search tags are:

  • tags = [ {"key1": "value1"} ] to select rows having a tag {"key1": "value1"}
  • tags = [ {"key1": "value1", "key2": "value2"} ] to select rows having tags {"key1": "value1"} AND {"key2": "value2"}
  • tags = [ {"key1": "value1"}, {"key2": "value2"} ] to select rows having tags {"key1": "value1"} OR {"key2": "value2"}
  • tags = [ {"key1": "value1", "key2": "value2"}, {"key3": "value3"} ] to select rows having tags ({"key1": "value1"} AND {"key2": "value2"}) OR {"key2": "value2"}
  • AND and OR logics can further be combined to perform complex selects
Parameters:
tagsList List[dict]
Return type:
Table
SELECT_BY_TAGS
Parameters:
axisLiteral[0, 1, 'index', 'columns']
tagsList
Return type:
Table
SELECT_NUMERIC_COLUMNS

Select numeric columns.

  • if drop_na = 'all', then drops columns where all values are nan (similar to DataFrame.drop_na(how=all|any))
  • if drop_na = 'any', then drop columns where any values are nan (similar to DataFrame.drop_na(how=all|any))
Parameters:
drop_naLiteral['all', 'any']
Return type:
Table
SET_ALL_COLUMN_NAMES
Parameters:
column_namesList
SET_ALL_COLUMN_TAGS
Parameters:
tagsList
SET_ALL_ROW_NAMES
Parameters:
row_namesList
SET_ALL_ROW_TAGS
Parameters:
tagsList
SET_CELL_VALUE_AT

Set the value of a cell at a given index

Parameters:
row_indexint
column_indexint
valueAny
SET_COLUMN_NAME
Parameters:
old_namestr
new_namestr
SET_COLUMN_TAGS_BY_INDEX

Set the tags of a column at a given index

Parameters:
column_indexint
tagsDict
SET_COLUMN_TAGS_BY_NAME

Set the tags of a column by name

Parameters:
column_namestr
tagsDict
SET_COMMENTS
Parameters:
commentsstr
SET_ROW_NAME

Set the name of a row at a given index

Parameters:
old_nameAny
new_namestr
SET_ROW_TAGS_BY_INDEX

Set the tags of a row at a given index

Parameters:
row_indexint
tagsDict
SET_ROW_TAGS_BY_NAME

Set the tags of a row by name

Parameters:
row_namestr
tagsDict
TAIL

Returns the last n rows for the columns ant targets.

Parameters:
nrows_empty int
Return type:
DataFrame
TO_CSV
Return type:
str
TO_DATAFRAME
Return type:
DataFrame
TO_JSON
Return type:
dict
TO_LIST
Return type:
list
TO_NUMPY
Return type:
ndarray
TRANSPOSE
Parameters:
infer_objectsbool
Return type:
Table