diff --git a/hivclustering/mtnetwork.py b/hivclustering/mtnetwork.py index 13e65f5..bdc7d9c 100644 --- a/hivclustering/mtnetwork.py +++ b/hivclustering/mtnetwork.py @@ -2496,6 +2496,11 @@ def test_edge_support(self, sequence_records, cycles, adjacency_set, hy_instance def fit_degree_distribution(self, degree_option=None, hy_instance=None): if hy_instance is None: + try: + import hppy as hy + except ImportError: + raise ImportError( + "Optional dependencies not found. Please install the 'edgefiltering' extras to use this function: pip install hivclustering[edgefiltering]") hy_instance = hy.HyphyInterface() script_path = os.path.realpath(__file__) hbl_path = os.path.join(os.path.dirname(script_path), "data", "HBL", "DegreeDistributions.bf")