Closed XuBlack closed 3 years ago
@XuBlack,
Thank you for pointing this out! You are correct that there is a discrepancy between what line 378 describes for the edge features and what line 860 references. Line 860 refers to a deprecated way of storing DGLGraphs for each protein complex (for which the argument use_dgl
would be set to False
). Your issue here on GitHub has reminded me to remove this portion of logic from the repository as it was not ultimately used (see our latest release).
In addition, I have updated the documentation for the function convert_df_to_dgl_graph
to read as follows. My hope is that its behavior is much clearer (and more up-to-date) now.
r""" Transform a given DataFrame of residues into a corresponding DGL graph.
Parameters
----------
df : pandas.DataFrame
input_file : str
knn : int
geo_nbrhd_size : int
self_loops : bool
Returns
-------
:class:`dgl.DGLGraph`
Graph structure, feature tensors for each node and edge.
... node_feats = graph.ndata['f']
... node_coords = graph.ndata['x']
... edge_feats = graph.edata['f']
- ``ndata['f']``: feature tensors of the nodes
Indices:
'node_pos_enc': 0,
'node_geo_feats_start': 1,
'node_geo_feats_end': 7,
'node_dips_plus_feats_start': 7,
'node_dips_plus_feats_end': 113,
- ``ndata['x']:`` Cartesian coordinate tensors of the nodes
- ``edata['f']``: feature tensors of the edges
Indices:
'edge_pos_enc': 0,
'edge_weights': 1,
'edge_dist_feats_start': 2,
'edge_dist_feats_end': 20,
'edge_dir_feats_start': 20,
'edge_dir_feats_end': 23,
'edge_orient_feats_start': 23,
'edge_orient_feats_end': 27,
'edge_amide_angles': 27
- ``edata['src_nbr_e_ids']``: For edge e, integer IDs of incident edges connected to e's source node
- ``edata['dst_nbr_e_ids']``: For edge e, integer IDs of incident edges connected to e's destination node
"""
@XuBlack, If you have any more questions, please feel free to reopen this issue. Thanks.
In
project/utils/deepinteract_utils.py
line 378, the function description aboutconvert_df_to_dgl_graph
says that it will returnedata['w']
andedata['a']
and in line 860edata['w']
andedata['a']
are used, but the functionconvert_df_to_dgl_graph
doesn't generate the two parameters.