utils/db_utils.py
def fetch_clan_full_region_records(clan_acc):
    """
    Fetches all regions per clan

    param clan_acc: A valid Rfam clan accession

    returns: A list with all regions from full_region table for a specific  clan
    """

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

    clan_region_query = ("SELECT * FROM full_region\n"
       "JOIN (SELECT rfam_acc FROM clan_membership WHERE clan_acc=\'%s\') as CLAN_FAMS\n"
                         "ON CLAN_FAMS.rfam_acc=full_region.rfam_acc")  # % (clan_acc)

    clan_cursor.execute(clan_region_query % clan_acc)

    clan_sequence_regions = clan_cursor.fetchall()

    clan_cursor.close()
    RfamDB.disconnect(cnx)

    return clan_sequence_regions

    Fetches all regions per clan

    param clan_acc: A valid Rfam clan accession

    returns: A list with all regions from full_region table for a specific  clan
    
Fetches all regions per clan
param clan_acc: A valid Rfam clan accession

A list with all regions from full_region table for a specific  clan
Fetches all regions per clan param clan_acc : A valid Rfam clan accession A list with all regions from full_region table for a specific clan
def fetch_clan_full_region_records(clan_acc):
    cnx = RfamDB.connect()
    clan_cursor = cnx.cursor(buffered=True)
    clan_region_query = ("SELECT * FROM full_region\n"
       "JOIN (SELECT rfam_acc FROM clan_membership WHERE clan_acc=\'%s\') as CLAN_FAMS\n"
                         "ON CLAN_FAMS.rfam_acc=full_region.rfam_acc")  
    clan_cursor.execute(clan_region_query % clan_acc)
    clan_sequence_regions = clan_cursor.fetchall()
    clan_cursor.close()
    RfamDB.disconnect(cnx)
    return clan_sequence_regions
def fetch_clan_full_region_records ( clan_acc ) : cnx = RfamDB . connect ( ) clan_cursor = cnx . cursor ( buffered = True ) clan_region_query = ( "SELECT * FROM full_region\n" "JOIN (SELECT rfam_acc FROM clan_membership WHERE clan_acc=\'%s\') as CLAN_FAMS\n" "ON CLAN_FAMS.rfam_acc=full_region.rfam_acc" ) clan_cursor . execute ( clan_region_query % clan_acc ) clan_sequence_regions = clan_cursor . fetchall ( ) clan_cursor . close ( ) RfamDB . disconnect ( cnx ) return clan_sequence_regions
Fetches all regions per clan
param clan_acc: A valid Rfam clan accession
Fetches all regions per clan param clan_acc : A valid Rfam clan accession
"""
    Fetches all regions per clan

    param clan_acc: A valid Rfam clan accession

    returns: A list with all regions from full_region table for a specific  clan
    """ # % (clan_acc)
clan_acc