utils/db_utils.py
def fetch_family_tax_ids(rfam_acc):
    """
    Queries RfamLive and extracts all family taxonomy ids

    rfam_acc: A valid Rfam family accession

    return: A list of taxonomic ids associated with a specific Rfam family
    """

    query = """select distinct ncbi_id
    from family_ncbi
    where rfam_acc=\'%s\'"""

    cnx = RfamDB.connect()
    cursor = cnx.cursor(buffered=True)

    cursor.execute(query % rfam_acc)

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

    cursor.close()
    cnx.close()

    return tax_ids

    Queries RfamLive and extracts all family taxonomy ids

    rfam_acc: A valid Rfam family accession

    return: A list of taxonomic ids associated with a specific Rfam family
    
Queries RfamLive and extracts all family taxonomy ids
rfam_acc: A valid Rfam family accession

A list of taxonomic ids associated with a specific Rfam family
Queries RfamLive and extracts all family taxonomy ids rfam_acc : A valid Rfam family accession A list of taxonomic ids associated with a specific Rfam family
def fetch_family_tax_ids(rfam_acc):
    query = """select distinct ncbi_id
    from family_ncbi
    where rfam_acc=\'%s\'"""
    cnx = RfamDB.connect()
    cursor = cnx.cursor(buffered=True)
    cursor.execute(query % rfam_acc)
    tax_ids = [x[0] for x in cursor.fetchall()]
    cursor.close()
    cnx.close()
    return tax_ids
def fetch_family_tax_ids ( rfam_acc ) : query = """select distinct ncbi_id
    from family_ncbi
    where rfam_acc=\'%s\'""" cnx = RfamDB . connect ( ) cursor = cnx . cursor ( buffered = True ) cursor . execute ( query % rfam_acc ) tax_ids = [ x [ 0 ] for x in cursor . fetchall ( ) ] cursor . close ( ) cnx . close ( ) return tax_ids
Queries RfamLive and extracts all family taxonomy ids
rfam_acc: A valid Rfam family accession
Queries RfamLive and extracts all family taxonomy ids rfam_acc : A valid Rfam family accession
"""
    Queries RfamLive and extracts all family taxonomy ids

    rfam_acc: A valid Rfam family accession

    return: A list of taxonomic ids associated with a specific Rfam family
    """
rfam_acc