Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Doc] Documentation Confusion #6

Closed
XuBlack opened this issue Nov 1, 2021 · 2 comments
Closed

[Doc] Documentation Confusion #6

XuBlack opened this issue Nov 1, 2021 · 2 comments

Comments

@XuBlack
Copy link

XuBlack commented Nov 1, 2021

In project/utils/deepinteract_utils.py line 378, the function description about convert_df_to_dgl_graph says that it will return edata['w'] and edata['a'] and in line 860 edata['w'] and edata['a'] are used, but the function convert_df_to_dgl_graph doesn't generate the two parameters.

@amorehead
Copy link
Collaborator

amorehead commented Nov 1, 2021

@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
    """

@amorehead amorehead changed the title Bug [Doc] Documentation Confusion Nov 1, 2021
@amorehead
Copy link
Collaborator

@XuBlack,
If you have any more questions, please feel free to reopen this issue.
Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants