@@ -140,7 +140,7 @@ def main():
140
140
parser_amf .add_argument ('-c' , '--db-mf' , type = str , required = True , default = "http://multiomics-int.cs.bham.ac.uk" ,
141
141
help = "Molecular formulae database (reference)." )
142
142
143
- parser_amf .add_argument ('-a' , '--adducts-library' , required = True ,
143
+ parser_amf .add_argument ('-a' , '--adducts-library' , type = str , default = None , required = False ,
144
144
help = "List of adducts to search for." )
145
145
146
146
parser_amf .add_argument ('-m' , '--ion-mode' , choices = ["pos" , "neg" ], required = True ,
@@ -149,7 +149,7 @@ def main():
149
149
parser_amf .add_argument ('-p' , '--ppm' , default = 3.0 , type = float , required = True ,
150
150
help = "Mass tolerance in parts per million." )
151
151
152
- parser_amf .add_argument ('-z' , '--max-mz' , type = float , required = False , default = 700 .0 ,
152
+ parser_amf .add_argument ('-z' , '--max-mz' , type = float , required = False , default = 500 .0 ,
153
153
help = "Maximum m/z value to assign molecular formula(e)." )
154
154
155
155
@@ -168,10 +168,10 @@ def main():
168
168
169
169
parser_am .add_argument ('-c' , '--db-compounds' , type = str , required = False , help = "Metabolite database (reference)." )
170
170
171
- parser_am .add_argument ('-n' , '--db-name' , type = str , default = "" , required = False ,
171
+ parser_am .add_argument ('-n' , '--db-name' , type = str , default = "" , required = True ,
172
172
help = "Name compound / metabolite database (within --db-compounds)." )
173
173
174
- parser_am .add_argument ('-a' , '--adducts-library' , required = True ,
174
+ parser_am .add_argument ('-a' , '--adducts-library' , type = str , default = None , required = False ,
175
175
help = "List of adducts to search for." )
176
176
177
177
parser_am .add_argument ('-m' , '--ion-mode' , choices = ["pos" , "neg" ], required = True ,
@@ -292,8 +292,14 @@ def main():
292
292
df = in_out .combine_peaklist_matrix (args .peaklist , args .intensity_matrix )
293
293
else :
294
294
df = in_out .read_peaklist (args .peaklist )
295
-
296
- lib = in_out .read_adducts (args .adducts_library , args .ion_mode )
295
+
296
+ if args .adducts_library :
297
+ lib = in_out .read_adducts (args .adducts_library , args .ion_mode )
298
+ else :
299
+ path = 'data/adducts.txt'
300
+ p = os .path .join (os .path .dirname (os .path .abspath (__file__ )), path )
301
+ lib = in_out .read_adducts (p , args .ion_mode )
302
+
297
303
annotation .annotate_molecular_formulae (df , ppm = args .ppm , lib_adducts = lib , db_out = args .db , db_in = args .db_mf , max_mz = args .max_mz )
298
304
299
305
if args .step == "annotate-compounds" :
@@ -302,8 +308,14 @@ def main():
302
308
df = in_out .combine_peaklist_matrix (args .peaklist , args .intensity_matrix )
303
309
else :
304
310
df = in_out .read_peaklist (args .peaklist )
305
-
306
- lib = in_out .read_adducts (args .adducts_library , args .ion_mode )
311
+
312
+ if args .adducts_library :
313
+ lib = in_out .read_adducts (args .adducts_library , args .ion_mode )
314
+ else :
315
+ path = 'data/adducts.txt'
316
+ p = os .path .join (os .path .dirname (os .path .abspath (__file__ )), path )
317
+ lib = in_out .read_adducts (p , args .ion_mode )
318
+
307
319
annotation .annotate_compounds (df , lib_adducts = lib , ppm = args .ppm , db_out = args .db , db_name = args .db_name , db_in = "" )
308
320
309
321
if args .step == "summary-results" :
0 commit comments