Curation (Python)¶
raven-toolbox objects in raven_toolbox.curation, collected from the source of the tracked branch.
Functions¶
| Function | Summary |
|---|---|
batch_curate |
Add or update metabolites / reactions / genes from data tables. |
batch_curate_from_tsv |
File-path convenience wrapper for :func:batch_curate. |
CurationResult |
Record of what :func:batch_curate added / updated. |
Reference¶
batch_curate¶
Add or update metabolites / reactions / genes from data tables.
Each table is optional. rxns_df and rxns_coeffs_df must be
provided together (one describes the per-reaction attributes, the
other carries the stoichiometric coefficients).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model
|
Model
|
Model to curate in place. |
required |
mets_df
|
DataFrame | None
|
Tables matching the schema described in
:mod: |
None
|
genes_df
|
DataFrame | None
|
Tables matching the schema described in
:mod: |
None
|
rxns_df
|
DataFrame | None
|
Tables matching the schema described in
:mod: |
None
|
rxns_coeffs_df
|
DataFrame | None
|
Tables matching the schema described in
:mod: |
None
|
met_id_prefix
|
str
|
Prefixes for freshly-generated metabolite / reaction ids
(e.g. |
'M_'
|
rxn_id_prefix
|
str
|
Prefixes for freshly-generated metabolite / reaction ids
(e.g. |
'M_'
|
Returns:
| Name | Type | Description |
|---|---|---|
A |
class:`CurationResult` summarising the changes.
|
|
batch_curate_from_tsv¶
File-path convenience wrapper for :func:batch_curate.
Each path is optional. TSVs are read with pandas' default
read_csv(sep='\t'); empty cells become NaN (not the
empty string), which the engine treats as "skip this field".
CurationResult¶
Record of what :func:batch_curate added / updated.
Each list holds the cobra ids of the affected entities, in the order they were processed.