#NEWLINE# def _check_toolplus( x ) : #NEWLINE# #INDENT# 'Parse options for adding non-standard/commercial tools like GATK and MuTecT.\n    ' #NEWLINE# Tool = collections . namedtuple ( 'Tool' , [ 'name' , 'fname' ] ) #NEWLINE# if ( ( '=' in x ) and ( len ( x . split ( '=' ) ) == 2 ) ) : #NEWLINE# #INDENT# ( name , fname ) = x . split ( '=' ) #NEWLINE# fname = os . path . normpath ( os . path . realpath ( fname ) ) #NEWLINE# if ( not os . path . exists ( fname ) ) : #NEWLINE# #INDENT# raise argparse . ArgumentTypeError ( ( 'Unexpected --toolplus argument for %s. File does not exist: %s' % ( name , fname ) ) ) #NEWLINE# #UNINDENT# return Tool ( name , fname ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise argparse . ArgumentTypeError ( 'Unexpected --toolplus argument. Expect toolname=filename.' )