def query(args):
    """
    %prog query binfile fastafile ctgID baseID

    Get the depth at a particular base.
    """
    p = OptionParser(query.__doc__)
    opts, args = p.parse_args(args)

    if len(args) != 4:
        sys.exit(not p.print_help())

    binfile, fastafile, ctgID, baseID = args
    b = BinFile(binfile, fastafile)
    ar = b.mmarray

    fastasize, sizes, offsets = get_offsets(fastafile)
    oi = offsets[ctgID] + int(baseID) - 1
    print("\t".join((ctgID, baseID, str(ar[oi]))))
def query ( args ) : p = OptionParser ( query . __doc__ ) opts , args = p . parse_args ( args ) if len ( args ) != 4 : sys . exit ( not p . print_help ( ) ) binfile , fastafile , ctgID , baseID = args b = BinFile ( binfile , fastafile ) ar = b . mmarray fastasize , sizes , offsets = get_offsets ( fastafile ) oi = offsets [ ctgID ] + int ( baseID ) - 1 print ( "\t" . join ( ( ctgID , baseID , str ( ar [ oi ] ) ) ) )
%prog query binfile fastafile ctgID baseID

    Get the depth at a particular base.