scout/commands/view/intervals.py
def intervals(context, build):
    """Show all indexes in the database"""
    LOG.info("Running scout view index")
    adapter = context.obj['adapter']

    intervals = adapter.get_coding_intervals(build)
    nr_intervals = 0
    longest = 0
    for chrom in CHROMOSOMES:
        for iv in intervals[chrom]:
            iv_len = iv.end - iv.begin
            if iv_len > longest:
                longest = iv_len
        int_nr = len(intervals.get(chrom, []))
        click.echo("{0}\t{1}".format(chrom, int_nr))
        nr_intervals += int_nr

    LOG.info("Total nr intervals:%s", nr_intervals)
    LOG.info("Total nr genes:%s", adapter.all_genes(build).count())
    LOG.info("Longest interval:%s", longest)
def intervals(context, build):
    """Show all indexes in the database"""
    LOG.info("Running scout view index")
    adapter = context.obj['adapter']

    intervals = adapter.get_coding_intervals(build)
    nr_intervals = 0
    longest = 0
    for chrom in CHROMOSOMES:
        for iv in intervals[chrom]:
            iv_len = iv.end - iv.begin
            if iv_len > longest:
                longest = iv_len
        int_nr = len(intervals.get(chrom, []))
        click.echo("{0}\t{1}".format(chrom, int_nr))
        nr_intervals += int_nr

    LOG.info("Total nr intervals:%s", nr_intervals)
    LOG.info("Total nr genes:%s", adapter.all_genes(build).count())
    LOG.info("Longest interval:%s", longest)
def intervals ( context , build ) : LOG . info ( "Running scout view index" ) adapter = context . obj [ 'adapter' ] intervals = adapter . get_coding_intervals ( build ) nr_intervals = 0 longest = 0 for chrom in CHROMOSOMES : for iv in intervals [ chrom ] : iv_len = iv . end - iv . begin if iv_len > longest : longest = iv_len int_nr = len ( intervals . get ( chrom , [ ] ) ) click . echo ( "{0}\t{1}" . format ( chrom , int_nr ) ) nr_intervals += int_nr LOG . info ( "Total nr intervals:%s" , nr_intervals ) LOG . info ( "Total nr genes:%s" , adapter . all_genes ( build ) . count ( ) ) LOG . info ( "Longest interval:%s" , longest )
Show all indexes in the database
Show all indexes in the database