-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bdeba8e
commit 11cbf55
Showing
4 changed files
with
322 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,166 @@ | ||
"""Provide MetaNetX assets.""" | ||
|
||
from dagster import graph_asset | ||
from polars import DataFrame | ||
from pandas import DataFrame | ||
|
||
from .op import mnx_table | ||
|
||
|
||
@graph_asset( | ||
config={ | ||
"mnx_table": {"ops": {"fetch_table": {"config": {"table": "comp_depr.tsv"}}}}, | ||
"mnx_table": { | ||
"ops": { | ||
"fetch_table": {"config": {"table": "comp_depr.tsv"}}, | ||
"etl_table": {"config": {"model": "MetaNetXDeprecation"}}, | ||
}, | ||
}, | ||
}, | ||
tags={"layer": "bronze"}, | ||
) | ||
def mnx_comp_depr() -> DataFrame: | ||
"""Define the comp_depr table asset.""" | ||
"""Define the deprecated compartment identifiers asset.""" | ||
return mnx_table() | ||
|
||
|
||
@graph_asset( | ||
config={ | ||
"mnx_table": {"ops": {"fetch_table": {"config": {"table": "comp_prop.tsv"}}}}, | ||
"mnx_table": { | ||
"ops": { | ||
"fetch_table": {"config": {"table": "comp_prop.tsv"}}, | ||
"etl_table": {"config": {"model": "MetaNetXCompartmentProperty"}}, | ||
}, | ||
}, | ||
}, | ||
tags={"layer": "bronze"}, | ||
) | ||
def mnx_comp_prop() -> DataFrame: | ||
"""Define the comp_prop table asset.""" | ||
"""Define the compartment properties asset.""" | ||
return mnx_table() | ||
|
||
|
||
@graph_asset( | ||
config={ | ||
"mnx_table": {"ops": {"fetch_table": {"config": {"table": "comp_xref.tsv"}}}}, | ||
"mnx_table": { | ||
"ops": { | ||
"fetch_table": {"config": {"table": "comp_xref.tsv"}}, | ||
"etl_table": {"config": {"model": "MetaNetXCrossReference"}}, | ||
}, | ||
}, | ||
}, | ||
tags={"layer": "bronze"}, | ||
) | ||
def mnx_comp_xref() -> DataFrame: | ||
"""Define the comp_xref table asset.""" | ||
"""Define the compartment cross-references asset.""" | ||
return mnx_table() | ||
|
||
|
||
@graph_asset( | ||
config={ | ||
"mnx_table": { | ||
"ops": { | ||
"fetch_table": {"config": {"table": "chem_depr.tsv"}}, | ||
"etl_table": {"config": {"model": "MetaNetXDeprecation"}}, | ||
}, | ||
}, | ||
}, | ||
tags={"layer": "bronze"}, | ||
) | ||
def mnx_chem_depr() -> DataFrame: | ||
"""Define the deprecated chemical identifiers asset.""" | ||
return mnx_table() | ||
|
||
|
||
@graph_asset( | ||
config={ | ||
"mnx_table": { | ||
"ops": { | ||
"fetch_table": {"config": {"table": "chem_isom.tsv"}}, | ||
"etl_table": {"config": {"model": "MetaNetXStereochemistry"}}, | ||
}, | ||
}, | ||
}, | ||
tags={"layer": "bronze"}, | ||
) | ||
def mnx_chem_isom() -> DataFrame: | ||
"""Define the stereochemistry asset.""" | ||
return mnx_table() | ||
|
||
|
||
@graph_asset( | ||
config={ | ||
"mnx_table": { | ||
"ops": { | ||
"fetch_table": {"config": {"table": "chem_prop.tsv"}}, | ||
"etl_table": {"config": {"model": "MetaNetXChemicalProperty"}}, | ||
}, | ||
}, | ||
}, | ||
tags={"layer": "bronze"}, | ||
) | ||
def mnx_chem_prop() -> DataFrame: | ||
"""Define the chemical properties asset.""" | ||
return mnx_table() | ||
|
||
|
||
@graph_asset( | ||
config={ | ||
"mnx_table": { | ||
"ops": { | ||
"fetch_table": {"config": {"table": "chem_xref.tsv"}}, | ||
"etl_table": {"config": {"model": "MetaNetXCrossReference"}}, | ||
}, | ||
}, | ||
}, | ||
tags={"layer": "bronze"}, | ||
) | ||
def mnx_chem_xref() -> DataFrame: | ||
"""Define the chemical cross-references asset.""" | ||
return mnx_table() | ||
|
||
|
||
@graph_asset( | ||
config={ | ||
"mnx_table": { | ||
"ops": { | ||
"fetch_table": {"config": {"table": "reac_depr.tsv"}}, | ||
"etl_table": {"config": {"model": "MetaNetXDeprecation"}}, | ||
}, | ||
}, | ||
}, | ||
tags={"layer": "bronze"}, | ||
) | ||
def mnx_reac_depr() -> DataFrame: | ||
"""Define the deprecated reaction identifiers asset.""" | ||
return mnx_table() | ||
|
||
|
||
@graph_asset( | ||
config={ | ||
"mnx_table": { | ||
"ops": { | ||
"fetch_table": {"config": {"table": "reac_prop.tsv"}}, | ||
"etl_table": {"config": {"model": "MetaNetXReactionProperty"}}, | ||
} | ||
}, | ||
}, | ||
tags={"layer": "bronze"}, | ||
) | ||
def mnx_reac_prop() -> DataFrame: | ||
"""Define the reaction properties asset.""" | ||
return mnx_table() | ||
|
||
|
||
@graph_asset( | ||
config={ | ||
"mnx_table": { | ||
"ops": { | ||
"fetch_table": {"config": {"table": "reac_xref.tsv"}}, | ||
"etl_table": {"config": {"model": "MetaNetXCrossReference"}}, | ||
} | ||
}, | ||
}, | ||
tags={"layer": "bronze"}, | ||
) | ||
def mnx_reac_xref() -> DataFrame: | ||
"""Define the reaction cross-references asset.""" | ||
return mnx_table() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.