Skip to content
This repository has been archived by the owner on Mar 22, 2024. It is now read-only.

onehot encoding for residue type and polarity #21

Merged
merged 8 commits into from
Dec 8, 2020
Merged

onehot encoding for residue type and polarity #21

merged 8 commits into from
Dec 8, 2020

Conversation

manonreau
Copy link
Collaborator

No description provided.

Copy link
Member

@NicoRenaud NicoRenaud left a 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 :)

Comment on lines 36 to 48

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
Copy link
Member

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' ?

Copy link
Member

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)

Comment on lines 55 to 56
pssmA = os.path.join(pssm_path, mol_name+'.A.pssm')
pssmB = os.path.join(pssm_path, mol_name+'.B.pssm')
Copy link
Member

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

Comment on lines +258 to +259
#self.nx.edges[node1, node2]['polarity'] = self._get_edge_polarity(
# node1, node2)
Copy link
Member

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)

Copy link
Member

@NicoRenaud NicoRenaud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good !

@manonreau manonreau merged commit 2ea9114 into master Dec 8, 2020
@manonreau manonreau deleted the onehot branch January 18, 2021 15:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants