Back to bricks list
Introduction Version

FBA result

RESOURCE
Typing name :  RESOURCE.gws_gena.FBAResult Brick :  gws_gena
Parent :
Resource set

Flux Balance Analysis Result

FBAResult class.

A resource set object containing the result tables of a flux balance analysis.

Views

RESOURCES LISTDefault view
List the resources
VIEW RESOURCE
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:
NameTypeDefault valueDescription
flux_dataframeDataFrame None
sv_dataframeDataFrame None
ADD_RESOURCE

Add a resource to the set

can be retrieve by calling the get_resource method with the name. If not provided, the resource name is used Otherwise it doesn't create a new resource but references it. In this case the resource must be an input of the task that created the ResourceSet and the resource must have been saved before, defaults to True

Parameters:
NameTypeDefault valueDescription
resourceResource Resource to add
unique_namestr None Name used to store the resource in the dict. it must be unique. the resource
create_new_resourcebool True If true, a new resource is created when saving the resource. , optional
ADD_TECHNICAL_INFO

Add technical information on the resource. Technical info are useful to set additional information on the resource.

Parameters:
NameTypeDefault valueDescription
technical_infoTechnicalInfo Technical information to add (key, value)
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]
CLEAR_RESOURCES
CLONE

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

Return type:
ResourceType
COMPUTE_ZERO_FLUX_THRESHOLD

Compute the zero-flux threshold

Return type:
(<class 'float'>, <class 'float'>)
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_FLUX_DATAFRAME_BY_REACTION_IDS

Get flux values by reaction ids

Parameters:
NameTypeDefault valueDescription
reaction_idsUnion[typing.List, str]
Return type:
DataFrame
GET_FLUX_TABLE

Get the flux table

GET_FLUXES_DATAFRAME

Get fluxes as dataframe

Return type:
DataFrame
GET_RESOURCE
Parameters:
NameTypeDefault valueDescription
resource_namestr
Return type:
Resource
GET_RESOURCE_IDS
Return type:
Set
GET_RESOURCE_MODELS
Return type:
List
GET_RESOURCES
Return type:
Dict
GET_RESOURCES_AS_SET
Return type:
Set
GET_SV_BY_COMPOUND_IDS

Get SV values by compound ids

Parameters:
NameTypeDefault valueDescription
compound_idsUnion[typing.List, str]
Return type:
DataFrame
GET_SV_DATAFRAME

Get SV as dataframe

Return type:
DataFrame
GET_SV_TABLE

Get the SV table

GET_TECHNICAL_INFO

Get the technical information of the resource

Parameters:
NameTypeDefault valueDescription
keystr Key of the technical information
Return type:
TechnicalInfo
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.

RESOURCE_EXISTS
Parameters:
NameTypeDefault valueDescription
resource_namestr
Return type:
Resource