@@ -3455,6 +3455,24 @@ def __getstate__(self):
34553455
34563456 @classmethod
34573457 def load (cls , file_or_path , * , skip_tables = False , skip_reference_sequence = False ):
3458+ """
3459+ Load a :class:`TableCollection` from a file or path, saved in the format defined
3460+ by :meth:`.dump`. Although the file must be in the correct format, unlike
3461+ :func:`tskit.load` further validation is not performed to check that the tables
3462+ meet the :ref:`sec_valid_tree_sequence_requirements`. For instance,
3463+ unsorted tables can be loaded without error and then sorted before
3464+ :meth:`creating <TableCollection.tree_sequence>` a :class:`TreeSequence`.
3465+
3466+ :param file_or_path: The file object or path from which to load the
3467+ TableCollection.
3468+ :param bool skip_tables: If True, no tables are read from the file and
3469+ only the top-level information is populated in the returned TableCollection.
3470+ :param bool skip_reference_sequence: If True, tables are read
3471+ without loading any reference sequence.
3472+ :return: A TableCollection instance
3473+ :rtype: TableCollection
3474+ :raises: **tskit.FileFormatError** -- If the file is not in a valid format.
3475+ """
34583476 file , local_file = util .convert_file_like_to_open_file (file_or_path , "rb" )
34593477 ll_tc = _tskit .TableCollection ()
34603478 try :
@@ -3474,7 +3492,8 @@ def dump(self, file_or_path):
34743492 """
34753493 Writes the table collection to the specified path or file object.
34763494
3477- :param str file_or_path: The file object or path to write the TreeSequence to.
3495+ :param str file_or_path: The file object or path to which to write this
3496+ TableCollection.
34783497 """
34793498 file , local_file = util .convert_file_like_to_open_file (file_or_path , "wb" )
34803499 try :
0 commit comments