SBRG / ssbio

A Python framework for structural systems biology
http://ssbio.readthedocs.io/en/latest/
MIT License
104 stars 28 forks source link

tmscore issue #46

Open bkellman opened 6 years ago

bkellman commented 6 years ago

https://github.com/SBRG/ssbio/blob/6f41652f716681a64f2f57aa3cc47eb1953e4ae4/docs/notebooks/FATCAT%20-%20Structure%20Similarity.ipynb#L72

When I try to run parse_fatcat I get an error:

---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
<ipython-input-4-a327e7af1a57> in <module>()
----> 1 fatcat.parse_fatcat(fatcat_outfile)

/home/ben/anaconda2/lib/python2.7/site-packages/ssbio/protein/structure/properties/fatcat.pyc in parse_fatcat(fatcat_xml)
     96     # Find the tmScore of the alignment
     97     if soup.find('block'):
---> 98         fatcat_results['tm_score'] = float(soup.find('afpchain')['tmscore'])
     99 
    100     return fatcat_results

/home/ben/anaconda2/lib/python2.7/site-packages/bs4/element.pyc in __getitem__(self, key)
    995         """tag[key] returns the value of the 'key' attribute for the tag,
    996         and throws an exception if it's not there."""
--> 997         return self.attrs[key]
    998 
    999     def __iter__(self):

KeyError: 'tmscore'

There seems to be an issue with the tm_score or tmscore key

nmih commented 6 years ago

Since the public version of FATCAT doesn't have tmscores, I'll have to change that to parse another similarity score