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

    param clan_acc: A valid Rfam clan accession

    returns: A list with all pdb regions per clan
    """

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

    clan_pdb_region_query = ("select pfr.rfam_acc, concat(pfr.pdb_id,'_',pfr.chain) as seq_acc, "
       "pfr.pdb_start, pfr.pdb_end, pfr.bit_score, pfr.evalue_score "
       "from pdb_full_region pfr, clan_membership cm "
       "where cm.rfam_acc=pfr.rfam_acc "
       "and cm.clan_acc=\'%s\' "
       "order by seq_acc")

    clan_cursor.execute(clan_pdb_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 pdb regions per clan
    
Fetches all regions per clan
param clan_acc: A valid Rfam clan accession

A list with all pdb regions per clan
Fetches all regions per clan param clan_acc : A valid Rfam clan accession A list with all pdb regions per clan
def fetch_clan_pdb_full_region_records(clan_acc):
    cnx = RfamDB.connect()
    clan_cursor = cnx.cursor(buffered=True)
    clan_pdb_region_query = ("select pfr.rfam_acc, concat(pfr.pdb_id,'_',pfr.chain) as seq_acc, "
       "pfr.pdb_start, pfr.pdb_end, pfr.bit_score, pfr.evalue_score "
       "from pdb_full_region pfr, clan_membership cm "
       "where cm.rfam_acc=pfr.rfam_acc "
       "and cm.clan_acc=\'%s\' "
       "order by seq_acc")
    clan_cursor.execute(clan_pdb_region_query % clan_acc)
    clan_sequence_regions = clan_cursor.fetchall()
    clan_cursor.close()
    RfamDB.disconnect(cnx)
    return clan_sequence_regions
def fetch_clan_pdb_full_region_records ( clan_acc ) : cnx = RfamDB . connect ( ) clan_cursor = cnx . cursor ( buffered = True ) clan_pdb_region_query = ( "select pfr.rfam_acc, concat(pfr.pdb_id,'_',pfr.chain) as seq_acc, " "pfr.pdb_start, pfr.pdb_end, pfr.bit_score, pfr.evalue_score " "from pdb_full_region pfr, clan_membership cm " "where cm.rfam_acc=pfr.rfam_acc " "and cm.clan_acc=\'%s\' " "order by seq_acc" ) clan_cursor . execute ( clan_pdb_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 pdb regions per clan
    """
clan_acc