Data Model¶
snputils centers work around lightweight objects that hold data arrays plus the sample, variant, ancestry, phenotype, or segment metadata needed to interpret them.
Core Objects¶
snputils.SNPObjectstores genotype calls and variant metadata.snputils.LocalAncestryObjectstores ancestry calls along chromosomes.snputils.GlobalAncestryObjectstores ADMIXTURE-style ancestry proportions.snputils.PhenotypeObjectandsnputils.MultiPhenotypeObjectstore trait data.snputils.GRGObjectstores genotype representation graph data.snputils.IBDObjectstores identity-by-descent segment tables.
Most objects provide a copy() method, shape/count properties, and filtering helpers that return object-level views or copies instead of loose arrays.
snpobj = su.read_snp("cohort.pgen")
snpobj.n_samples, snpobj.n_snps
Use the API reference when you need exact constructor arguments or property names.