cdmbi / PCM

PCM workflow
GNU General Public License v2.0
1 stars 4 forks source link

Error when using Combine_Ligand_Protein() function #4

Open sawsimeon opened 9 years ago

sawsimeon commented 9 years ago

Hi,

Recieved the following error when using the function

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-100-f557f3320197> in <module>()
      2                                         header_ligand = compound_descriptors,
      3                                         protein = protein,
----> 4                                         header_protein = protein_descriptors)

<ipython-input-99-80e544229008> in cross_terms_ligand_protein(ligand, header_ligand, protein, header_protein)
      8         for jj in range(Cp):
      9             H_lp.append(header_ligand[j]+'*'+header_protein[jj])
---> 10             cross = np.multiply(ligand[:,j], protein[:, jj])
     11             Cross_lp = np.append(Cross_lp, np.reshape(cross, (ligand.shape[0],1)),
     12                                 axis = 1)

C:\Users\Saw\Anaconda\envs\py33\lib\site-packages\pandas\core\frame.py in __getitem__(self, key)
   1778             return self._getitem_multilevel(key)
   1779         else:
-> 1780             return self._getitem_column(key)
   1781 
   1782     def _getitem_column(self, key):

C:\Users\Saw\Anaconda\envs\py33\lib\site-packages\pandas\core\frame.py in _getitem_column(self, key)
   1785         # get column
   1786         if self.columns.is_unique:
-> 1787             return self._get_item_cache(key)
   1788 
   1789         # duplicate columns & possible reduce dimensionaility

C:\Users\Saw\Anaconda\envs\py33\lib\site-packages\pandas\core\generic.py in _get_item_cache(self, item)
   1064         """ return the cached item, item represents a label indexer """
   1065         cache = self._item_cache
-> 1066         res = cache.get(item)
   1067         if res is None:
   1068             values = self._data.get(item)

TypeError: unhashable type: 'slice'

For notebook viewer.