code: def query(args):
      
      p = OptionParser(query.__doc__)
  
      opts, args = p.parse_args(args)
  
      if len(args) != 2:
          sys.exit(p.print_help())
  
      frgscffile, region = args
      gzfile = frgscffile + ".gz"
      tbifile = gzfile + ".tbi"
      outfile = region + ".posmap"
  
      if not (op.exists(gzfile) and op.exists(tbifile)):
          index(frgscffile)
  
      assert op.exists(gzfile) and op.exists(tbifile)
  
      cmd = "tabix {0} {1}".format(gzfile, region)
      sh(cmd, outfile=outfile)
docs: %prog query frgscf.sorted scfID:start-end
  
      Query certain region to get frg placement, using random access. Build index
      if not present.