freqsap.study ============= .. py:module:: freqsap.study .. autoapi-nested-parse:: Module for representing population study data. Classes ------- .. autoapisummary:: freqsap.study.Study Module Contents --------------- .. py:class:: Study Represents a population genetics study with allele frequency data. .. attribute:: source The data source or database name. :type: str .. attribute:: population The population identifier. :type: str .. attribute:: group The population group or ethnicity. :type: str .. attribute:: size The sample size of the study. :type: int .. attribute:: reference The reference allele with its frequency. :type: Allele .. attribute:: alternatives List of alternative alleles with their frequencies. :type: list[Allele] .. py:attribute:: source :type: str .. py:attribute:: population :type: str .. py:attribute:: group :type: str .. py:attribute:: size :type: int .. py:attribute:: reference :type: freqsap.allele.Allele .. py:attribute:: alternatives :type: list[freqsap.allele.Allele] .. py:method:: header() -> list[str] Get the column headers for this study's data. :returns: List of column header names. :rtype: list[str] .. py:method:: row() -> dict Convert study data to a dictionary row format. Creates a dictionary with study metadata, reference allele data, and all alternative allele data with dynamically numbered columns. :returns: Dictionary containing all study data in row format. :rtype: dict