Closed dhimmel closed 6 years ago
This PR does two things:
Changes the existing metagraph.extract_metapaths
function to use source
and target
as argument names rather than source_kind
and target_kind
. This function can now take metanodes or metanode_kinds for these args. Unfortunately, this could break existing code which calls these parameters by name. I don't see any code via a GitHub search that specified these arguments by name. Now target can be set to None to get all metapaths starting on source.
Add metagraph.extract_all_metapaths
which gets all metapaths below a certain length. This function has a exclude_inverts
toggle that could help us only calculate values (like path counts) for one orientation of metapaths.
@zietzm care to review?
Refs https://github.com/greenelab/hetmech/issues/76#issuecomment-378698413
Possibly relevant: code in 1-prepare.ipynb from
dhimmel/integrate
.