def filterbedgraph(args):
    p = OptionParser(filterbedgraph.__doc__)
    opts, args = p.parse_args(args)

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

    bedgraphfile, cutoff = args
    c = float(cutoff)
    fp = open(bedgraphfile)
    pf = bedgraphfile.rsplit(".", 1)[0]
    filteredbed = pf + ".filtered-{}.bed".format(cutoff)
    fw = open(filteredbed, "w")
    nfiltered = ntotal = 0
    for row in fp:
        b = BedLine(row)
        ntotal += 1
        if float(b.accn) >= c:
            print >> fw, b
            nfiltered += 1
    fw.close()
    logging.debug("A total of {} intervals (score >= {}) written to `{}`".\
                    format(percentage(nfiltered, ntotal), cutoff, filteredbed))

    mergeBed(filteredbed, sorted=True, delim=None)
mediaIsPlaying(
dataset/ETHPy150Open tanghaibao/jcvi/formats/bed.py/filterbedgraph--crossover with--dataset/ETHPy150Open brousch/sl4a_pydroid_mock_api/src/android/utils/androidhelper_r6.py/Android.mediaIsPlaying