-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdata_structures.py
More file actions
47 lines (35 loc) · 1.13 KB
/
data_structures.py
File metadata and controls
47 lines (35 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
"""
Shared data structures for MuMDIA.
This module contains dataclass definitions used across multiple modules
to avoid circular import issues.
"""
from dataclasses import dataclass, field
from typing import Dict
import numpy as np
@dataclass
class CorrelationResults:
"""Results from fragment correlation analysis."""
correlations: np.ndarray
correlations_count: np.ndarray
sum_pred_frag_intens: np.ndarray
correlation_matrix_psm_ids: np.ndarray
correlation_matrix_frag_ids: np.ndarray
most_intens_cor: float
most_intens_cos: float
mse_avg_pred_intens: float
mse_avg_pred_intens_total: float
@dataclass
class PickleConfig:
"""Configuration for pickle file caching."""
write_deeplc: bool = False
write_ms2pip: bool = False
write_correlation: bool = False
read_deeplc: bool = False
read_ms2pip: bool = False
read_correlation: bool = False
@dataclass
class SpectraData:
"""Container for spectral data dictionaries."""
ms1_dict: Dict = field(default_factory=dict)
ms2_to_ms1_dict: Dict = field(default_factory=dict)
ms2_dict: Dict = field(default_factory=dict)