-
Notifications
You must be signed in to change notification settings - Fork 32
onehot encoding for residue type and polarity #21
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few things to maybe check, but it might be because I forgot how the code works :)
graphprot/Graph.py
Outdated
|
||
if self.score['irmsd'] < 1.0 : | ||
_class = 1 | ||
elif self.score['irmsd'] < 2.0 : | ||
_class = 2 | ||
elif self.score['irmsd'] < 4.0 : | ||
_class = 3 | ||
elif self.score['irmsd'] < 6.0 : | ||
_class = 4 | ||
else : | ||
_class = 5 | ||
|
||
self.score['class'] = _class |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you need the _class
variable ? why not
if self.score['irmsd'] < 1.0:
self.score['class'] = 1
I also find 'class'
a bit generic. Maybe 'capri_class'
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you could also shorten the code
self.score['class'] = 5
for thr, val in zip([6.0, 4.0, 2.0, 1.0],[4,3,2,1]):
if self.score['irmsd'] <= thr:
self.score['class'] = val
but of course it's a bit less readable ... so up to you :) (plus I don't know if what I propose here works :D)
graphprot/GraphGen.py
Outdated
pssmA = os.path.join(pssm_path, mol_name+'.A.pssm') | ||
pssmB = os.path.join(pssm_path, mol_name+'.B.pssm') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should rename the files we give in example then Or at least check that the example still work
#self.nx.edges[node1, node2]['polarity'] = self._get_edge_polarity( | ||
# node1, node2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so we don't have any edge features ? no polarity and no distance ? (sorry I forgot a bit about the inner workings of the code)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good !
No description provided.