dae.tools package

Submodules

dae.tools.annotate_variants module

dae.tools.annotate_variants.cli(argv: list[str] | None = None) None[source]

Annotate variants main function.

dae.tools.annotate_variants.cli_genome_options(parser: ArgumentParser) ArgumentParser[source]

Create parser options for reference genome and gene models.

dae.tools.annotate_variants.cli_variants_options(parser: ArgumentParser) None[source]

Configure parser for variant specifying options.

dae.tools.annotate_variants.cli_vcf(argv: list[str] | None = None) None[source]

Annotate variants main function for annotating VCF file.

dae.tools.annotate_variants.parse_cli_genome_options(args: Namespace) tuple[Optional[dae.genomic_resources.reference_genome.ReferenceGenome], Optional[dae.genomic_resources.gene_models.GeneModels]][source]

Parse reference genome and gene models options.

dae.tools.annotate_variants.parse_cli_variants_options(args: Namespace) dict[str, Any][source]

Parse variant definition options.

dae.tools.cnv2parquet module

dae.tools.create_sqlite_gene_set module

dae.tools.create_sqlite_gene_set.main(argv)[source]

Entry point for the tool.

dae.tools.cshl2vcf module

dae.tools.dae2parquet module

dae.tools.denovo2parquet module

dae.tools.denovo2ped module

dae.tools.denovo2vcf module

dae.tools.draw_pedigree module

Tool to draw pedigrees defined in a file.

dae.tools.draw_pedigree.build_families_report(families: FamiliesData) FamiliesReport[source]

Build a family report based on affected status.

dae.tools.draw_pedigree.build_family_layout(family)[source]
dae.tools.draw_pedigree.draw_families(families)[source]

Draw families.

dae.tools.draw_pedigree.draw_families_report(families)[source]

Draw families from families report.

dae.tools.draw_pedigree.draw_pedigree(layout, title, show_family=True, tags=None)[source]
dae.tools.draw_pedigree.main(argv=None)[source]

Run the CLI for draw_pedigree tool.

dae.tools.extract_family_variants module

dae.tools.family_pedigree_generator module

dae.tools.generate_autism_gene_profile module

dae.tools.generate_common_report module

dae.tools.generate_denovo_gene_sets module

dae.tools.generate_denovo_gene_sets.main(gpf_instance: GPFInstance | None = None, argv: list[str] | None = None) None[source]

Generate denovo gene sets CLI.

dae.tools.genotype_data_tool module

dae.tools.gpf_instance_adjustments module

class dae.tools.gpf_instance_adjustments.AdjustDuckDbStorageCommand(instance_dir: str, storage_id: str, read_only: str)[source]

Bases: AdjustmentsCommand

Adjusts impala storage.

execute() None[source]

Execute adjustment command.

class dae.tools.gpf_instance_adjustments.AdjustImpalaStorageCommand(instance_dir: str, storage_id: str, read_only: bool, hdfs_host: str, impala_hosts: list[str])[source]

Bases: AdjustmentsCommand

Adjusts impala storage.

execute() None[source]

Execute adjustment command.

class dae.tools.gpf_instance_adjustments.AdjustmentsCommand(instance_dir: str)[source]

Bases: ABC

Abstract class for adjusting an GPF instance config.

close() None[source]

Save adjusted config.

abstract execute() None[source]

Execute adjustment command.

class dae.tools.gpf_instance_adjustments.DefaultGenotypeStorage(instance_dir: str, storage_id: str)[source]

Bases: StudyConfigsAdjustmentCommand

Adjust default genotype storage.

adjust_study(_study_id: str, study_config: dict[str, Any]) dict[str, Any][source]
execute() None[source]

Execute adjustment command.

class dae.tools.gpf_instance_adjustments.EnableDisableStudies(instance_dir: str, study_ids: Iterable[str], enabled: bool = False)[source]

Bases: StudyConfigsAdjustmentCommand

Enable or disable collection of studies.

adjust_dataset(dataset_id: str, dataset_config: dict[str, Any]) dict[str, Any][source]
adjust_study(study_id: str, study_config: dict[str, Any]) dict[str, Any][source]
execute() None[source]

Execute adjustment command.

class dae.tools.gpf_instance_adjustments.InstanceIdCommand(instance_dir: str, instance_id: str)[source]

Bases: AdjustmentsCommand

Adjusts GPF instance ID.

execute() None[source]

Execute adjustment command.

class dae.tools.gpf_instance_adjustments.StudyConfigsAdjustmentCommand(instance_dir: str)[source]

Bases: AdjustmentsCommand

Command to adjust study configs.

adjust_dataset(_dataset_id: str, dataset_config: dict[str, Any]) dict[str, Any][source]
adjust_study(_study_id: str, study_config: dict[str, Any]) dict[str, Any][source]
dae.tools.gpf_instance_adjustments.cli(argv: list[str] | None = None) None[source]

Handle cli invocation.

dae.tools.gpf_validation_runner module

class dae.tools.gpf_validation_runner.AbstractRunner(expectations: dict[str, Any], gpf_instance: GPFInstance)[source]

Bases: object

The base class for test runners.

property error_case_count: int
property failed_case_count: int
property passed_case_count: int
class dae.tools.gpf_validation_runner.BaseGenotypeBrowserRunner(expectations: dict[str, Any], gpf_instance: GPFInstance)[source]

Bases: AbstractRunner

Base class for Genotype Browser Runners.

class dae.tools.gpf_validation_runner.GenotypeBrowserRunner(expectations: dict[str, Any], gpf_instance: GPFInstance, detailed_reporting: bool, skip_columns: set)[source]

Bases: BaseGenotypeBrowserRunner

Run Genotype Browser tests.

run() None[source]

Run tests.

store_results(dirname: str) None[source]

Store results.

class dae.tools.gpf_validation_runner.MainRunner(gpf_instance: GPFInstance, outfilename: str, detailed_reporting: bool, skip_columns: list[Any])[source]

Bases: object

Main runner.

static collect_expectations(expectations: str) Iterator[dict[str, Any]][source]

Collect expectations.

property errors_case_count: int
property failed_case_count: int
main(expectations_iterator: Iterator[Any]) None[source]

Entry point for this runner.

make_validation_runner(expectations: dict[str, Any]) GenotypeBrowserRunner[source]

Create a validation runner.

property passed_case_count: int
static store_junit_results(runners: list[dae.tools.gpf_validation_runner.AbstractRunner], outfilename: str) None[source]

Store junit results.

store_results(expectations_iterator: Iterator[dict[str, Any]], dirname: str) None[source]
summary() None[source]

Print a summary of the test results.

class dae.tools.gpf_validation_runner.TestResult(expectation: dict[str, Any] | None = None, case: dict[str, Any] | None = None, test_for: str | None = None, params: dict[str, Any] | None = None, result: str | None = None)[source]

Bases: object

Encapsulate the result of a test.

to_xml_element() Element[source]

Convert to an XML element.

class dae.tools.gpf_validation_runner.TestStatus(value)[source]

Bases: Enum

An enumeration.

ERROR = 4
FAIL = 2
NOTSET = 0
PASSED = 1
class dae.tools.gpf_validation_runner.TestSuite(study: str, target: str, name: str)[source]

Bases: object

A collection of tests.

append(case: TestResult) None[source]
to_xml_element() Element[source]

Convert to an XML element.

dae.tools.gpf_validation_runner.main(argv: list[str] | None = None) None[source]

Entry point for the runner script.

dae.tools.grr_cache_repo module

Provides CLI tools for caching genomic resources.

dae.tools.grr_cache_repo.cli_cache_repo(argv: list[str] | None = None) None[source]

CLI for caching genomic resources.

dae.tools.grr_cache_repo.extract_resource_ids_from_annotation(annotation: str, repository: GenomicResourceRepo) set[str][source]

Collect resources and resource files used by annotation.

dae.tools.hdfs_parquet_loader module

dae.tools.impala_batch_import module

dae.tools.impala_parquet_loader module

dae.tools.impala_tables_loader module

dae.tools.impala_tables_stats module

dae.tools.impala_tables_summary_variants module

dae.tools.ped2parquet module

dae.tools.ped2ped module

Tool to convert pedigree file into cannonical GPF pedigree file.

dae.tools.ped2ped.main(argv: list[str] | None = None) None[source]

Transform a pedigree file into cannonical GPF pedigree.

It should be called from the command line.

dae.tools.phase module

dae.tools.phase.checkConsistency(inp)[source]

Check consistency.

dae.tools.phase.getDims(inp)[source]
dae.tools.phase.phase(inp)[source]

Calculate phase.

dae.tools.phase.possiblePersonPhasing(inp, L, P, nCpies, p)[source]
dae.tools.phase.possiblePersonPhasingR(inp, L, P, p, ll, cPh, posPhs, seenHet)[source]

Is person phasing R possible.

dae.tools.pheno2browser module

pheno2browser – prepares a DAE pheno browser data.

exception dae.tools.pheno2browser.CLIError(msg: str)[source]

Bases: Exception

Generic exception to raise and log different fatal errors.

dae.tools.pheno2browser.build_pheno_browser(dbfile, pheno_name, output_dir, pheno_regressions=None)[source]
dae.tools.pheno2browser.calc_dbfile_hashsum(dbfilename)[source]
dae.tools.pheno2browser.main(argv=None)[source]

Command line options.

dae.tools.pheno2dae module

dae.tools.remote_instance_mirror module

dae.tools.simple_family2pedigree module

dae.tools.simple_family2pedigree.main(argv)[source]
dae.tools.simple_family2pedigree.parse_cli_arguments(argv=['-b', 'html', '-d', '_build/doctrees', '.', '_build/html'])[source]

dae.tools.simple_pheno_import module

dae.tools.simple_study_import module

dae.tools.simple_study_import.build_import_project(args: Namespace, gpf_instance: GPFInstance) ImportProject[source]

Build an import project based on the CLI arguments.

dae.tools.simple_study_import.cli_arguments(dae_config: Box, argv: list[str] | None = None) Namespace[source]

Create and return CLI arguments parser.

dae.tools.simple_study_import.main(argv: list[str] | None = None, gpf_instance: GPFInstance | None = None) None[source]

Run the simple study import procedure.

dae.tools.toGATKformat module

dae.tools.vcf2parquet module

dae.tools.vcfinfo_extractor module

dae.tools.vcfinfo_extractor.info_get(info, column=None)[source]
dae.tools.vcfinfo_extractor.info_get_allele(info, column=None)[source]
dae.tools.vcfinfo_extractor.info_get_allele_percent(info, column=None)[source]
dae.tools.vcfinfo_extractor.main(argv, gpf_instance=None)[source]

Module contents