Mappings Methods

Methods related to ComPath mappings.

Function to deal with ComPath mappings.

pathway_forte.mappings.get_mapping_dict(df, mapping_type)[source]

Create a dictionary with ComPath mappings for each pathway.

Return type

Mapping[Tuple[str, str], List[Tuple[str, str]]]

pathway_forte.mappings.get_equivalent_pairs(df)[source]

Get equivalent pairs of pathways from 2 databases.

Parameters

df (DataFrame) – pairwise mappings dataframe

Returns

equivalent pathway pairs dictionary {(SOURCE_RESOURCE,SOURCE_ID):[(TARGET_RESOURCE,TARGET_ID)]}

Return type

dict[list]

pathway_forte.mappings.load_compath_mapping_dfs()[source]

Load ComPath mappings data frames.

Return type

Tuple[DataFrame, DataFrame, DataFrame, DataFrame]

pathway_forte.mappings.get_equivalent_mappings_dict()[source]

Get mapping dictionary of all equivalent pairs of pathways.

Special mappings are not included in the overall mappings as some of the WP pathways possess identical IDs.

Return type

Mapping[Tuple[str, str], List[Tuple[str, str]]]