localpdb/plugins/PDBClustering.py
def parse_cluster_data(fn):
    """
    Parse PDB protein sequences clustering data available from the RCSB website
    @param fn: filename with clustering data
    @return: dictionary with pdb_chain as keys and cluster number (integer)
    """
    f = open(fn, 'r')
    data = [line.rstrip() for line in f.readlines()]
    f.close()
    cluster_data = {}
    for c in range(1, len(data)+1):
        for entry in data[c-1].split(' '):
            pdb, chain = entry.split('_')
            cluster_data['{}_{}'.format(pdb.lower(), chain)] = str(c)
    return cluster_data

    Parse PDB protein sequences clustering data available from the RCSB website
    @param fn: filename with clustering data
    @return: dictionary with pdb_chain as keys and cluster number (integer)
    
Parse PDB protein sequences clustering data available from the RCSB website
Parse PDB protein sequences clustering data available from the RCSB website
def parse_cluster_data(fn):
    f = open(fn, 'r')
    data = [line.rstrip() for line in f.readlines()]
    f.close()
    cluster_data = {}
    for c in range(1, len(data)+1):
        for entry in data[c-1].split(' '):
            pdb, chain = entry.split('_')
            cluster_data['{}_{}'.format(pdb.lower(), chain)] = str(c)
    return cluster_data
def parse_cluster_data ( fn ) : f = open ( fn , 'r' ) data = [ line . rstrip ( ) for line in f . readlines ( ) ] f . close ( ) cluster_data = { } for c in range ( 1 , len ( data ) + 1 ) : for entry in data [ c - 1 ] . split ( ' ' ) : pdb , chain = entry . split ( '_' ) cluster_data [ '{}_{}' . format ( pdb . lower ( ) , chain ) ] = str ( c ) return cluster_data
Parse PDB protein sequences clustering data available from the RCSB website
Parse PDB protein sequences clustering data available from the RCSB website
"""
    Parse PDB protein sequences clustering data available from the RCSB website
    @param fn: filename with clustering data
    @return: dictionary with pdb_chain as keys and cluster number (integer)
    """
dictionary with pdb_chain as keys and cluster number (integer)
dictionary with pdb_chain as keys and cluster number ( integer )
fn
filename with clustering data
filename with clustering data