napistu.matching.interactions
Functions
|
Edgelist to Pathway Species |
|
Edgelist to Compartmentalized Species IDds |
Filter to Direct Mechanistic Interactions |
|
Filter to Indirect Mechanistic Interactions |
- napistu.matching.interactions._edgelist_to_scids_if_needed(edgelist: DataFrame, sbml_dfs: SBML_dfs, species_identifiers: DataFrame, ontologies: set) DataFrame
Map a set of edgelist species to cspecies or skip if cspecies were provided.
- napistu.matching.interactions.edgelist_to_pathway_species(formatted_edgelist: DataFrame, species_identifiers: DataFrame, ontologies: set, feature_id_var: str = 'feature_id', verbose: bool = False) DataFrame
Edgelist to Pathway Species
Match an edgelist of molecular species pairs to their corresponding species in a pathway representation.
Parameters: formatted_edgelist: pd.DataFrame
pd.Dataframe containing a “identifier_upstream” and “identifier_downstream” variables used to to match entries
- species_identifiers: pd.DataFrame
A table of molecular species identifiers produced from sbml_dfs.get_identifiers(“species”) generally using sbml_dfs.export_sbml_dfs()
- ontologies: set
A set of ontologies used to match features to pathway species
- feature_id_var: str, default=FEATURE_ID_VAR_DEFAULT
Variable in “formatted_edgelist” containing feature ids
- verbose: bool, default=False
Whether to print verbose output
Returns: edges_on_pathway: pd.DataFrame
formatted_edgelist with upstream features mapped to “s_id_upstream” and downstream species mapped to “s_id_downstream”
- napistu.matching.interactions.edgelist_to_scids(formatted_edgelist: DataFrame, sbml_dfs: SBML_dfs, species_identifiers: DataFrame, ontologies: set)
Edgelist to Compartmentalized Species IDds
Map an edgelist of possible mechanistic interactions onto a pathadex pathway
Parameters: formatted_edgelist: pd.DataFrame
pd.Dataframe containing a “identifier_upstream” and “identifier_downstream” variables used to to match entries
- sbml_dfs: sbml_dfs_core.SBML_dfs
A mechanistic model
- species_identifiers: pd.DataFrame
A table of molecular species identifiers produced from sbml_dfs.get_identifiers(“species”) generally using sbml_dfs.export_sbml_dfs()
- ontologies: set
A set of ontologies used to match features to pathway species
Returns: edgelist_w_scids: pd.DataFrame
formatted_edgelist with upstream features mapped to “sc_id_upstream” and downstream species mapped to “sc_id_downstream”
- napistu.matching.interactions.filter_to_direct_mechanistic_interactions(formatted_edgelist: DataFrame, sbml_dfs: SBML_dfs, species_identifiers: DataFrame, ontologies: set) DataFrame
Filter to Direct Mechanistic Interactions
Filter an edgelist to direct mechanistic interactions
Parameters: formatted_edgelist: pd.DataFrame
pd.Dataframe containing a “identifier_upstream” and “identifier_downstream” variables used to to match entries
- sbml_dfs: sbml_dfs_core.SBML_dfs
A mechanistic model
- species_identifiers: pd.DataFrame
A table of molecular species identifiers produced from sbml_dfs.get_identifiers(“species”) generally using sbml_dfs.export_sbml_dfs()
- ontologies: set
A set of ontologies used to match features to pathway species
Returns: edgelist_w_direct_mechanistic_interactions: pd.DataFrame
formatted_edgelist filtered to mechanistic reactions present in the pathway representation
- napistu.matching.interactions.filter_to_indirect_mechanistic_interactions(formatted_edgelist: DataFrame, sbml_dfs: SBML_dfs, species_identifiers: DataFrame, napistu_graph: Graph, ontologies: set, precomputed_distances=None, max_path_length=10)
Filter to Indirect Mechanistic Interactions
Filter an edgelist to indirect mechanistic interactions. Indirect relationships are identified by searching a network for paths from an upstream species to a downstream species
Parameters: formatted_edgelist: pd.DataFrame
pd.Dataframe containing a “identifier_upstream” and “identifier_downstream” variables used to to match entries
- sbml_dfs: sbml_dfs_core.SBML_dfs
A mechanistic model
- species_identifiers: pandas.DataFrame
A table of molecular species identifiers produced from sbml_dfs.get_identifiers(“species”) generally using sbml_dfs.export_sbml_dfs()
- napistu_graph: igraph.Graph
A network representation of the sbml_dfs model
- ontologies: set
A set of ontologies used to match features to pathway species
- precomputed_distances: None or a pd.DataFrame containing path lengths and weights
between pairs of cspecies.
- max_path_length: int
Maximum number of steps to consider.
Returns: edgelist_w_indirect_mechanistic_interactions: pd.DataFrame
formatted_edgelist filtered to mechanistic reactions which can be described by an indirect mechanism. The mechanism is described by a path weight, length, and a vpath and epath list of vertices and edges which were traversed to create the path.