Module bindings

Source
Expand description

Low-level (“unsafe”) bindings to the C API.

This module is a 1-to-1 mapping of C types and functions for both tskit and kastore. The bindings are generate via bindgen.

Using things from this module will be unsafe. Further, as many of the types require init() methods to correctly set up the structs, one has to coerce rust into allowing uninitialized variables:

use std::mem::MaybeUninit;
let mut edges: MaybeUninit<tskit::bindings::tsk_edge_table_t> = MaybeUninit::uninit();
unsafe {
    let _ = tskit::bindings::tsk_edge_table_init(edges.as_mut_ptr(), 0);
    let _ = tskit::bindings::tsk_edge_table_add_row(edges.as_mut_ptr(), 0., 10., 0, 1, std::ptr::null(), 0);
    assert_eq!((*edges.as_ptr()).num_rows, 1);
    tskit::bindings::tsk_edge_table_free(edges.as_mut_ptr());
}

The best source for documentation will be the tskit docs. Those docs describe the most important parts of the C API. This module contains the same types/functions with the same names.

Structs§

_IO_FILE
_IO_codecvt
_IO_marker
_IO_wide_data
_tsk_avl_node_int_t
_tsk_edge_list_node_t
_tsk_identity_segment_t
_tsk_ls_hmm_t
_tsk_table_sorter_t
@brief Low-level table sorting method.
kaitem_t
kastore_t
@brief A file-backed store of key-array values.
tsk_argsort_t
tsk_avl_tree_int_t
tsk_blkalloc_t
tsk_bookmark_t
@brief A bookmark recording the position of all the tables in a table collection.
tsk_compressed_matrix_t
tsk_diff_iter_t
tsk_edge_list_t
tsk_edge_t
@brief A single edge defined by a row in the edge table.
tsk_edge_table_t
@brief The edge table.
tsk_identity_segment_list_t
tsk_identity_segments_t
tsk_individual_t
@brief A single individual defined by a row in the individual table.
tsk_individual_table_t
@brief The individual table.
tsk_ld_calc_t
tsk_migration_t
@brief A single migration defined by a row in the migration table.
tsk_migration_table_t
@brief The migration table.
tsk_mutation_t
@brief A single mutation defined by a row in the mutation table.
tsk_mutation_table_t
@brief The mutation table.
tsk_node_t
@brief A single node defined by a row in the node table.
tsk_node_table_t
@brief The node table.
tsk_population_t
@brief A single population defined by a row in the population table.
tsk_population_table_t
@brief The population table.
tsk_provenance_t
@brief A single provenance defined by a row in the provenance table.
tsk_provenance_table_t
@brief The provenance table.
tsk_recomb_required_record
tsk_reference_sequence_t
tsk_site_probability_t
tsk_site_t
@brief A single site defined by a row in the site table.
tsk_site_table_t
@brief The site table.
tsk_state_transition_t
tsk_table_collection_t
@brief A collection of tables defining the data for a tree sequence.
tsk_table_collection_t__bindgen_ty_1
tsk_transition_stack_t
tsk_tree_t
@brief A single tree in a tree sequence.
tsk_tree_t__bindgen_ty_1
@brief Left and right coordinates of the genomic interval that this tree covers. The left coordinate is inclusive and the right coordinate exclusive.
tsk_treeseq_t
@brief The tree sequence object.
tsk_value_transition_t
tsk_vargen_t
tsk_variant_t
@brief A variant at a specific site.
tsk_viterbi_matrix_t

Constants§

KAS_ARRAY_ALIGN
KAS_BORROWS_ARRAY
KAS_BUG_ASSERT_MESSAGE
KAS_ERR_BAD_FILE_FORMAT
KAS_ERR_BAD_FLAGS
KAS_ERR_BAD_MODE
KAS_ERR_BAD_TYPE
KAS_ERR_DUPLICATE_KEY
KAS_ERR_EMPTY_KEY
KAS_ERR_EOF
KAS_ERR_GENERIC
KAS_ERR_ILLEGAL_OPERATION
KAS_ERR_IO
KAS_ERR_KEY_NOT_FOUND
KAS_ERR_NO_MEMORY
KAS_ERR_TYPE_MISMATCH
KAS_ERR_VERSION_TOO_NEW
KAS_ERR_VERSION_TOO_OLD
KAS_FILE_VERSION_MAJOR
KAS_FILE_VERSION_MINOR
KAS_FLOAT32
KAS_FLOAT64
KAS_GET_TAKES_OWNERSHIP
KAS_HEADER_SIZE
KAS_INT8
KAS_INT16
KAS_INT32
KAS_INT64
KAS_ITEM_DESCRIPTOR_SIZE
KAS_MAGIC
KAS_NUM_TYPES
KAS_READ
KAS_READ_ALL
KAS_UINT8
KAS_UINT16
KAS_UINT32
KAS_UINT64
KAS_VERSION_MAJOR
KAS_VERSION_MINOR
KAS_VERSION_PATCH
KAS_WRITE
TSK_ALLELES_ACGT
TSK_BUG_ASSERT_MESSAGE
TSK_CHECK_EDGE_ORDERING
TSK_CHECK_INDEXES
TSK_CHECK_INDIVIDUAL_ORDERING
TSK_CHECK_MIGRATION_ORDERING
TSK_CHECK_MUTATION_ORDERING
TSK_CHECK_SITE_DUPLICATES
TSK_CHECK_SITE_ORDERING
TSK_CHECK_TREES
TSK_CLEAR_METADATA_SCHEMAS
TSK_CLEAR_PROVENANCE
TSK_CLEAR_TS_METADATA_AND_SCHEMA
TSK_CMP_IGNORE_METADATA
TSK_CMP_IGNORE_PROVENANCE
TSK_CMP_IGNORE_REFERENCE_SEQUENCE
TSK_CMP_IGNORE_TABLES
TSK_CMP_IGNORE_TIMESTAMPS
TSK_CMP_IGNORE_TS_METADATA
TSK_COPY_FILE_UUID
TSK_DEBUG
TSK_DIR_FORWARD
TSK_DIR_REVERSE
TSK_DUMP_FORCE_OFFSET_64
TSK_ERR_ALLELE_NOT_FOUND
TSK_ERR_BAD_ANCESTRAL_STATE
TSK_ERR_BAD_COLUMN_TYPE
TSK_ERR_BAD_COMPRESSED_MATRIX_NODE
TSK_ERR_BAD_EDGES_CONTRADICTORY_CHILDREN
TSK_ERR_BAD_EDGE_INTERVAL
TSK_ERR_BAD_GENOTYPE
TSK_ERR_BAD_NODE_TIME_ORDERING
TSK_ERR_BAD_NUM_WINDOWS
TSK_ERR_BAD_OFFSET
TSK_ERR_BAD_PARAM_VALUE
TSK_ERR_BAD_RESULT_DIMS
TSK_ERR_BAD_SAMPLES
TSK_ERR_BAD_SAMPLE_SET_INDEX
TSK_ERR_BAD_SEQUENCE_LENGTH
TSK_ERR_BAD_SITE_POSITION
TSK_ERR_BAD_STATE_DIMS
TSK_ERR_BAD_TABLE_POSITION
TSK_ERR_BAD_WINDOWS
TSK_ERR_BOTH_COLUMNS_REQUIRED
TSK_ERR_BUFFER_OVERFLOW
TSK_ERR_CANNOT_EXTEND_FROM_SELF
TSK_ERR_CANT_PROCESS_EDGES_WITH_METADATA
TSK_ERR_CANT_TAKE_OWNERSHIP_NO_EDGE_METADATA
TSK_ERR_COLUMN_OVERFLOW
TSK_ERR_DUPLICATE_EDGES
TSK_ERR_DUPLICATE_SAMPLE
TSK_ERR_DUPLICATE_SITE_POSITION
TSK_ERR_EDGES_NONCONTIGUOUS_PARENTS
TSK_ERR_EDGES_NOT_SORTED_CHILD
TSK_ERR_EDGES_NOT_SORTED_LEFT
TSK_ERR_EDGES_NOT_SORTED_PARENT_TIME
TSK_ERR_EDGE_OUT_OF_BOUNDS
TSK_ERR_EMPTY_SAMPLE_SET
TSK_ERR_EOF
TSK_ERR_FILE_FORMAT
TSK_ERR_FILE_VERSION_TOO_NEW
TSK_ERR_FILE_VERSION_TOO_OLD
TSK_ERR_GENERATE_UUID
TSK_ERR_GENERIC
TSK_ERR_GENOME_COORDS_NONFINITE
TSK_ERR_GENOTYPES_ALL_MISSING
TSK_ERR_IBD_PAIRS_NOT_STORED
TSK_ERR_IBD_SEGMENTS_NOT_STORED
TSK_ERR_INDIVIDUAL_OUT_OF_BOUNDS
TSK_ERR_INDIVIDUAL_PARENT_CYCLE
TSK_ERR_INDIVIDUAL_POPULATION_MISMATCH
TSK_ERR_INDIVIDUAL_SELF_PARENT
TSK_ERR_INDIVIDUAL_TIME_MISMATCH
TSK_ERR_INSUFFICIENT_INDEX_TUPLES
TSK_ERR_INSUFFICIENT_SAMPLE_SETS
TSK_ERR_IO
TSK_ERR_KEEP_UNARY_MUTUALLY_EXCLUSIVE
TSK_ERR_LEFT_LESS_ZERO
TSK_ERR_MATCH_IMPOSSIBLE
TSK_ERR_METADATA_DISABLED
TSK_ERR_MIGRATIONS_NOT_SUPPORTED
TSK_ERR_MIGRATION_OUT_OF_BOUNDS
TSK_ERR_MULTIPLE_ROOTS
TSK_ERR_MULTIPLE_STAT_MODES
TSK_ERR_MUST_IMPUTE_NON_SAMPLES
TSK_ERR_MUTATION_OUT_OF_BOUNDS
TSK_ERR_MUTATION_PARENT_AFTER_CHILD
TSK_ERR_MUTATION_PARENT_DIFFERENT_SITE
TSK_ERR_MUTATION_PARENT_EQUAL
TSK_ERR_MUTATION_PARENT_INCONSISTENT
TSK_ERR_MUTATION_TIME_HAS_BOTH_KNOWN_AND_UNKNOWN
TSK_ERR_MUTATION_TIME_OLDER_THAN_PARENT_MUTATION
TSK_ERR_MUTATION_TIME_OLDER_THAN_PARENT_NODE
TSK_ERR_MUTATION_TIME_YOUNGER_THAN_NODE
TSK_ERR_NODE_OUT_OF_BOUNDS
TSK_ERR_NONBINARY_MUTATIONS_UNSUPPORTED
TSK_ERR_NO_MEMORY
TSK_ERR_NO_SAMPLE_LISTS
TSK_ERR_NULL_CHILD
TSK_ERR_NULL_PARENT
TSK_ERR_NULL_VITERBI_MATRIX
TSK_ERR_ONLY_INFINITE_SITES
TSK_ERR_POPULATION_OUT_OF_BOUNDS
TSK_ERR_PROVENANCE_OUT_OF_BOUNDS
TSK_ERR_REQUIRED_COL_NOT_FOUND
TSK_ERR_RIGHT_GREATER_SEQ_LENGTH
TSK_ERR_SAME_NODES_IN_PAIR
TSK_ERR_SAMPLES_NOT_EQUAL
TSK_ERR_SAMPLE_SIZE_MISMATCH
TSK_ERR_SEEK_OUT_OF_BOUNDS
TSK_ERR_SEQUENCE_LENGTH_MISMATCH
TSK_ERR_SILENT_MUTATIONS_NOT_SUPPORTED
TSK_ERR_SIMPLIFY_MIGRATIONS_NOT_SUPPORTED
TSK_ERR_SITE_OUT_OF_BOUNDS
TSK_ERR_SORT_MIGRATIONS_NOT_SUPPORTED
TSK_ERR_SORT_OFFSET_NOT_SUPPORTED
TSK_ERR_TABLES_BAD_INDEXES
TSK_ERR_TABLES_NOT_INDEXED
TSK_ERR_TABLE_OVERFLOW
TSK_ERR_TIME_NONFINITE
TSK_ERR_TIME_UNCALIBRATED
TSK_ERR_TOO_MANY_ALLELES
TSK_ERR_TOO_MANY_VALUES
TSK_ERR_TREE_OVERFLOW
TSK_ERR_UNARY_NODES
TSK_ERR_UNDEFINED_MULTIROOT
TSK_ERR_UNDEFINED_NONBINARY
TSK_ERR_UNION_BAD_MAP
TSK_ERR_UNION_DIFF_HISTORIES
TSK_ERR_UNSORTED_INDIVIDUALS
TSK_ERR_UNSORTED_MIGRATIONS
TSK_ERR_UNSORTED_MUTATIONS
TSK_ERR_UNSORTED_SITES
TSK_ERR_UNSUPPORTED_OPERATION
TSK_ERR_UNSUPPORTED_STAT_MODE
TSK_ERR_VARIANT_CANT_DECODE_COPY
TSK_ERR_ZERO_ALLELES
TSK_FILE_FORMAT_NAME
TSK_FILE_FORMAT_NAME_LENGTH
TSK_FILE_FORMAT_VERSION_MAJOR
TSK_FILE_FORMAT_VERSION_MINOR
TSK_IBD_STORE_PAIRS
TSK_IBD_STORE_SEGMENTS
TSK_INCLUDE_TERMINAL
TSK_ISOLATED_NOT_MISSING
TSK_KAS_ERR_BIT
TSK_LOAD_SKIP_REFERENCE_SEQUENCE
TSK_LOAD_SKIP_TABLES
TSK_MAX_ID
TSK_MISSING_DATA
TSK_MM_FIXED_ANCESTRAL_STATE
TSK_NEWICK_LEGACY_MS_LABELS
TSK_NODE_IS_SAMPLE
TSK_NO_CHECK_INTEGRITY
TSK_NO_CHECK_POPULATION_REFS
TSK_NO_INIT
TSK_NO_SAMPLE_COUNTS
TSK_SAMPLE_LISTS
TSK_SIMPLIFY_FILTER_INDIVIDUALS
TSK_SIMPLIFY_FILTER_POPULATIONS
TSK_SIMPLIFY_FILTER_SITES
TSK_SIMPLIFY_KEEP_INPUT_ROOTS
TSK_SIMPLIFY_KEEP_UNARY
TSK_SIMPLIFY_KEEP_UNARY_IN_INDIVIDUALS
TSK_SIMPLIFY_REDUCE_TO_SITE_TOPOLOGY
TSK_STAT_ALLOW_TIME_UNCALIBRATED
TSK_STAT_BRANCH
TSK_STAT_NODE
TSK_STAT_POLARISED
TSK_STAT_SITE
TSK_STAT_SPAN_NORMALISE
TSK_SUBSET_KEEP_UNREFERENCED
TSK_SUBSET_NO_CHANGE_POPULATIONS
TSK_TABLE_NO_METADATA
TSK_TAKE_OWNERSHIP
TSK_TC_NO_EDGE_METADATA
TSK_TIME_UNITS_UNCALIBRATED
TSK_TIME_UNITS_UNKNOWN
TSK_TREE_OK
TSK_TS_INIT_BUILD_INDEXES
TSK_UNION_NO_ADD_POP
TSK_UNION_NO_CHECK_SHARED
TSK_UNKNOWN_TIME_HEX
TSK_UUID_SIZE
TSK_VERSION_MAJOR
TSK_VERSION_MINOR
TSK_VERSION_PATCH

Functions§

kastore_close
@brief Close an opened store, freeing all resources.
kastore_contains
@brief Return 1 if the store contains the specified key and 0 if it does not.
kastore_containss
@brief Return 1 if the store contains the specified NULL terminated key and 0 if it does not.
kastore_get
@brief Get the array for the specified key.
kastore_gets
@brief Get the array for the specified NULL-terminated key.
kastore_gets_float32
kastore_gets_float64
kastore_gets_int8
@defgroup TYPED_GETS_GROUP Typed get functions. @{
kastore_gets_int16
kastore_gets_int32
kastore_gets_int64
kastore_gets_uint8
kastore_gets_uint16
kastore_gets_uint32
kastore_gets_uint64
kastore_open
@brief Open a store from a given file in read (“r”), write (“w”) or append (“a”) mode.
kastore_openf
@brief Open a store from a given FILE pointer.
kastore_oput
@brief Insert the specified key-array pair into the store, transferring ownership of the malloced array buffer to the store (own-put).
kastore_oputs
@brief Insert the specified NULL terminated key and array pair into the store, transferring ownership of the malloced array buffer to the store (own-put).
kastore_oputs_float32
kastore_oputs_float64
kastore_oputs_int8
@defgroup TYPED_OPUTS_GROUP Typed own-and-put functions. @{
kastore_oputs_int16
kastore_oputs_int32
kastore_oputs_int64
kastore_oputs_uint8
kastore_oputs_uint16
kastore_oputs_uint32
kastore_oputs_uint64
kastore_print_state
@}
kastore_put
@brief Insert the specified key-array pair into the store.
kastore_puts
@brief Insert the specified NULL terminated key and array pair into the store.
kastore_puts_float32
kastore_puts_float64
kastore_puts_int8
@defgroup TYPED_PUTS_GROUP Typed put functions. @{
kastore_puts_int16
kastore_puts_int32
kastore_puts_int64
kastore_puts_uint8
kastore_puts_uint16
kastore_puts_uint32
kastore_puts_uint64
tsk_avl_tree_int_free
tsk_avl_tree_int_get_root
tsk_avl_tree_int_init
tsk_avl_tree_int_insert
tsk_avl_tree_int_ordered_nodes
tsk_avl_tree_int_print_state
tsk_avl_tree_int_search
tsk_blkalloc_free
tsk_blkalloc_get
tsk_blkalloc_init
tsk_blkalloc_print_state
tsk_blkalloc_reset
tsk_calloc
tsk_compressed_matrix_clear
tsk_compressed_matrix_decode
tsk_compressed_matrix_free
tsk_compressed_matrix_init
tsk_compressed_matrix_print_state
tsk_compressed_matrix_store_site
tsk_convert_newick
tsk_diff_iter_free
tsk_diff_iter_init
tsk_diff_iter_next
tsk_diff_iter_print_state
tsk_edge_table_add_row
@brief Adds a row to this edge table.
tsk_edge_table_append_columns
@brief Extends this table by copying from a set of column arrays
tsk_edge_table_clear
@brief Clears this table, setting the number of rows to zero.
tsk_edge_table_copy
@brief Copies the state of this table into the specified destination.
tsk_edge_table_dump_text
@}
tsk_edge_table_equals
@brief Returns true if the data in the specified table is identical to the data in this table.
tsk_edge_table_extend
@brief Extends this table by appending rows copied from another table.
tsk_edge_table_free
@brief Free the internal memory for the specified table.
tsk_edge_table_get_row
@brief Get the row at the specified index.
tsk_edge_table_init
@brief Initialises the table by allocating the internal memory.
tsk_edge_table_print_state
@brief Print out the state of this table to the specified stream.
tsk_edge_table_set_columns
@brief Replace this table’s data by copying from a set of column arrays
tsk_edge_table_set_max_metadata_length_increment
@brief Controls the pre-allocation strategy for the metadata column
tsk_edge_table_set_max_rows_increment
@brief Controls the pre-allocation strategy for this table
tsk_edge_table_set_metadata_schema
@brief Set the metadata schema @rst Copies the metadata schema string to this table, replacing any existing. @endrst @param self A pointer to a tsk_edge_table_t object. @param metadata_schema A pointer to a char array @param metadata_schema_length The size of the metadata schema in bytes. @return Return 0 on success or a negative value on failure.
tsk_edge_table_squash
@brief Squash adjacent edges in-place
tsk_edge_table_takeset_columns
tsk_edge_table_truncate
@brief Truncates this table so that only the first num_rows are retained.
tsk_edge_table_update_row
@brief Updates the row at the specified index.
tsk_generate_uuid
tsk_get_debug_stream
tsk_get_kas_error
tsk_identity_segments_free
tsk_identity_segments_get
tsk_identity_segments_get_items
tsk_identity_segments_get_keys
tsk_identity_segments_get_num_pairs
tsk_identity_segments_get_num_segments
tsk_identity_segments_get_total_span
tsk_identity_segments_print_state
tsk_individual_table_add_row
@brief Adds a row to this individual table.
tsk_individual_table_append_columns
@brief Extends this table by copying from a set of column arrays
tsk_individual_table_clear
@brief Clears this table, setting the number of rows to zero.
tsk_individual_table_copy
@brief Copies the state of this table into the specified destination.
tsk_individual_table_dump_text
@}
tsk_individual_table_equals
@brief Returns true if the data in the specified table is identical to the data in this table.
tsk_individual_table_extend
@brief Extends this table by appending rows copied from another table.
tsk_individual_table_free
@brief Free the internal memory for the specified table.
tsk_individual_table_get_row
@brief Get the row at the specified index.
tsk_individual_table_init
@brief Initialises the table by allocating the internal memory.
tsk_individual_table_print_state
@brief Print out the state of this table to the specified stream.
tsk_individual_table_set_columns
@brief Replace this table’s data by copying from a set of column arrays
tsk_individual_table_set_max_location_length_increment
@brief Controls the pre-allocation strategy for the location column
tsk_individual_table_set_max_metadata_length_increment
@brief Controls the pre-allocation strategy for the metadata column
tsk_individual_table_set_max_parents_length_increment
@brief Controls the pre-allocation strategy for the parents column
tsk_individual_table_set_max_rows_increment
@brief Controls the pre-allocation strategy for this table
tsk_individual_table_set_metadata_schema
@brief Set the metadata schema
tsk_individual_table_takeset_columns
tsk_individual_table_truncate
@brief Truncates this table so that only the first num_rows are retained.
tsk_individual_table_update_row
@brief Updates the row at the specified index.
tsk_is_kas_error
tsk_is_unknown_time
@brief Check if a number is TSK_UNKNOWN_TIME
tsk_isfinite
tsk_isnan
tsk_ld_calc_free
tsk_ld_calc_get_r2
tsk_ld_calc_get_r2_array
tsk_ld_calc_init
tsk_ld_calc_print_state
tsk_ls_hmm_forward
tsk_ls_hmm_free
tsk_ls_hmm_init
tsk_ls_hmm_print_state
tsk_ls_hmm_run
tsk_ls_hmm_set_precision
tsk_ls_hmm_viterbi
tsk_malloc
tsk_memcmp
tsk_memcpy
tsk_memmove
tsk_memset
tsk_migration_table_add_row
@brief Adds a row to this migration table.
tsk_migration_table_append_columns
@brief Extends this table by copying from a set of column arrays
tsk_migration_table_clear
@brief Clears this table, setting the number of rows to zero.
tsk_migration_table_copy
@brief Copies the state of this table into the specified destination.
tsk_migration_table_dump_text
@}
tsk_migration_table_equals
@brief Returns true if the data in the specified table is identical to the data in this table.
tsk_migration_table_extend
@brief Extends this table by appending rows copied from another table.
tsk_migration_table_free
@brief Free the internal memory for the specified table.
tsk_migration_table_get_row
@brief Get the row at the specified index.
tsk_migration_table_init
@brief Initialises the table by allocating the internal memory.
tsk_migration_table_print_state
@brief Print out the state of this table to the specified stream.
tsk_migration_table_set_columns
@brief Replace this table’s data by copying from a set of column arrays
tsk_migration_table_set_max_metadata_length_increment
@brief Controls the pre-allocation strategy for the metadata column
tsk_migration_table_set_max_rows_increment
@brief Controls the pre-allocation strategy for this table
tsk_migration_table_set_metadata_schema
@brief Set the metadata schema @rst Copies the metadata schema string to this table, replacing any existing. @endrst @param self A pointer to a tsk_migration_table_t object. @param metadata_schema A pointer to a char array. @param metadata_schema_length The size of the metadata schema in bytes. @return Return 0 on success or a negative value on failure.
tsk_migration_table_takeset_columns
tsk_migration_table_truncate
@brief Truncates this table so that only the first num_rows are retained.
tsk_migration_table_update_row
@brief Updates the row at the specified index.
tsk_mutation_table_add_row
@brief Adds a row to this mutation table.
tsk_mutation_table_append_columns
@brief Extends this table by copying from a set of column arrays
tsk_mutation_table_clear
@brief Clears this table, setting the number of rows to zero.
tsk_mutation_table_copy
@brief Copies the state of this table into the specified destination.
tsk_mutation_table_dump_text
@}
tsk_mutation_table_equals
@brief Returns true if the data in the specified table is identical to the data in this table.
tsk_mutation_table_extend
@brief Extends this table by appending rows copied from another table.
tsk_mutation_table_free
@brief Free the internal memory for the specified table.
tsk_mutation_table_get_row
@brief Get the row at the specified index.
tsk_mutation_table_init
@brief Initialises the table by allocating the internal memory.
tsk_mutation_table_print_state
@brief Print out the state of this table to the specified stream.
tsk_mutation_table_set_columns
@brief Replace this table’s data by copying from a set of column arrays
tsk_mutation_table_set_max_derived_state_length_increment
@brief Controls the pre-allocation strategy for the derived_state column
tsk_mutation_table_set_max_metadata_length_increment
@brief Controls the pre-allocation strategy for the metadata column
tsk_mutation_table_set_max_rows_increment
@brief Controls the pre-allocation strategy for this table
tsk_mutation_table_set_metadata_schema
@brief Set the metadata schema @rst Copies the metadata schema string to this table, replacing any existing. @endrst @param self A pointer to a tsk_mutation_table_t object. @param metadata_schema A pointer to a char array. @param metadata_schema_length The size of the metadata schema in bytes. @return Return 0 on success or a negative value on failure.
tsk_mutation_table_takeset_columns
tsk_mutation_table_truncate
@brief Truncates this table so that only the first num_rows are retained.
tsk_mutation_table_update_row
@brief Updates the row at the specified index.
tsk_node_table_add_row
@brief Adds a row to this node table.
tsk_node_table_append_columns
@brief Extends this table by copying from a set of column arrays
tsk_node_table_clear
@brief Clears this table, setting the number of rows to zero.
tsk_node_table_copy
@brief Copies the state of this table into the specified destination.
tsk_node_table_dump_text
@}
tsk_node_table_equals
@brief Returns true if the data in the specified table is identical to the data in this table.
tsk_node_table_extend
@brief Extends this table by appending rows copied from another table.
tsk_node_table_free
@brief Free the internal memory for the specified table.
tsk_node_table_get_row
@brief Get the row at the specified index.
tsk_node_table_init
@brief Initialises the table by allocating the internal memory.
tsk_node_table_print_state
@brief Print out the state of this table to the specified stream.
tsk_node_table_set_columns
@brief Replace this table’s data by copying from a set of column arrays
tsk_node_table_set_max_metadata_length_increment
@brief Controls the pre-allocation strategy for the metadata column
tsk_node_table_set_max_rows_increment
@brief Controls the pre-allocation strategy for this table
tsk_node_table_set_metadata_schema
@brief Set the metadata schema @rst Copies the metadata schema string to this table, replacing any existing. @endrst @param self A pointer to a tsk_node_table_t object. @param metadata_schema A pointer to a char array. @param metadata_schema_length The size of the metadata schema in bytes. @return Return 0 on success or a negative value on failure.
tsk_node_table_takeset_columns
tsk_node_table_truncate
@brief Truncates this table so that only the first num_rows are retained.
tsk_node_table_update_row
@brief Updates the row at the specified index.
tsk_population_table_add_row
@brief Adds a row to this population table.
tsk_population_table_append_columns
@brief Extends this table by copying from a set of column arrays
tsk_population_table_clear
@brief Clears this table, setting the number of rows to zero.
tsk_population_table_copy
@brief Copies the state of this table into the specified destination.
tsk_population_table_dump_text
@}
tsk_population_table_equals
@brief Returns true if the data in the specified table is identical to the data in this table.
tsk_population_table_extend
@brief Extends this table by appending rows copied from another table.
tsk_population_table_free
@brief Free the internal memory for the specified table.
tsk_population_table_get_row
@brief Get the row at the specified index.
tsk_population_table_init
@brief Initialises the table by allocating the internal memory.
tsk_population_table_print_state
@brief Print out the state of this table to the specified stream.
tsk_population_table_set_columns
@brief Replace this table’s data by copying from a set of column arrays
tsk_population_table_set_max_metadata_length_increment
@brief Controls the pre-allocation strategy for the metadata column
tsk_population_table_set_max_rows_increment
@brief Controls the pre-allocation strategy for this table
tsk_population_table_set_metadata_schema
@brief Set the metadata schema @rst Copies the metadata schema string to this table, replacing any existing. @endrst @param self A pointer to a tsk_population_table_t object. @param metadata_schema A pointer to a char array. @param metadata_schema_length The size of the metadata schema in bytes. @return Return 0 on success or a negative value on failure.
tsk_population_table_takeset_columns
tsk_population_table_truncate
@brief Truncates this table so that only the first num_rows are retained.
tsk_population_table_update_row
@brief Updates the row at the specified index.
tsk_provenance_table_add_row
@brief Adds a row to this provenance table.
tsk_provenance_table_append_columns
@brief Extends this table by copying from a set of column arrays
tsk_provenance_table_clear
@brief Clears this table, setting the number of rows to zero.
tsk_provenance_table_copy
@brief Copies the state of this table into the specified destination.
tsk_provenance_table_dump_text
@}
tsk_provenance_table_equals
@brief Returns true if the data in the specified table is identical to the data in this table.
tsk_provenance_table_extend
@brief Extends this table by appending rows copied from another table.
tsk_provenance_table_free
@brief Free the internal memory for the specified table.
tsk_provenance_table_get_row
@brief Get the row at the specified index.
tsk_provenance_table_init
@brief Initialises the table by allocating the internal memory.
tsk_provenance_table_print_state
@brief Print out the state of this table to the specified stream.
tsk_provenance_table_set_columns
@brief Replace this table’s data by copying from a set of column arrays
tsk_provenance_table_set_max_record_length_increment
@brief Controls the pre-allocation strategy for the record column
tsk_provenance_table_set_max_rows_increment
@brief Controls the pre-allocation strategy for this table
tsk_provenance_table_set_max_timestamp_length_increment
@brief Controls the pre-allocation strategy for the timestamp column
tsk_provenance_table_takeset_columns
tsk_provenance_table_truncate
@brief Truncates this table so that only the first num_rows are retained.
tsk_provenance_table_update_row
@brief Updates the row at the specified index.
tsk_realloc
tsk_reference_sequence_copy
tsk_reference_sequence_equals
tsk_reference_sequence_free
tsk_reference_sequence_init
tsk_reference_sequence_is_null
tsk_reference_sequence_set_data
tsk_reference_sequence_set_metadata
tsk_reference_sequence_set_metadata_schema
tsk_reference_sequence_set_url
tsk_reference_sequence_takeset_data
tsk_reference_sequence_takeset_metadata
tsk_round
tsk_search_sorted
tsk_set_debug_stream
tsk_set_kas_error
tsk_site_table_add_row
@brief Adds a row to this site table.
tsk_site_table_append_columns
@brief Extends this table by copying from a set of column arrays
tsk_site_table_clear
@brief Clears this table, setting the number of rows to zero.
tsk_site_table_copy
@brief Copies the state of this table into the specified destination.
tsk_site_table_dump_text
@}
tsk_site_table_equals
@brief Returns true if the data in the specified table is identical to the data in this table.
tsk_site_table_extend
@brief Extends this table by appending rows copied from another table.
tsk_site_table_free
@brief Free the internal memory for the specified table.
tsk_site_table_get_row
@brief Get the row at the specified index.
tsk_site_table_init
@brief Initialises the table by allocating the internal memory.
tsk_site_table_print_state
@brief Print out the state of this table to the specified stream.
tsk_site_table_set_columns
@brief Replace this table’s data by copying from a set of column arrays
tsk_site_table_set_max_ancestral_state_length_increment
@brief Controls the pre-allocation strategy for the ancestral_state column
tsk_site_table_set_max_metadata_length_increment
@brief Controls the pre-allocation strategy for the metadata column
tsk_site_table_set_max_rows_increment
@brief Controls the pre-allocation strategy for this table
tsk_site_table_set_metadata_schema
@brief Set the metadata schema @rst Copies the metadata schema string to this table, replacing any existing. @endrst @param self A pointer to a tsk_site_table_t object. @param metadata_schema A pointer to a char array. @param metadata_schema_length The size of the metadata schema in bytes. @return Return 0 on success or a negative value on failure.
tsk_site_table_takeset_columns
tsk_site_table_truncate
@brief Truncates this table so that only the first num_rows are retained.
tsk_site_table_update_row
@brief Updates the row at the specified index.
tsk_squash_edges
@}
tsk_strerror
@brief Return a description of the specified error.
tsk_table_collection_build_index
@brief Builds indexes for this table collection.
tsk_table_collection_canonicalise
@brief Puts the tables into canonical form.
tsk_table_collection_check_integrity
@brief Runs integrity checks on this table collection.
tsk_table_collection_clear
@brief Clears data tables (and optionally provenances and metadata) in this table collection.
tsk_table_collection_compute_mutation_parents
tsk_table_collection_compute_mutation_times
tsk_table_collection_copy
@brief Copies the state of this table collection into the specified destination.
tsk_table_collection_deduplicate_sites
tsk_table_collection_delete_older
tsk_table_collection_drop_index
@brief Deletes the indexes for this table collection.
tsk_table_collection_dump
@brief Write a table collection to file.
tsk_table_collection_dumpf
@brief Write a table collection to a stream.
tsk_table_collection_equals
@brief Returns true if the data in the specified table collection is equal to the data in this table collection.
tsk_table_collection_free
@brief Free the internal memory for the specified table collection.
tsk_table_collection_has_index
@brief Returns true if this table collection is indexed.
tsk_table_collection_has_reference_sequence
tsk_table_collection_ibd_between
tsk_table_collection_ibd_within
tsk_table_collection_individual_topological_sort
@brief Sorts the individual table in this collection.
tsk_table_collection_init
@brief Initialises the table collection by allocating the internal memory and initialising all the constituent tables.
tsk_table_collection_link_ancestors
tsk_table_collection_load
@brief Load a table collection from a file path.
tsk_table_collection_loadf
@brief Load a table collection from a stream.
tsk_table_collection_print_state
@brief Print out the state of this table collection to the specified stream.
tsk_table_collection_record_num_rows
@brief Record the number of rows in each table in the specified tsk_bookmark_t object.
tsk_table_collection_set_indexes
tsk_table_collection_set_metadata
@brief Set the metadata @rst Copies the metadata string to this table collection, replacing any existing. @endrst @param self A pointer to a tsk_table_collection_t object. @param metadata A pointer to a char array. @param metadata_length The size of the metadata in bytes. @return Return 0 on success or a negative value on failure.
tsk_table_collection_set_metadata_schema
@brief Set the metadata schema @rst Copies the metadata schema string to this table collection, replacing any existing. @endrst @param self A pointer to a tsk_table_collection_t object. @param metadata_schema A pointer to a char array. @param metadata_schema_length The size of the metadata schema in bytes. @return Return 0 on success or a negative value on failure.
tsk_table_collection_set_time_units
@brief Set the time_units @rst Copies the time_units string to this table collection, replacing any existing. @endrst @param self A pointer to a tsk_table_collection_t object. @param time_units A pointer to a char array. @param time_units_length The size of the time units string in bytes. @return Return 0 on success or a negative value on failure.
tsk_table_collection_simplify
@brief Simplify the tables to remove redundant information.
tsk_table_collection_sort
@brief Sorts the tables in this collection.
tsk_table_collection_subset
@brief Subsets and reorders a table collection according to an array of nodes.
tsk_table_collection_takeset_indexes
tsk_table_collection_takeset_metadata
tsk_table_collection_truncate
@brief Truncates the tables in this table collection according to the specified bookmark.
tsk_table_collection_union
@brief Forms the node-wise union of two table collections.
tsk_table_sorter_free
@brief Free the internal memory for the specified table sorter.
tsk_table_sorter_init
@brief Initialises the memory for the sorter object.
tsk_table_sorter_run
@brief Runs the sort using the configured functions.
tsk_tree_b1_index
tsk_tree_b2_index
tsk_tree_clear
@brief Set the tree into the null state.
tsk_tree_colless_index
tsk_tree_copy
@brief Copies the state of this tree into the specified destination.
tsk_tree_equals
tsk_tree_first
@brief Seek to the first tree in the sequence.
tsk_tree_free
@brief Free the internal memory for the specified tree.
tsk_tree_get_branch_length
@brief Return the length of the branch ancestral to the specified node.
tsk_tree_get_depth
@brief Return number of nodes on the path from the specified node to root.
tsk_tree_get_left_root
@brief Returns the leftmost root in this tree.
tsk_tree_get_mrca
@brief Compute the most recent common ancestor of two nodes.
tsk_tree_get_num_roots
@brief Returns the number of roots in this tree.
tsk_tree_get_num_samples
@brief Counts the number of samples in the subtree rooted at a node.
tsk_tree_get_num_tracked_samples
tsk_tree_get_parent
@brief Returns the parent of the specified node.
tsk_tree_get_right_root
@brief Returns the rightmost root in this tree.
tsk_tree_get_root_threshold
tsk_tree_get_sites
@brief Get the list of sites for this tree.
tsk_tree_get_size_bound
@brief Return an upper bound on the number of nodes reachable from the roots of this tree.
tsk_tree_get_time
@brief Returns the time of the specified node.
tsk_tree_get_total_branch_length
@brief Computes the sum of the lengths of all branches reachable from the specified node, or from all roots if u=TSK_NULL.
tsk_tree_has_sample_counts
tsk_tree_has_sample_lists
tsk_tree_init
@brief Initialises the tree by allocating internal memory and associating with the specified tree sequence.
tsk_tree_is_descendant
@brief Returns true if u is a descendant of v.
tsk_tree_is_sample
tsk_tree_kc_distance
tsk_tree_last
@brief Seek to the last tree in the sequence.
tsk_tree_map_mutations
tsk_tree_next
@brief Seek to the next tree in the sequence.
tsk_tree_num_lineages
tsk_tree_postorder
@brief Fill an array with the nodes of this tree in postorder.
tsk_tree_postorder_from
@brief Fill an array with the nodes of this tree starting from a particular node.
tsk_tree_preorder
@brief Fill an array with the nodes of this tree in preorder.
tsk_tree_preorder_from
@brief Fill an array with the nodes of this tree starting from a particular node.
tsk_tree_preorder_samples_from
@}
tsk_tree_prev
@brief Seek to the previous tree in the sequence.
tsk_tree_print_state
@brief Print out the state of this tree to the specified stream.
tsk_tree_sackin_index
tsk_tree_seek
@brief Seek to a particular position on the genome.
tsk_tree_set_root_threshold
tsk_tree_set_tracked_samples
tsk_tree_track_descendant_samples
tsk_treeseq_Y1
tsk_treeseq_Y2
tsk_treeseq_Y3
tsk_treeseq_allele_frequency_spectrum
tsk_treeseq_copy_tables
@brief Copies the state of the table collection underlying this tree sequence into the specified destination table collection.
tsk_treeseq_divergence
tsk_treeseq_diversity
tsk_treeseq_dump
@brief Write a tree sequence to file.
tsk_treeseq_dumpf
@brief Write a tree sequence to a stream.
tsk_treeseq_f2
tsk_treeseq_f3
tsk_treeseq_f4
tsk_treeseq_free
@brief Free the internal memory for the specified tree sequence.
tsk_treeseq_genealogical_nearest_neighbours
tsk_treeseq_general_stat
tsk_treeseq_genetic_relatedness
tsk_treeseq_get_breakpoints
@brief Get the breakpoints
tsk_treeseq_get_discrete_genome
@brief Get the discrete genome status
tsk_treeseq_get_discrete_time
@brief Get the discrete time status
tsk_treeseq_get_edge
@brief Get a edge by its index
tsk_treeseq_get_file_uuid
@brief Get the file uuid
tsk_treeseq_get_individual
@brief Get a individual by its index
tsk_treeseq_get_individuals_population
tsk_treeseq_get_individuals_time
tsk_treeseq_get_metadata
@brief Get the top-level tree sequence metadata.
tsk_treeseq_get_metadata_length
@brief Get the length of top-level tree sequence metadata
tsk_treeseq_get_metadata_schema
@brief Get the top-level tree sequence metadata schema.
tsk_treeseq_get_metadata_schema_length
@brief Get the length of the top-level tree sequence metadata schema.
tsk_treeseq_get_migration
@brief Get a edge by its index
tsk_treeseq_get_mutation
@brief Get a mutation by its index
tsk_treeseq_get_node
@brief Get a node by its index
tsk_treeseq_get_num_edges
@brief Get the number of edges
tsk_treeseq_get_num_individuals
@brief Get the number of individuals
tsk_treeseq_get_num_migrations
@brief Get the number of migrations
tsk_treeseq_get_num_mutations
@brief Get the number of mutations
tsk_treeseq_get_num_nodes
@brief Get the number of nodes
tsk_treeseq_get_num_populations
@brief Get the number of populations
tsk_treeseq_get_num_provenances
@brief Get the number of provenances
tsk_treeseq_get_num_samples
@brief Get the number of samples
tsk_treeseq_get_num_sites
@brief Get the number of sites
tsk_treeseq_get_num_trees
@brief Return the number of trees in this tree sequence.
tsk_treeseq_get_population
@brief Get a population by its index
tsk_treeseq_get_provenance
@brief Get a provenance by its index
tsk_treeseq_get_sample_index_map
@brief Get the map of node id to sample index
tsk_treeseq_get_samples
@brief Get the samples
tsk_treeseq_get_sequence_length
@brief Get the sequence length
tsk_treeseq_get_site
@brief Get a site by its index
tsk_treeseq_get_time_units
@brief Get the time units string
tsk_treeseq_get_time_units_length
@brief Get the length of time units string @rst Returns the length of the time units string. @endrst
tsk_treeseq_has_reference_sequence
tsk_treeseq_init
@brief Initialises the tree sequence based on the specified table collection.
tsk_treeseq_is_sample
@brief Check if a node is a sample
tsk_treeseq_kc_distance
tsk_treeseq_load
@brief Load a tree sequence from a file path.
tsk_treeseq_loadf
@brief Load a tree sequence from a stream.
tsk_treeseq_mean_descendants
tsk_treeseq_print_state
@brief Print out the state of this tree sequence to the specified stream.
tsk_treeseq_segregating_sites
tsk_treeseq_simplify
@brief Create a simplified instance of this tree sequence
tsk_treeseq_split_edges
@}
tsk_treeseq_trait_correlation
tsk_treeseq_trait_covariance
tsk_treeseq_trait_linear_model
tsk_vargen_free
tsk_vargen_init
@}
tsk_vargen_next
tsk_vargen_print_state
tsk_variant_decode
@brief Decode the genotypes at the given site, storing them in this variant.
tsk_variant_free
@brief Free the internal memory for the specified variant.
tsk_variant_init
@brief Initialises the variant by allocating the internal memory
tsk_variant_print_state
@brief Print out the state of this variant to the specified stream.
tsk_variant_restricted_copy
@brief Copies the state of this variant to another variant
tsk_viterbi_matrix_add_recombination_required
tsk_viterbi_matrix_clear
tsk_viterbi_matrix_free
tsk_viterbi_matrix_init
tsk_viterbi_matrix_print_state
tsk_viterbi_matrix_traceback

Type Aliases§

FILE
_IO_lock_t
__off64_t
__off_t
general_stat_func_t
tsk_avl_node_int_t
tsk_edge_list_node_t
tsk_flags_t
@brief Container for bitwise flags.
tsk_id_t
tsk_identity_segment_t
tsk_ls_hmm_t
tsk_size_t
@brief Tskit sizes.
tsk_table_sorter_t
@brief Low-level table sorting method.