utils/db_utils.py
def fetch_clan_accessions():
    """
    Fetches all clan accessions from the database and returns then in the
    form of a list

    returns: A list of all clan accessions
    """
    cnx = RfamDB.connect()
    clan_cursor = cnx.cursor(buffered=True)

    clan_query = "SELECT clan_acc FROM clan"

    # fetch clans
    clan_cursor.execute(clan_query)
    clans = [str(x[0]) for x in clan_cursor.fetchall()]

    clan_cursor.close()
    RfamDB.disconnect(cnx)

    return clans

    Fetches all clan accessions from the database and returns then in the
    form of a list

    returns: A list of all clan accessions
    
Fetches all clan accessions from the database and returns then in the
form of a list

A list of all clan accessions
Fetches all clan accessions from the database and returns then in the form of a list A list of all clan accessions
def fetch_clan_accessions():
    cnx = RfamDB.connect()
    clan_cursor = cnx.cursor(buffered=True)
    clan_query = "SELECT clan_acc FROM clan"
    clan_cursor.execute(clan_query)
    clans = [str(x[0]) for x in clan_cursor.fetchall()]
    clan_cursor.close()
    RfamDB.disconnect(cnx)
    return clans
def fetch_clan_accessions ( ) : cnx = RfamDB . connect ( ) clan_cursor = cnx . cursor ( buffered = True ) clan_query = "SELECT clan_acc FROM clan" clan_cursor . execute ( clan_query ) clans = [ str ( x [ 0 ] ) for x in clan_cursor . fetchall ( ) ] clan_cursor . close ( ) RfamDB . disconnect ( cnx ) return clans
Fetches all clan accessions from the database and returns then in the
form of a list
Fetches all clan accessions from the database and returns then in the form of a list
"""
    Fetches all clan accessions from the database and returns then in the
    form of a list

    returns: A list of all clan accessions
    """ # fetch clans