File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ import argparse
2525import sys
2626
2727import pyard
28+ from pyard .exceptions import InvalidAlleleError
2829
2930
3031def get_imgt_version (imgt_version ):
@@ -77,6 +78,7 @@ if __name__ == "__main__":
7778 if args .version :
7879 version = ard .get_db_version ()
7980 print (f"IPD-IMGT/HLA version:" , version )
81+ print (f"py-ard version:" , pyard .__version__ )
8082 sys .exit (0 )
8183
8284 if args .splits :
@@ -85,5 +87,17 @@ if __name__ == "__main__":
8587 print (f"{ mapping [0 ]} = { '/' .join (mapping [1 ])} " )
8688 sys .exit (0 )
8789
88- print (ard .redux_gl (args .gl_string , args .redux_type ))
90+ try :
91+ if args .redux_type :
92+ print (ard .redux_gl (args .gl_string , args .redux_type ))
93+ else :
94+ for redux_type in pyard .pyard .reduction_types :
95+ redux_type_info = f"Reduction Method: { redux_type } "
96+ print (redux_type_info )
97+ print ("-" * len (redux_type_info ))
98+ print (ard .redux_gl (args .gl_string , redux_type ))
99+ except InvalidAlleleError as e :
100+ print ("Error:" , e )
101+
102+ # Remove ard and close db connection
89103 del ard
You can’t perform that action at this time.
0 commit comments