utils/db_utils.py
def fetch_rfam_accs_sorted(order='DESC'):
    """
    Fetch all available Rfam accs and sort by specified order. DESC by default

    order: The order in which to sort the records (ASC, DESC)
    returns: void
    """

    # connect to db
    cnx = RfamDB.connect()

    # get a new buffered cursor
    cursor = cnx.cursor(buffered=True)

    # update is_significant field to 0
    query = ("select rfam_acc from seed_region\n"
       "group by rfam_acc\n"
       "order by count(*) %s" % order)

    cursor.execute(query)

    rfam_accs = [str(x[0]) for x in cursor.fetchall()]

    cursor.close()
    RfamDB.disconnect(cnx)

    return rfam_accs

    Fetch all available Rfam accs and sort by specified order. DESC by default

    order: The order in which to sort the records (ASC, DESC)
    returns: void
    
Fetch all available Rfam accs and sort by specified order. DESC by default
order: The order in which to sort the records (ASC, DESC)
returns: void
Fetch all available Rfam accs and sort by specified order . DESC by default order : The order in which to sort the records ( ASC DESC ) returns : void
def fetch_rfam_accs_sorted(order='DESC'):
    cnx = RfamDB.connect()
    cursor = cnx.cursor(buffered=True)
    query = ("select rfam_acc from seed_region\n"
       "group by rfam_acc\n"
       "order by count(*) %s" % order)
    cursor.execute(query)
    rfam_accs = [str(x[0]) for x in cursor.fetchall()]
    cursor.close()
    RfamDB.disconnect(cnx)
    return rfam_accs
def fetch_rfam_accs_sorted ( order = 'DESC' ) : cnx = RfamDB . connect ( ) cursor = cnx . cursor ( buffered = True ) query = ( "select rfam_acc from seed_region\n" "group by rfam_acc\n" "order by count(*) %s" % order ) cursor . execute ( query ) rfam_accs = [ str ( x [ 0 ] ) for x in cursor . fetchall ( ) ] cursor . close ( ) RfamDB . disconnect ( cnx ) return rfam_accs
Fetch all available Rfam accs and sort by specified order.
Fetch all available Rfam accs and sort by specified order .
"""
    Fetch all available Rfam accs and sort by specified order. DESC by default

    order: The order in which to sort the records (ASC, DESC)
    returns: void
    """ # connect to db # get a new buffered cursor # update is_significant field to 0
order