snipar.read.bgen module

snipar.read.bgen.get_gts_matrix_given_ped(ped, bgenfile, par_gts_f=None, snp_ids=None, ids=None, sib=False, parsum=False, start=0, end=None, verbose=False, print_sample_info=False)[source]

Used in get_gts_matrix: see get_gts_matrix for documentation

snipar.read.bgen.get_snps(gts_f, snp_ids=None)[source]

Used in get_gts_matrix_given_ped to match observed and imputed SNPs and return SNP information on shared SNPs. Removes SNPs that have duplicated SNP ids. in_obs_sid contains the SNPs in the imputed genotypes that are present in the observed SNPs obs_sid_index contains the index in the observed SNPs of the common SNPs

snipar.read.bgen.match_observed_and_imputed_snps(gts_f, par_gts_f, snp_ids=None, start=0, end=None)[source]

Used in get_gts_matrix_given_ped to match observed and imputed SNPs and return SNP information on shared SNPs. Removes SNPs that have duplicated SNP ids. in_obs_sid contains the SNPs in the imputed genotypes that are present in the observed SNPs obs_sid_index contains the index in the observed SNPs of the common SNPs

snipar.read.bgen.read_PO_pairs_from_bgen(ped, bgenfile)[source]
snipar.read.bgen.read_sibs_from_bgen(bgenfile, sibpairs)[source]