Skip to contents

Retrieve information about the haplotype cache

Usage

CacheSummary()

N()

L()

Value

CacheSummary() prints information about the current state of the kalis cache. Also invisibly returns a vector giving the dimensions of the cached haplotype data (num variants, num haplotypes), or NULL if the cache is empty.

N() returns the number of haplotypes currently in the kalis cache, or NULL if the cache is empty.

L() returns the number of variants currently in the kalis cache, or NULL if the cache is empty.

Examples

# First fill the cache with the toy data included in the package
data("SmallHaps")
CacheHaplotypes(SmallHaps)
#> Warning: haplotypes already cached ... overwriting existing cache.

# View full summary
CacheSummary()
#> Cache currently loaded with 300 haplotypes, each with 400 variants. 
#>   Memory consumed: 16 kB. 

# Also note the invisible return
dims <- CacheSummary()
#> Cache currently loaded with 300 haplotypes, each with 400 variants. 
#>   Memory consumed: 16 kB. 
dims
#> [1] 400 300

# Get just numbers of haplotypes and variants separately
N()
#> [1] 300
L()
#> [1] 400