Global Namespace

Overview

// typedefs
 
typedef enum rsx_status_t rsx_status_t;
typedef struct rsx_popmap_t rsx_popmap_t;
 
// enums
 
enum rsx_status_t;
 
// global functions
 
enum rsx_status_t rsx_process(const char* input_dir, const char* output_path, uint32_t n_threads, uint32_t min_depth);
enum rsx_status_t rsx_freq(const char* table_path, const char* output_path, uint32_t min_depth);
enum rsx_status_t rsx_popmap_load(const char* path, struct rsx_popmap_t** out);
void rsx_popmap_free(struct rsx_popmap_t* popmap);
uint16_t rsx_popmap_n_individuals(const struct rsx_popmap_t* popmap);
const char* rsx_last_error(void);
 
// macros
 
#define BYTES_PER_CELL
#define DEFAULT_OVERHEAD
#define DEFAULT_SPILL_FRACTION
#define RSX_VERSION
#define RSX_VERSION_MAJOR
#define RSX_VERSION_MINOR
#define RSX_VERSION_PATCH

Detailed Documentation

Typedefs

typedef enum rsx_status_t rsx_status_t

Status codes returned by all C API functions.

typedef struct rsx_popmap_t rsx_popmap_t

Opaque handle to a loaded popmap.

Global Functions

enum rsx_status_t rsx_process(const char* input_dir, const char* output_path, uint32_t n_threads, uint32_t min_depth)

Run the process command.

Safety

All string pointers must be valid null-terminated C strings.

enum rsx_status_t rsx_freq(const char* table_path, const char* output_path, uint32_t min_depth)

Run the freq command.

Safety

All string pointers must be valid null-terminated C strings.

enum rsx_status_t rsx_popmap_load(const char* path, struct rsx_popmap_t** out)

Load a popmap from a file path.

Safety

path must be a valid null-terminated C string.

void rsx_popmap_free(struct rsx_popmap_t* popmap)

Free a popmap handle.

Safety

popmap must have been created by rsx_popmap_load.

uint16_t rsx_popmap_n_individuals(const struct rsx_popmap_t* popmap)

Get the number of individuals in a popmap.

Safety

popmap must be a valid handle from rsx_popmap_load.

const char* rsx_last_error(void)

Retrieve a pointer to the last error message for the current thread.

The pointer is valid until the next call to any radsex_* function on the same thread.

Safety

This is intended to be called from C. The returned pointer must not be freed by the caller.

Macros

#define BYTES_PER_CELL

Bytes per depth cell. We always store u16 in the marker buffer regardless of the inbound Arrow type, so this is a fixed 2 bytes.

#define DEFAULT_OVERHEAD

Default overhead multiplier capturing arrow validity buffers, group masks, per-marker accumulators, intermediate Vecs. 6x is conservative for the largest commands (signif FDR, triage Bayesian, depth exact).

#define DEFAULT_SPILL_FRACTION

Default fraction of available RAM we are willing to use before switching to the spill path.