scout/commands/export/gene.py
def genes(context, build, json):
    """Export all genes from a build"""
    LOG.info("Running scout export genes")
    adapter = context.obj['adapter']

    result = adapter.all_genes(build=build)
    if json:
        click.echo(dumps(result))
        return
        
    gene_string = ("{0}\t{1}\t{2}\t{3}\t{4}")
    click.echo("#Chromosom\tStart\tEnd\tHgnc_id\tHgnc_symbol")
    for gene_obj in result:
        click.echo(gene_string.format(
            gene_obj['chromosome'],
            gene_obj['start'],
            gene_obj['end'],
            gene_obj['hgnc_id'],
            gene_obj['hgnc_symbol'],
        ))
def genes(context, build, json):
    LOG.info("Running scout export genes")
    adapter = context.obj['adapter']

    result = adapter.all_genes(build=build)
    if json:
        click.echo(dumps(result))
        return
        
    gene_string = ("{0}\t{1}\t{2}\t{3}\t{4}")
    click.echo("#Chromosom\tStart\tEnd\tHgnc_id\tHgnc_symbol")
    for gene_obj in result:
        click.echo(gene_string.format(
            gene_obj['chromosome'],
            gene_obj['start'],
            gene_obj['end'],
            gene_obj['hgnc_id'],
            gene_obj['hgnc_symbol'],
        ))
def genes ( context , build , json ) : LOG . info ( "Running scout export genes" ) adapter = context . obj [ 'adapter' ] result = adapter . all_genes ( build = build ) if json : click . echo ( dumps ( result ) ) return gene_string = ( "{0}\t{1}\t{2}\t{3}\t{4}" ) click . echo ( "#Chromosom\tStart\tEnd\tHgnc_id\tHgnc_symbol" ) for gene_obj in result : click . echo ( gene_string . format ( gene_obj [ 'chromosome' ] , gene_obj [ 'start' ] , gene_obj [ 'end' ] , gene_obj [ 'hgnc_id' ] , gene_obj [ 'hgnc_symbol' ] , ) )
Export all genes from a build
Export all genes from a build