text: #!/usr/bin/env python
  
  import os
  import sys
  from multiprocessing import Pool, cpu_count
  import subprocess
  import tempfile
  
  
  def prepare_argparser():
      """Prepare optparser object. New options will be added in this function first.
      """
  
      description = "%(prog)s -- A Python package for tRNA identification using tRNAscan-SE and Aragorn."
      epilog = "For command line options of each command, type: %(prog)s COMMAND -h"
  
      parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter,
                                          description=description, epilog=epilog)
  
      parser.add_argument('-t', '--threads', type=int, help='Number of CPUs.', metavar='', dest="threads")
      parser.add_argument('-n', '--network', required=True, type=str, help='Path to tab-separated network.', metavar='', dest="network")
      parser.add_argument('-e', '--enhancer', required=True, type=str, help='Path to enhancer-gene pairs.', metavar='', dest="enhancer")
      parser.add_argument('-m', '--mutation', required=True, type=str, help='Path to snp file.', metavar='', dest="mutation")
      parser.add_argument('-r', type=float, help='Restart possibility. Choose between 0 and 1.', metavar='', dest="r")
      parser.add_argument('-p', '--permutation', default=500, type=int, help='Permutation times.', metavar='', dest="permutation")
      parser.add_argument('-o', '--output', default='ennet_res', help='Output prefix.', metavar='', dest="output")
  
  
  
  
  
  def main():
  
      parser = prepare_argparser()
  
      if len(sys.argv) < 2:
          parser.print_help()
          sys.exit(1)
  
      args = parser.parse_args()
  
  
  
  if __name__ == '__main__':
  
      try:
          main()
      except KeyboardInterrupt:
          logger.error("User interrupted me! ;-) Bye!")
          sys.exit(1)
  
  