code: def pair(args):
      
      p = OptionParser(pair.__doc__)
  
      opts, args = p.parse_args(args)
      if len(args) != 1:
          sys.exit(p.print_help())
  
      def callback(s):
          print(s.pairline)
      Sam(args[0], callback=callback)
docs: %prog pair samfile
  
      Parses the sam file and retrieve in pairs format,
      query:pos ref:pos