parameters: (details=None)
return_statement: return details
docstring: parses the command line arguments and returns a
     _FingerprinterDetails_ instance with the results.
  
     **Note**:
  
       - If you make modifications here, please update the global
         _usageDoc string so the Usage message is up to date.
  
       - This routine is used by both the fingerprinter, the clusterer and the
         screener; not all arguments make sense for all applications.
docstring_summary: parses the command line arguments and returns a
     _FingerprinterDetails_ instance with the results.
docstring_tokens: parses the command line arguments and returns a _FingerprinterDetails_ instance with the results .
function: def ParseArgs(details=None):
    """ parses the command line arguments and returns a
     _FingerprinterDetails_ instance with the results.
  
     **Note**:
  
       - If you make modifications here, please update the global
         _usageDoc string so the Usage message is up to date.
  
       - This routine is used by both the fingerprinter, the clusterer and the
         screener; not all arguments make sense for all applications.
  
    """
    args = sys.argv[1:]
    try:
      args, extras = getopt.getopt(args,
                                   'HVs:d:t:o:h',
                                   [
                                     'minSize=',
                                     'maxSize=',
                                     'density=',
                                     'minPath=',
                                     'maxPath=',
                                     'bitsPerHash=',
                                     'smilesName=',
                                     'molPkl=',
                                     'useSD',
                                     'idName=',
                                     'discrim',
                                     'outTable=',
                                     'outDbName=',
                                     'fpColName=',
                                     'maxMols=',
                                     'useMACCS',
                                     'keepTable',
                                     # SCREENING:
                                     'smilesTable=',
                                     'doScreen=',
                                     'topN=',
                                     'thresh=',
                                     'smiles=',
                                     'dice',
                                     'cosine',
                                     # CLUSTERING:
                                     'actTable=',
                                     'actName=',
                                     'SLINK',
                                     'CLINK',
                                     'UPGMA',
                                   ])
    except Exception:
      import traceback
      traceback.print_exc()
      Usage()
  
    if details is None:
      details = FingerprinterDetails()
    if len(extras):
      details.inFileName = extras[0]
  
    for arg, val in args:
      if arg == '-H':
        details.useHs = 1
      elif arg == '-V':
        details.useValence = 1
      elif arg == '-d':
        details.dbName = val
      elif arg == '-t':
        details.tableName = val
      elif arg == '-o':
        details.outFileName = val
      elif arg == '--minSize':
        details.minSize = int(val)
      elif arg == '--maxSize':
        details.fpSize = int(val)
      elif arg == '--density':
        details.tgtDensity = float(val)
      elif arg == '--outTable':
        details.outTableName = val
      elif arg == '--outDbName':
        details.outDbName = val
      elif arg == '--fpColName':
        details.fpColName = val
      elif arg == '--minPath':
        details.minPath = int(val)
      elif arg == '--maxPath':
        details.maxPath = int(val)
      elif arg == '--nBitsPerHash':
        details.bitsPerHash = int(val)
      elif arg == '--discrim':
        details.discrimHash = 1
      elif arg == '--smilesName':
        details.smilesName = val
      elif arg == '--molPkl':
        details.molPklName = val
      elif arg == '--useSD':
        details.useSmiles = False
        details.useSD = True
      elif arg == '--idName':
        details.idName = val
      elif arg == '--maxMols':
        details.maxMols = int(val)
      elif arg == '--useMACCS':
        details.fingerprinter = MACCSkeys.GenMACCSKeys
      elif arg == '--keepTable':
        details.replaceTable = False
  
      # SCREENER:
      elif arg == '--smilesTable':
        details.smilesTableName = val
      elif arg == '--topN':
        details.doThreshold = 0
        details.topN = int(val)
      elif arg == '--thresh':
        details.doThreshold = 1
        details.screenThresh = float(val)
      elif arg == '--smiles':
        details.probeSmiles = val
      elif arg == '--dice':
        details.metric = DataStructs.DiceSimilarity
      elif arg == '--cosine':
        details.metric = DataStructs.CosineSimilarity
  
      # CLUSTERS:
      elif arg == '--SLINK':
        details.clusterAlgo = Murtagh.SLINK
      elif arg == '--CLINK':
        details.clusterAlgo = Murtagh.CLINK
      elif arg == '--UPGMA':
        details.clusterAlgo = Murtagh.UPGMA
      elif arg == '--actTable':
        details.actTableName = val
      elif arg == '--actName':
        details.actName = val
      elif arg == '-h':
        Usage()
    return details
function_tokens: def ParseArgs ( details = None ) : args = sys . argv [ 1 : ] try : args , extras = getopt . getopt ( args , 'HVs:d:t:o:h' , [ 'minSize=' , 'maxSize=' , 'density=' , 'minPath=' , 'maxPath=' , 'bitsPerHash=' , 'smilesName=' , 'molPkl=' , 'useSD' , 'idName=' , 'discrim' , 'outTable=' , 'outDbName=' , 'fpColName=' , 'maxMols=' , 'useMACCS' , 'keepTable' , # SCREENING: 'smilesTable=' , 'doScreen=' , 'topN=' , 'thresh=' , 'smiles=' , 'dice' , 'cosine' , # CLUSTERING: 'actTable=' , 'actName=' , 'SLINK' , 'CLINK' , 'UPGMA' , ] ) except Exception : import traceback traceback . print_exc ( ) Usage ( ) if details is None : details = FingerprinterDetails ( ) if len ( extras ) : details . inFileName = extras [ 0 ] for arg , val in args : if arg == '-H' : details . useHs = 1 elif arg == '-V' : details . useValence = 1 elif arg == '-d' : details . dbName = val elif arg == '-t' : details . tableName = val elif arg == '-o' : details . outFileName = val elif arg == '--minSize' : details . minSize = int ( val ) elif arg == '--maxSize' : details . fpSize = int ( val ) elif arg == '--density' : details . tgtDensity = float ( val ) elif arg == '--outTable' : details . outTableName = val elif arg == '--outDbName' : details . outDbName = val elif arg == '--fpColName' : details . fpColName = val elif arg == '--minPath' : details . minPath = int ( val ) elif arg == '--maxPath' : details . maxPath = int ( val ) elif arg == '--nBitsPerHash' : details . bitsPerHash = int ( val ) elif arg == '--discrim' : details . discrimHash = 1 elif arg == '--smilesName' : details . smilesName = val elif arg == '--molPkl' : details . molPklName = val elif arg == '--useSD' : details . useSmiles = False details . useSD = True elif arg == '--idName' : details . idName = val elif arg == '--maxMols' : details . maxMols = int ( val ) elif arg == '--useMACCS' : details . fingerprinter = MACCSkeys . GenMACCSKeys elif arg == '--keepTable' : details . replaceTable = False # SCREENER: elif arg == '--smilesTable' : details . smilesTableName = val elif arg == '--topN' : details . doThreshold = 0 details . topN = int ( val ) elif arg == '--thresh' : details . doThreshold = 1 details . screenThresh = float ( val ) elif arg == '--smiles' : details . probeSmiles = val elif arg == '--dice' : details . metric = DataStructs . DiceSimilarity elif arg == '--cosine' : details . metric = DataStructs . CosineSimilarity # CLUSTERS: elif arg == '--SLINK' : details . clusterAlgo = Murtagh . SLINK elif arg == '--CLINK' : details . clusterAlgo = Murtagh . CLINK elif arg == '--UPGMA' : details . clusterAlgo = Murtagh . UPGMA elif arg == '--actTable' : details . actTableName = val elif arg == '--actName' : details . actName = val elif arg == '-h' : Usage ( ) return details