HasSparse: Returns whether dosages for the variant_numth variant and...

View source: R/RcppExports.R

HasSparseR Documentation

Returns whether dosages for the variant_numth variant and given allele are represented in a sparse manner that is supported by ReadSparse(), under the current sample subset.

Description

Returns whether dosages for the variant_numth variant and given allele are represented in a sparse manner that is supported by ReadSparse(), under the current sample subset.

Usage

HasSparse(pgen, variant_num, allele_num = 2L)

Arguments

pgen

Object returned by NewPgen().

variant_num

Variant index (1-based).

allele_num

Allele index; 1 corresponds to REF, 2 to the first ALT allele, 3 to the second ALT allele if it exists, etc. Optional, defaults to 2.

Value

True iff the (variant, allele) pair has a sparse representation that can be returned by ReadSparse().


pgenlibr documentation built on June 24, 2025, 1:07 a.m.