To Graph Database¶
Date published: 26/09/23
- bin.to_db.get_graph(feature_matrix: DataFrame, edge_list: DataFrame, from_col: str, to_col: str) Graph [source]¶
Construct a graph from edge list data.
- Args:
- feature_matrix (pd.DataFrame):
The feature matrix.
- edge_list (pd.DataFrame):
The edge list.
- from_col (str):
The “from” column name.
- to_col (str):
The “to” column name.
- Returns:
- nx.Graph:
The graph to write to the database.
- bin.to_db.log_results(tracking_uri: str, experiment_prefix: str, grn_name: str, feature_matrix: DataFrame, edge_list: DataFrame) None [source]¶
Log experiment results to the experiment tracker.
- Args:
- tracking_uri (str):
The tracking URI.
- experiment_prefix (str):
The experiment name prefix.
- grn_name (str):
The name of the GRN.
- feature_matrix (pd.DataFrame):
The feature matrix.
- edge_list (pd.DataFrame):
The edge list.
- bin.to_db.main(config: DictConfig) None [source]¶
The main entry point for the plotting pipeline.
- Args:
- config (DictConfig):
The pipeline configuration.
- bin.to_db.to_db(db_host: str, db_name: str, db_username: str, db_password: str, collection: str, G: Graph) None [source]¶
Write the graph to the database.
- Args:
- db_host (str):
The database host.
- db_name (str):
The database name.
- db_username (str):
The database username.
- db_password (str):
The database password.
- collection (str):
The database collection.
- G (nx.Graph):
The graph.