@@ -199,6 +199,7 @@ def test_hdf5_peaklists_to_txt(self):
199
199
with open (to_test_data (fn ), "rU" ) as comp :
200
200
self .assertEqual (test_result .read (), comp .read ())
201
201
202
+
202
203
def test_hdf5_peak_matrix_to_txt (self ):
203
204
hdf5_peak_matrix_to_txt (to_test_data ("MTBLS79_mzml_peak_matrix.hdf5" ), to_test_result ("pm_mzml_triplicates.txt" ),
204
205
attr_name = "intensity" , rsd_tags = (), delimiter = "\t " , samples_in_rows = True , comprehensive = False )
@@ -212,12 +213,19 @@ def test_hdf5_peak_matrix_to_txt(self):
212
213
self .assertEquals (test_result .readline ().split ("\t " )[0 :6 ],
213
214
["m/z" , "missing values" , "tags_classLabel" , "tags_batch" , "tags_untyped" , "74.0166655257" ])
214
215
216
+ hdf5_peak_matrix_to_txt (to_test_data ("MTBLS79_mzml_peak_matrix.hdf5" ), to_test_result ("pm_mzml_triplicates_snr.txt" ),
217
+ attr_name = "snr" , rsd_tags = ("QC" ,), delimiter = "\t " , samples_in_rows = True , comprehensive = False )
218
+ with open (to_test_result ("pm_mzml_triplicates_snr.txt" ), "rU" ) as test_result :
219
+ self .assertEquals (test_result .readlines ()[1 ].split ("\t " )[0 :10 ],
220
+ ["batch04_B02_rep01_301.mzML" , "0.0" , "0.0" , "0.0" , "0.0" , "0.0" , "0.0" , "3.60960180872" , "0.0" , "4.35180213987" ])
221
+
215
222
hdf5_peak_matrix_to_txt (to_test_data ("MTBLS79_mzml_peak_matrix.hdf5" ), to_test_result ("pm_mzml_triplicates_comprehensive_T.txt" ),
216
223
attr_name = "intensity" , rsd_tags = ("QC" ,), delimiter = "\t " , samples_in_rows = False , comprehensive = True )
217
224
with open (to_test_result ("pm_mzml_triplicates_comprehensive_T.txt" ), "rU" ) as test_result :
218
225
self .assertEquals (test_result .readline ().split ("\t " )[0 :5 ],
219
226
['m/z' , 'present' , 'occurrence' , 'purity' , 'rsd_QC' ])
220
227
228
+
221
229
def test_create_sample_list (self ):
222
230
pls = load_peaklists_from_hdf5 (to_test_data ("MTBLS79_mzml_triplicates.hdf5" ))
223
231
create_sample_list (pls , to_test_result ("filelist_csl_MTBLS79_mzml_triplicates.txt" ))
0 commit comments