@classmethod
def from_bg_file(cls, bg_file):
    """
        Load a BulgeGraph from a file containing a text-based representation.

        :param bg_file: The filename.
        :return: A bulge Graph.
        """
    with open(bg_file, 'r') as f:
        bg_string = f.read()
    return cls.from_bg_string(bg_string)
