scout/adapter/mongo/query.py
def coordinate_filter(self, query, mongo_query):
        """ Adds genomic coordinated-related filters to the query object

        Args:
            query(dict): a dictionary of query filters specified by the users
            mongo_query(dict): the query that is going to be submitted to the database

        Returns:
            mongo_query(dict): returned object contains coordinate filters

        """
        LOG.debug('Adding genomic coordinates to the query')
        chromosome = query['chrom']
        mongo_query['chromosome'] = chromosome

        if (query.get('start') and query.get('end')):
            mongo_query['position'] = {'$lte': int(query['end'])}
            mongo_query['end'] = {'$gte': int(query['start'])}

        return mongo_query
def coordinate_filter(self, query, mongo_query):
        LOG.debug('Adding genomic coordinates to the query')
        chromosome = query['chrom']
        mongo_query['chromosome'] = chromosome

        if (query.get('start') and query.get('end')):
            mongo_query['position'] = {'$lte': int(query['end'])}
            mongo_query['end'] = {'$gte': int(query['start'])}

        return mongo_query
def coordinate_filter ( self , query , mongo_query ) : LOG . debug ( 'Adding genomic coordinates to the query' ) chromosome = query [ 'chrom' ] mongo_query [ 'chromosome' ] = chromosome if ( query . get ( 'start' ) and query . get ( 'end' ) ) : mongo_query [ 'position' ] = { '$lte' : int ( query [ 'end' ] ) } mongo_query [ 'end' ] = { '$gte' : int ( query [ 'start' ] ) } return mongo_query
Adds genomic coordinated-related filters to the query object

        Args:
            query(dict): a dictionary of query filters specified by the users
            mongo_query(dict): the query that is going to be submitted to the database

        Returns:
            mongo_query(dict): returned object contains coordinate filters
Adds genomic coordinated - related filters to the query object