pub unsafe extern "C" fn tsk_table_collection_check_integrity(
    self_: *const tsk_table_collection_t,
    options: tsk_flags_t
) -> tsk_id_t
Expand description

@brief Runs integrity checks on this table collection.

@rst

Checks the integrity of this table collection. The default checks (i.e., with options = 0) guarantee the integrity of memory and entity references within the table collection. All positions along the genome are checked to see if they are finite values and within the required bounds. Time values are checked to see if they are finite or marked as unknown. Consistency of the direction of inheritance is also checked: whether parents are more recent than children, mutations are not more recent than their nodes or their mutation parents, etcetera.

To check if a set of tables fulfills the :ref:requirements <sec_valid_tree_sequence_requirements> needed for a valid tree sequence, use the :c:macro:TSK_CHECK_TREES option. When this method is called with :c:macro:TSK_CHECK_TREES, the number of trees in the tree sequence is returned. Thus, to check for errors client code should verify that the return value is less than zero. All other options will return zero on success and a negative value on failure.

More fine-grained checks can be achieved using bitwise combinations of the other options.

Options**:

Options can be specified by providing one or more of the following bitwise flags:

  • :c:macro:TSK_CHECK_EDGE_ORDERING
  • :c:macro:TSK_CHECK_SITE_ORDERING
  • :c:macro:TSK_CHECK_SITE_DUPLICATES
  • :c:macro:TSK_CHECK_MUTATION_ORDERING
  • :c:macro:TSK_CHECK_INDIVIDUAL_ORDERING
  • :c:macro:TSK_CHECK_MIGRATION_ORDERING
  • :c:macro:TSK_CHECK_INDEXES
  • :c:macro:TSK_CHECK_TREES
  • :c:macro:TSK_NO_CHECK_POPULATION_REFS @endrst

@param self A pointer to a tsk_table_collection_t object. @param options Bitwise options. @return Return a negative error value on if any problems are detected in the tree sequence. If the TSK_CHECK_TREES option is provided, the number of trees in the tree sequence will be returned, on success.