Phenotype table
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]
- target: the value of the flux measured experimentally (e.g.
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
Functions
Constructor, please do not overwrite this method, use the init method instead Leave the constructor without parameters.
data | Union[pandas.core.frame.DataFrame, numpy.ndarray, list] |
row_names | List |
column_names | List |
row_tags | List |
column_tags | List |
format_header_names | bool |
Add a new column to the Dataframe.
name | str |
data | Union[list, pandas.core.series.Series] |
index | int |
Add a {key, value} tag to a column at a given index
column_index | int |
key | str |
value | str |
Add a {key, value} tag to a column
column_name | str |
key | str |
value | str |
Add a row to the Dataframe.
name | str | str |
data | Union[list, pandas.core.series.Series] | list |
index | int |
Add a {key, value} tag to a row at a given index
row_index | int |
key | str |
value | str |
Add a {key, value} tag to a row
row_name | str |
key | str |
value | str |
Add a technical information to the resource
technical_info | TechnicalInfo |
Raise an exception if the column doesn't exist
name | str |
case_sensitive | bool |
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
Union[str, NoneType] |
Method that raises an exception if the row doesn't exist.
name | str |
case_sensitive | bool |
Clone the resource to create a new instance with a new id It copies the RFields
Table |
name | str |
case_sensitive | bool |
bool |
Copy column tag from source_table to self matching by index
source_table | Table | source table to copy tags from |
from_index | int | int, optional |
to_index | int | int, optional |
Copy column tag from source_table to self matching by name
source_table | Table | source table to copy tags from |
Copy row tag from source_table to self matching by index
source_table | Table | source table to copy tags from |
from_index | int | int, optional |
to_index | int | int, optional |
Copy row tag from source_table to self matching by name
source_table | Table | source table to copy tags from |
Create a new table from a dataframe and a meta
dataframe | DataFrame |
row_tags | List |
column_tags | List |
Table |
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.
filtered_df | DataFrame |
Table |
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.
filtered_df | DataFrame |
Table |
o | object |
bool |
filters | List |
Table |
filters | List |
Table |
axis | Literal[0, 1, 'index', 'columns'] |
tags | List |
Table |
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, ...
name | str |
str |
Get the complete list of column tags with list of values for each
Dict |
Get the complete list of row tags with list of values for each
Dict |
Get the value of a cell at a given index
row_index | int |
column_index | int |
Any |
list |
Get a column as a dataframe
column_name | str |
skip_nan | _empty |
DataFrame |
Get a column as a list
column_name | str |
skip_nan | _empty |
list |
Returns the column data of the Dataframe with the given name.
column_name | str |
skip_nan | bool |
List |
column_name | str |
TableColumnInfo |
Get the column names
from_index | int |
to_index | int |
List |
Function to retrieve the column names based on row positions
positions | List |
List |
column_name | str |
int |
from_index | int |
to_index | int |
none_if_empty | bool |
List |
column_index | int |
Dict |
column_name | str |
Dict |
column_name | _empty |
TableColumnType |
from_index | int |
to_index | int |
List |
list |
DataFrame |
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
str |
list |
list |
Returns the row data of the Dataframe with the given index.
row_name | str |
skip_na | bool |
List |
row_name | str |
TableHeaderInfo |
Get the row names
from_index | int |
to_index | int |
List |
Function to retrieve the row names based on row positions
positions | List |
List |
Get the position of a row from its name
row_name | str |
int |
row_name | str |
Dict |
from_index | int |
to_index | int |
none_if_empty | bool |
List |
row_index | int |
Dict |
from_index | int |
to_index | int |
List |
Get tags
axis | Literal[0, 1, 'index', 'columns'] |
List |
list |
Get the technical information of the resource
key | str |
TechnicalInfo |
list |
Returns the first n rows for the columns ant targets.
nrows | _empty | int |
DataFrame |
Call infer_objects on the underlying dataframe, it modifies the table dataframe.
Table |
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 a column from the Dataframe.
column_name | str | str |
Remove a row from the Dataframe.
row_name | str | str |
name | str |
case_sensitive | bool |
bool |
filters | List |
Table |
positions | List |
Table |
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
tags | List | List[dict] |
Table |
Create a new table from coords. It includes the to_row_id and to_column_id
from_row_id | int |
from_column_id | int |
to_row_id | int |
to_column_id | int |
Table |
filters | List |
Table |
positions | List |
Table |
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
tags | List | List[dict] |
Table |
axis | Literal[0, 1, 'index', 'columns'] |
tags | List |
Table |
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)
)
drop_na | Literal['all', 'any'] |
Table |
column_names | List |
tags | List |
row_names | List |
tags | List |
Set the value of a cell at a given index
row_index | int |
column_index | int |
value | Any |
old_name | str |
new_name | str |
Set the tags of a column at a given index
column_index | int |
tags | Dict |
Set the tags of a column by name
column_name | str |
tags | Dict |
comments | str |
Set the name of a row at a given index
old_name | Any |
new_name | str |
Set the tags of a row at a given index
row_index | int |
tags | Dict |
Set the tags of a row by name
row_name | str |
tags | Dict |
Returns the last n rows for the columns ant targets.
nrows | _empty | int |
DataFrame |
str |
DataFrame |
dict |
list |
ndarray |
infer_objects | bool |
Table |