abakan/ProDy — Issue #103: alignment error
Author: gchen402
Created: 2012-03-07 17:31:47+00:00
State: open

I'm trying to compare a set of structures and would like to align them with respect to a restricted region only, thus uses the command:

ref_structure = ref_structure.copy('resnum 170 to 188 195 to 213 and calpha')

However, during generation of my ensemble, I get the following error message.

In [764]: for pdbfile in filelist:
.....: structure = parsePDB(pdbfile, subset='calpha')
.....: mappings = mapOntoChain(structure, ref_chain)
.....: atommap = mappings[0][0]
.....: ensemble.addCoordset(atommap, weights=atommap.getMappedFlags())
.....:
@> 193 atoms and 1 coordinate set(s) were parsed in 0.01s.
@> Evaluating "AtomGroup 1t56_ca": 1 chains are identified
@> Trying to map atoms based on residue numbers and identities:
@> Comparing Chain A from 1t56_ca (len=193) with Chain A from ethr reference:
@>	Failed to match chains based on residue numbers (seqid=100%, cover=19%).
@> Trying to map atoms based on global sequence alignment:
@> Comparing Chain A from 1t56_ca (len=193) with Chain A from ethr reference:
@>	Failed to match chains (seqid=100%, cover=19%).
---------------------------------------------------------------------------
IndexError Traceback (most recent call last)

/home/gc402/Project/prody/ethr/pdbfiles/ in ()

IndexError: list index out of range

If I replace " structure = parsePDB(pdbfile, subset='calpha')" with " structure = parsePDB(pdbfile, subset='resnum 170 to 188 195 to 213 and calpha')" I get a different error message:
In [762]: for pdbfile in filelist:
.....: structure = parsePDB(pdbfile, subset='resnum 170 to 188 195 to 213 and calpha')
.....: mappings = mapOntoChain(structure, ref_chain)
.....: atommap = mappings[0][0]
.....: ensemble.addCoordset(atommap, weights=atommap.getMappedFlags())
.....:
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)

/home/gc402/Project/prody/ethr/pdbfiles/ in ()

/usr/local/lib/python2.6/dist-packages/ProDy-0.9.4-py2.6-linux-i686.egg/prody/proteins.pyc in parsePDB(pdb, **kwargs)
707 kwargs['title'] = title
708 pdb = openFile(pdb)
--> 709 result = parsePDBStream(pdb, **kwargs)
710 pdb.close()
711 return result

/usr/local/lib/python2.6/dist-packages/ProDy-0.9.4-py2.6-linux-i686.egg/prody/proteins.pyc in parsePDBStream(stream, **kwargs)
739 raise TypeError('subset must be a string')
740 elif subset.lower() not in _PDBSubsets:
--> 741 raise ValueError('"{0:s}" is not a valid subset'.format(subset))
742 title_suffix = '_' + _PDBSubsets[subset]
743 if chain is not None:

ValueError: "resnum 170 to 188 195 to 213 and calpha" is not a valid subset

it would be much appreciated if you could point me to any changes I should make.

many thanks,
Gengshi