@@ -55,28 +55,39 @@ def test_read_peaklist(self):
55
55
self .assertEqual (self .df_peaklist ["intensity" ].iloc [- 1 ], 4549.65 )
56
56
57
57
def test_combine_peaklist_matrix (self ):
58
- df = combine_peaklist_matrix (to_test_data ("peaklist_lcms_pos_theoretical.txt" ), to_test_data ("dataMatrix_theoretical .txt" ))
58
+ df = combine_peaklist_matrix (to_test_data ("peaklist_lcms_pos_theoretical.txt" ), to_test_data ("dataMatrix_lcms_theoretical .txt" ))
59
59
60
60
self .assertEqual (df ["name" ].iloc [0 ], "M127T60" )
61
61
self .assertEqual (df ["name" ].iloc [- 1 ], "M550T200" )
62
62
63
63
self .assertEqual (df ["mz" ].iloc [0 ], 126.9792044 )
64
- self .assertEqual (df ["mz" ].iloc [- 1 ], np . float64 ( 550.0658904 ) )
64
+ self .assertEqual (df ["mz" ].iloc [- 1 ], 550.0658904 )
65
65
66
66
self .assertEqual (df ["rt" ].iloc [0 ], 60 )
67
67
self .assertEqual (df ["rt" ].iloc [- 1 ], 200 )
68
68
69
69
self .assertEqual (df ["intensity" ].iloc [0 ], 1421.775 )
70
70
self .assertEqual (df ["intensity" ].iloc [- 1 ], 4549.65 )
71
71
72
+ df = combine_peaklist_matrix (to_test_data ("peaklist_dims_pos_theoretical.txt" ), to_test_data ("dataMatrix_dims_theoretical.txt" ))
73
+
74
+ self .assertEqual (df ["name" ].iloc [0 ], "126_9792044" )
75
+ self .assertEqual (df ["name" ].iloc [- 1 ], "550_0658904" )
76
+
77
+ self .assertEqual (df ["mz" ].iloc [0 ], 126.9792044 )
78
+ self .assertEqual (df ["mz" ].iloc [- 1 ], 550.0658904 )
79
+
80
+ self .assertEqual (df ["intensity" ].iloc [0 ], 1421.78 )
81
+ self .assertEqual (df ["intensity" ].iloc [- 1 ], 4549.65 )
82
+
72
83
def test_read_xset_matrix (self ):
73
84
df = read_xset_matrix (to_test_data ("xset_matrix.txt" ), "sample01" )
74
85
75
86
self .assertEqual (df ["name" ].iloc [0 ], "M127T60" )
76
87
self .assertEqual (df ["name" ].iloc [- 1 ], "M550T200" )
77
88
78
89
np .testing .assert_almost_equal (df ["mz" ].iloc [0 ], 126.9792044 , 8 )
79
- np .testing .assert_almost_equal (df ["mz" ].iloc [- 1 ], np . float64 ( 550.0658904 ) , 8 )
90
+ np .testing .assert_almost_equal (df ["mz" ].iloc [- 1 ], 550.0658904 , 8 )
80
91
81
92
self .assertEqual (df ["rt" ].iloc [0 ], 60 )
82
93
self .assertEqual (df ["rt" ].iloc [- 1 ], 200 )
0 commit comments