dae.backends.dae package
Submodules
dae.backends.dae.loader module
- class dae.backends.dae.loader.DaeTransmittedFamiliesGenotypes(families, family_data)[source]
Bases:
dae.backends.raw.loader.FamiliesGenotypes
Tuple of families and family data
- class dae.backends.dae.loader.DaeTransmittedLoader(families, summary_filename, genome, regions=None, params=None, **_kwargs)[source]
Bases:
dae.backends.raw.loader.VariantsGenotypesLoader
Loader for dae variants.
- property variants_filenames
- class dae.backends.dae.loader.DenovoFamiliesGenotypes(family, gt, best_state=None)[source]
Bases:
dae.backends.raw.loader.FamiliesGenotypes
Tuple of family, genotype, and best_state
- class dae.backends.dae.loader.DenovoLoader(families: dae.pedigrees.family.FamiliesData, denovo_filename: str, genome: dae.genomic_resources.reference_genome.ReferenceGenome, regions: Optional[List[str]] = None, params: Optional[Dict[str, Any]] = None, sort: bool = True)[source]
Bases:
dae.backends.raw.loader.VariantsGenotypesLoader
Load denovo variants.
- classmethod flexible_denovo_load(filepath: str, genome: dae.genomic_resources.reference_genome.ReferenceGenome, families: dae.pedigrees.family.FamiliesData, denovo_location: Optional[str] = None, denovo_variant: Optional[str] = None, denovo_chrom: Optional[str] = None, denovo_pos: Optional[str] = None, denovo_ref: Optional[str] = None, denovo_alt: Optional[str] = None, denovo_person_id: Optional[str] = None, denovo_family_id: Optional[str] = None, denovo_best_state: Optional[str] = None, denovo_genotype: Optional[str] = None, denovo_sep: str = '\t', adjust_chrom_prefix=None, **kwargs) pandas.core.frame.DataFrame [source]
Load de Novo variants from a file.
Read a text file containing variants in the form of delimiter-separted values and produce a dataframe.
The text file may use different names for the columns containing the relevant data - these are specified with the provided parameters.
- Parameters
filepath (str) – The path to the DSV file to read.
genome – A reference genome object.
denovo_location (str) – The label or index of the column containing
the CSHL-style location of the variant.
- Parameters
denovo_variant (str) – The label or index of the column containing
the CSHL-style representation of the variant.
- Parameters
denovo_chrom (str) – The label or index of the column containing
the chromosome upon which the variant is located.
- Parameters
denovo_pos (str) – The label or index of the column containing the
position upon which the variant is located.
- Parameters
denovo_ref (str) – The label or index of the column containing the
variant’s reference allele.
- Parameters
denovo_alt (str) – The label or index of the column containing the
variant’s alternative allele.
- Parameters
denovo_person_id (str) – The label or index of the column
containing either a singular person ID or a comma-separated list of person IDs.
- Parameters
denovo_family_id (str) – The label or index of the column
containing a singular family ID.
- Parameters
denovo_best_state (str) – The label or index of the column
containing the best state for the variant.
- Parameters
families (str) – An instance of the FamiliesData class for the
pedigree of the relevant study.
- Returns
Dataframe containing the variants, with the following
header - ‘chrom’, ‘position’, ‘reference’, ‘alternative’, ‘family_id’, ‘genotype’.
- Return type
An instance of Pandas’ DataFrame class.
- static produce_genotype(chrom: str, pos: int, genome: dae.genomic_resources.reference_genome.ReferenceGenome, family: dae.pedigrees.family.Family, members_with_variant: List[str]) numpy.ndarray [source]
Produce genotype.