dae.pheno package
Subpackages
- dae.pheno.prepare package
- Submodules
- dae.pheno.prepare.individuals2ped module
- dae.pheno.prepare.measure_classifier module
- dae.pheno.prepare.ped2individuals module
- dae.pheno.prepare.pheno_prepare module
ClassifyMeasureTask
MeasureValuesTask
PrepareBase
PrepareCommon
PreparePersons
PrepareVariables
PrepareVariables.build_instrument()
PrepareVariables.build_pheno_common()
PrepareVariables.build_variables()
PrepareVariables.create_default_measure()
PrepareVariables.load_descriptions()
PrepareVariables.load_instrument()
PrepareVariables.log_filename
PrepareVariables.log_header()
PrepareVariables.log_measure()
Task
TaskQueue
- dae.pheno.prepare.ssc_prepare module
- Module contents
- dae.pheno.utils package
Submodules
dae.pheno.common module
- class dae.pheno.common.MeasureType(value)[source]
Bases:
Enum
Definition of measure types.
- categorical = 3
- continuous = 1
- static from_str(measure_type: str) MeasureType [source]
- static is_numeric(measure_type: MeasureType) bool [source]
- static is_text(measure_type: MeasureType) bool [source]
- ordinal = 2
- other = 100
- raw = 5
- skipped = 1000
- text = 4
- dae.pheno.common.check_phenotype_data_config(config: Box) bool [source]
Check phenotype database preparation config for consistency.
dae.pheno.db module
- class dae.pheno.db.PhenoDb(dbfile: str, read_only: bool = True)[source]
Bases:
object
Class that manages access to phenotype databases.
- STREAMING_CHUNK_SIZE = 25
- build_instrument_values_tables() None [source]
Create instrument values tables.
Each row is basically a list of every measure value in the instrument for a certain person.
- clear_instrument_values_tables(drop: bool = False) None [source]
Clear all instrument values tables.
- get_browser_measure(measure_id: str) dict | None [source]
Get measrue description from phenotype browser database.
- get_instrument_column_names() dict[str, list[str]] [source]
Return a map of instruments and their measure column names.
- get_measure_column_names(measure_ids: list[str] | None = None) dict[str, str] [source]
Return measure column names mapped to their measure IDs.
- get_measure_column_names_reverse(measure_ids: list[str] | None = None) dict[str, str] [source]
Return measure column names mapped to their measure IDs.
- property has_descriptions: bool
Check if the database has a description data.
- property regression_display_names: Dict[str, str]
Return regressions display name.
- property regression_display_names_with_ids: dict[str, Any]
Return regression display names with measure IDs.
- property regression_ids: list[str]
- save_regression_values(reg: Dict[str, str]) None [source]
Save regression values into the databases.
- search_measures(instrument_name: str | None = None, keyword: str | None = None) Iterator[dict[str, Any]] [source]
Find measert by keyword search.
dae.pheno.graphs module
- class dae.pheno.graphs.GraphColumn(name, roles, status, df)[source]
Bases:
object
Build a colum to produce a graph from it.
- property label
- dae.pheno.graphs.draw_categorical_violin_distribution(df, measure_id, roles_definition=None, ax=None, numerical_categories=False, max_categories=12)[source]
Draw violin distribution for categorical measures.
- dae.pheno.graphs.draw_linregres(df, col1, col2, jitter: int | None = None, ax=None)[source]
Draw a graph display linear regression between two columns.
- dae.pheno.graphs.draw_measure_violinplot(df, measure_id, roles_definition=None, ax=None)[source]
Draw a violin plot for a measure.
dae.pheno.husl module
dae.pheno.palletes module
dae.pheno.pheno_db module
dae.pheno.plots module
dae.pheno.prepare_data module
- class dae.pheno.prepare_data.PreparePhenoBrowserBase(pheno_name: str, phenotype_data: PhenotypeStudy, output_dir: str, pheno_regressions: Box | None = None, images_dir: str | None = None)[source]
Bases:
object
Prepares phenotype data for the phenotype browser.
- LARGE_DPI = 150
- SMALL_DPI = 16
- browsable_figure_path(measure: Measure, suffix: str) str [source]
Construct file path for storing a measure figures.
- build_regression(dependent_measure: Measure, independent_measure: Measure, jitter: float) dict[str, Union[str, float]] [source]
Build measure regressiongs.
- build_values_categorical_distribution(measure: Measure) dict[str, Any] [source]
Build a categorical value distribution fiugre.
- build_values_ordinal_distribution(measure: Measure) dict[str, Any] [source]
Build an ordinal value distribution figure.
- build_values_other_distribution(measure: Measure) dict[str, Any] [source]
Build an other value distribution figure.
- build_values_violinplot(measure: Measure) dict[str, Any] [source]
Build a violin plot figure for the measure.
- figure_filepath(measure: Measure, suffix: str) str [source]
Construct file path for storing a measure figures.