pandas_genomics.accessors.GenotypeDataframeAccessor¶
-
class
pandas_genomics.accessors.GenotypeDataframeAccessor(pandas_obj)[source]¶ DataFrame accessor for GenotypeArray methods
df.genomics.variant_info df.genomics.encode_additive()
Methods
__init__(pandas_obj)Initialize self.
calculate_edge_encoding_values(data, …[, …])Calculate alpha values to be used in edge encoding
encode_additive()Additive encoding of genotypes.
encode_codominant()Codominant encoding of genotypes.
encode_dominant()Dominant encoding of genotypes.
encode_edge(encoding_info)EDGE (weighted) encoding of genotypes.
encode_recessive()Recessive encoding of genotypes.
filter_variants_hwe([cutoff])Drop variants with a probability of HWE less than the specified value (0.05 by default).
filter_variants_maf([keep_min_freq])Drop variants with a MAF less than the specified value (0.01 by default)
in_regions(regions)Keep variants that exist in one or more of the specified regions
not_in_regions(regions)Remove variants that exist in one or more of the specified regions
Attributes
hwe_pvalReturn the probability that the samples are in HWE
mafReturn the minor allele frequency of each variant
variant_infoReturn a DataFrame with variant info indexed by the column name (one row per GenotypeArray)