EdgeDetail module
|
Class for Edge Details |
|
Class for Match |
|
An enumeration. |
EdgeDetail
- class modifinder.classes.EdgeDetail.EdgeDetail(number_of_modifications: int = -1, match_score: float = 0, matches: List[Match] | None = None, start_spectrum_id: str | None = None, end_spectrum_id: str | None = None)[source]
Bases:
object
Class for Edge Details
- Parameters:
number_of_modifications (int) – Number of modifications, -1 for unknown
match_score (float) – Match score, how well the two spectra match
matches (List[Match]) – List of matches, each match is a tuple of two peak indices and the match type. It is important to note that match has directionality. The first peak index is from the first node of the edge and the second peak index is from the second node of the edge.
- __init__(number_of_modifications: int = -1, match_score: float = 0, matches: List[Match] | None = None, start_spectrum_id: str | None = None, end_spectrum_id: str | None = None)[source]
Initialize the EdgeDetail object.
- Parameters:
number_of_modifications (int) – Number of modifications, -1 for unknown
match_score (float) – Match score, how well the two spectra match
matches (List[Match]) – List of matches, each match is a tuple of two peak indices and the match type. It is important to note that match has directionality. The first peak index is from the first node of the edge and the second peak index is from the second node of the edge.
- copy()[source]
Create a copy of the EdgeDetail object
- Returns:
A copy of the EdgeDetail object
- Return type:
- get_matches_pairs() List[Tuple[int, int]] [source]
Get the matches as a list of tuples
- Returns:
List of tuples of peak indices
- Return type:
List[Tuple[int, int]]
Match
- class modifinder.classes.EdgeDetail.Match(first_peak_index: int, second_peak_index: int, match_type: MatchType)[source]
Bases:
object
Class for Match
- first_peak_index
Index of the peak in the first spectrum
- Type:
int
- second_peak_index
Index of the peak in the second spectrum
- Type:
int
- __init__(first_peak_index: int, second_peak_index: int, match_type: MatchType)[source]
Initialize the Match object.
- Parameters:
first_peak_index (int) – Index of the first peak
second_peak_index (int) – Index of the second peak
match_type (MatchType) – Type of the match
Notes
if you need matches with more information, create a new class and inherit from this class.