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, start_compound_id: str | None = None, end_compound_id: str | None = None)[source]
Bases:
objectClass 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 m/z values and the match type. It is important to note that match has directionality. The first peak m/z is from the first node of the edge and the second peak m/z 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, start_compound_id: str | None = None, end_compound_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 m/z values and the match type. It is important to note that match has directionality. The first peak m/z is from the first node of the edge and the second peak m/z 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 m/z values
- Return type:
List[Tuple[int, int]]
- get_single_type_matches(match_type: MatchType) List[Tuple[int, int]][source]
Get the matches of a specific type
- Parameters:
match_type (MatchType) – Type of the match
- Returns:
List of tuples of peak m/z values [(first_peak_mz, second_peak_mz), …] of the specified match type
- Return type:
List[Tuple[int, int]]
Match
- class modifinder.classes.EdgeDetail.Match(first_peak_mz: int, second_peak_mz: int, match_type: MatchType)[source]
Bases:
objectClass for Match
- first_peak_mz
mz of the peak in the first spectrum
- Type:
int
- second_peak_mz
mz of the peak in the second spectrum
- Type:
int
- __init__(first_peak_mz: int, second_peak_mz: int, match_type: MatchType)[source]
Initialize the Match object.
- Parameters:
first_peak_mz (int) – m/z of the first peak
second_peak_mz (int) – m/z 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.