scout/server/blueprints/variants/controllers.py
def sv_variants(store, institute_obj, case_obj, variants_query, page=1, per_page=50):
    """Pre-process list of SV variants."""
    skip_count = (per_page * max(page - 1, 0))
    more_variants = True if variants_query.count() > (skip_count + per_page) else False

    genome_build = case_obj.get('genome_build', '37')
    if genome_build not in ['37','38']:
        genome_build = '37'

    return {
        'variants': (parse_variant(store, institute_obj, case_obj, variant, genome_build=genome_build) for variant in
                     variants_query.skip(skip_count).limit(per_page)),
        'more_variants': more_variants,
    }
def sv_variants(store, institute_obj, case_obj, variants_query, page=1, per_page=50):
    skip_count = (per_page * max(page - 1, 0))
    more_variants = True if variants_query.count() > (skip_count + per_page) else False

    genome_build = case_obj.get('genome_build', '37')
    if genome_build not in ['37','38']:
        genome_build = '37'

    return {
        'variants': (parse_variant(store, institute_obj, case_obj, variant, genome_build=genome_build) for variant in
                     variants_query.skip(skip_count).limit(per_page)),
        'more_variants': more_variants,
    }
def sv_variants ( store , institute_obj , case_obj , variants_query , page = 1 , per_page = 50 ) : skip_count = ( per_page * max ( page - 1 , 0 ) ) more_variants = True if variants_query . count ( ) > ( skip_count + per_page ) else False genome_build = case_obj . get ( 'genome_build' , '37' ) if genome_build not in [ '37' , '38' ] : genome_build = '37' return { 'variants' : ( parse_variant ( store , institute_obj , case_obj , variant , genome_build = genome_build ) for variant in variants_query . skip ( skip_count ) . limit ( per_page ) ) , 'more_variants' : more_variants , }
Pre-process list of SV variants.
Pre - process list of SV variants .