MHCXGraph.core.subgraphs.extract_subgraph_from_secondary_structure

MHCXGraph.core.subgraphs.extract_subgraph_from_secondary_structure(g: Graph, ss_elements: list[str], inverse: bool = False, filter_dataframe: bool = True, recompute_distmat: bool = False, update_coords: bool = True, return_node_list: bool = False) Graph | list[str] | None[source]

Select nodes by secondary structure label.

Parameters:
Returns:

Subgraph or node list.

Return type:

nx.Graph or list of str

Raises:

ProteinGraphConfigurationError – If any node lacks the ‘ss’ attribute.