@@ -294,9 +294,13 @@ def main():
294
294
#########################################
295
295
296
296
parser_gap .add_argument ('-i' , '--input' ,
297
- required = True , default = [], action = 'append' ,
297
+ type = str , required = True ,
298
298
help = "Single or Multiple HDF5 files that contain a peak matrix object from one of the processing steps." )
299
299
300
+ parser_gap .add_argument ('-n' , '--name-peaklist' ,
301
+ required = True , type = str ,
302
+ help = "HDF5 file to save the peaklist objects." )
303
+
300
304
parser_gap .add_argument ('-o' , '--output' ,
301
305
required = True , type = str ,
302
306
help = "HDF5 file to save the peaklist objects." )
@@ -412,25 +416,26 @@ def main():
412
416
hdf5_portal .save_peak_matrix_as_hdf5 (pm_sf , args .output )
413
417
414
418
elif args .step == "merge-peaklists" :
415
- pls_merged = workflow .merge_peaklists (sources = args .input , filelist = args .filelist )
419
+ pls_merged = workflow .merge_peaklists (source = args .input , filelist = args .filelist )
416
420
hdf5_portal .save_peaklists_as_hdf5 (pls_merged , args .output )
417
421
418
422
elif args .step == "get-peaklists" :
419
423
pls = []
420
424
for s in args .input :
421
- if os .path .isfile (args .input ):
422
- raise OSError ('HDF5 database [%s] not exists' .format (args .input ))
423
- if h5py .is_hdf5 (args .input ):
424
- raise OSError ('input file [%s] is not a valid HDF5 database' .format (args .input ))
425
- pls .extend (hdf5_portal .load_peak_matrix_from_hdf5 (s ).get_peaklists ())
425
+ if not os .path .isfile (s ):
426
+ raise OSError ('HDF5 database [{}] not exists' .format (s ))
427
+ if not h5py .is_hdf5 (s ):
428
+ raise OSError ('input file [{}] is not a valid HDF5 database' .format (s ))
429
+ pm = hdf5_portal .load_peak_matrix_from_hdf5 (s )
430
+ pls .extend (pm .get_peaklists ())
426
431
hdf5_portal .save_peaklists_as_hdf5 (pls , args .output )
427
432
428
433
elif args .step == "get-average-peaklist" :
429
- if os .path .isfile (args .input ):
430
- raise OSError ('HDF5 database [%s ] not exists' .format (args .input ))
431
- if h5py .is_hdf5 (args .input ):
432
- raise OSError ('input file [%s ] is not a valid HDF5 database' .format (args .input ))
433
- pls = [hdf5_portal .load_peak_matrix_from_hdf5 (args .input ).to_peaklist ()]
434
+ if not os .path .isfile (args .input ):
435
+ raise OSError ('HDF5 database [{} ] not exists' .format (args .input ))
436
+ if not h5py .is_hdf5 (args .input ):
437
+ raise OSError ('input file [{} ] is not a valid HDF5 database' .format (args .input ))
438
+ pls = [hdf5_portal .load_peak_matrix_from_hdf5 (args .input ).to_peaklist (ID = args . name_peaklist )]
434
439
hdf5_portal .save_peaklists_as_hdf5 (pls , args .output )
435
440
436
441
elif args .step == "hdf5-to-txt" :
0 commit comments