Digital Twin Test

Functions for running versions of the DTT. These functions are the core external-facing functions of this package.

linear_crt()

DTT using a fixed linear statistic

linear_crt_indep()

DTT with independence, using a fixed linear statistic

conditional_tdt()

The DTT with a TDT-like test statistic

Misc Other Functions

Functions for processing DTT p-values, creating a synthetic population, and running the usual TDT.

accum_test()

Accumulation test with the hinge-exponential function

generate_offspring()

Generate a synthetic offspring

haps_to_gen()

Convert haplotype matrix to genotype matrix

tdt()

Computes TDT p-value

Data Sets

Sample data sets.

haps_matrix

3,000 synthetic haplotypes from one chromosome

Internal functions

These functions are intended only for internal use.

col_cors()

Correlation across columns

create_offspring_population()

Simulate an offspring population

deviance_test_stats()

Computed test statistics based on deviance change for GLM

find_mate_pair()

Find a pair of haplotypes.

forward_backward_()

forward_backward_

gen_id_to_haps()

Convert genotype IDs to haplotype IDs

generate_ancestry()

Generate ancestry information

get_beta_glmnet()

Run CV glmnet

get_fb_results()

Forward-backward algorithm for parent-offspring trio of haplotypes

get_genotype_ids()

Complete haplotype list

get_phased_ancestry()

Indentify maternal vs paternal haplotypes

haps_id_to_gen()

Convert haplotype IDs to genptype IDs

hinge_exp()

Hinge-exponential function

impute_variant_fast()

Imputes a set of variants

logistic_ll()

Logistic-log likelihood

sample_ancestry_()

sample_ancestry_

sample_parity_poisson()

Sample poisson conditional on its parity