diff --git a/404.html b/404.html index 5ec9cfd56..730f28844 100644 --- a/404.html +++ b/404.html @@ -9,7 +9,7 @@ - + diff --git a/CODE_OF_CONDUCT/index.html b/CODE_OF_CONDUCT/index.html index 9ff42f4ac..0e5f406c5 100644 --- a/CODE_OF_CONDUCT/index.html +++ b/CODE_OF_CONDUCT/index.html @@ -11,7 +11,7 @@ - + diff --git a/about/index.html b/about/index.html index 3b634a095..342cd9da5 100644 --- a/about/index.html +++ b/about/index.html @@ -11,7 +11,7 @@ - + diff --git a/api/pheval/analyse/analysis/index.html b/api/pheval/analyse/analysis/index.html index 62fdc1872..f0da5df64 100644 --- a/api/pheval/analyse/analysis/index.html +++ b/api/pheval/analyse/analysis/index.html @@ -11,7 +11,7 @@ - + @@ -491,21 +491,21 @@
  • - src.pheval.analyse.analysis + analysis
  • - benchmark_directory() + benchmark_directory
  • - benchmark_run_comparisons() + benchmark_run_comparisons
  • @@ -1221,21 +1221,21 @@
  • - src.pheval.analyse.analysis + analysis
  • - benchmark_directory() + benchmark_directory
  • - benchmark_run_comparisons() + benchmark_run_comparisons
  • @@ -1265,6 +1265,7 @@

    Analysis

    +
    @@ -1280,12 +1281,13 @@

    Analysis

    +

    -benchmark_directory(results_dir_and_input, score_order, output_prefix, threshold, gene_analysis, variant_analysis, disease_analysis, plot_type) + benchmark_directory(results_dir_and_input, score_order, output_prefix, threshold, gene_analysis, variant_analysis, disease_analysis, plot_type)

    @@ -1294,6 +1296,8 @@

    Benchmark prioritisation performance for a single run.

    + +

    Parameters:

    @@ -1310,7 +1314,11 @@

    TrackInputOutputDirectories -

    + @@ -1320,7 +1328,11 @@

    str -

    + @@ -1330,7 +1342,11 @@

    str -

    + @@ -1340,7 +1356,11 @@

    float -

    + @@ -1350,7 +1370,11 @@

    bool -

    + @@ -1360,7 +1384,11 @@

    bool -

    + @@ -1370,7 +1398,11 @@

    bool -

    + @@ -1380,7 +1412,11 @@

    str -

    + @@ -1388,9 +1424,9 @@

    Input and output directories for tracking results.

    +
    +

    Input and output directories for tracking results.

    +
    +
    required

    The order in which scores are arranged, this can be either ascending or descending.

    +
    +

    The order in which scores are arranged, this can be either ascending or descending.

    +
    +
    required

    Prefix for the benchmark output file names.

    +
    +

    Prefix for the benchmark output file names.

    +
    +
    required

    The threshold for benchmark evaluation.

    +
    +

    The threshold for benchmark evaluation.

    +
    +
    required

    Boolean flag indicating whether to benchmark gene results.

    +
    +

    Boolean flag indicating whether to benchmark gene results.

    +
    +
    required

    Boolean flag indicating whether to benchmark variant results.

    +
    +

    Boolean flag indicating whether to benchmark variant results.

    +
    +
    required

    Boolean flag indicating whether to benchmark disease results.

    +
    +

    Boolean flag indicating whether to benchmark disease results.

    +
    +
    required

    Type of plot for benchmark visualisation.

    +
    +

    Type of plot for benchmark visualisation.

    +
    +
    required
    -
    - Source code in src/pheval/analyse/analysis.py -
    - + @@ -1535,7 +1578,11 @@

    +

    The order in which scores are arranged, this can be either ascending or descending.

    + +

    @@ -1545,7 +1592,11 @@

    +

    Prefix for the benchmark output file names.

    + +

    @@ -1555,7 +1606,11 @@

    +

    The threshold for benchmark evaluation.

    + +

    @@ -1565,7 +1620,11 @@

    +

    Boolean flag indicating whether to benchmark gene results.

    + +

    @@ -1575,7 +1634,11 @@

    +

    Boolean flag indicating whether to benchmark variant results.

    + +

    @@ -1585,7 +1648,11 @@

    +

    Boolean flag indicating whether to benchmark disease results.

    + +

    @@ -1595,7 +1662,11 @@

    +

    Type of plot for benchmark visualisation.

    + +

    @@ -1603,9 +1674,9 @@

    - Source code in src/pheval/analyse/analysis.py -

     53
    +          
    + Source code in src/pheval/analyse/analysis.py +
     53
      54
      55
      56
    @@ -1490,17 +1526,18 @@ 

    benchmark_generator=DiseaseBenchmarkRunOutputGenerator(), )

    -
    +
    +

    -benchmark_run_comparisons(results_directories, score_order, output_prefix, threshold, gene_analysis, variant_analysis, disease_analysis, plot_type) + benchmark_run_comparisons(results_directories, score_order, output_prefix, threshold, gene_analysis, variant_analysis, disease_analysis, plot_type)

    @@ -1509,6 +1546,8 @@

    List[TrackInputOutputDirectories]

    Input and output directories for tracking results.

    +
    +

    Input and output directories for tracking results.

    +
    +
    required required required required required required required required
    144
    +          
    + Source code in src/pheval/analyse/analysis.py +
    144
     145
     146
     147
    @@ -1705,7 +1776,7 @@ 

    benchmark_generator=DiseaseBenchmarkRunOutputGenerator(), )

    -
    +
    diff --git a/api/pheval/analyse/benchmark_generator/index.html b/api/pheval/analyse/benchmark_generator/index.html index 3a6fd255e..5d5b7993f 100644 --- a/api/pheval/analyse/benchmark_generator/index.html +++ b/api/pheval/analyse/benchmark_generator/index.html @@ -11,7 +11,7 @@ - + @@ -505,7 +505,7 @@
  • - src.pheval.analyse.benchmark_generator + benchmark_generator
  • @@ -1235,7 +1235,7 @@
  • - src.pheval.analyse.benchmark_generator + benchmark_generator
  • @@ -1293,6 +1293,7 @@

    Benchmark generator

    +
    @@ -1312,7 +1313,7 @@

    Benchmark generator

    - BenchmarkRunOutputGenerator + BenchmarkRunOutputGenerator @@ -1327,6 +1328,8 @@

    Base class for recording data required for generating benchmarking outputs.

    + +

    Attributes:

    @@ -1338,42 +1341,57 @@

    - + - + - + - + - + - +and returns BenchmarkRunResults.

    + + - + - +
    prioritisation_type_file_prefixprioritisation_type_file_prefix str

    Prefix for the prioritisation type output file.

    +
    +

    Prefix for the prioritisation type output file.

    +
    +
    y_labely_label str

    Label for the y-axis in benchmarking outputs.

    +
    +

    Label for the y-axis in benchmarking outputs.

    +
    +
    generate_benchmark_run_resultsgenerate_benchmark_run_results Callable

    Callable to generate benchmark run results. +

    +
    +

    Callable to generate benchmark run results. Takes parameters: input and results directory, score order, threshold, rank comparison, -and returns BenchmarkRunResults.

    stats_comparison_file_suffixstats_comparison_file_suffix str

    Suffix for the rank comparison file.

    +
    +

    Suffix for the rank comparison file.

    +
    +
    - -
    - Source code in src/pheval/analyse/benchmark_generator.py -
    - + - + - + - + - + - +and returns BenchmarkRunResults.

    + + - + - +
    20
    +            
    + Source code in src/pheval/analyse/benchmark_generator.py +
    20
     21
     22
     23
    @@ -1411,7 +1429,7 @@ 

    ] stats_comparison_file_suffix: str

    -
    + @@ -1431,6 +1449,7 @@

    +

    @@ -1438,7 +1457,7 @@

    - DiseaseBenchmarkRunOutputGenerator + DiseaseBenchmarkRunOutputGenerator @@ -1449,8 +1468,8 @@

    -

    - Bases: BenchmarkRunOutputGenerator

    +

    + Bases: BenchmarkRunOutputGenerator

    Subclass of BenchmarkRunOutputGenerator specialised @@ -1458,6 +1477,8 @@

    prioritisation_type_file_prefixprioritisation_type_file_prefix str

    Prefix for the disease prioritisation type file. -Defaults to DISEASE_PLOT_FILE_PREFIX.

    +
    +

    Prefix for the disease prioritisation type file. +Defaults to DISEASE_PLOT_FILE_PREFIX.

    +
    +
    y_labely_label str

    Label for the y-axis in disease prioritisation benchmarking outputs. -Defaults to DISEASE_PLOT_Y_LABEL.

    +
    +

    Label for the y-axis in disease prioritisation benchmarking outputs. +Defaults to DISEASE_PLOT_Y_LABEL.

    +
    +
    generate_benchmark_run_resultsgenerate_benchmark_run_results Callable

    Callable to generate disease prioritisation +

    +
    +

    Callable to generate disease prioritisation benchmark run results. Defaults to benchmark_disease_prioritisation. Takes parameters: input and results directory, score order, threshold, rank comparison, -and returns BenchmarkRunResults.

    stats_comparison_file_suffixstats_comparison_file_suffix str

    Suffix for the disease rank comparison file. -Defaults to "-disease_summary.tsv".

    +
    +

    Suffix for the disease rank comparison file. +Defaults to "-disease_summary.tsv".

    +
    +
    - -
    - Source code in src/pheval/analyse/benchmark_generator.py -
    102
    +            
    + Source code in src/pheval/analyse/benchmark_generator.py +
    102
     103
     104
     105
    @@ -1564,7 +1600,7 @@ 

    ] = benchmark_disease_prioritisation stats_comparison_file_suffix: str = "-disease_summary.tsv"

    -
    + @@ -1584,6 +1620,7 @@

    @@ -1591,7 +1628,7 @@

    - GeneBenchmarkRunOutputGenerator + GeneBenchmarkRunOutputGenerator @@ -1602,8 +1639,8 @@

    -

    - Bases: BenchmarkRunOutputGenerator

    +

    + Bases: BenchmarkRunOutputGenerator

    Subclass of BenchmarkRunOutputGenerator specialised @@ -1611,6 +1648,8 @@

    This subclass inherits from BenchmarkRunOutputGenerator and specialises its attributes specifically for gene prioritisation benchmarking.

    + +

    Attributes:

    @@ -1622,46 +1661,61 @@

    - + - + - + - + - + - +and returns BenchmarkRunResults.

    + + - + - +
    prioritisation_type_file_prefixprioritisation_type_file_prefix str

    Prefix for the gene prioritisation type file. -Defaults to GENE_PLOT_FILE_PREFIX.

    +
    +

    Prefix for the gene prioritisation type file. +Defaults to GENE_PLOT_FILE_PREFIX.

    +
    +
    y_labely_label str

    Label for the y-axis in gene prioritisation benchmarking outputs. -Defaults to GENE_PLOT_Y_LABEL.

    +
    +

    Label for the y-axis in gene prioritisation benchmarking outputs. +Defaults to GENE_PLOT_Y_LABEL.

    +
    +
    generate_benchmark_run_resultsgenerate_benchmark_run_results Callable

    Callable to generate gene prioritisation +

    +
    +

    Callable to generate gene prioritisation benchmark run results. Defaults to benchmark_gene_prioritisation. Takes parameters: input and results directory, score order, threshold, rank comparison, -and returns BenchmarkRunResults.

    stats_comparison_file_suffixstats_comparison_file_suffix str

    Suffix for the gene rank comparison file. -Defaults to "-gene_summary.tsv".

    +
    +

    Suffix for the gene rank comparison file. +Defaults to "-gene_summary.tsv".

    +
    +
    - -
    - Source code in src/pheval/analyse/benchmark_generator.py -
    - + - + - + - + - + - +and returns BenchmarkRunResults.

    + + - + - +
    41
    +            
    + Source code in src/pheval/analyse/benchmark_generator.py +
    41
     42
     43
     44
    @@ -1717,7 +1771,7 @@ 

    ] = benchmark_gene_prioritisation stats_comparison_file_suffix: str = "-gene_summary.tsv"

    -
    + @@ -1737,6 +1791,7 @@

    +

    @@ -1744,7 +1799,7 @@

    - VariantBenchmarkRunOutputGenerator + VariantBenchmarkRunOutputGenerator @@ -1755,8 +1810,8 @@

    -

    - Bases: BenchmarkRunOutputGenerator

    +

    + Bases: BenchmarkRunOutputGenerator

    Subclass of BenchmarkRunOutputGenerator specialised @@ -1764,6 +1819,8 @@

    prioritisation_type_file_prefixprioritisation_type_file_prefix str

    Prefix for the variant prioritisation type file. -Defaults to VARIANT_PLOT_FILE_PREFIX.

    +
    +

    Prefix for the variant prioritisation type file. +Defaults to VARIANT_PLOT_FILE_PREFIX.

    +
    +
    y_labely_label str

    Label for the y-axis in variant prioritisation benchmarking outputs. -Defaults to VARIANT_PLOT_Y_LABEL.

    +
    +

    Label for the y-axis in variant prioritisation benchmarking outputs. +Defaults to VARIANT_PLOT_Y_LABEL.

    +
    +
    generate_benchmark_run_resultsgenerate_benchmark_run_results Callable

    Callable to generate variant prioritisation +

    +
    +

    Callable to generate variant prioritisation benchmark run results. Defaults to benchmark_variant_prioritisation. Takes parameters: input and results directory, score order, threshold, rank comparison, -and returns BenchmarkRunResults.

    stats_comparison_file_suffixstats_comparison_file_suffix str

    Suffix for the variant rank comparison file. -Defaults to "-variant_summary.tsv".

    +
    +

    Suffix for the variant rank comparison file. +Defaults to "-variant_summary.tsv".

    +
    +
    - -
    - Source code in src/pheval/analyse/benchmark_generator.py -
    - + - + - + - + - + - + - +
    71
    +            
    + Source code in src/pheval/analyse/benchmark_generator.py +
    71
     72
     73
     74
    @@ -1872,7 +1944,7 @@ 

    ] = benchmark_variant_prioritisation stats_comparison_file_suffix: str = "-variant_summary.tsv"

    -
    + @@ -1892,6 +1964,7 @@

    Benchmarking data

    +
    @@ -1270,7 +1271,7 @@

    Benchmarking data

    - BenchmarkRunResults + BenchmarkRunResults @@ -1285,6 +1286,8 @@

    ranks

    dict

    Dictionary containing recorded ranks for samples.

    +
    +

    Dictionary containing recorded ranks for samples.

    +
    +
    rank_statsrank_stats RankStats

    Statistics related to benchmark.

    +
    +

    Statistics related to benchmark.

    +
    +
    results_dirresults_dir Path

    Path to the result directory. Defaults to None.

    +
    +

    Path to the result directory. Defaults to None.

    +
    +
    benchmark_namebenchmark_name str

    Name of the benchmark run. Defaults to None.

    +
    +

    Name of the benchmark run. Defaults to None.

    +
    +
    - -
    - Source code in src/pheval/analyse/benchmarking_data.py -
    - + - + - + - + - + - + - + - +
     8
    +            
    + Source code in src/pheval/analyse/benchmarking_data.py +
     8
      9
     10
     11
    @@ -1363,7 +1381,7 @@ 

    results_dir: Path = None benchmark_name: str = None

    -
    + @@ -1383,6 +1401,7 @@

    Binary classification stats

    +
    @@ -1492,7 +1493,7 @@

    Binary classification stats

    - BinaryClassificationStats + BinaryClassificationStats @@ -1507,6 +1508,8 @@

    true_positivestrue_positives int

    The count of true positive instances - i.e., the number of known entities -ranked 1 in the results.

    +
    +

    The count of true positive instances - i.e., the number of known entities +ranked 1 in the results.

    +
    +
    true_negativestrue_negatives int

    The count of true negative instances - i.e., the number of non-relevant entities -ranked at a position other than 1 in the results.

    +
    +

    The count of true negative instances - i.e., the number of non-relevant entities +ranked at a position other than 1 in the results.

    +
    +
    false_positivesfalse_positives int

    The count of false positive instances - i.e., the number of non-relevant entities -ranked at position 1 in the results.

    +
    +

    The count of false positive instances - i.e., the number of non-relevant entities +ranked at position 1 in the results.

    +
    +
    false_negativesfalse_negatives int

    The count of false negative instances - i.e., the number of known entities -ranked at a position other than 1 in the results.

    +
    +

    The count of false negative instances - i.e., the number of known entities +ranked at a position other than 1 in the results.

    +
    +
    - -
    - Source code in src/pheval/analyse/binary_classification_stats.py -
    - + - + - +
     12
    +            
    + Source code in src/pheval/analyse/binary_classification_stats.py +
     12
      13
      14
      15
    @@ -2191,7 +2209,7 @@ 

    else 0.0 )

    -
    + @@ -2205,12 +2223,13 @@

    -accuracy() + accuracy()

    @@ -2220,6 +2239,8 @@

    float

    float

    The Accuracy of the model, calculated as the sum of true positives and true negatives divided by

    +
    +

    The Accuracy of the model, calculated as the sum of true positives and true negatives divided by

    +
    +
    float

    the sum of true positives, false positives, true negatives, and false negatives.

    +
    +

    the sum of true positives, false positives, true negatives, and false negatives.

    +
    +
    float

    Returns 0.0 if the total sum of counts is zero.

    +
    +

    Returns 0.0 if the total sum of counts is zero.

    +
    +
    -
    - Source code in src/pheval/analyse/binary_classification_stats.py -
    250
    +          
    + Source code in src/pheval/analyse/binary_classification_stats.py +
    250
     251
     252
     253
    @@ -2308,63 +2341,34 @@ 

    else 0.0 )

    -
    +
    +

    -add_classification(pheval_results, relevant_ranks) + add_classification(pheval_results, relevant_ranks)

    -

    Update binary classification metrics for known and unknown entities based on their ranks.

    - -

    Parameters:

    - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    pheval_results - Union[List[RankedPhEvalGeneResult], List[RankedPhEvalVariantResult], List[RankedPhEvalDiseaseResult]] -

    (Union[List[RankedPhEvalGeneResult], List[RankedPhEvalVariantResult], List[RankedPhEvalDiseaseResult]]): - The list of all pheval results.

    - required -
    relevant_ranks - List[int] -

    A list of the ranks associated with the known entities.

    - required -
    +

    Update binary classification metrics for known and unknown entities based on their ranks. +Args: + pheval_results: + (Union[List[RankedPhEvalGeneResult], List[RankedPhEvalVariantResult], List[RankedPhEvalDiseaseResult]]): + The list of all pheval results. + relevant_ranks (List[int]): A list of the ranks associated with the known entities.

    -
    - Source code in src/pheval/analyse/binary_classification_stats.py -
    - + @@ -2451,9 +2462,9 @@

    - Source code in src/pheval/analyse/binary_classification_stats.py -

    114
    +          
    + Source code in src/pheval/analyse/binary_classification_stats.py +
    114
     115
     116
     117
    @@ -2408,17 +2412,18 @@ 

    ) self.add_labels_and_scores(pheval_results, relevant_ranks)

    -
    +
    +

    -add_classification_for_known_entities(relevant_ranks) + add_classification_for_known_entities(relevant_ranks)

    @@ -2427,6 +2432,8 @@

    List[int]

    A list of the ranks associated with the known entities.

    +
    +

    A list of the ranks associated with the known entities.

    +
    +
    required
    - + @@ -2520,9 +2538,9 @@

    - Source code in src/pheval/analyse/binary_classification_stats.py -

    63
    +          
    + Source code in src/pheval/analyse/binary_classification_stats.py +
    63
     64
     65
     66
    @@ -2477,17 +2488,18 @@ 

    elif rank != 1: self.false_negatives += 1

    -
    +
    +

    -add_classification_for_other_entities(ranks) + add_classification_for_other_entities(ranks)

    @@ -2496,6 +2508,8 @@

    List[int]

    A list of the ranks for all other entities.

    +
    +

    A list of the ranks for all other entities.

    +
    +
    required
    - + @@ -2589,9 +2614,9 @@

    - Source code in src/pheval/analyse/binary_classification_stats.py -

    76
    +          
    + Source code in src/pheval/analyse/binary_classification_stats.py +
    76
     77
     78
     79
    @@ -2546,17 +2564,18 @@ 

    elif rank != 1: self.true_negatives += 1

    -
    +
    +

    -add_labels_and_scores(pheval_results, relevant_ranks) + add_labels_and_scores(pheval_results, relevant_ranks)

    @@ -2565,6 +2584,8 @@

    List[int]

    A list of the ranks associated with the known entities.

    +
    +

    A list of the ranks associated with the known entities.

    +
    +
    required
    - + - +
     89
    +          
    + Source code in src/pheval/analyse/binary_classification_stats.py +
     89
      90
      91
      92
    @@ -2639,17 +2664,18 @@ 

    self.labels.append(label) relevant_ranks_copy.remove(result.rank) if label == 1 else None

    -
    +
    +

    -f1_score() + f1_score()

    @@ -2660,6 +2686,8 @@

    float

    float

    The F1 Score of the model, calculated as 2 * TP / (2 * TP + FP + FN).

    +
    +

    The F1 Score of the model, calculated as 2 * TP / (2 * TP + FP + FN).

    +
    +
    float

    Returns 0.0 if the denominator is zero.

    +
    +

    Returns 0.0 if the denominator is zero.

    +
    +
    -
    - Source code in src/pheval/analyse/binary_classification_stats.py -
    - + - +
    279
    +          
    + Source code in src/pheval/analyse/binary_classification_stats.py +
    279
     280
     281
     282
    @@ -2720,17 +2756,18 @@ 

    else 0.0 )

    -
    +
    +

    -false_discovery_rate() + false_discovery_rate()

    @@ -2740,6 +2777,8 @@

    float

    float

    The False Discovery Rate of the model, calculated as false positives divided by the sum of

    +
    +

    The False Discovery Rate of the model, calculated as false positives divided by the sum of

    +
    +
    float

    false positives and true positives. Returns 0.0 if both false positives and true positives are zero.

    +
    +

    false positives and true positives. Returns 0.0 if both false positives and true positives are zero.

    +
    +
    -
    - Source code in src/pheval/analyse/binary_classification_stats.py -
    - + - +
    218
    +          
    + Source code in src/pheval/analyse/binary_classification_stats.py +
    218
     219
     220
     221
    @@ -2796,17 +2843,18 @@ 

    else 0.0 )

    -
    +
    +

    -false_negative_rate() + false_negative_rate()

    @@ -2816,6 +2864,8 @@

    float

    float

    The False Negative Rate of the model, calculated as false negatives divided by the sum of

    +
    +

    The False Negative Rate of the model, calculated as false negatives divided by the sum of

    +
    +
    float

    false negatives and true positives. Returns 0.0 if both false negatives and true positives are zero.

    +
    +

    false negatives and true positives. Returns 0.0 if both false negatives and true positives are zero.

    +
    +
    -
    - Source code in src/pheval/analyse/binary_classification_stats.py -
    - + - +
    234
    +          
    + Source code in src/pheval/analyse/binary_classification_stats.py +
    234
     235
     236
     237
    @@ -2872,17 +2930,18 @@ 

    else 0.0 )

    -
    +
    +

    -false_positive_rate() + false_positive_rate()

    @@ -2892,6 +2951,8 @@

    float

    float

    The False Positive Rate of the model, calculated as false positives divided by the sum of

    +
    +

    The False Positive Rate of the model, calculated as false positives divided by the sum of

    +
    +
    float

    false positives and true negatives. Returns 0.0 if both false positives and true negatives are zero.

    +
    +

    false positives and true negatives. Returns 0.0 if both false positives and true negatives are zero.

    +
    +
    -
    - Source code in src/pheval/analyse/binary_classification_stats.py -
    - + - + - +
    202
    +          
    + Source code in src/pheval/analyse/binary_classification_stats.py +
    202
     203
     204
     205
    @@ -2948,17 +3017,18 @@ 

    else 0.0 )

    -
    +
    +

    -matthews_correlation_coefficient() + matthews_correlation_coefficient()

    @@ -2968,6 +3038,8 @@

    float

    float

    The Matthews Correlation Coefficient of the model, calculated as

    +
    +

    The Matthews Correlation Coefficient of the model, calculated as

    +
    +
    float

    ((TP * TN) - (FP * FN)) / sqrt((TP + FP) * (TP + FN) * (TN + FP) * (TN + FN)).

    +
    +

    ((TP * TN) - (FP * FN)) / sqrt((TP + FP) * (TP + FN) * (TN + FP) * (TN + FN)).

    +
    +
    float

    Returns 0.0 if the denominator is zero.

    +
    +

    Returns 0.0 if the denominator is zero.

    +
    +
    -
    - Source code in src/pheval/analyse/binary_classification_stats.py -
    - + - +
    297
    +          
    + Source code in src/pheval/analyse/binary_classification_stats.py +
    297
     298
     299
     300
    @@ -3066,17 +3150,18 @@ 

    else 0.0 )

    -
    +
    +

    -negative_predictive_value() + negative_predictive_value()

    @@ -3086,6 +3171,8 @@

    float

    float

    The Negative Predictive Value of the model, calculated as true negatives divided by the sum of

    +
    +

    The Negative Predictive Value of the model, calculated as true negatives divided by the sum of

    +
    +
    float

    true negatives and false negatives. Returns 0.0 if both true negatives and false negatives are zero.

    +
    +

    true negatives and false negatives. Returns 0.0 if both true negatives and false negatives are zero.

    +
    +
    -
    - Source code in src/pheval/analyse/binary_classification_stats.py -
    - + - +
    186
    +          
    + Source code in src/pheval/analyse/binary_classification_stats.py +
    186
     187
     188
     189
    @@ -3142,17 +3237,18 @@ 

    else 0.0 )

    -
    +
    +

    -precision() + precision()

    @@ -3163,6 +3259,8 @@

    float

    float

    The precision of the model, calculated as true positives divided by the sum of true positives

    +
    +

    The precision of the model, calculated as true positives divided by the sum of true positives

    +
    +
    float

    and false positives. Returns 0.0 if both true positives and false positives are zero.

    +
    +

    and false positives. Returns 0.0 if both true positives and false positives are zero.

    +
    +
    -
    - Source code in src/pheval/analyse/binary_classification_stats.py -
    169
    +          
    + Source code in src/pheval/analyse/binary_classification_stats.py +
    169
     170
     171
     172
    @@ -3221,17 +3327,18 @@ 

    else 0.0 )

    -
    +
    +

    -remove_relevant_ranks(pheval_results, relevant_ranks) + remove_relevant_ranks(pheval_results, relevant_ranks) staticmethod @@ -3242,42 +3349,14 @@

    -

    Remove the relevant entity ranks from all result ranks

    +

    Remove the relevant entity ranks from all result ranks +Args: + pheval_results: + (Union[List[RankedPhEvalGeneResult], List[RankedPhEvalVariantResult], List[RankedPhEvalDiseaseResult]]): + The list of all pheval results. + relevant_ranks (List[int]): A list of the ranks associated with the known entities.

    + -

    Parameters:

    - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    pheval_results - Union[List[RankedPhEvalGeneResult], List[RankedPhEvalVariantResult], List[RankedPhEvalDiseaseResult]] -

    (Union[List[RankedPhEvalGeneResult], List[RankedPhEvalVariantResult], List[RankedPhEvalDiseaseResult]]): - The list of all pheval results.

    - required -
    relevant_ranks - List[int] -

    A list of the ranks associated with the known entities.

    - required -

    Returns:

    @@ -3292,14 +3371,18 @@

    List[int] -

    +

    List[int]: A list of the ranks with the relevant entity ranks removed.

    +
    +

    List[int]: A list of the ranks with the relevant entity ranks removed.

    +
    +
    -
    - Source code in src/pheval/analyse/binary_classification_stats.py -
    - + - +
    35
    +          
    + Source code in src/pheval/analyse/binary_classification_stats.py +
    35
     36
     37
     38
    @@ -3353,17 +3436,18 @@ 

    continue return all_result_ranks

    -
    +
    +

    -sensitivity() + sensitivity()

    @@ -3373,6 +3457,8 @@

    float

    float

    The sensitivity of the model, calculated as true positives divided by the sum of true positives

    +
    +

    The sensitivity of the model, calculated as true positives divided by the sum of true positives

    +
    +
    float

    and false negatives. Returns 0 if both true positives and false negatives are zero.

    +
    +

    and false negatives. Returns 0 if both true positives and false negatives are zero.

    +
    +
    -
    - Source code in src/pheval/analyse/binary_classification_stats.py -
    - + - +
    137
    +          
    + Source code in src/pheval/analyse/binary_classification_stats.py +
    137
     138
     139
     140
    @@ -3429,17 +3523,18 @@ 

    else 0.0 )

    -
    +
    +

    -specificity() + specificity()

    @@ -3449,6 +3544,8 @@

    float

    float

    The specificity of the model, calculated as true negatives divided by the sum of true negatives

    +
    +

    The specificity of the model, calculated as true negatives divided by the sum of true negatives

    +
    +
    float

    and false positives. Returns 0.0 if both true negatives and false positives are zero.

    +
    +

    and false positives. Returns 0.0 if both true negatives and false positives are zero.

    +
    +
    -
    - Source code in src/pheval/analyse/binary_classification_stats.py -
    153
    +          
    + Source code in src/pheval/analyse/binary_classification_stats.py +
    153
     154
     155
     156
    @@ -3505,7 +3610,7 @@ 

    else 0.0 )

    -
    +
    @@ -3516,6 +3621,7 @@

    Disease prioritisation analysis

    +
    @@ -1338,7 +1339,7 @@

    Disease prioritisation analysis

    - AssessDiseasePrioritisation + AssessDiseasePrioritisation

    @@ -1349,10 +1350,9 @@

    - Source code in src/pheval/analyse/disease_prioritisation_analysis.py -
    - + @@ -1768,7 +1775,11 @@

    Path -

    + @@ -1778,7 +1789,11 @@

    List[RankedPhEvalDiseaseResult] -

    + @@ -1788,7 +1803,11 @@

    +

    Threshold for scores

    + +

    @@ -1798,7 +1817,11 @@

    +

    Score order for results, either ascending or descending

    + +

    @@ -1808,7 +1831,11 @@

    List[ProbandDisease] -

    + @@ -1816,9 +1843,9 @@

    - Source code in src/pheval/analyse/disease_prioritisation_analysis.py -

     17
    +            
    + Source code in src/pheval/analyse/disease_prioritisation_analysis.py +
     17
      18
      19
      20
    @@ -1714,7 +1714,7 @@ 

    self.standardised_disease_results, relevant_ranks )

    -
    + @@ -1728,12 +1728,13 @@

    -__init__(phenopacket_path, results_dir, standardised_disease_results, threshold, score_order, proband_diseases) + __init__(phenopacket_path, results_dir, standardised_disease_results, threshold, score_order, proband_diseases)

    @@ -1742,6 +1743,8 @@

    Path

    Path to the phenopacket file

    +
    +

    Path to the phenopacket file

    +
    +
    required

    Path to the results directory

    +
    +

    Path to the results directory

    +
    +
    required

    List of ranked PhEval disease results

    +
    +

    List of ranked PhEval disease results

    +
    +
    required required required

    List of proband diseases

    +
    +

    List of proband diseases

    +
    +
    required
    - + @@ -1919,7 +1953,11 @@

    defaultdict -

    + @@ -1929,7 +1967,11 @@

    BinaryClassificationStats -

    + @@ -1937,9 +1979,9 @@

    - Source code in src/pheval/analyse/disease_prioritisation_analysis.py -

    20
    +          
    + Source code in src/pheval/analyse/disease_prioritisation_analysis.py +
    20
     21
     22
     23
    @@ -1872,17 +1899,18 @@ 

    self.score_order = score_order self.proband_diseases = proband_diseases

    -
    +
    +

    -assess_disease_prioritisation(rank_stats, rank_records, binary_classification_stats) + assess_disease_prioritisation(rank_stats, rank_records, binary_classification_stats)

    @@ -1893,6 +1921,8 @@

    RankStats

    RankStats class instance

    +
    +

    RankStats class instance

    +
    +
    required

    A defaultdict to store the correct ranked results.

    +
    +

    A defaultdict to store the correct ranked results.

    +
    +
    required

    BinaryClassificationStats class instance.

    +
    +

    BinaryClassificationStats class instance.

    +
    +
    required
    - + @@ -2092,7 +2142,11 @@

    +

    The order in which scores are arranged, either ascending or descending.

    + +

    @@ -2102,7 +2156,11 @@

    TrackInputOutputDirectories -

    + @@ -2112,7 +2170,11 @@

    +

    Threshold for assessment.

    + +

    @@ -2122,7 +2184,11 @@

    RankStats -

    + @@ -2132,7 +2198,11 @@

    defaultdict -

    + @@ -2142,7 +2212,11 @@

    BinaryClassificationStats -

    + @@ -2150,9 +2224,9 @@

    - Source code in src/pheval/analyse/disease_prioritisation_analysis.py -

    149
    +          
    + Source code in src/pheval/analyse/disease_prioritisation_analysis.py +
    149
     150
     151
     152
    @@ -2037,7 +2079,7 @@ 

    self.standardised_disease_results, relevant_ranks )

    -
    +
    @@ -2048,15 +2090,17 @@

    -assess_phenopacket_disease_prioritisation(phenopacket_path, score_order, results_dir_and_input, threshold, disease_rank_stats, disease_rank_comparison, disease_binary_classification_stats) + assess_phenopacket_disease_prioritisation(phenopacket_path, score_order, results_dir_and_input, threshold, disease_rank_stats, disease_rank_comparison, disease_binary_classification_stats)

    @@ -2066,6 +2110,8 @@

    Path

    Path to the Phenopacket.

    +
    +

    Path to the Phenopacket.

    +
    +
    required required

    Input and output directories.

    +
    +

    Input and output directories.

    +
    +
    required required

    RankStats class instance.

    +
    +

    RankStats class instance.

    +
    +
    required

    Default dictionary for disease rank comparisons.

    +
    +

    Default dictionary for disease rank comparisons.

    +
    +
    required

    BinaryClassificationStats class instance.

    +
    +

    BinaryClassificationStats class instance.

    +
    +
    required
    - + @@ -2271,7 +2352,11 @@

    +

    The order in which scores are arranged.

    + +

    @@ -2281,7 +2366,11 @@

    +

    Threshold for assessment.

    + +

    @@ -2291,7 +2380,11 @@

    defaultdict -

    + @@ -2299,6 +2392,8 @@

    - + - +
    215
    +          
    + Source code in src/pheval/analyse/disease_prioritisation_analysis.py +
    215
     216
     217
     218
    @@ -2226,17 +2300,18 @@ 

    disease_rank_stats, disease_rank_comparison, disease_binary_classification_stats )

    -
    +
    +

    -benchmark_disease_prioritisation(results_directory_and_input, score_order, threshold, disease_rank_comparison) + benchmark_disease_prioritisation(results_directory_and_input, score_order, threshold, disease_rank_comparison)

    @@ -2245,6 +2320,8 @@

    TrackInputOutputDirectories

    Input and output directories.

    +
    +

    Input and output directories.

    +
    +
    required required required

    Default dictionary for disease rank comparisons.

    +
    +

    Default dictionary for disease rank comparisons.

    +
    +
    required BenchmarkRunResults

    An object containing benchmarking results for disease prioritisation,

    +
    +

    An object containing benchmarking results for disease prioritisation,

    +
    +

    including ranks and rank statistics for the benchmarked directory.

    +
    +

    including ranks and rank statistics for the benchmarked directory.

    +
    +
    -
    - Source code in src/pheval/analyse/disease_prioritisation_analysis.py -
    254
    +          
    + Source code in src/pheval/analyse/disease_prioritisation_analysis.py +
    254
     255
     256
     257
    @@ -2397,7 +2500,7 @@ 

    binary_classification_stats=disease_binary_classification_stats, )

    -
    +
    diff --git a/api/pheval/analyse/gene_prioritisation_analysis/index.html b/api/pheval/analyse/gene_prioritisation_analysis/index.html index e16554c8e..697341646 100644 --- a/api/pheval/analyse/gene_prioritisation_analysis/index.html +++ b/api/pheval/analyse/gene_prioritisation_analysis/index.html @@ -11,7 +11,7 @@ - + @@ -561,7 +561,7 @@
  • - src.pheval.analyse.gene_prioritisation_analysis + gene_prioritisation_analysis
  • @@ -576,14 +576,14 @@
  • - __init__() + __init__
  • - assess_gene_prioritisation() + assess_gene_prioritisation
  • @@ -595,14 +595,14 @@
  • - assess_phenopacket_gene_prioritisation() + assess_phenopacket_gene_prioritisation
  • - benchmark_gene_prioritisation() + benchmark_gene_prioritisation
  • @@ -1248,7 +1248,7 @@
  • - src.pheval.analyse.gene_prioritisation_analysis + gene_prioritisation_analysis
  • @@ -1263,14 +1263,14 @@
  • - __init__() + __init__
  • - assess_gene_prioritisation() + assess_gene_prioritisation
  • @@ -1282,14 +1282,14 @@
  • - assess_phenopacket_gene_prioritisation() + assess_phenopacket_gene_prioritisation
  • - benchmark_gene_prioritisation() + benchmark_gene_prioritisation
  • @@ -1319,6 +1319,7 @@

    Gene prioritisation analysis

    +
    @@ -1338,7 +1339,7 @@

    Gene prioritisation analysis

    - AssessGenePrioritisation + AssessGenePrioritisation

    @@ -1349,10 +1350,9 @@

    - Source code in src/pheval/analyse/gene_prioritisation_analysis.py -
    - + @@ -1814,7 +1821,11 @@

    Path -

    + @@ -1824,7 +1835,11 @@

    List[RankedPhEvalGeneResult] -

    + @@ -1834,7 +1849,11 @@

    +

    Threshold for scores

    + +

    @@ -1844,7 +1863,11 @@

    +

    Score order for results, either ascending or descending

    + +

    @@ -1854,7 +1877,11 @@

    List[ProbandCausativeGene] -

    + @@ -1862,9 +1889,9 @@

    - Source code in src/pheval/analyse/gene_prioritisation_analysis.py -

     19
    +            
    + Source code in src/pheval/analyse/gene_prioritisation_analysis.py +
     19
      20
      21
      22
    @@ -1760,7 +1760,7 @@ 

    pheval_results=self.standardised_gene_results, relevant_ranks=relevant_ranks )

    -
    + @@ -1774,12 +1774,13 @@

    -__init__(phenopacket_path, results_dir, standardised_gene_results, threshold, score_order, proband_causative_genes) + __init__(phenopacket_path, results_dir, standardised_gene_results, threshold, score_order, proband_causative_genes)

    @@ -1788,6 +1789,8 @@

    Path

    Path to the phenopacket file

    +
    +

    Path to the phenopacket file

    +
    +
    required

    Path to the results directory

    +
    +

    Path to the results directory

    +
    +
    required

    List of ranked PhEval gene results

    +
    +

    List of ranked PhEval gene results

    +
    +
    required required required

    List of proband causative genes

    +
    +

    List of proband causative genes

    +
    +
    required
    - + @@ -1963,7 +1997,11 @@

    defaultdict -

    + @@ -1973,7 +2011,11 @@

    BinaryClassificationStats -

    + @@ -1981,9 +2023,9 @@

    - Source code in src/pheval/analyse/gene_prioritisation_analysis.py -

    22
    +          
    + Source code in src/pheval/analyse/gene_prioritisation_analysis.py +
    22
     23
     24
     25
    @@ -1916,17 +1943,18 @@ 

    self.score_order = score_order self.proband_causative_genes = proband_causative_genes

    -
    +
    +

    -assess_gene_prioritisation(rank_stats, rank_records, binary_classification_stats) + assess_gene_prioritisation(rank_stats, rank_records, binary_classification_stats)

    @@ -1937,6 +1965,8 @@

    RankStats

    RankStats class instance

    +
    +

    RankStats class instance

    +
    +
    required

    A defaultdict to store the correct ranked results.

    +
    +

    A defaultdict to store the correct ranked results.

    +
    +
    required

    BinaryClassificationStats class instance.

    +
    +

    BinaryClassificationStats class instance.

    +
    +
    required
    - + @@ -2158,7 +2208,11 @@

    +

    The order in which scores are arranged, either ascending or descending.

    + +

    @@ -2168,7 +2222,11 @@

    TrackInputOutputDirectories -

    + @@ -2178,7 +2236,11 @@

    +

    Threshold for assessment.

    + +

    @@ -2188,7 +2250,11 @@

    RankStats -

    + @@ -2198,7 +2264,11 @@

    defaultdict -

    + @@ -2208,7 +2278,11 @@

    BinaryClassificationStats -

    + @@ -2216,9 +2290,9 @@

    - Source code in src/pheval/analyse/gene_prioritisation_analysis.py -

    163
    +          
    + Source code in src/pheval/analyse/gene_prioritisation_analysis.py +
    163
     164
     165
     166
    @@ -2103,7 +2145,7 @@ 

    pheval_results=self.standardised_gene_results, relevant_ranks=relevant_ranks )

    -
    +
    @@ -2114,15 +2156,17 @@

    -assess_phenopacket_gene_prioritisation(phenopacket_path, score_order, results_dir_and_input, threshold, gene_rank_stats, gene_rank_comparison, gene_binary_classification_stats) + assess_phenopacket_gene_prioritisation(phenopacket_path, score_order, results_dir_and_input, threshold, gene_rank_stats, gene_rank_comparison, gene_binary_classification_stats)

    @@ -2132,6 +2176,8 @@

    Path

    Path to the Phenopacket.

    +
    +

    Path to the Phenopacket.

    +
    +
    required required

    Input and output directories.

    +
    +

    Input and output directories.

    +
    +
    required required

    RankStats class instance.

    +
    +

    RankStats class instance.

    +
    +
    required

    Default dictionary for gene rank comparisons.

    +
    +

    Default dictionary for gene rank comparisons.

    +
    +
    required

    BinaryClassificationStats class instance.

    +
    +

    BinaryClassificationStats class instance.

    +
    +
    required
    239
    +          
    + Source code in src/pheval/analyse/gene_prioritisation_analysis.py +
    239
     240
     241
     242
    @@ -2292,17 +2366,18 @@ 

    gene_rank_stats, gene_rank_comparison, gene_binary_classification_stats )

    -
    +
    +

    -benchmark_gene_prioritisation(results_directory_and_input, score_order, threshold, gene_rank_comparison) + benchmark_gene_prioritisation(results_directory_and_input, score_order, threshold, gene_rank_comparison)

    @@ -2319,9 +2394,9 @@

    - Source code in src/pheval/analyse/gene_prioritisation_analysis.py -
    278
    +          
    + Source code in src/pheval/analyse/gene_prioritisation_analysis.py +
    278
     279
     280
     281
    @@ -2391,7 +2466,7 @@ 

    binary_classification_stats=gene_binary_classification_stats, )

    -
    +
    diff --git a/api/pheval/analyse/generate_plots/index.html b/api/pheval/analyse/generate_plots/index.html index 08bb76deb..4cba87853 100644 --- a/api/pheval/analyse/generate_plots/index.html +++ b/api/pheval/analyse/generate_plots/index.html @@ -11,7 +11,7 @@ - + @@ -575,7 +575,7 @@
  • - src.pheval.analyse.generate_plots + generate_plots
  • @@ -590,49 +590,49 @@
  • - __init__() + __init__
  • - generate_cumulative_bar() + generate_cumulative_bar
  • - generate_non_cumulative_bar() + generate_non_cumulative_bar
  • - generate_precision_recall() + generate_precision_recall
  • - generate_roc_curve() + generate_roc_curve
  • - generate_stacked_bar_plot() + generate_stacked_bar_plot
  • - return_benchmark_name() + return_benchmark_name
  • @@ -644,21 +644,21 @@
  • - generate_plots() + generate_plots
  • - generate_plots_from_benchmark_summary_tsv() + generate_plots_from_benchmark_summary_tsv
  • - trim_corpus_results_directory_suffix() + trim_corpus_results_directory_suffix
  • @@ -1290,7 +1290,7 @@
  • - src.pheval.analyse.generate_plots + generate_plots
  • @@ -1305,49 +1305,49 @@
  • - __init__() + __init__
  • - generate_cumulative_bar() + generate_cumulative_bar
  • - generate_non_cumulative_bar() + generate_non_cumulative_bar
  • - generate_precision_recall() + generate_precision_recall
  • - generate_roc_curve() + generate_roc_curve
  • - generate_stacked_bar_plot() + generate_stacked_bar_plot
  • - return_benchmark_name() + return_benchmark_name
  • @@ -1359,21 +1359,21 @@
  • - generate_plots() + generate_plots
  • - generate_plots_from_benchmark_summary_tsv() + generate_plots_from_benchmark_summary_tsv
  • - trim_corpus_results_directory_suffix() + trim_corpus_results_directory_suffix
  • @@ -1403,6 +1403,7 @@

    Generate plots

    +
    @@ -1422,7 +1423,7 @@

    Generate plots

    - PlotGenerator + PlotGenerator

    @@ -1433,10 +1434,9 @@

    Class to generate plots.

    - -
    - Source code in src/pheval/analyse/generate_plots.py -
     37
    +            
    + Source code in src/pheval/analyse/generate_plots.py +
     37
      38
      39
      40
    @@ -2318,7 +2318,7 @@ 

    bbox_inches="tight", )

    -
    + @@ -2332,30 +2332,29 @@

    -__init__() + __init__()

    -

    Initialise the PlotGenerator class.

    - -
    - Note -

    self.stats will be used to store statistics data. -self.mrr will store Mean Reciprocal Rank (MRR) values. -Matplotlib settings are configured to remove the right and top axes spines -for generated plots.

    -
    -
    - Source code in src/pheval/analyse/generate_plots.py -
    53
    +      

    Initialise the PlotGenerator class. +Note: + self.stats will be used to store statistics data. + self.mrr will store Mean Reciprocal Rank (MRR) values. + Matplotlib settings are configured to remove the right and top axes spines + for generated plots.

    + +
    + Source code in src/pheval/analyse/generate_plots.py +
    53
     54
     55
     56
    @@ -2383,17 +2382,18 @@ 

    matplotlib.rcParams["axes.spines.right"] = False matplotlib.rcParams["axes.spines.top"] = False

    -
    +
    +

    -generate_cumulative_bar(benchmarking_results, benchmark_generator, title=None) + generate_cumulative_bar(benchmarking_results, benchmark_generator, title=None)

    @@ -2402,6 +2402,8 @@

    Generate a cumulative bar plot.

    + +

    Parameters:

    @@ -2418,7 +2420,11 @@

    List[BenchmarkRunResults] -

    + @@ -2428,7 +2434,11 @@

    BenchmarkRunOutputGenerator -

    + @@ -2438,7 +2448,11 @@

    str -

    + @@ -2446,9 +2460,9 @@

    List of benchmarking results for multiple runs.

    +
    +

    List of benchmarking results for multiple runs.

    +
    +
    required

    Object containing benchmarking output generation details.

    +
    +

    Object containing benchmarking output generation details.

    +
    +
    required

    Title for the generated plot. Defaults to None.

    +
    +

    Title for the generated plot. Defaults to None.

    +
    +
    None
    -
    - Source code in src/pheval/analyse/generate_plots.py -
    - + @@ -2573,7 +2594,11 @@

    BenchmarkRunOutputGenerator -

    + @@ -2583,7 +2608,11 @@

    +

    Title for the generated plot. Defaults to None.

    + +

    @@ -2591,9 +2620,9 @@

    - Source code in src/pheval/analyse/generate_plots.py -

    253
    +          
    + Source code in src/pheval/analyse/generate_plots.py +
    253
     254
     255
     256
    @@ -2528,17 +2542,18 @@ 

    bbox_inches="tight", )

    -
    +
    +

    -generate_non_cumulative_bar(benchmarking_results, benchmark_generator, title=None) + generate_non_cumulative_bar(benchmarking_results, benchmark_generator, title=None)

    @@ -2547,6 +2562,8 @@

    List[BenchmarkRunResults]

    List of benchmarking results for multiple runs.

    +
    +

    List of benchmarking results for multiple runs.

    +
    +
    required

    Object containing benchmarking output generation details.

    +
    +

    Object containing benchmarking output generation details.

    +
    +
    required None
    - + @@ -2720,7 +2756,11 @@

    BenchmarkRunOutputGenerator -

    + @@ -2728,9 +2768,9 @@

    - Source code in src/pheval/analyse/generate_plots.py -

    437
    +          
    + Source code in src/pheval/analyse/generate_plots.py +
    437
     438
     439
     440
    @@ -2675,17 +2704,18 @@ 

    bbox_inches="tight", )

    -
    +
    +

    -generate_precision_recall(benchmarking_results, benchmark_generator) + generate_precision_recall(benchmarking_results, benchmark_generator)

    @@ -2694,6 +2724,8 @@

    List[BenchmarkRunResults]

    List of benchmarking results for multiple runs.

    +
    +

    List of benchmarking results for multiple runs.

    +
    +
    required

    Object containing benchmarking output generation details.

    +
    +

    Object containing benchmarking output generation details.

    +
    +
    required
    399
    +          
    + Source code in src/pheval/analyse/generate_plots.py +
    399
     400
     401
     402
    @@ -2804,17 +2844,18 @@ 

    bbox_inches="tight", )

    -
    +
    +

    -generate_roc_curve(benchmarking_results, benchmark_generator) + generate_roc_curve(benchmarking_results, benchmark_generator)

    @@ -2823,6 +2864,8 @@

    Generate and plot Receiver Operating Characteristic (ROC) curves for binary classification benchmark results.

    + +

    Parameters:

    @@ -2839,7 +2882,11 @@

    List[BenchmarkRunResults] -

    + @@ -2849,7 +2896,11 @@

    BenchmarkRunOutputGenerator -

    + @@ -2857,9 +2908,9 @@

    List of benchmarking results for multiple runs.

    +
    +

    List of benchmarking results for multiple runs.

    +
    +
    required

    Object containing benchmarking output generation details.

    +
    +

    Object containing benchmarking output generation details.

    +
    +
    required
    -
    - Source code in src/pheval/analyse/generate_plots.py -
    - + @@ -2978,7 +3036,11 @@

    BenchmarkRunOutputGenerator -

    + @@ -2988,7 +3050,11 @@

    +

    Title for the generated plot. Defaults to None.

    + +

    @@ -2996,9 +3062,9 @@

    - Source code in src/pheval/analyse/generate_plots.py -

    361
    +          
    + Source code in src/pheval/analyse/generate_plots.py +
    361
     362
     363
     364
    @@ -2933,17 +2984,18 @@ 

    bbox_inches="tight", )

    -
    +
    +

    -generate_stacked_bar_plot(benchmarking_results, benchmark_generator, title=None) + generate_stacked_bar_plot(benchmarking_results, benchmark_generator, title=None)

    @@ -2952,6 +3004,8 @@

    List[BenchmarkRunResults]

    List of benchmarking results for multiple runs.

    +
    +

    List of benchmarking results for multiple runs.

    +
    +
    required

    Object containing benchmarking output generation details.

    +
    +

    Object containing benchmarking output generation details.

    +
    +
    required None
    144
    +          
    + Source code in src/pheval/analyse/generate_plots.py +
    144
     145
     146
     147
    @@ -3108,17 +3174,18 @@ 

    bbox_inches="tight", )

    -
    +
    +

    -return_benchmark_name(benchmark_result) + return_benchmark_name(benchmark_result)

    @@ -3127,6 +3194,8 @@

    Return the benchmark name for a run.

    + +

    Parameters:

    @@ -3143,7 +3212,11 @@

    BenchmarkRunResults -

    + @@ -3151,6 +3224,8 @@

    The benchmarking results for a run.

    +
    +

    The benchmarking results for a run.

    +
    +
    required
    + +

    Returns:

    @@ -3164,14 +3239,18 @@

    str

    - +
    str

    The benchmark name obtained from the given BenchmarkRunResults instance.

    +
    +

    The benchmark name obtained from the given BenchmarkRunResults instance.

    +
    +
    -
    - Source code in src/pheval/analyse/generate_plots.py -
    - + @@ -3256,7 +3343,11 @@

    BenchmarkRunOutputGenerator -

    + @@ -3266,7 +3357,11 @@

    +

    @@ -3276,7 +3371,11 @@

    +

    Title for the generated plot. Defaults to None.

    + +

    @@ -3286,7 +3385,11 @@

    +

    Specify whether to generate plots from the TSV file. Defaults to False.

    + +

    @@ -3294,9 +3397,9 @@

    - Source code in src/pheval/analyse/generate_plots.py -

    81
    +          
    + Source code in src/pheval/analyse/generate_plots.py +
    81
     82
     83
     84
    @@ -3201,7 +3280,7 @@ 

    else self._create_run_identifier(benchmark_result.results_dir) )

    -
    +
    @@ -3212,15 +3291,17 @@

    + +

    -generate_plots(benchmarking_results, benchmark_generator, plot_type, title=None, generate_from_tsv=False) + generate_plots(benchmarking_results, benchmark_generator, plot_type, title=None, generate_from_tsv=False)

    @@ -3230,6 +3311,8 @@

    BenchmarkRunResults]

    List of benchmarking results for multiple runs.

    +
    +

    List of benchmarking results for multiple runs.

    +
    +
    required

    Object containing benchmarking output generation details.

    +
    +

    Object containing benchmarking output generation details.

    +
    +
    required +
    +

    Type of plot to be generated ("bar_stacked", "bar_cumulative", "bar_non_cumulative").

    +
    +
    required None False
    - + @@ -3401,7 +3511,11 @@

    +

    Flag indicating whether to analyse gene prioritisation.

    + +

    @@ -3411,7 +3525,11 @@

    +

    Flag indicating whether to analyse variant prioritisation.

    + +

    @@ -3421,7 +3539,11 @@

    +

    Flag indicating whether to analyse disease prioritisation.

    + +

    @@ -3431,7 +3553,11 @@

    +

    @@ -3441,35 +3567,23 @@

    +

    Title for the generated plot.

    + -

    - -
    480
    +          
    + Source code in src/pheval/analyse/generate_plots.py +
    480
     481
     482
     483
    @@ -3354,17 +3457,18 @@ 

    elif plot_type == "bar_non_cumulative": plot_generator.generate_non_cumulative_bar(benchmarking_results, benchmark_generator, title)

    -
    +
    +

    -generate_plots_from_benchmark_summary_tsv(benchmark_summary_tsv, gene_analysis, variant_analysis, disease_analysis, plot_type, title) + generate_plots_from_benchmark_summary_tsv(benchmark_summary_tsv, gene_analysis, variant_analysis, disease_analysis, plot_type, title)

    @@ -3375,6 +3479,8 @@

    Path

    Path to the summary TSV file containing benchmark results.

    +
    +

    Path to the summary TSV file containing benchmark results.

    +
    +
    required required required required +
    +

    Type of plot to be generated ("bar_stacked", "bar_cumulative", "bar_non_cumulative").

    +
    +
    required
    - -

    Raises:

    - - - - - - - - - -
    TypeDescription
    - ValueError + required

    If an unsupported plot type is specified.

    +

    Raises: + ValueError: If an unsupported plot type is specified.

    -
    - Source code in src/pheval/analyse/generate_plots.py -
    511
    +          
    + Source code in src/pheval/analyse/generate_plots.py +
    511
     512
     513
     514
    @@ -3543,17 +3657,18 @@ 

    ) generate_plots(benchmarking_results, benchmark_generator, plot_type, title, True)

    -
    +
    +

    -trim_corpus_results_directory_suffix(corpus_results_directory) + trim_corpus_results_directory_suffix(corpus_results_directory)

    @@ -3562,6 +3677,8 @@

    Trim the suffix from the corpus results directory name.

    + +

    Parameters:

    @@ -3578,7 +3695,11 @@

    Path -

    + @@ -3586,6 +3707,8 @@

    The directory path containing corpus results.

    +
    +

    The directory path containing corpus results.

    +
    +
    required
    + +

    Returns:

    @@ -3599,14 +3722,18 @@

    Path

    - +
    Path

    The Path object with the suffix removed from the directory name.

    +
    +

    The Path object with the suffix removed from the directory name.

    +
    +
    -
    - Source code in src/pheval/analyse/generate_plots.py -
    24
    +          
    + Source code in src/pheval/analyse/generate_plots.py +
    24
     25
     26
     27
    @@ -3628,7 +3755,7 @@ 

    """ return Path(str(corpus_results_directory).replace(PHEVAL_RESULTS_DIRECTORY_SUFFIX, ""))

    -
    +
    diff --git a/api/pheval/analyse/generate_summary_outputs/index.html b/api/pheval/analyse/generate_summary_outputs/index.html index 6fa093dfe..2fda74b44 100644 --- a/api/pheval/analyse/generate_summary_outputs/index.html +++ b/api/pheval/analyse/generate_summary_outputs/index.html @@ -11,7 +11,7 @@ - + @@ -589,7 +589,7 @@
  • - src.pheval.analyse.generate_summary_outputs + generate_summary_outputs
  • @@ -604,21 +604,21 @@
  • - __init__() + __init__
  • - generate_comparison_output() + generate_comparison_output
  • - generate_output() + generate_output
  • @@ -630,21 +630,21 @@
  • - generate_benchmark_comparison_output() + generate_benchmark_comparison_output
  • - generate_benchmark_output() + generate_benchmark_output
  • - merge_results() + merge_results
  • @@ -1262,7 +1262,7 @@
  • - src.pheval.analyse.generate_summary_outputs + generate_summary_outputs
  • @@ -1277,21 +1277,21 @@
  • - __init__() + __init__
  • - generate_comparison_output() + generate_comparison_output
  • - generate_output() + generate_output
  • @@ -1303,21 +1303,21 @@
  • - generate_benchmark_comparison_output() + generate_benchmark_comparison_output
  • - generate_benchmark_output() + generate_benchmark_output
  • - merge_results() + merge_results
  • @@ -1347,6 +1347,7 @@

    Generate summary outputs

    +
    @@ -1366,7 +1367,7 @@

    Generate summary outputs

    - RankComparisonGenerator + RankComparisonGenerator

    @@ -1377,10 +1378,9 @@

    Class for writing the run comparison of rank assignment for prioritisation.

    - -
    - Source code in src/pheval/analyse/generate_summary_outputs.py -
    - + @@ -1558,9 +1565,9 @@

    - Source code in src/pheval/analyse/generate_summary_outputs.py -

    15
    +            
    + Source code in src/pheval/analyse/generate_summary_outputs.py +
    15
     16
     17
     18
    @@ -1506,7 +1506,7 @@ 

    """ self._calculate_rank_difference().to_csv(prefix + suffix, sep="\t")

    -
    + @@ -1520,12 +1520,13 @@

    -__init__(run_comparison) + __init__(run_comparison)

    @@ -1534,6 +1535,8 @@

    defaultdict

    A nested dictionary containing the run comparison data.

    +
    +

    A nested dictionary containing the run comparison data.

    +
    +
    required
    - + @@ -1621,7 +1635,11 @@

    +

    Suffix for the output file name.

    + +

    @@ -1629,9 +1647,9 @@

    - Source code in src/pheval/analyse/generate_summary_outputs.py -

    18
    +          
    + Source code in src/pheval/analyse/generate_summary_outputs.py +
    18
     19
     20
     21
    @@ -1576,17 +1583,18 @@ 

    """ self.run_comparison = run_comparison

    -
    +
    +

    -generate_comparison_output(prefix, suffix) + generate_comparison_output(prefix, suffix)

    @@ -1595,6 +1603,8 @@

    str

    Prefix for the output file name.

    +
    +

    Prefix for the output file name.

    +
    +
    required required
    - + @@ -1694,7 +1719,11 @@

    +

    Suffix for the output file name.

    + +

    @@ -1702,9 +1731,9 @@

    - Source code in src/pheval/analyse/generate_summary_outputs.py -

    69
    +          
    + Source code in src/pheval/analyse/generate_summary_outputs.py +
    69
     70
     71
     72
    @@ -1649,17 +1667,18 @@ 

    """ self._calculate_rank_difference().to_csv(prefix + suffix, sep="\t")

    -
    +
    +

    -generate_output(prefix, suffix) + generate_output(prefix, suffix)

    @@ -1668,6 +1687,8 @@

    str

    Prefix for the output file name.

    +
    +

    Prefix for the output file name.

    +
    +
    required required
    - + @@ -1780,7 +1817,11 @@

    +

    The type of plot to be generated.

    + +

    @@ -1790,7 +1831,11 @@

    BenchmarkRunOutputGenerator -

    + @@ -1798,9 +1843,9 @@

    - Source code in src/pheval/analyse/generate_summary_outputs.py -

    59
    +          
    + Source code in src/pheval/analyse/generate_summary_outputs.py +
    59
     60
     61
     62
    @@ -1722,7 +1751,7 @@ 

    """ self._generate_dataframe().to_csv(prefix + suffix, sep="\t")

    -
    +
    @@ -1733,15 +1762,17 @@

    -generate_benchmark_comparison_output(benchmarking_results, plot_type, benchmark_generator) + generate_benchmark_comparison_output(benchmarking_results, plot_type, benchmark_generator)

    @@ -1753,6 +1784,8 @@

    List[BenchmarkRunResults]

    A list containing BenchmarkRunResults instances -representing the benchmarking results of multiple runs.

    +
    +

    A list containing BenchmarkRunResults instances +representing the benchmarking results of multiple runs.

    +
    +
    required required

    Object containing benchmarking output generation details.

    +
    +

    Object containing benchmarking output generation details.

    +
    +
    required
    137
    +          
    + Source code in src/pheval/analyse/generate_summary_outputs.py +
    137
     138
     139
     140
    @@ -1878,17 +1923,18 @@ 

    plot_type, )

    -
    +
    +

    -generate_benchmark_output(benchmarking_results, plot_type, benchmark_generator) + generate_benchmark_output(benchmarking_results, plot_type, benchmark_generator)

    @@ -1897,6 +1943,8 @@

    Generate prioritisation outputs for a single benchmarking run.

    + +

    Parameters:

    @@ -1913,7 +1961,11 @@

    BenchmarkRunResults -

    + @@ -1923,7 +1975,11 @@

    str -

    + @@ -1933,7 +1989,11 @@

    BenchmarkRunOutputGenerator -

    + @@ -1941,9 +2001,9 @@

    Results of a benchmarking run.

    +
    +

    Results of a benchmarking run.

    +
    +
    required

    Type of plot to generate.

    +
    +

    Type of plot to generate.

    +
    +
    required

    Object containing benchmarking output generation details.

    +
    +

    Object containing benchmarking output generation details.

    +
    +
    required
    -
    - Source code in src/pheval/analyse/generate_summary_outputs.py -
    @@ -2041,7 +2108,11 @@

    +

    The second dictionary to be merged.

    + +

    @@ -2049,6 +2120,8 @@

    defaultdict -

    +
     80
    +          
    + Source code in src/pheval/analyse/generate_summary_outputs.py +
     80
      81
      82
      83
    @@ -1991,17 +2051,18 @@ 

    plot_type, )

    -
    +
    +

    -merge_results(result1, result2) + merge_results(result1, result2)

    @@ -2015,6 +2076,8 @@

    +

    The first dictionary to be merged.

    +

    +
    required required

    The merged dictionary containing the combined contents of result1 and result2.

    +
    +

    The merged dictionary containing the combined contents of result1 and result2.

    +
    +
    -
    - Source code in src/pheval/analyse/generate_summary_outputs.py -
    - + 'found', 'total', 'mean_reciprocal_rank'.

    + + @@ -1320,6 +1328,8 @@

    List[BenchmarkRunResults] -

    +
    106
    +          
    + Source code in src/pheval/analyse/generate_summary_outputs.py +
    106
     107
     108
     109
    @@ -2127,7 +2204,7 @@ 

    result1[key] = val return result1

    -
    +
    diff --git a/api/pheval/analyse/parse_benchmark_summary/index.html b/api/pheval/analyse/parse_benchmark_summary/index.html index 65e89a642..0a5e9a46d 100644 --- a/api/pheval/analyse/parse_benchmark_summary/index.html +++ b/api/pheval/analyse/parse_benchmark_summary/index.html @@ -11,7 +11,7 @@ - + @@ -603,21 +603,21 @@
  • - src.pheval.analyse.parse_benchmark_summary + parse_benchmark_summary
  • - parse_benchmark_result_summary() + parse_benchmark_result_summary
  • - read_benchmark_tsv_result_summary() + read_benchmark_tsv_result_summary
  • @@ -1221,21 +1221,21 @@
  • - src.pheval.analyse.parse_benchmark_summary + parse_benchmark_summary
  • - parse_benchmark_result_summary() + parse_benchmark_result_summary
  • - read_benchmark_tsv_result_summary() + read_benchmark_tsv_result_summary
  • @@ -1265,6 +1265,7 @@

    Parse benchmark summary

    +
    @@ -1280,12 +1281,13 @@

    Parse benchmark summary

    +

    -parse_benchmark_result_summary(benchmarking_df) + parse_benchmark_result_summary(benchmarking_df)

    @@ -1294,6 +1296,8 @@

    benchmarking_df - pd.DataFrame + DataFrame

    Summary benchmark DataFrame containing columns such as +

    +
    +

    Summary benchmark DataFrame containing columns such as 'results_directory_path', 'top', 'top3', 'top5', 'top10', - 'found', 'total', 'mean_reciprocal_rank'.

    required

    List[BenchmarkRunResults]: A list of BenchmarkRunResults instances generated from the DataFrame.

    +
    +

    List[BenchmarkRunResults]: A list of BenchmarkRunResults instances generated from the DataFrame.

    +
    +
    -
    - Source code in src/pheval/analyse/parse_benchmark_summary.py -
    - + @@ -1443,6 +1464,8 @@

    - + 'total', 'mean_reciprocal_rank'.

    + +
    39
    +          
    + Source code in src/pheval/analyse/parse_benchmark_summary.py +
    39
     40
     41
     42
    @@ -1400,17 +1414,18 @@ 

    benchmarking_results.append(benchmarking_result) return benchmarking_results

    -
    +
    +

    -read_benchmark_tsv_result_summary(benchmarking_tsv) + read_benchmark_tsv_result_summary(benchmarking_tsv)

    @@ -1419,6 +1434,8 @@

    Path

    Path to the summary benchmark TSV output file.

    +
    +

    Path to the summary benchmark TSV output file.

    +
    +
    required
    - pd.DataFrame + DataFrame

    pd.DataFrame: A pandas DataFrame containing specific columns from the TSV file, including: +

    +
    +

    pd.DataFrame: A pandas DataFrame containing specific columns from the TSV file, including: 'results_directory_path', 'top', 'top3', 'top5', 'top10', 'found', - 'total', 'mean_reciprocal_rank'.

    -
    - Source code in src/pheval/analyse/parse_benchmark_summary.py -
    - + @@ -1320,7 +1328,11 @@

    List[dict] -

    + @@ -1328,6 +1340,8 @@

    List[PhEvalResult] -

    + - +
    11
    +          
    + Source code in src/pheval/analyse/parse_benchmark_summary.py +
    11
     12
     13
     14
    @@ -1517,7 +1544,7 @@ 

    ], )

    -
    +
    diff --git a/api/pheval/analyse/parse_pheval_result/index.html b/api/pheval/analyse/parse_pheval_result/index.html index 1dd1d5940..393c2ed33 100644 --- a/api/pheval/analyse/parse_pheval_result/index.html +++ b/api/pheval/analyse/parse_pheval_result/index.html @@ -11,7 +11,7 @@ - + @@ -617,21 +617,21 @@
  • - src.pheval.analyse.parse_pheval_result + parse_pheval_result
  • - parse_pheval_result() + parse_pheval_result
  • - read_standardised_result() + read_standardised_result
  • @@ -1221,21 +1221,21 @@
  • - src.pheval.analyse.parse_pheval_result + parse_pheval_result
  • - parse_pheval_result() + parse_pheval_result
  • - read_standardised_result() + read_standardised_result
  • @@ -1265,6 +1265,7 @@

    Parse pheval result

    +
    @@ -1280,12 +1281,13 @@

    Parse pheval result

    +

    -parse_pheval_result(data_class_type, pheval_result) + parse_pheval_result(data_class_type, pheval_result)

    @@ -1294,6 +1296,8 @@

    PhEvalResult

    The data class type to parse the result into.

    +
    +

    The data class type to parse the result into.

    +
    +
    required

    A list of dictionaries representing the PhEval result.

    +
    +

    A list of dictionaries representing the PhEval result.

    +
    +
    required

    List[PhEvalResult]: A list of instances of the specified data class type,

    +
    +

    List[PhEvalResult]: A list of instances of the specified data class type,

    +
    +
    List[PhEvalResult]

    each instance representing a row in the PhEval result.

    +
    +

    each instance representing a row in the PhEval result.

    +
    +
    -
    - Source code in src/pheval/analyse/parse_pheval_result.py -
    - + @@ -1427,6 +1456,8 @@

    List[dict] -

    +
    29
    +          
    + Source code in src/pheval/analyse/parse_pheval_result.py +
    29
     30
     31
     32
    @@ -1384,17 +1406,18 @@ 

    """ return [data_class_type(**row) for row in pheval_result]

    -
    +
    +

    -read_standardised_result(standardised_result_path) + read_standardised_result(standardised_result_path)

    @@ -1403,6 +1426,8 @@

    Path

    The path to the file containing the standardised result output.

    +
    +

    The path to the file containing the standardised result output.

    +
    +
    required

    List[dict]: A list of dictionaries representing the content of the standardised result file.

    +
    +

    List[dict]: A list of dictionaries representing the content of the standardised result file.

    +
    +
    -
    - Source code in src/pheval/analyse/parse_pheval_result.py -
    - + - + - + - + - + - +
    12
    +          
    + Source code in src/pheval/analyse/parse_pheval_result.py +
    12
     13
     14
     15
    @@ -1477,7 +1512,7 @@ 

    info_log.info(f"Could not find {standardised_result_path}") return pd.DataFrame().to_dict("records")

    -
    +
    diff --git a/api/pheval/analyse/prioritisation_rank_recorder/index.html b/api/pheval/analyse/prioritisation_rank_recorder/index.html index b222f91ae..2e571b0d5 100644 --- a/api/pheval/analyse/prioritisation_rank_recorder/index.html +++ b/api/pheval/analyse/prioritisation_rank_recorder/index.html @@ -11,7 +11,7 @@ - + @@ -631,7 +631,7 @@
  • - src.pheval.analyse.prioritisation_rank_recorder + prioritisation_rank_recorder
  • @@ -646,7 +646,7 @@
  • - record_rank() + record_rank
  • @@ -1227,7 +1227,7 @@
  • - src.pheval.analyse.prioritisation_rank_recorder + prioritisation_rank_recorder
  • @@ -1242,7 +1242,7 @@
  • - record_rank() + record_rank
  • @@ -1277,6 +1277,7 @@

    Prioritisation rank recorder

    +
    @@ -1296,7 +1297,7 @@

    Prioritisation rank recorder

    - PrioritisationRankRecorder + PrioritisationRankRecorder @@ -1311,6 +1312,8 @@

    indexindex int

    The index representing the run.

    +
    +

    The index representing the run.

    +
    +
    directorydirectory Path

    The result directory path.

    +
    +

    The result directory path.

    +
    +
    run_comparisonrun_comparison defaultdict

    The comparison dictionary to record ranks.

    +
    +

    The comparison dictionary to record ranks.

    +
    +
    - -
    - Source code in src/pheval/analyse/prioritisation_rank_recorder.py -
    13
    +            
    + Source code in src/pheval/analyse/prioritisation_rank_recorder.py +
    13
     14
     15
     16
    @@ -1490,7 +1504,7 @@ 

    self._record_disease_rank() self.run_comparison[self.index][self.directory] = self.prioritisation_result.rank

    -
    + @@ -1504,12 +1518,13 @@

    -record_rank() + record_rank()

    @@ -1522,9 +1537,9 @@

    - Source code in src/pheval/analyse/prioritisation_rank_recorder.py -
    - + - + - + - + - + - +
    65
    +          
    + Source code in src/pheval/analyse/prioritisation_rank_recorder.py +
    65
     66
     67
     68
    @@ -1562,7 +1577,7 @@ 

    self._record_disease_rank() self.run_comparison[self.index][self.directory] = self.prioritisation_result.rank

    -
    +
    @@ -1573,6 +1588,7 @@

    Prioritisation result types

    +
    @@ -1298,7 +1299,7 @@

    Prioritisation result types

    - DiseasePrioritisationResult + DiseasePrioritisationResult @@ -1313,6 +1314,8 @@

    phenopacket_pathphenopacket_path Path

    Path to the phenopacket.

    +
    +

    Path to the phenopacket.

    +
    +
    diseasedisease ProbandDisease

    The proband disease.

    +
    +

    The proband disease.

    +
    +
    rankrank int

    The assigned rank for the disease. Defaults to 0.

    +
    +

    The assigned rank for the disease. Defaults to 0.

    +
    +
    - -
    - Source code in src/pheval/analyse/prioritisation_result_types.py -
    39
    +            
    + Source code in src/pheval/analyse/prioritisation_result_types.py +
    39
     40
     41
     42
    @@ -1378,7 +1392,7 @@ 

    disease: ProbandDisease rank: int = 0

    -
    + @@ -1398,6 +1412,7 @@

    @@ -1405,7 +1420,7 @@

    - GenePrioritisationResult + GenePrioritisationResult @@ -1420,6 +1435,8 @@

    Store rank data for causative genes.

    + +

    Attributes:

    @@ -1431,33 +1448,44 @@

    - + - + - + - + - + - +
    phenopacket_pathphenopacket_path Path

    Path to the phenopacket.

    +
    +

    Path to the phenopacket.

    +
    +
    genegene str

    The causative gene.

    +
    +

    The causative gene.

    +
    +
    rankrank int

    The assigned rank for the gene. Defaults to 0.

    +
    +

    The assigned rank for the gene. Defaults to 0.

    +
    +
    - -
    - Source code in src/pheval/analyse/prioritisation_result_types.py -
    - + - + - + - + - + - +
     7
    +            
    + Source code in src/pheval/analyse/prioritisation_result_types.py +
     7
      8
      9
     10
    @@ -1485,7 +1513,7 @@ 

    gene: str rank: int = 0

    -
    + @@ -1505,6 +1533,7 @@

    +

    @@ -1512,7 +1541,7 @@

    - VariantPrioritisationResult + VariantPrioritisationResult @@ -1527,6 +1556,8 @@

    phenopacket_pathphenopacket_path Path

    Path to the phenopacket.

    +
    +

    Path to the phenopacket.

    +
    +
    variantvariant GenomicVariant

    The genomic variant.

    +
    +

    The genomic variant.

    +
    +
    rankrank int

    The assigned rank for the variant. Defaults to 0.

    +
    +

    The assigned rank for the variant. Defaults to 0.

    +
    +
    - -
    - Source code in src/pheval/analyse/prioritisation_result_types.py -
    23
    +            
    + Source code in src/pheval/analyse/prioritisation_result_types.py +
    23
     24
     25
     26
    @@ -1592,7 +1634,7 @@ 

    variant: GenomicVariant rank: int = 0

    -
    + @@ -1612,6 +1654,7 @@

    Rank stats

    +
    @@ -1546,7 +1547,7 @@

    Rank stats

    - RankStats + RankStats @@ -1561,6 +1562,8 @@

    Store statistics related to ranking.

    + +

    Attributes:

    @@ -1572,75 +1575,110 @@

    - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
    toptop int

    Count of top-ranked matches.

    +
    +

    Count of top-ranked matches.

    +
    +
    top3top3 int

    Count of matches within the top 3 ranks.

    +
    +

    Count of matches within the top 3 ranks.

    +
    +
    top5top5 int

    Count of matches within the top 5 ranks.

    +
    +

    Count of matches within the top 5 ranks.

    +
    +
    top10top10 int

    Count of matches within the top 10 ranks.

    +
    +

    Count of matches within the top 10 ranks.

    +
    +
    foundfound int

    Count of found matches.

    +
    +

    Count of found matches.

    +
    +
    totaltotal int

    Total count of matches.

    +
    +

    Total count of matches.

    +
    +
    reciprocal_ranksreciprocal_ranks List[float]

    List of reciprocal ranks.

    +
    +

    List of reciprocal ranks.

    +
    +
    relevant_ranksrelevant_ranks List[List[int]]

    Nested list of ranks for the known entities for all cases in a run.

    +
    +

    Nested list of ranks for the known entities for all cases in a run.

    +
    +
    mrrmrr float

    Mean Reciprocal Rank (MRR). Defaults to None.

    +
    +

    Mean Reciprocal Rank (MRR). Defaults to None.

    +
    +
    - -
    - Source code in src/pheval/analyse/rank_stats.py -
    @@ -2222,16 +2267,16 @@

    +
    Notes

    This method updates the internal attributes of the RankStats object based on the provided rank value. It calculates various statistics such as the count of top ranks (1, 3, 5, and 10), the total number of ranks found,and the reciprocal rank. This function modifies the object's state by updating the internal attributes.

    -
    - Source code in src/pheval/analyse/rank_stats.py -

     13
    +            
    + Source code in src/pheval/analyse/rank_stats.py +
     13
      14
      15
      16
    @@ -2170,7 +2208,7 @@ 

    ndcg_scores.append(ndcg_score(np.asarray([ideal_ranking]), np.asarray([result_ranks]))) return np.mean(ndcg_scores)

    -
    + @@ -2184,12 +2222,13 @@

    +

    -add_rank(rank) + add_rank(rank)

    @@ -2198,6 +2237,8 @@

    +

    The rank value to be added.

    +

    +

    required
    @@ -2326,7 +2378,11 @@

    +

    The number of top predictions to consider.

    + +

    @@ -2334,6 +2390,8 @@

    +

    The F-beta score at k, ranging from 0.0 to 1.0. + A higher score indicates better trade-off between precision and recall.

    + +

    39
    +          
    + Source code in src/pheval/analyse/rank_stats.py +
    39
     40
     41
     42
    @@ -2277,17 +2322,18 @@ 

    if rank != "" and rank <= 10: self.top10 += 1

    -
    +
    +

    -f_beta_score_at_k(percentage_at_k, k) + f_beta_score_at_k(percentage_at_k, k)

    @@ -2300,6 +2346,8 @@

    +

    The percentage of true positive predictions within the top-k.

    +

    +
    required required
    -
    - Source code in src/pheval/analyse/rank_stats.py -
    234
    +          
    + Source code in src/pheval/analyse/rank_stats.py +
    234
     235
     236
     237
    @@ -2403,17 +2465,18 @@ 

    else 0 )

    -
    +
    +

    -mean_average_precision_at_k(k) + mean_average_precision_at_k(k)

    @@ -2424,6 +2487,8 @@

    Mean Average Precision at k (MAP@k) is a performance metric for ranked data. It calculates the average precision at k for each result rank and then takes the mean across all queries.

    + +

    Parameters:

    @@ -2440,7 +2505,11 @@

    int -

    + @@ -2448,6 +2517,8 @@

    The number of top predictions to consider for precision calculation.

    +
    +

    The number of top predictions to consider for precision calculation.

    +
    +
    required
    + +

    Returns:

    @@ -2461,15 +2532,19 @@

    float

    - +
    float

    The Mean Average Precision at k, ranging from 0.0 to 1.0. - A higher value indicates better performance in ranking relevant entities higher in the predictions.

    +
    +

    The Mean Average Precision at k, ranging from 0.0 to 1.0. + A higher value indicates better performance in ranking relevant entities higher in the predictions.

    +
    +
    -
    - Source code in src/pheval/analyse/rank_stats.py -
    - + @@ -2563,6 +2645,8 @@

    float

    - +
    208
    +          
    + Source code in src/pheval/analyse/rank_stats.py +
    208
     209
     210
     211
    @@ -2519,17 +2594,18 @@ 

    ) return (1 / self.total) * cumulative_average_precision_scores

    -
    +
    +

    -mean_normalised_discounted_cumulative_gain(k) + mean_normalised_discounted_cumulative_gain(k)

    @@ -2539,6 +2615,8 @@

    int

    The rank cutoff for calculating NDCG.

    +
    +

    The rank cutoff for calculating NDCG.

    +
    +
    required float

    The mean NDCG score across all query results.

    +
    +

    The mean NDCG score across all query results.

    +
    +
    -
    - Source code in src/pheval/analyse/rank_stats.py -
    259
    +          
    + Source code in src/pheval/analyse/rank_stats.py +
    259
     260
     261
     262
    @@ -2621,17 +2709,18 @@ 

    ndcg_scores.append(ndcg_score(np.asarray([ideal_ranking]), np.asarray([result_ranks]))) return np.mean(ndcg_scores)

    -
    +
    +

    -mean_reciprocal_rank() + mean_reciprocal_rank()

    @@ -2644,6 +2733,8 @@

    +

    The calculated Mean Reciprocal Rank.

    +

    +
    -
    - Source code in src/pheval/analyse/rank_stats.py -
    @@ -2749,7 +2851,11 @@

    +

    The second percentage value.

    + +

    @@ -2757,6 +2863,8 @@

    +

    The difference between the two percentage values.

    + +

    134
    +          
    + Source code in src/pheval/analyse/rank_stats.py +
    134
     135
     136
     137
    @@ -2700,17 +2795,18 @@ 

    return mean(self.reciprocal_ranks) return mean(self.reciprocal_ranks)

    -
    +
    +

    -percentage_difference(percentage_value_1, percentage_value_2) + percentage_difference(percentage_value_1, percentage_value_2) staticmethod @@ -2723,6 +2819,8 @@

    +

    The first percentage value.

    +

    +
    required required
    -
    - Source code in src/pheval/analyse/rank_stats.py -
    120
    +          
    + Source code in src/pheval/analyse/rank_stats.py +
    120
     121
     122
     123
    @@ -2803,17 +2915,18 @@ 

    """ return percentage_value_1 - percentage_value_2

    -
    +
    +

    -percentage_found() + percentage_found()

    @@ -2822,6 +2935,8 @@

    +

    The percentage of matches found compared to the total count.

    +

    +
    -
    - Source code in src/pheval/analyse/rank_stats.py -
    @@ -2901,6 +3027,8 @@

    +

    The calculated percentage rank based on the provided value and the total count.

    + +

    111
    +          
    + Source code in src/pheval/analyse/rank_stats.py +
    111
     112
     113
     114
    @@ -2858,17 +2977,18 @@ 

    """ return self.percentage_rank(self.found)

    -
    +
    +

    -percentage_rank(value) + percentage_rank(value)

    @@ -2877,6 +2997,8 @@

    +

    The value for which the percentage rank needs to be calculated.

    +

    +
    required
    -
    - Source code in src/pheval/analyse/rank_stats.py -
    63
    +          
    + Source code in src/pheval/analyse/rank_stats.py +
    63
     64
     65
     66
    @@ -2943,17 +3075,18 @@ 

    """ return 100 * value / self.total

    -
    +
    +

    -percentage_top() + percentage_top()

    @@ -2962,6 +3095,8 @@

    +

    The percentage of top matches compared to the total count.

    +

    +
    -
    - Source code in src/pheval/analyse/rank_stats.py -
    75
    +          
    + Source code in src/pheval/analyse/rank_stats.py +
    75
     76
     77
     78
    @@ -2998,17 +3137,18 @@ 

    """ return self.percentage_rank(self.top)

    -
    +
    +

    -percentage_top10() + percentage_top10()

    @@ -3017,6 +3157,8 @@

    +

    The percentage of matches within the top 10 compared to the total count.

    +

    +
    -
    - Source code in src/pheval/analyse/rank_stats.py -
    102
    +          
    + Source code in src/pheval/analyse/rank_stats.py +
    102
     103
     104
     105
    @@ -3053,17 +3199,18 @@ 

    """ return self.percentage_rank(self.top10)

    -
    +
    +

    -percentage_top3() + percentage_top3()

    @@ -3072,6 +3219,8 @@

    +

    The percentage of matches within the top 3 compared to the total count.

    +

    +
    -
    - Source code in src/pheval/analyse/rank_stats.py -
    84
    +          
    + Source code in src/pheval/analyse/rank_stats.py +
    84
     85
     86
     87
    @@ -3108,17 +3261,18 @@ 

    """ return self.percentage_rank(self.top3)

    -
    +
    +

    -percentage_top5() + percentage_top5()

    @@ -3127,6 +3281,8 @@

    +

    The percentage of matches within the top 5 compared to the total count.

    +

    +
    -
    - Source code in src/pheval/analyse/rank_stats.py -
    @@ -3208,6 +3375,8 @@

    +

    The precision at k, ranging from 0.0 to 1.0.

    + +

    - +
     93
    +          
    + Source code in src/pheval/analyse/rank_stats.py +
     93
      94
      95
      96
    @@ -3163,17 +3323,18 @@ 

    """ return self.percentage_rank(self.top5)

    -
    +
    +

    -precision_at_k(k) + precision_at_k(k)

    @@ -3184,6 +3345,8 @@

    +

    The number of top predictions to consider.

    +

    +
    required
    float

    A higher precision indicates a better performance in identifying relevant items in the top-k predictions.

    +
    +

    A higher precision indicates a better performance in identifying relevant items in the top-k predictions.

    +
    +
    -
    - Source code in src/pheval/analyse/rank_stats.py -
    168
    +          
    + Source code in src/pheval/analyse/rank_stats.py +
    168
     169
     170
     171
    @@ -3264,17 +3441,18 @@ 

    k_attr = getattr(self, f"top{k}") if k > 1 else self.top return k_attr / (self.total * k)

    -
    +
    +

    -return_mean_reciprocal_rank() + return_mean_reciprocal_rank()

    @@ -3285,6 +3463,8 @@

    If a pre-calculated MRR value exists (stored in the 'mrr' attribute), this method returns that value. Otherwise, it computes the Mean Reciprocal Rank using the 'mean_reciprocal_rank' method.

    + +

    Returns:

    @@ -3298,14 +3478,18 @@

    float

    - +
    float

    The Mean Reciprocal Rank value.

    +
    +

    The Mean Reciprocal Rank value.

    +
    +
    -
    - Source code in src/pheval/analyse/rank_stats.py -
    153
    +          
    + Source code in src/pheval/analyse/rank_stats.py +
    153
     154
     155
     156
    @@ -3333,7 +3517,7 @@ 

    else: return self.mean_reciprocal_rank()

    -
    +
    @@ -3344,6 +3528,7 @@

    +
    @@ -3351,7 +3536,7 @@

    - RankStatsWriter + RankStatsWriter

    @@ -3362,10 +3547,9 @@

    Class for writing the rank stats to a file.

    - -
    - Source code in src/pheval/analyse/rank_stats.py -
    280
    +            
    + Source code in src/pheval/analyse/rank_stats.py +
    280
     281
     282
     283
    @@ -3635,7 +3819,7 @@ 

    except IOError: print("Error closing ", self.file)

    -
    + @@ -3649,47 +3833,26 @@

    +

    -__init__(file) + __init__(file)

    -

    Initialise the RankStatsWriter class

    - -

    Parameters:

    - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    file - Path -

    Path to the file where rank stats will be written

    - required -
    +

    Initialise the RankStatsWriter class +Args: + file (Path): Path to the file where rank stats will be written

    -
    - Source code in src/pheval/analyse/rank_stats.py -
    283
    +          
    + Source code in src/pheval/analyse/rank_stats.py +
    283
     284
     285
     286
    @@ -3797,17 +3960,18 @@ 

    ] )

    -
    +
    +

    -close() + close()

    @@ -3816,6 +3980,8 @@

    +

    If there's an error while closing the file.

    +

    +
    -
    - Source code in src/pheval/analyse/rank_stats.py -
    - + @@ -3903,7 +4080,11 @@

    RankStats -

    + @@ -3911,6 +4092,8 @@

    +

    If there is an error writing to the file.

    + +

    404
    +          
    + Source code in src/pheval/analyse/rank_stats.py +
    404
     405
     406
     407
    @@ -3858,17 +4028,18 @@ 

    except IOError: print("Error closing ", self.file)

    -
    +
    +

    -write_row(directory, rank_stats, binary_classification) + write_row(directory, rank_stats, binary_classification)

    @@ -3877,6 +4048,8 @@

    Path

    Path to the results directory corresponding to the run

    +
    +

    Path to the results directory corresponding to the run

    +
    +
    required

    RankStats instance containing rank statistics corresponding to the run

    +
    +

    RankStats instance containing rank statistics corresponding to the run

    +
    +
    required
    -
    - Source code in src/pheval/analyse/rank_stats.py -
    - + - + - +
    338
    +          
    + Source code in src/pheval/analyse/rank_stats.py +
    338
     339
     340
     341
    @@ -4061,7 +4248,7 @@ 

    except IOError: print("Error writing ", self.file)

    -
    +
    @@ -4072,6 +4259,7 @@

    Run data parser

    +
    @@ -1284,7 +1285,7 @@

    Run data parser

    - TrackInputOutputDirectories + TrackInputOutputDirectories @@ -1299,6 +1300,8 @@

    phenopacket_dir

    Path

    The directory containing input phenopackets.

    +
    +

    The directory containing input phenopackets.

    +
    +
    results_dirresults_dir Path

    The directory containing output results from pheval.

    +
    +

    The directory containing output results from pheval.

    +
    +
    - -
    - Source code in src/pheval/analyse/run_data_parser.py -
    - + @@ -1414,6 +1432,8 @@

    List[TrackInputOutputDirectories] -

    + - +
     8
    +            
    + Source code in src/pheval/analyse/run_data_parser.py +
     8
      9
     10
     11
    @@ -1353,7 +1363,7 @@ 

    phenopacket_dir: Path results_dir: Path

    -
    + @@ -1373,15 +1383,17 @@

    -parse_run_data_text_file(run_data_path) + parse_run_data_text_file(run_data_path)

    @@ -1390,6 +1402,8 @@

    Path

    The path to the run data .txt file.

    +
    +

    The path to the run data .txt file.

    +
    +
    required

    List[TrackInputOutputDirectories]: A list of TrackInputOutputDirectories objects, containing

    +
    +

    List[TrackInputOutputDirectories]: A list of TrackInputOutputDirectories objects, containing

    +
    +
    List[TrackInputOutputDirectories]

    input test data directories and their corresponding output directories.

    +
    +

    input test data directories and their corresponding output directories.

    +
    +
    -
    +
    Notes

    The run data .txt file should be formatted with tab-separated values. Each row should contain two columns: the first column representing the input test data phenopacket directory, and the second column representing the corresponding run output directory.

    -
    - Source code in src/pheval/analyse/run_data_parser.py -
    22
    +          
    + Source code in src/pheval/analyse/run_data_parser.py +
    22
     23
     24
     25
    @@ -1492,7 +1520,7 @@ 

    ) return run_data_list

    -
    +
    diff --git a/api/pheval/analyse/variant_prioritisation_analysis/index.html b/api/pheval/analyse/variant_prioritisation_analysis/index.html index c62b692a2..659cae035 100644 --- a/api/pheval/analyse/variant_prioritisation_analysis/index.html +++ b/api/pheval/analyse/variant_prioritisation_analysis/index.html @@ -11,7 +11,7 @@ - + @@ -687,7 +687,7 @@
  • - src.pheval.analyse.variant_prioritisation_analysis + variant_prioritisation_analysis
  • @@ -702,14 +702,14 @@
  • - __init__() + __init__
  • - assess_variant_prioritisation() + assess_variant_prioritisation
  • @@ -721,14 +721,14 @@
  • - assess_phenopacket_variant_prioritisation() + assess_phenopacket_variant_prioritisation
  • - benchmark_variant_prioritisation() + benchmark_variant_prioritisation
  • @@ -1248,7 +1248,7 @@
  • - src.pheval.analyse.variant_prioritisation_analysis + variant_prioritisation_analysis
  • @@ -1263,14 +1263,14 @@
  • - __init__() + __init__
  • - assess_variant_prioritisation() + assess_variant_prioritisation
  • @@ -1282,14 +1282,14 @@
  • - assess_phenopacket_variant_prioritisation() + assess_phenopacket_variant_prioritisation
  • - benchmark_variant_prioritisation() + benchmark_variant_prioritisation
  • @@ -1319,6 +1319,7 @@

    Variant prioritisation analysis

    +
    @@ -1338,7 +1339,7 @@

    Variant prioritisation analysis

    - AssessVariantPrioritisation + AssessVariantPrioritisation

    @@ -1349,10 +1350,9 @@

    - Source code in src/pheval/analyse/variant_prioritisation_analysis.py -
    - + @@ -1756,7 +1763,11 @@

    Path -

    + @@ -1766,7 +1777,11 @@

    List[RankedPhEvalVariantResult] -

    + @@ -1776,7 +1791,11 @@

    +

    Threshold for scores

    + +

    @@ -1786,7 +1805,11 @@

    +

    Score order for results, either ascending or descending

    + +

    @@ -1796,7 +1819,11 @@

    List[GenomicVariant] -

    + @@ -1804,9 +1831,9 @@

    - Source code in src/pheval/analyse/variant_prioritisation_analysis.py -

     17
    +            
    + Source code in src/pheval/analyse/variant_prioritisation_analysis.py +
     17
      18
      19
      20
    @@ -1702,7 +1702,7 @@ 

    self.standardised_variant_results, relevant_ranks )

    -
    + @@ -1716,12 +1716,13 @@

    -__init__(phenopacket_path, results_dir, standardised_variant_results, threshold, score_order, proband_causative_variants) + __init__(phenopacket_path, results_dir, standardised_variant_results, threshold, score_order, proband_causative_variants)

    @@ -1730,6 +1731,8 @@

    Path

    Path to the phenopacket file

    +
    +

    Path to the phenopacket file

    +
    +
    required

    Path to the results directory

    +
    +

    Path to the results directory

    +
    +
    required

    List of ranked PhEval variant results

    +
    +

    List of ranked PhEval variant results

    +
    +
    required required required

    List of proband variants

    +
    +

    List of proband variants

    +
    +
    required
    - + @@ -1907,7 +1941,11 @@

    defaultdict -

    + @@ -1917,7 +1955,11 @@

    BinaryClassificationStats -

    + @@ -1925,9 +1967,9 @@

    - Source code in src/pheval/analyse/variant_prioritisation_analysis.py -

    20
    +          
    + Source code in src/pheval/analyse/variant_prioritisation_analysis.py +
    20
     21
     22
     23
    @@ -1860,17 +1887,18 @@ 

    self.score_order = score_order self.proband_causative_variants = proband_causative_variants

    -
    +
    +

    -assess_variant_prioritisation(rank_stats, rank_records, binary_classification_stats) + assess_variant_prioritisation(rank_stats, rank_records, binary_classification_stats)

    @@ -1881,6 +1909,8 @@

    RankStats

    RankStats class instance

    +
    +

    RankStats class instance

    +
    +
    required

    A defaultdict to store the correct ranked results.

    +
    +

    A defaultdict to store the correct ranked results.

    +
    +
    required

    BinaryClassificationStats class instance.

    +
    +

    BinaryClassificationStats class instance.

    +
    +
    required
    - + @@ -2082,7 +2132,11 @@

    +

    The order in which scores are arranged, either ascending or descending.

    + +

    @@ -2092,7 +2146,11 @@

    TrackInputOutputDirectories -

    + @@ -2102,7 +2160,11 @@

    +

    Threshold for assessment.

    + +

    @@ -2112,7 +2174,11 @@

    RankStats -

    + @@ -2122,7 +2188,11 @@

    defaultdict -

    + @@ -2132,7 +2202,11 @@

    BinaryClassificationStats -

    + @@ -2140,9 +2214,9 @@

    - Source code in src/pheval/analyse/variant_prioritisation_analysis.py -

    142
    +          
    + Source code in src/pheval/analyse/variant_prioritisation_analysis.py +
    142
     143
     144
     145
    @@ -2027,7 +2069,7 @@ 

    self.standardised_variant_results, relevant_ranks )

    -
    +
    @@ -2038,15 +2080,17 @@

    -assess_phenopacket_variant_prioritisation(phenopacket_path, score_order, results_dir_and_input, threshold, variant_rank_stats, variant_rank_comparison, variant_binary_classification_stats) + assess_phenopacket_variant_prioritisation(phenopacket_path, score_order, results_dir_and_input, threshold, variant_rank_stats, variant_rank_comparison, variant_binary_classification_stats)

    @@ -2056,6 +2100,8 @@

    Path

    Path to the Phenopacket.

    +
    +

    Path to the Phenopacket.

    +
    +
    required required

    Input and output directories.

    +
    +

    Input and output directories.

    +
    +
    required required

    RankStats class instance.

    +
    +

    RankStats class instance.

    +
    +
    required

    Default dictionary for variant rank comparisons.

    +
    +

    Default dictionary for variant rank comparisons.

    +
    +
    required

    BinaryClassificationStats class instance.

    +
    +

    BinaryClassificationStats class instance.

    +
    +
    required
    - + @@ -2261,7 +2342,11 @@

    +

    The order in which scores are arranged.

    + +

    @@ -2271,7 +2356,11 @@

    +

    Threshold for assessment.

    + +

    @@ -2281,7 +2370,11 @@

    defaultdict -

    + @@ -2289,6 +2382,8 @@

    - + - +
    209
    +          
    + Source code in src/pheval/analyse/variant_prioritisation_analysis.py +
    209
     210
     211
     212
    @@ -2216,17 +2290,18 @@ 

    variant_rank_stats, variant_rank_comparison, variant_binary_classification_stats )

    -
    +
    +

    -benchmark_variant_prioritisation(results_directory_and_input, score_order, threshold, variant_rank_comparison) + benchmark_variant_prioritisation(results_directory_and_input, score_order, threshold, variant_rank_comparison)

    @@ -2235,6 +2310,8 @@

    TrackInputOutputDirectories

    Input and output directories.

    +
    +

    Input and output directories.

    +
    +
    required required required

    Default dictionary for variant rank comparisons.

    +
    +

    Default dictionary for variant rank comparisons.

    +
    +
    required BenchmarkRunResults

    An object containing benchmarking results for variant prioritisation,

    +
    +

    An object containing benchmarking results for variant prioritisation,

    +
    +

    including ranks and rank statistics for the benchmarked directory.

    +
    +

    including ranks and rank statistics for the benchmarked directory.

    +
    +
    -
    - Source code in src/pheval/analyse/variant_prioritisation_analysis.py -
    - + - + diff --git a/api/pheval/config_parser/index.html b/api/pheval/config_parser/index.html index 8c7dec36b..3905e04c6 100644 --- a/api/pheval/config_parser/index.html +++ b/api/pheval/config_parser/index.html @@ -11,7 +11,7 @@ - + @@ -421,7 +421,7 @@
  • - src.pheval.config_parser + config_parser
  • @@ -435,7 +435,7 @@
  • - parse_input_dir_config() + parse_input_dir_config
  • @@ -1219,7 +1219,7 @@
  • - src.pheval.config_parser + config_parser
  • @@ -1233,7 +1233,7 @@
  • - parse_input_dir_config() + parse_input_dir_config
  • @@ -1263,6 +1263,7 @@

    Config parser

    +
    @@ -1282,7 +1283,7 @@

    Config parser

    - InputDirConfig + InputDirConfig @@ -1297,6 +1298,8 @@

    Class for defining the fields within the input directory config.

    + +

    Parameters:

    248
    +          
    + Source code in src/pheval/analyse/variant_prioritisation_analysis.py +
    248
     249
     250
     251
    @@ -2387,7 +2490,7 @@ 

    binary_classification_stats=variant_binary_classification_stats, )

    -
    +
    diff --git a/api/pheval/cli/index.html b/api/pheval/cli/index.html index 033f59c4a..a4eabed6c 100644 --- a/api/pheval/cli/index.html +++ b/api/pheval/cli/index.html @@ -11,7 +11,7 @@ - + @@ -1856,13 +1856,13 @@
    generate-stats-plot
    --variant-analysis / --no-variant-analysis booleanSpecify analysis for variant prioritisation NOTE: This argument is mutually exclusive with arguments: [gene_analysis, disease_analysis].Specify analysis for variant prioritisation NOTE: This argument is mutually exclusive with arguments: [disease_analysis, gene_analysis]. False
    --disease-analysis / --no-disease-analysis booleanSpecify analysis for disease prioritisation NOTE: This argument is mutually exclusive with arguments: [gene_analysis, variant_analysis].Specify analysis for disease prioritisation NOTE: This argument is mutually exclusive with arguments: [variant_analysis, gene_analysis]. False
    @@ -1313,7 +1316,11 @@

    - + @@ -1323,7 +1330,11 @@

    - + @@ -1333,7 +1344,11 @@

    - + @@ -1343,7 +1358,11 @@

    - + @@ -1353,7 +1372,11 @@

    - + @@ -1363,7 +1386,11 @@

    - + @@ -1371,10 +1398,9 @@

    str

    Name of the tool implementation (e.g. exomiser/phen2gene)

    +
    +

    Name of the tool implementation (e.g. exomiser/phen2gene)

    +
    +
    required str

    Version of the tool implementation

    +
    +

    Version of the tool implementation

    +
    +
    required bool

    Whether to extract prioritised variants from results.

    +
    +

    Whether to extract prioritised variants from results.

    +
    +
    required bool

    Whether to extract prioritised genes from results.

    +
    +

    Whether to extract prioritised genes from results.

    +
    +
    required bool

    Whether to extract prioritised diseases from results.

    +
    +

    Whether to extract prioritised diseases from results.

    +
    +
    required Any

    Tool specific configurations

    +
    +

    Tool specific configurations

    +
    +
    required
    - -
    - Source code in src/pheval/config_parser.py -
    10
    +            
    + Source code in src/pheval/config_parser.py +
    10
     11
     12
     13
    @@ -1420,7 +1446,7 @@ 

    disease_analysis: bool tool_specific_configuration_options: Any

    -
    + @@ -1440,15 +1466,17 @@

    + +

    -parse_input_dir_config(input_dir) + parse_input_dir_config(input_dir)

    @@ -1457,9 +1485,9 @@

    Reads the config file.

    -
    - Source code in src/pheval/config_parser.py -
    35
    +          
    + Source code in src/pheval/config_parser.py +
    35
     36
     37
     38
    @@ -1471,7 +1499,7 @@ 

    config_file.close() return from_yaml(InputDirConfig, yaml.dump(config))

    -
    +
    diff --git a/api/pheval/constants/index.html b/api/pheval/constants/index.html index f9348e583..db336da5e 100644 --- a/api/pheval/constants/index.html +++ b/api/pheval/constants/index.html @@ -11,7 +11,7 @@ - + @@ -435,7 +435,7 @@
  • - src.pheval.constants + constants
  • @@ -1205,7 +1205,7 @@
  • - src.pheval.constants + constants
  • @@ -1235,6 +1235,7 @@

    Constants

    +
    diff --git a/api/pheval/infra/exomiserdb/index.html b/api/pheval/infra/exomiserdb/index.html index a83fbbdc2..8bbb60f9d 100644 --- a/api/pheval/infra/exomiserdb/index.html +++ b/api/pheval/infra/exomiserdb/index.html @@ -11,7 +11,7 @@ - + @@ -734,7 +734,7 @@
  • - src.pheval.infra.exomiserdb + exomiserdb
  • @@ -749,7 +749,7 @@
  • - get_connection() + get_connection
  • @@ -769,7 +769,7 @@
  • - create_connection() + create_connection
  • @@ -789,7 +789,7 @@
  • - import_from_semsim_file() + import_from_semsim_file
  • @@ -1267,7 +1267,7 @@
  • - src.pheval.infra.exomiserdb + exomiserdb
  • @@ -1282,7 +1282,7 @@
  • - get_connection() + get_connection
  • @@ -1302,7 +1302,7 @@
  • - create_connection() + create_connection
  • @@ -1322,7 +1322,7 @@
  • - import_from_semsim_file() + import_from_semsim_file
  • @@ -1357,6 +1357,7 @@

    Exomiserdb

    +
    @@ -1376,7 +1377,7 @@

    Exomiserdb

    - DBConnection + DBConnection

    @@ -1385,10 +1386,9 @@

    - -
    - Source code in src/pheval/infra/exomiserdb.py -
    43
    +            
    + Source code in src/pheval/infra/exomiserdb.py +
    43
     44
     45
     46
    @@ -1424,7 +1424,7 @@ 

    connection = cls.get_connection() return connection.cursor()

    -
    + @@ -1438,12 +1438,13 @@

    +

    -get_connection() + get_connection() classmethod @@ -1456,9 +1457,9 @@

    - Source code in src/pheval/infra/exomiserdb.py -
    49
    +          
    + Source code in src/pheval/infra/exomiserdb.py +
    49
     50
     51
     52
    @classmethod
    @@ -1466,7 +1467,7 @@ 

    """Creates return new Singleton database connection""" return DBConnection.connection

    -
    +
    @@ -1477,6 +1478,7 @@

    @@ -1484,7 +1486,7 @@

    - DBConnector + DBConnector

    @@ -1493,10 +1495,9 @@

    - -
    - Source code in src/pheval/infra/exomiserdb.py -
    14
    +            
    + Source code in src/pheval/infra/exomiserdb.py +
    14
     15
     16
     17
    @@ -1550,7 +1551,7 @@ 

    def __exit__(self, *other): self.dbconn.close()

    -
    + @@ -1564,12 +1565,13 @@

    +

    -create_connection() + create_connection()

    @@ -1578,9 +1580,9 @@

    - Source code in src/pheval/infra/exomiserdb.py -
    26
    +          
    + Source code in src/pheval/infra/exomiserdb.py +
    26
     27
     28
     29
    @@ -1596,7 +1598,7 @@ 

    self.jar, )

    -
    +
    @@ -1607,6 +1609,7 @@

    @@ -1614,7 +1617,7 @@

    - ExomiserDB + ExomiserDB

    @@ -1623,10 +1626,9 @@

    - -
    - Source code in src/pheval/infra/exomiserdb.py -
    - + @@ -1764,7 +1773,11 @@

    +

    Subject Prefix. e.g HP

    + +

    @@ -1774,7 +1787,11 @@

    +

    Object Prefix. e.g MP

    + +

    @@ -1782,9 +1799,9 @@

    - Source code in src/pheval/infra/exomiserdb.py -

     63
    +            
    + Source code in src/pheval/infra/exomiserdb.py +
     63
      64
      65
      66
    @@ -1710,7 +1712,7 @@ 

    batches = reader.next_batches(batch_length)

    -
    + @@ -1724,12 +1726,13 @@

    +

    -import_from_semsim_file(input_file, subject_prefix, object_prefix) + import_from_semsim_file(input_file, subject_prefix, object_prefix)

    @@ -1738,6 +1741,8 @@

    Path

    semsim profile

    +
    +

    semsim profile

    +
    +
    required required required
     77
    +          
    + Source code in src/pheval/infra/exomiserdb.py +
     77
      78
      79
      80
    @@ -1840,7 +1857,7 @@ 

    batches = reader.next_batches(batch_length)

    -
    +
    @@ -1851,6 +1868,7 @@

    Post processing

    +
    @@ -1568,7 +1569,7 @@

    Post processing

    - PhEvalDiseaseResult + PhEvalDiseaseResult @@ -1579,66 +1580,23 @@

    -

    - Bases: PhEvalResult

    - - -

    Minimal data required from tool-specific output for disease prioritisation

    - -

    Parameters:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    disease_name - str -

    Disease name for the result entry

    - required -
    disease_identifier - str -

    Identifier for the disease result entry in the OMIM namespace

    - required -
    score - str -

    Score for the disease result entry

    - required -
    - -
    - Notes -

    While we recommend providing the disease identifier in the OMIM namespace, -any matching format used in Phenopacket interpretations is acceptable for result matching purposes -in the analysis.

    -
    - -
    - Source code in src/pheval/post_processing/post_processing.py -
    131
    +          

    + Bases: PhEvalResult

    + + +

    Minimal data required from tool-specific output for disease prioritisation +Args: + disease_name (str): Disease name for the result entry + disease_identifier (str): Identifier for the disease result entry in the OMIM namespace + score (str): Score for the disease result entry +Notes: + While we recommend providing the disease identifier in the OMIM namespace, + any matching format used in Phenopacket interpretations is acceptable for result matching purposes + in the analysis.

    + +
    + Source code in src/pheval/post_processing/post_processing.py +
    131
     132
     133
     134
    @@ -1670,7 +1628,7 @@ 

    disease_identifier: str score: float

    -
    + @@ -1690,6 +1648,7 @@

    @@ -1697,7 +1656,7 @@

    - PhEvalGeneResult + PhEvalGeneResult @@ -1708,66 +1667,23 @@

    -

    - Bases: PhEvalResult

    - - -

    Minimal data required from tool-specific output for gene prioritisation result

    - -

    Parameters:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    gene_symbol - Union[List[str], str] -

    The gene symbol(s) for the result entry

    - required -
    gene_identifier - Union[List[str], str] -

    The ENSEMBL gene identifier(s) for the result entry

    - required -
    score - float -

    The score for the gene result entry

    - required -
    - -
    - Notes -

    While we recommend providing the gene identifier in the ENSEMBL namespace, -any matching format used in Phenopacket interpretations is acceptable for result matching purposes -in the analysis.

    -
    - -
    - Source code in src/pheval/post_processing/post_processing.py -
    30
    +          

    + Bases: PhEvalResult

    + + +

    Minimal data required from tool-specific output for gene prioritisation result +Args: + gene_symbol (Union[List[str], str]): The gene symbol(s) for the result entry + gene_identifier (Union[List[str], str]): The ENSEMBL gene identifier(s) for the result entry + score (float): The score for the gene result entry +Notes: + While we recommend providing the gene identifier in the ENSEMBL namespace, + any matching format used in Phenopacket interpretations is acceptable for result matching purposes + in the analysis.

    + +
    + Source code in src/pheval/post_processing/post_processing.py +
    30
     31
     32
     33
    @@ -1799,7 +1715,7 @@ 

    gene_identifier: Union[List[str], str] score: float

    -
    + @@ -1819,6 +1735,7 @@

    @@ -1826,7 +1743,7 @@

    - PhEvalResult + PhEvalResult @@ -1841,19 +1758,19 @@

    - Source code in src/pheval/post_processing/post_processing.py -
    25
    +            
    + Source code in src/pheval/post_processing/post_processing.py +
    25
     26
     27
    @dataclass
     class PhEvalResult:
         """Base class for PhEval results."""
     
    -
    +
    +
    @@ -1861,7 +1778,7 @@

    - PhEvalVariantResult + PhEvalVariantResult @@ -1872,96 +1789,28 @@

    -

    - Bases: PhEvalResult

    - - -

    Minimal data required from tool-specific output for variant prioritisation

    - -

    Parameters:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    chromosome - str -

    The chromosome position of the variant recommended to be provided in the following format.

    - required -
    start - int -

    The start position of the variant

    - required -
    end - int -

    The end position of the variant

    - required -
    ref - str -

    The reference allele of the variant

    - required -
    alt - str -

    The alternate allele of the variant

    - required -
    score - float -

    The score for the variant result entry

    - required -
    - -
    - Notes -

    While we recommend providing the variant's chromosome in the specified format, -any matching format used in Phenopacket interpretations is acceptable for result matching purposes -in the analysis.

    -
    - -
    - Source code in src/pheval/post_processing/post_processing.py -
    75
    +          

    + Bases: PhEvalResult

    + + +

    Minimal data required from tool-specific output for variant prioritisation +Args: + chromosome (str): The chromosome position of the variant recommended to be provided in the following format. + This includes numerical designations from 1 to 22 representing autosomal chromosomes, + as well as the sex chromosomes X and Y, and the mitochondrial chromosome MT. + start (int): The start position of the variant + end (int): The end position of the variant + ref (str): The reference allele of the variant + alt (str): The alternate allele of the variant + score (float): The score for the variant result entry +Notes: + While we recommend providing the variant's chromosome in the specified format, + any matching format used in Phenopacket interpretations is acceptable for result matching purposes + in the analysis.

    + +
    + Source code in src/pheval/post_processing/post_processing.py +
    75
     76
     77
     78
    @@ -2009,7 +1858,7 @@ 

    alt: str score: float

    -
    + @@ -2029,6 +1878,7 @@

    @@ -2036,7 +1886,7 @@

    - RankedPhEvalDiseaseResult + RankedPhEvalDiseaseResult @@ -2047,40 +1897,17 @@

    -

    - Bases: PhEvalDiseaseResult

    +

    + Bases: PhEvalDiseaseResult

    -

    PhEval disease result with corresponding rank

    - -

    Parameters:

    - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    rank - int -

    The rank for the result entry

    - required -
    +

    PhEval disease result with corresponding rank +Args: + rank (int): The rank for the result entry

    - -
    - Source code in src/pheval/post_processing/post_processing.py -
    149
    +            
    + Source code in src/pheval/post_processing/post_processing.py +
    149
     150
     151
     152
    @@ -2130,7 +1957,7 @@ 

    rank=rank, )

    -
    + @@ -2144,12 +1971,13 @@

    -from_disease_result(pheval_disease_result, rank) + from_disease_result(pheval_disease_result, rank) staticmethod @@ -2160,41 +1988,12 @@

    -

    Return RankedPhEvalDiseaseResult from a PhEvalDiseaseResult and rank

    +

    Return RankedPhEvalDiseaseResult from a PhEvalDiseaseResult and rank +Args: + pheval_disease_result (PhEvalDiseaseResult): The disease result entry + rank (int): The corresponding rank for the result entry

    + -

    Parameters:

    - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    pheval_disease_result - PhEvalDiseaseResult -

    The disease result entry

    - required -
    rank - int -

    The corresponding rank for the result entry

    - required -

    Returns:

    @@ -2208,14 +2007,18 @@

    +

    The result as a RankedPhEvalDiseaseResult

    + +

    -
    - Source code in src/pheval/post_processing/post_processing.py -
    158
    +          
    + Source code in src/pheval/post_processing/post_processing.py +
    158
     159
     160
     161
    @@ -2247,7 +2050,7 @@ 

    rank=rank, )

    -
    +
    @@ -2258,6 +2061,7 @@

    @@ -2265,7 +2069,7 @@

    - RankedPhEvalGeneResult + RankedPhEvalGeneResult @@ -2276,40 +2080,17 @@

    -

    - Bases: PhEvalGeneResult

    +

    + Bases: PhEvalGeneResult

    -

    PhEval gene result with corresponding rank

    - -

    Parameters:

    - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    rank - int -

    The rank for the result entry

    - required -
    - +

    PhEval gene result with corresponding rank +Args: + rank (int): The rank for the result entry

    -
    - Source code in src/pheval/post_processing/post_processing.py -
    48
    +            
    + Source code in src/pheval/post_processing/post_processing.py +
    48
     49
     50
     51
    @@ -2359,7 +2140,7 @@ 

    rank=rank, )

    -
    + @@ -2373,12 +2154,13 @@

    -from_gene_result(pheval_gene_result, rank) + from_gene_result(pheval_gene_result, rank) staticmethod @@ -2389,41 +2171,12 @@

    -

    Return RankedPhEvalGeneResult from a PhEvalGeneResult and rank

    +

    Return RankedPhEvalGeneResult from a PhEvalGeneResult and rank +Args: + pheval_gene_result (PhEvalGeneResult): The gene result entry + rank (int): The corresponding rank for the result entry

    + -

    Parameters:

    - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    pheval_gene_result - PhEvalGeneResult -

    The gene result entry

    - required -
    rank - int -

    The corresponding rank for the result entry

    - required -

    Returns:

    @@ -2437,14 +2190,18 @@

    +

    The result as a RankedPhEvalGeneResult

    + +

    -
    - Source code in src/pheval/post_processing/post_processing.py -
    57
    +          
    + Source code in src/pheval/post_processing/post_processing.py +
    57
     58
     59
     60
    @@ -2476,7 +2233,7 @@ 

    rank=rank, )

    -
    +
    @@ -2487,6 +2244,7 @@

    @@ -2494,7 +2252,7 @@

    - RankedPhEvalVariantResult + RankedPhEvalVariantResult @@ -2505,40 +2263,17 @@

    -

    - Bases: PhEvalVariantResult

    +

    + Bases: PhEvalVariantResult

    -

    PhEval variant result with corresponding rank

    +

    PhEval variant result with corresponding rank +Args: + rank (int): The rank for the result entry

    -

    Parameters:

    - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    rank - int -

    The rank for the result entry

    - required -
    - - -
    - Source code in src/pheval/post_processing/post_processing.py -
    101
    +            
    + Source code in src/pheval/post_processing/post_processing.py +
    101
     102
     103
     104
    @@ -2594,7 +2329,7 @@ 

    rank=rank, )

    -
    + @@ -2608,12 +2343,13 @@

    -from_variant_result(pheval_variant_result, rank) + from_variant_result(pheval_variant_result, rank) staticmethod @@ -2624,41 +2360,12 @@

    -

    Return RankedPhEvalVariantResult from a PhEvalVariantResult and rank

    +

    Return RankedPhEvalVariantResult from a PhEvalVariantResult and rank +Args: + pheval_variant_result (PhEvalVariantResult): The variant result entry + rank (int): The corresponding rank for the result entry

    + -

    Parameters:

    - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    pheval_variant_result - PhEvalVariantResult -

    The variant result entry

    - required -
    rank - int -

    The corresponding rank for the result entry

    - required -

    Returns:

    @@ -2672,14 +2379,18 @@

    +

    The result as a RankedPhEvalVariantResult

    + +

    -
    - Source code in src/pheval/post_processing/post_processing.py -
    110
    +          
    + Source code in src/pheval/post_processing/post_processing.py +
    110
     111
     112
     113
    @@ -2717,7 +2428,7 @@ 

    rank=rank, )

    -
    +
    @@ -2728,6 +2439,7 @@

    @@ -2735,7 +2447,7 @@

    - ResultSorter + ResultSorter

    @@ -2746,10 +2458,9 @@

    - Source code in src/pheval/post_processing/post_processing.py -
    185
    +            
    + Source code in src/pheval/post_processing/post_processing.py +
    185
     186
     187
     188
    @@ -2837,7 +2548,7 @@ 

    else self._sort_by_decreasing_score() )

    -
    + @@ -2851,12 +2562,13 @@

    -__init__(pheval_results, sort_order) + __init__(pheval_results, sort_order)

    @@ -2865,6 +2577,8 @@

    Initialise ResultSorter

    + +

    Parameters:

    @@ -2881,7 +2595,11 @@

    [PhEvalResult] -

    + @@ -2891,7 +2609,11 @@

    SortOrder -

    + @@ -2899,9 +2621,9 @@

    List of PhEvalResult instances to be sorted

    +
    +

    List of PhEvalResult instances to be sorted

    +
    +
    required

    Sorting order to be applied

    +
    +

    Sorting order to be applied

    +
    +
    required
    -
    - Source code in src/pheval/post_processing/post_processing.py -
    - +
    188
    +          
    + Source code in src/pheval/post_processing/post_processing.py +
    188
     189
     190
     191
    @@ -2921,17 +2643,18 @@ 

    self.pheval_results = pheval_results self.sort_order = sort_order

    -
    +
    +

    -sort_pheval_results() + sort_pheval_results()

    @@ -2940,6 +2663,8 @@

    [PhEvalResult]

    [PhEvalResult]: Sorted list of PhEvalResult instances.

    +
    +

    [PhEvalResult]: Sorted list of PhEvalResult instances.

    +
    +
    -
    - Source code in src/pheval/post_processing/post_processing.py -
    217
    +          
    + Source code in src/pheval/post_processing/post_processing.py +
    217
     218
     219
     220
    @@ -2984,7 +2713,7 @@ 

    else self._sort_by_decreasing_score() )

    -
    +
    @@ -2995,6 +2724,7 @@

    @@ -3002,23 +2732,22 @@

    - SortOrder + SortOrder

    -

    - Bases: Enum

    +

    + Bases: Enum

    Enumeration representing sorting orders.

    - -
    - Source code in src/pheval/post_processing/post_processing.py -
    176
    +            
    + Source code in src/pheval/post_processing/post_processing.py +
    176
     177
     178
     179
    @@ -3032,7 +2761,7 @@ 

    DESCENDING = 2 """Descending sort order."""

    -
    + @@ -3049,10 +2778,11 @@

    -ASCENDING = 1 + ASCENDING = 1 class-attribute + instance-attribute

    @@ -3070,10 +2800,11 @@

    -DESCENDING = 2 + DESCENDING = 2 class-attribute + instance-attribute

    @@ -3094,56 +2825,29 @@

    -calculate_end_pos(variant_start, variant_ref) + calculate_end_pos(variant_start, variant_ref)

    -

    Calculate the end position for a variant

    +

    Calculate the end position for a variant +Args: + variant_start (int): The start position of the variant + variant_ref (str): The reference allele of the variant

    + -

    Parameters:

    - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    variant_start - int -

    The start position of the variant

    - required -
    variant_ref - str -

    The reference allele of the variant

    - required -

    Returns:

    @@ -3158,14 +2862,18 @@

    +

    The end position of the variant

    + +

    -
    - Source code in src/pheval/post_processing/post_processing.py -
    13
    +          
    + Source code in src/pheval/post_processing/post_processing.py +
    13
     14
     15
     16
    @@ -3185,17 +2893,18 @@ 

    """ return variant_start + len(variant_ref) - 1

    -
    +
    +

    -generate_pheval_result(pheval_result, sort_order_str, output_dir, tool_result_path) + generate_pheval_result(pheval_result, sort_order_str, output_dir, tool_result_path)

    @@ -3204,6 +2913,8 @@

    Generate PhEval variant, gene or disease TSV result based on input results.

    + +

    Parameters:

    @@ -3220,7 +2931,11 @@

    [PhEvalResult] -

    + @@ -3230,7 +2945,11 @@

    str -

    + @@ -3240,7 +2959,11 @@

    Path -

    + @@ -3250,7 +2973,11 @@

    Path -

    + @@ -3258,6 +2985,8 @@

    List of PhEvalResult instances to be processed.

    +
    +

    List of PhEvalResult instances to be processed.

    +
    +
    required

    String representation of the desired sorting order.

    +
    +

    String representation of the desired sorting order.

    +
    +
    required

    Path to the output directory.

    +
    +

    Path to the output directory.

    +
    +
    required

    Path to the tool-specific result file.

    +
    +

    Path to the tool-specific result file.

    +
    +
    required
    + +

    Raises:

    @@ -3271,14 +3000,18 @@

    ValueError -

    +

    If the results are not all the same type or an error occurs during file writing.

    +
    +

    If the results are not all the same type or an error occurs during file writing.

    +
    +
    -
    - Source code in src/pheval/post_processing/post_processing.py -
    357
    +          
    + Source code in src/pheval/post_processing/post_processing.py +
    357
     358
     359
     360
    @@ -3338,7 +3071,7 @@ 

    else: raise ValueError("Results are not all of the same type.")

    -
    +
    diff --git a/api/pheval/prepare/create_noisy_phenopackets/index.html b/api/pheval/prepare/create_noisy_phenopackets/index.html index 66e81f3ad..f18adcf1a 100644 --- a/api/pheval/prepare/create_noisy_phenopackets/index.html +++ b/api/pheval/prepare/create_noisy_phenopackets/index.html @@ -11,7 +11,7 @@ - + @@ -828,7 +828,7 @@
  • - src.pheval.prepare.create_noisy_phenopackets + create_noisy_phenopackets
  • @@ -843,49 +843,49 @@
  • - __init__() + __init__
  • - convert_patient_terms_to_parent() + convert_patient_terms_to_parent
  • - create_random_hpo_terms() + create_random_hpo_terms
  • - randomise_hpo_terms() + randomise_hpo_terms
  • - retain_real_patient_terms() + retain_real_patient_terms
  • - retrieve_hpo_term() + retrieve_hpo_term
  • - scramble_factor_proportions() + scramble_factor_proportions
  • @@ -897,35 +897,35 @@
  • - add_noise_to_phenotypic_profile() + add_noise_to_phenotypic_profile
  • - create_scrambled_phenopacket() + create_scrambled_phenopacket
  • - create_scrambled_phenopackets() + create_scrambled_phenopackets
  • - load_ontology() + load_ontology
  • - scramble_phenopackets() + scramble_phenopackets
  • @@ -1304,7 +1304,7 @@
  • - src.pheval.prepare.create_noisy_phenopackets + create_noisy_phenopackets
  • @@ -1319,49 +1319,49 @@
  • - __init__() + __init__
  • - convert_patient_terms_to_parent() + convert_patient_terms_to_parent
  • - create_random_hpo_terms() + create_random_hpo_terms
  • - randomise_hpo_terms() + randomise_hpo_terms
  • - retain_real_patient_terms() + retain_real_patient_terms
  • - retrieve_hpo_term() + retrieve_hpo_term
  • - scramble_factor_proportions() + scramble_factor_proportions
  • @@ -1373,35 +1373,35 @@
  • - add_noise_to_phenotypic_profile() + add_noise_to_phenotypic_profile
  • - create_scrambled_phenopacket() + create_scrambled_phenopacket
  • - create_scrambled_phenopackets() + create_scrambled_phenopackets
  • - load_ontology() + load_ontology
  • - scramble_phenopackets() + scramble_phenopackets
  • @@ -1431,6 +1431,7 @@

    Create noisy phenopackets

    +
    @@ -1450,7 +1451,7 @@

    Create noisy phenopackets

    - HpoRandomiser + HpoRandomiser

    @@ -1461,10 +1462,9 @@

    - Source code in src/pheval/prepare/create_noisy_phenopackets.py -
     29
    +            
    + Source code in src/pheval/prepare/create_noisy_phenopackets.py +
     29
      30
      31
      32
    @@ -1772,7 +1772,7 @@ 

    + self.create_random_hpo_terms(number_of_scrambled_terms) )

    -
    + @@ -1786,12 +1786,13 @@

    -__init__(hpo_ontology, scramble_factor) + __init__(hpo_ontology, scramble_factor)

    @@ -1800,6 +1801,8 @@

    Initialise the HpoRandomiser.

    + +

    Parameters:

    @@ -1816,7 +1819,11 @@

    ProntoImplementation -

    + @@ -1826,7 +1833,11 @@

    float -

    + @@ -1834,9 +1845,9 @@

    The instance of the HPO ontology.

    +
    +

    The instance of the HPO ontology.

    +
    +
    required

    A factor for scrambling phenotypic features.

    +
    +

    A factor for scrambling phenotypic features.

    +
    +
    required
    -
    - Source code in src/pheval/prepare/create_noisy_phenopackets.py -
    - + @@ -1903,7 +1921,11 @@

    List[PhenotypicFeature] -

    + @@ -1913,7 +1935,11 @@

    +

    The count of scrambled HPO terms.

    + +

    @@ -1921,6 +1947,8 @@

    List[PhenotypicFeature] -

    +
    32
    +          
    + Source code in src/pheval/prepare/create_noisy_phenopackets.py +
    32
     33
     34
     35
    @@ -1858,17 +1869,18 @@ 

    self.phenotypic_abnormalities = set(hpo_ontology.roots(predicates=["HP:0000118"])) self.scramble_factor = scramble_factor

    -
    +
    +

    -convert_patient_terms_to_parent(phenotypic_features, retained_phenotypic_features, number_of_scrambled_terms) + convert_patient_terms_to_parent(phenotypic_features, retained_phenotypic_features, number_of_scrambled_terms)

    @@ -1877,6 +1889,8 @@

    List[PhenotypicFeature]

    List of all phenotypic features.

    +
    +

    List of all phenotypic features.

    +
    +
    required

    List of retained non-scrambled phenotypic features.

    +
    +

    List of retained non-scrambled phenotypic features.

    +
    +
    required required

    List[PhenotypicFeature]: A list of HPO terms converted to their parent terms.

    +
    +

    List[PhenotypicFeature]: A list of HPO terms converted to their parent terms.

    +
    +
    -
    +
    Note

    This method identifies a subset of patient HPO terms that are not retained among the non-scrambled phenotypic features and converts them to their respective parent terms. It then returns a list of parent HPO terms based on the provided scrambled terms count. If no remaining HPO terms are available for conversion, no parent terms are returned.

    -
    - Source code in src/pheval/prepare/create_noisy_phenopackets.py -
    - + @@ -2071,6 +2110,8 @@

    List[PhenotypicFeature] -

    +
     94
    +          
    + Source code in src/pheval/prepare/create_noisy_phenopackets.py +
     94
      95
      96
      97
    @@ -2028,17 +2060,18 @@ 

    parent_terms.append(self.retrieve_hpo_term(random.choice(parents))) return parent_terms

    -
    +
    +

    -create_random_hpo_terms(number_of_scrambled_terms) + create_random_hpo_terms(number_of_scrambled_terms)

    @@ -2047,6 +2080,8 @@

    int

    The count of random HPO terms to be generated.

    +
    +

    The count of random HPO terms to be generated.

    +
    +
    required

    List[PhenotypicFeature]: A list of randomly selected HPO terms.

    +
    +

    List[PhenotypicFeature]: A list of randomly selected HPO terms.

    +
    +
    -
    - Source code in src/pheval/prepare/create_noisy_phenopackets.py -
    - + @@ -2162,6 +2214,8 @@

    List[PhenotypicFeature] -

    +
    135
    +          
    + Source code in src/pheval/prepare/create_noisy_phenopackets.py +
    135
     136
     137
     138
    @@ -2119,17 +2164,18 @@ 

    ) return [self.retrieve_hpo_term(random_id) for random_id in random_ids]

    -
    +
    +

    -randomise_hpo_terms(phenotypic_features) + randomise_hpo_terms(phenotypic_features)

    @@ -2138,6 +2184,8 @@

    List[PhenotypicFeature]

    List of phenotypic features to be randomised.

    +
    +

    List of phenotypic features to be randomised.

    +
    +
    required

    List[PhenotypicFeature]: A list of randomised HPO terms.

    +
    +

    List[PhenotypicFeature]: A list of randomised HPO terms.

    +
    +
    -
    +
    Note

    This method randomises the provided phenotypic features by incorporating three types of HPO terms: 1. Retained Patient Terms: Non-scrambled (real patient) HPO terms retained based on the scramble factor. @@ -2189,9 +2247,9 @@

    - Source code in src/pheval/prepare/create_noisy_phenopackets.py -
    - + @@ -2306,7 +2371,11 @@

    +

    The count of scrambled HPO terms.

    + +

    @@ -2314,6 +2383,8 @@

    List[PhenotypicFeature] -

    +
    150
    +          
    + Source code in src/pheval/prepare/create_noisy_phenopackets.py +
    150
     151
     152
     153
    @@ -2257,17 +2315,18 @@ 

    + self.create_random_hpo_terms(number_of_scrambled_terms) )

    -
    +
    +

    -retain_real_patient_terms(phenotypic_features, number_of_scrambled_terms) + retain_real_patient_terms(phenotypic_features, number_of_scrambled_terms) staticmethod @@ -2280,6 +2339,8 @@

    List[PhenotypicFeature]

    List of phenotypic features.

    +
    +

    List of phenotypic features.

    +
    +
    required required

    List[PhenotypicFeature]: A list of non-scrambled (real patient) HPO terms.

    +
    +

    List[PhenotypicFeature]: A list of non-scrambled (real patient) HPO terms.

    +
    +
    -
    - Source code in src/pheval/prepare/create_noisy_phenopackets.py -
    - + @@ -2417,6 +2499,8 @@

    PhenotypicFeature

    - +
    73
    +          
    + Source code in src/pheval/prepare/create_noisy_phenopackets.py +
    73
     74
     75
     76
    @@ -2374,17 +2449,18 @@ 

    number_of_real_id = 1 return random.sample(phenotypic_features, number_of_real_id)

    -
    +
    +

    -retrieve_hpo_term(hpo_id) + retrieve_hpo_term(hpo_id)

    @@ -2393,6 +2469,8 @@

    str

    The HPO ID of the term to retrieve.

    +
    +

    The HPO ID of the term to retrieve.

    +
    +
    required PhenotypicFeature

    The PhenotypicFeature object representing the retrieved HPO term.

    +
    +

    The PhenotypicFeature object representing the retrieved HPO term.

    +
    +
    -
    - Source code in src/pheval/prepare/create_noisy_phenopackets.py -
    - + @@ -2506,6 +2601,8 @@

    int

    - +
    59
    +          
    + Source code in src/pheval/prepare/create_noisy_phenopackets.py +
    59
     60
     61
     62
    @@ -2463,17 +2551,18 @@ 

    hpo_term = "".join(rels[(list(rels.keys())[0])]) return PhenotypicFeature(type=OntologyClass(id=hpo_id, label=hpo_term))

    -
    +
    +

    -scramble_factor_proportions(phenotypic_features) + scramble_factor_proportions(phenotypic_features)

    @@ -2482,6 +2571,8 @@

    list[PhenotypicFeature]

    List of phenotypic features.

    +
    +

    List of phenotypic features.

    +
    +
    required int

    The calculated number of phenotypic features to be scrambled.

    +
    +

    The calculated number of phenotypic features to be scrambled.

    +
    +
    -
    - Source code in src/pheval/prepare/create_noisy_phenopackets.py -
    - + @@ -2608,7 +2717,11 @@

    Union[Phenopacket, Family] -

    + @@ -2616,6 +2729,8 @@

    Union[Phenopacket, Family] -

    +
    44
    +          
    + Source code in src/pheval/prepare/create_noisy_phenopackets.py +
    44
     45
     46
     47
    @@ -2554,7 +2655,7 @@ 

    else: return int(round(len(phenotypic_features) * self.scramble_factor, 0))

    -
    +
    @@ -2565,15 +2666,17 @@

    -add_noise_to_phenotypic_profile(hpo_randomiser, phenopacket) + add_noise_to_phenotypic_profile(hpo_randomiser, phenopacket)

    @@ -2582,6 +2685,8 @@

    HpoRandomiser

    An instance of HpoRandomiser used for randomisation.

    +
    +

    An instance of HpoRandomiser used for randomisation.

    +
    +
    required

    The Phenopacket or Family to be randomised.

    +
    +

    The Phenopacket or Family to be randomised.

    +
    +
    required

    Union[Phenopacket, Family]: The randomised Phenopacket or Family.

    +
    +

    Union[Phenopacket, Family]: The randomised Phenopacket or Family.

    +
    +
    -
    - Source code in src/pheval/prepare/create_noisy_phenopackets.py -
    - + @@ -2717,7 +2843,11 @@

    Path -

    + @@ -2727,7 +2857,11 @@

    +

    A factor determining the level of scrambling for phenotypic features.

    + +

    @@ -2735,9 +2869,9 @@

    - Source code in src/pheval/prepare/create_noisy_phenopackets.py -

    185
    +          
    + Source code in src/pheval/prepare/create_noisy_phenopackets.py +
    185
     186
     187
     188
    @@ -2672,17 +2791,18 @@ 

    randomised_phenopacket = PhenopacketRebuilder(phenopacket).add_randomised_hpo(random_phenotypes) return randomised_phenopacket

    -
    +
    +

    -create_scrambled_phenopacket(output_dir, phenopacket_path, scramble_factor) + create_scrambled_phenopacket(output_dir, phenopacket_path, scramble_factor)

    @@ -2691,6 +2811,8 @@

    Path

    The directory to store the output scrambled Phenopacket.

    +
    +

    The directory to store the output scrambled Phenopacket.

    +
    +
    required

    The path to the original Phenopacket file.

    +
    +

    The path to the original Phenopacket file.

    +
    +
    required required
    - + @@ -2826,7 +2967,11 @@

    Path -

    + @@ -2836,7 +2981,11 @@

    +

    A factor determining the level of scrambling for phenotypic features.

    + +

    @@ -2844,9 +2993,9 @@

    - Source code in src/pheval/prepare/create_noisy_phenopackets.py -

    205
    +          
    + Source code in src/pheval/prepare/create_noisy_phenopackets.py +
    205
     206
     207
     208
    @@ -2781,17 +2915,18 @@ 

    output_dir.joinpath(phenopacket_path.name), )

    -
    +
    +

    -create_scrambled_phenopackets(output_dir, phenopacket_dir, scramble_factor) + create_scrambled_phenopackets(output_dir, phenopacket_dir, scramble_factor)

    @@ -2800,6 +2935,8 @@

    Path

    The directory to store the output scrambled Phenopackets.

    +
    +

    The directory to store the output scrambled Phenopackets.

    +
    +
    required

    The directory containing the original Phenopacket files.

    +
    +

    The directory containing the original Phenopacket files.

    +
    +
    required required
    229
    +          
    + Source code in src/pheval/prepare/create_noisy_phenopackets.py +
    229
     230
     231
     232
    @@ -2892,17 +3041,18 @@ 

    ), )

    -
    +
    +

    -load_ontology() + load_ontology()

    @@ -2911,6 +3061,8 @@

    +

    An instance of ProntoImplementation containing the loaded HPO.

    +

    +
    -
    - Source code in src/pheval/prepare/create_noisy_phenopackets.py -
    18
    +          
    + Source code in src/pheval/prepare/create_noisy_phenopackets.py +
    18
     19
     20
     21
    @@ -2948,17 +3104,18 @@ 

    resource = OntologyResource(slug="hp.obo", local=False) return ProntoImplementation(resource)

    -
    +
    +

    -scramble_phenopackets(output_dir, phenopacket_path, phenopacket_dir, scramble_factor) + scramble_phenopackets(output_dir, phenopacket_path, phenopacket_dir, scramble_factor)

    @@ -2967,6 +3124,8 @@

    Create scrambled phenopackets from either a single phenopacket or a directory of phenopackets.

    + +

    Parameters:

    @@ -2983,7 +3142,11 @@

    Path -

    + @@ -2993,7 +3156,11 @@

    Path -

    + @@ -3003,7 +3170,11 @@

    Path -

    + @@ -3013,7 +3184,11 @@

    float -

    + @@ -3021,9 +3196,9 @@

    The directory to store the output scrambled Phenopackets.

    +
    +

    The directory to store the output scrambled Phenopackets.

    +
    +
    required

    The path to a single Phenopacket file (if applicable).

    +
    +

    The path to a single Phenopacket file (if applicable).

    +
    +
    required

    The directory containing multiple Phenopacket files (if applicable).

    +
    +

    The directory containing multiple Phenopacket files (if applicable).

    +
    +
    required

    A factor determining the level of scrambling for phenotypic features.

    +
    +

    A factor determining the level of scrambling for phenotypic features.

    +
    +
    required
    -
    - Source code in src/pheval/prepare/create_noisy_phenopackets.py -
    254
    +          
    + Source code in src/pheval/prepare/create_noisy_phenopackets.py +
    254
     255
     256
     257
    @@ -3057,7 +3232,7 @@ 

    elif phenopacket_dir is not None: create_scrambled_phenopackets(output_dir, phenopacket_dir, scramble_factor)

    -
    +
    diff --git a/api/pheval/prepare/create_spiked_vcf/index.html b/api/pheval/prepare/create_spiked_vcf/index.html index 42eb17389..d6c9530b5 100644 --- a/api/pheval/prepare/create_spiked_vcf/index.html +++ b/api/pheval/prepare/create_spiked_vcf/index.html @@ -11,7 +11,7 @@ - + @@ -842,7 +842,7 @@
  • - src.pheval.prepare.create_spiked_vcf + create_spiked_vcf
  • @@ -857,7 +857,7 @@
  • - populate_fields() + populate_fields
  • @@ -884,28 +884,28 @@
  • - __init__() + __init__
  • - parse_assembly() + parse_assembly
  • - parse_sample_id() + parse_sample_id
  • - parse_vcf_header() + parse_vcf_header
  • @@ -925,35 +925,35 @@
  • - __init__() + __init__
  • - construct_header() + construct_header
  • - construct_variant_entry() + construct_variant_entry
  • - construct_vcf() + construct_vcf
  • - construct_vcf_records() + construct_vcf_records
  • @@ -973,28 +973,28 @@
  • - __init__() + __init__
  • - write_gzip() + write_gzip
  • - write_uncompressed() + write_uncompressed
  • - write_vcf_file() + write_vcf_file
  • @@ -1006,63 +1006,63 @@
  • - check_variant_assembly() + check_variant_assembly
  • - create_spiked_vcf() + create_spiked_vcf
  • - create_spiked_vcfs() + create_spiked_vcfs
  • - generate_spiked_vcf_file() + generate_spiked_vcf_file
  • - read_vcf() + read_vcf
  • - select_vcf_template() + select_vcf_template
  • - spike_and_update_phenopacket() + spike_and_update_phenopacket
  • - spike_vcf_contents() + spike_vcf_contents
  • - spike_vcfs() + spike_vcfs
  • @@ -1427,7 +1427,7 @@
  • - src.pheval.prepare.create_spiked_vcf + create_spiked_vcf
  • @@ -1442,7 +1442,7 @@
  • - populate_fields() + populate_fields
  • @@ -1469,28 +1469,28 @@
  • - __init__() + __init__
  • - parse_assembly() + parse_assembly
  • - parse_sample_id() + parse_sample_id
  • - parse_vcf_header() + parse_vcf_header
  • @@ -1510,35 +1510,35 @@
  • - __init__() + __init__
  • - construct_header() + construct_header
  • - construct_variant_entry() + construct_variant_entry
  • - construct_vcf() + construct_vcf
  • - construct_vcf_records() + construct_vcf_records
  • @@ -1558,28 +1558,28 @@
  • - __init__() + __init__
  • - write_gzip() + write_gzip
  • - write_uncompressed() + write_uncompressed
  • - write_vcf_file() + write_vcf_file
  • @@ -1591,63 +1591,63 @@
  • - check_variant_assembly() + check_variant_assembly
  • - create_spiked_vcf() + create_spiked_vcf
  • - create_spiked_vcfs() + create_spiked_vcfs
  • - generate_spiked_vcf_file() + generate_spiked_vcf_file
  • - read_vcf() + read_vcf
  • - select_vcf_template() + select_vcf_template
  • - spike_and_update_phenopacket() + spike_and_update_phenopacket
  • - spike_vcf_contents() + spike_vcf_contents
  • - spike_vcfs() + spike_vcfs
  • @@ -1677,6 +1677,7 @@

    Create spiked vcf

    +
    @@ -1696,7 +1697,7 @@

    Create spiked vcf

    - VcfFile + VcfFile @@ -1711,6 +1712,8 @@

    Represents a VCF file with its name, contents, and header information.

    + +

    Attributes:

    @@ -1722,33 +1725,44 @@

    - + - + - + - + - + - +
    vcf_file_namevcf_file_name str

    The name of the VCF file.

    +
    +

    The name of the VCF file.

    +
    +
    vcf_contentsvcf_contents List[str]

    The contents of the VCF file.

    +
    +

    The contents of the VCF file.

    +
    +
    vcf_headervcf_header VcfHeader

    The parsed header information of the VCF file.

    +
    +

    The parsed header information of the VCF file.

    +
    +
    - -
    - Source code in src/pheval/prepare/create_spiked_vcf.py -
    - + @@ -1862,6 +1883,8 @@

    +

    An instance of VcfFile with populated fields.

    + +

    175
    +            
    + Source code in src/pheval/prepare/create_spiked_vcf.py +
    175
     176
     177
     178
    @@ -1806,7 +1820,7 @@ 

    contents = read_vcf(template_vcf) return VcfFile(template_vcf.name, contents, VcfHeaderParser(contents).parse_vcf_header())

    -
    + @@ -1820,12 +1834,13 @@

    +

    -populate_fields(template_vcf) + populate_fields(template_vcf) staticmethod @@ -1838,6 +1853,8 @@

    Path

    The path to the template VCF file.

    +
    +

    The path to the template VCF file.

    +
    +
    required
    -
    - Source code in src/pheval/prepare/create_spiked_vcf.py -
    190
    +          
    + Source code in src/pheval/prepare/create_spiked_vcf.py +
    190
     191
     192
     193
    @@ -1909,7 +1936,7 @@ 

    contents = read_vcf(template_vcf) return VcfFile(template_vcf.name, contents, VcfHeaderParser(contents).parse_vcf_header())

    -
    +
    @@ -1920,6 +1947,7 @@

    @@ -1927,7 +1955,7 @@

    - VcfHeader + VcfHeader @@ -1942,6 +1970,8 @@

    Data obtained from VCF header.

    + +

    Parameters:

    @@ -1958,7 +1988,11 @@

    - + @@ -1968,7 +2002,11 @@

    - + @@ -1978,7 +2016,11 @@

    - + @@ -1986,10 +2028,9 @@

    str

    The sample identifier from the VCF header.

    +
    +

    The sample identifier from the VCF header.

    +
    +
    required str

    The assembly information obtained from the VCF header.

    +
    +

    The assembly information obtained from the VCF header.

    +
    +
    required bool

    A boolean indicating whether the VCF denotes chromosomes as chr or not.

    +
    +

    A boolean indicating whether the VCF denotes chromosomes as chr or not.

    +
    +
    required
    - -
    - Source code in src/pheval/prepare/create_spiked_vcf.py -
    78
    +            
    + Source code in src/pheval/prepare/create_spiked_vcf.py +
    78
     79
     80
     81
    @@ -2015,7 +2056,7 @@ 

    assembly: str chr_status: bool

    -
    + @@ -2035,6 +2076,7 @@

    +
    @@ -2042,7 +2084,7 @@

    - VcfHeaderParser + VcfHeaderParser

    @@ -2053,10 +2095,9 @@

    - Source code in src/pheval/prepare/create_spiked_vcf.py -
    @@ -2230,9 +2278,9 @@

    - Source code in src/pheval/prepare/create_spiked_vcf.py -

    112
    +            
    + Source code in src/pheval/prepare/create_spiked_vcf.py +
    112
     113
     114
     115
    @@ -2178,7 +2219,7 @@ 

    sample_id = self.parse_sample_id() return VcfHeader(sample_id, assembly, chr_status)

    -
    + @@ -2192,12 +2233,13 @@

    -__init__(vcf_contents) + __init__(vcf_contents)

    @@ -2206,6 +2248,8 @@

    +

    The contents of the VCF file as a list of strings.

    +

    +
    required
    115
    +          
    + Source code in src/pheval/prepare/create_spiked_vcf.py +
    115
     116
     117
     118
    @@ -2248,17 +2296,18 @@ 

    """ self.vcf_contents = vcf_contents

    -
    +
    +

    -parse_assembly() + parse_assembly()

    @@ -2267,6 +2316,8 @@

    Parse the genome assembly and format of vcf_records.

    + +

    Returns:

    @@ -2280,14 +2331,18 @@

    tuple[str, bool] -

    +

    Tuple[str, bool]: A tuple containing the assembly and chromosome status (True/False).

    +
    +

    Tuple[str, bool]: A tuple containing the assembly and chromosome status (True/False).

    +
    +
    -
    - Source code in src/pheval/prepare/create_spiked_vcf.py -
    124
    +          
    + Source code in src/pheval/prepare/create_spiked_vcf.py +
    124
     125
     126
     127
    @@ -2341,17 +2396,18 @@ 

    assembly = [k for k, v in genome_assemblies.items() if v == vcf_assembly][0] return assembly, chr_status

    -
    +
    +

    -parse_sample_id() + parse_sample_id()

    @@ -2360,6 +2416,8 @@

    Parse the sample ID of the VCF.

    + +

    Returns:

    @@ -2373,14 +2431,18 @@

    str

    - +
    str

    The sample ID extracted from the VCF header.

    +
    +

    The sample ID extracted from the VCF header.

    +
    +
    -
    - Source code in src/pheval/prepare/create_spiked_vcf.py -
    152
    +          
    + Source code in src/pheval/prepare/create_spiked_vcf.py +
    152
     153
     154
     155
    @@ -2400,17 +2462,18 @@ 

    if line.startswith("#CHROM"): return line.split("\t")[9].rstrip()

    -
    +
    +

    -parse_vcf_header() + parse_vcf_header()

    @@ -2419,6 +2482,8 @@

    Parse the header of the VCF.

    + +

    Returns:

    @@ -2432,14 +2497,18 @@

    VcfHeader

    - +
    VcfHeader

    An instance of VcfHeader containing sample ID, assembly, and chromosome status.

    +
    +

    An instance of VcfHeader containing sample ID, assembly, and chromosome status.

    +
    +
    -
    - Source code in src/pheval/prepare/create_spiked_vcf.py -
    163
    +          
    + Source code in src/pheval/prepare/create_spiked_vcf.py +
    163
     164
     165
     166
    @@ -2459,7 +2528,7 @@ 

    sample_id = self.parse_sample_id() return VcfHeader(sample_id, assembly, chr_status)

    -
    +
    @@ -2470,6 +2539,7 @@

    +
    @@ -2477,7 +2547,7 @@

    - VcfSpiker + VcfSpiker

    @@ -2488,10 +2558,9 @@

    Class for spiking proband variants into template VCF file contents.

    - -
    - Source code in src/pheval/prepare/create_spiked_vcf.py -
    - + @@ -2785,7 +2861,11 @@

    List[ProbandCausativeVariant] -

    + @@ -2795,7 +2875,11 @@

    VcfHeader -

    + @@ -2803,9 +2887,9 @@

    - Source code in src/pheval/prepare/create_spiked_vcf.py -

    284
    +            
    + Source code in src/pheval/prepare/create_spiked_vcf.py +
    284
     285
     286
     287
    @@ -2731,7 +2800,7 @@ 

    """ return self.construct_header(self.construct_vcf_records(template_vcf_name))

    -
    + @@ -2745,12 +2814,13 @@

    +

    -__init__(vcf_contents, proband_causative_variants, vcf_header) + __init__(vcf_contents, proband_causative_variants, vcf_header)

    @@ -2759,6 +2829,8 @@

    List[str]

    Contents of the template VCF file.

    +
    +

    Contents of the template VCF file.

    +
    +
    required

    List of proband causative variants.

    +
    +

    List of proband causative variants.

    +
    +
    required

    The VCF header information.

    +
    +

    The VCF header information.

    +
    +
    required
    - + @@ -2882,6 +2973,8 @@

    List[str] -

    +
    287
    +          
    + Source code in src/pheval/prepare/create_spiked_vcf.py +
    287
     288
     289
     290
    @@ -2839,17 +2923,18 @@ 

    self.proband_causative_variants = proband_causative_variants self.vcf_header = vcf_header

    -
    +
    +

    -construct_header(updated_vcf_records) + construct_header(updated_vcf_records)

    @@ -2858,6 +2943,8 @@

    List[str]

    Updated VCF records.

    +
    +

    Updated VCF records.

    +
    +
    required

    List[str]: Constructed header as a list of strings.

    +
    +

    List[str]: Constructed header as a list of strings.

    +
    +
    -
    - Source code in src/pheval/prepare/create_spiked_vcf.py -
    371
    +          
    + Source code in src/pheval/prepare/create_spiked_vcf.py +
    371
     372
     373
     374
    @@ -2944,17 +3041,18 @@ 

    updated_vcf_file.append(text) return updated_vcf_file

    -
    +
    +

    -construct_variant_entry(proband_variant_data) + construct_variant_entry(proband_variant_data)

    @@ -2963,6 +3061,8 @@

    Construct variant entries.

    + +

    Parameters:

    @@ -2979,7 +3079,11 @@

    ProbandCausativeVariant -

    + @@ -2987,6 +3091,8 @@

    Data for the proband variant.

    +
    +

    Data for the proband variant.

    +
    +
    required
    + +

    Returns:

    @@ -3000,14 +3106,18 @@

    List[str] -

    +

    List[str]: Constructed variant entry as a list of strings.

    +
    +

    List[str]: Constructed variant entry as a list of strings.

    +
    +
    -
    - Source code in src/pheval/prepare/create_spiked_vcf.py -
    @@ -3118,6 +3235,8 @@

    List[str] -

    +
    305
    +          
    + Source code in src/pheval/prepare/create_spiked_vcf.py +
    305
     306
     307
     308
    @@ -3075,17 +3185,18 @@ 

    genotype_codes[proband_variant_data.genotype.lower()] + "\n", ]

    -
    +
    +

    -construct_vcf(template_vcf_name) + construct_vcf(template_vcf_name)

    @@ -3094,6 +3205,8 @@

    +

    Name of the template VCF file.

    +

    +
    required

    List[str]: The complete spiked VCF file content as a list of strings.

    +
    +

    List[str]: The complete spiked VCF file content as a list of strings.

    +
    +
    -
    - Source code in src/pheval/prepare/create_spiked_vcf.py -
    393
    +          
    + Source code in src/pheval/prepare/create_spiked_vcf.py +
    393
     394
     395
     396
    @@ -3160,17 +3283,18 @@ 

    """ return self.construct_header(self.construct_vcf_records(template_vcf_name))

    -
    +
    +

    -construct_vcf_records(template_vcf_name) + construct_vcf_records(template_vcf_name)

    @@ -3179,6 +3303,8 @@

    Construct updated VCF records by inserting spiked variants into the correct positions within the VCF.

    + +

    Parameters:

    @@ -3195,7 +3321,11 @@

    str -

    + @@ -3203,6 +3333,8 @@

    Name of the template VCF file.

    +
    +

    Name of the template VCF file.

    +
    +
    required
    + +

    Returns:

    @@ -3216,14 +3348,18 @@

    List[str] -

    +

    List[str]: Updated VCF records containing the spiked variants.

    +
    +

    List[str]: Updated VCF records containing the spiked variants.

    +
    +
    -
    - Source code in src/pheval/prepare/create_spiked_vcf.py -
    340
    +          
    + Source code in src/pheval/prepare/create_spiked_vcf.py +
    340
     341
     342
     343
    @@ -3283,7 +3419,7 @@ 

    updated_vcf_records.insert(variant_entry_position, "\t".join(variant_entry)) return updated_vcf_records

    -
    +
    @@ -3294,6 +3430,7 @@

    +
    @@ -3301,7 +3438,7 @@

    - VcfWriter + VcfWriter

    @@ -3312,10 +3449,9 @@

    Class for writing VCF file.

    - -
    - Source code in src/pheval/prepare/create_spiked_vcf.py -
    - + @@ -3457,7 +3600,11 @@

    Path -

    + @@ -3465,9 +3612,9 @@

    - Source code in src/pheval/prepare/create_spiked_vcf.py -

    406
    +            
    + Source code in src/pheval/prepare/create_spiked_vcf.py +
    406
     407
     408
     409
    @@ -3403,7 +3539,7 @@ 

    """ self.write_gzip() if is_gzipped(self.spiked_vcf_file_path) else self.write_uncompressed()

    -
    + @@ -3417,12 +3553,13 @@

    +

    -__init__(vcf_contents, spiked_vcf_file_path) + __init__(vcf_contents, spiked_vcf_file_path)

    @@ -3431,6 +3568,8 @@

    List[str]

    Contents of the VCF file to be written.

    +
    +

    Contents of the VCF file to be written.

    +
    +
    required

    Path to the spiked VCF file to be created.

    +
    +

    Path to the spiked VCF file to be created.

    +
    +
    required
    409
    +          
    + Source code in src/pheval/prepare/create_spiked_vcf.py +
    409
     410
     411
     412
    @@ -3495,17 +3642,18 @@ 

    self.vcf_contents = vcf_contents self.spiked_vcf_file_path = spiked_vcf_file_path

    -
    +
    +

    -write_gzip() + write_gzip()

    @@ -3514,9 +3662,9 @@

    - Source code in src/pheval/prepare/create_spiked_vcf.py -
    424
    +          
    + Source code in src/pheval/prepare/create_spiked_vcf.py +
    424
     425
     426
     427
    @@ -3534,17 +3682,18 @@ 

    f.write(line) f.close()

    -
    +
    +

    -write_uncompressed() + write_uncompressed()

    @@ -3553,9 +3702,9 @@

    Write the VCF contents to an uncompressed VCF file.

    -
    - Source code in src/pheval/prepare/create_spiked_vcf.py -
    434
    +          
    + Source code in src/pheval/prepare/create_spiked_vcf.py +
    434
     435
     436
     437
    @@ -3569,17 +3718,18 @@ 

    file.writelines(self.vcf_contents) file.close()

    -
    +
    +

    -write_vcf_file() + write_vcf_file()

    @@ -3590,9 +3740,9 @@

    - Source code in src/pheval/prepare/create_spiked_vcf.py -
    - + @@ -3662,7 +3820,11 @@

    VcfHeader -

    + @@ -3672,7 +3834,11 @@

    Path -

    + @@ -3680,6 +3846,8 @@

    +

    If there are too many or incompatible genome assemblies found.

    + +

    - +
    442
    +          
    + Source code in src/pheval/prepare/create_spiked_vcf.py +
    442
     443
     444
     445
    @@ -3608,7 +3758,7 @@ 

    """ self.write_gzip() if is_gzipped(self.spiked_vcf_file_path) else self.write_uncompressed()

    -
    +
    @@ -3619,15 +3769,17 @@

    -check_variant_assembly(proband_causative_variants, vcf_header, phenopacket_path) + check_variant_assembly(proband_causative_variants, vcf_header, phenopacket_path)

    @@ -3636,6 +3788,8 @@

    List[ProbandCausativeVariant]

    A list of causative variants from the proband.

    +
    +

    A list of causative variants from the proband.

    +
    +
    required

    An instance of VcfHeader representing the VCF file's header.

    +
    +

    An instance of VcfHeader representing the VCF file's header.

    +
    +
    required

    The path to the Phenopacket file.

    +
    +

    The path to the Phenopacket file.

    +
    +
    required
    IncompatibleGenomeAssemblyError

    If the assembly in the Phenopacket does not match the VCF assembly.

    +
    +

    If the assembly in the Phenopacket does not match the VCF assembly.

    +
    +
    -
    - Source code in src/pheval/prepare/create_spiked_vcf.py -
    - + @@ -3817,7 +4000,11 @@

    Path -

    + @@ -3827,7 +4014,11 @@

    Path -

    + @@ -3837,7 +4028,11 @@

    Path -

    + @@ -3847,7 +4042,11 @@

    Path -

    + @@ -3857,7 +4056,11 @@

    Path -

    + @@ -3865,6 +4068,8 @@

    InputError -

    +
    249
    +          
    + Source code in src/pheval/prepare/create_spiked_vcf.py +
    249
     250
     251
     252
    @@ -3772,17 +3948,18 @@ 

    assembly=phenopacket_assembly, phenopacket=phenopacket_path )

    -
    +
    +

    -create_spiked_vcf(output_dir, phenopacket_path, hg19_template_vcf, hg38_template_vcf, hg19_vcf_dir, hg38_vcf_dir) + create_spiked_vcf(output_dir, phenopacket_path, hg19_template_vcf, hg38_template_vcf, hg19_vcf_dir, hg38_vcf_dir)

    @@ -3791,6 +3968,8 @@

    Path

    The directory to store the generated spiked VCF file.

    +
    +

    The directory to store the generated spiked VCF file.

    +
    +
    required

    Path to the Phenopacket file.

    +
    +

    Path to the Phenopacket file.

    +
    +
    required

    Path to the hg19 template VCF file (optional).

    +
    +

    Path to the hg19 template VCF file (optional).

    +
    +
    required

    Path to the hg38 template VCF file (optional).

    +
    +

    Path to the hg38 template VCF file (optional).

    +
    +
    required

    The directory containing the hg19 VCF files (optional).

    +
    +

    The directory containing the hg19 VCF files (optional).

    +
    +
    required

    The directory containing the hg38 VCF files (optional).

    +
    +

    The directory containing the hg38 VCF files (optional).

    +
    +
    required

    If both hg19_template_vcf and hg38_template_vcf are None.

    +
    +

    If both hg19_template_vcf and hg38_template_vcf are None.

    +
    +
    -
    - Source code in src/pheval/prepare/create_spiked_vcf.py -
    - + @@ -3988,7 +4204,11 @@

    Path -

    + @@ -3998,7 +4218,11 @@

    Path -

    + @@ -4008,7 +4232,11 @@

    Path -

    + @@ -4018,7 +4246,11 @@

    Path -

    + @@ -4028,7 +4260,11 @@

    Path -

    + @@ -4036,6 +4272,8 @@

    InputError -

    +
    573
    +          
    + Source code in src/pheval/prepare/create_spiked_vcf.py +
    573
     574
     575
     576
    @@ -3943,17 +4152,18 @@ 

    hg19_vcf_info, hg38_vcf_info, hg19_vcf_dir, hg38_vcf_dir, output_dir, phenopacket_path )

    -
    +
    +

    -create_spiked_vcfs(output_dir, phenopacket_dir, hg19_template_vcf, hg38_template_vcf, hg19_vcf_dir, hg38_vcf_dir) + create_spiked_vcfs(output_dir, phenopacket_dir, hg19_template_vcf, hg38_template_vcf, hg19_vcf_dir, hg38_vcf_dir)

    @@ -3962,6 +4172,8 @@

    Path

    The directory to store the generated spiked VCF file.

    +
    +

    The directory to store the generated spiked VCF file.

    +
    +
    required

    Path to the Phenopacket directory.

    +
    +

    Path to the Phenopacket directory.

    +
    +
    required

    Path to the template hg19 VCF file (optional).

    +
    +

    Path to the template hg19 VCF file (optional).

    +
    +
    required

    Path to the template hg19 VCF file (optional).

    +
    +

    Path to the template hg19 VCF file (optional).

    +
    +
    required

    The directory containing the hg19 VCF files (optional).

    +
    +

    The directory containing the hg19 VCF files (optional).

    +
    +
    required

    The directory containing the hg38 VCF files (optional).

    +
    +

    The directory containing the hg38 VCF files (optional).

    +
    +
    required

    If both hg19_template_vcf and hg38_template_vcf are None.

    +
    +

    If both hg19_template_vcf and hg38_template_vcf are None.

    +
    +
    -
    - Source code in src/pheval/prepare/create_spiked_vcf.py -
    - + @@ -4171,7 +4420,11 @@

    Union[Phenopacket, Family] -

    + @@ -4181,7 +4434,11 @@

    Path -

    + @@ -4191,7 +4448,11 @@

    VcfFile -

    + @@ -4201,7 +4462,11 @@

    VcfFile -

    + @@ -4211,7 +4476,11 @@

    Path -

    + @@ -4221,35 +4490,23 @@

    Path -

    - - -
    604
    +          
    + Source code in src/pheval/prepare/create_spiked_vcf.py +
    604
     605
     606
     607
    @@ -4126,17 +4368,18 @@ 

    hg19_vcf_info, hg38_vcf_info, hg19_vcf_dir, hg38_vcf_dir, output_dir, phenopacket_path )

    -
    +
    +

    -generate_spiked_vcf_file(output_dir, phenopacket, phenopacket_path, hg19_vcf_info, hg38_vcf_info, hg19_vcf_dir, hg38_vcf_dir) + generate_spiked_vcf_file(output_dir, phenopacket, phenopacket_path, hg19_vcf_info, hg38_vcf_info, hg19_vcf_dir, hg38_vcf_dir)

    @@ -4145,6 +4388,8 @@

    Path

    Path to the directory to store the generated file.

    +
    +

    Path to the directory to store the generated file.

    +
    +
    required

    Phenopacket or Family containing causative variants.

    +
    +

    Phenopacket or Family containing causative variants.

    +
    +
    required

    Path to the Phenopacket file.

    +
    +

    Path to the Phenopacket file.

    +
    +
    required

    VCF file info for hg19 template vcf.

    +
    +

    VCF file info for hg19 template vcf.

    +
    +
    required

    VCF file info for hg38 template vcf.

    +
    +

    VCF file info for hg38 template vcf.

    +
    +
    required

    The directory containing the hg19 VCF files.

    +
    +

    The directory containing the hg19 VCF files.

    +
    +
    required

    The directory containing the hg38 VCF files.

    - required +
    +

    The directory containing the hg38 VCF files.

    +
    - -

    Returns:

    - - - - - - - - - - -
    Name TypeDescription
    File - File + + required

    The generated File object representing the newly created spiked VCF file.

    +

    Returns: + File: The generated File object representing the newly created spiked VCF file.

    -
    - Source code in src/pheval/prepare/create_spiked_vcf.py -
    498
    +          
    + Source code in src/pheval/prepare/create_spiked_vcf.py +
    498
     499
     500
     501
    @@ -4317,17 +4574,18 @@ 

    file_attributes={"fileFormat": "vcf", "genomeAssembly": vcf_assembly}, )

    -
    +
    +

    -read_vcf(vcf_file) + read_vcf(vcf_file)

    @@ -4336,6 +4594,8 @@

    Read the contents of a VCF file into memory, handling both uncompressed and gzipped files.

    + +

    Parameters:

    @@ -4352,7 +4612,11 @@

    - + @@ -4360,6 +4624,8 @@

    Path

    The path to the VCF file to be read.

    +
    +

    The path to the VCF file to be read.

    +
    +
    required
    + +

    Returns:

    @@ -4373,14 +4639,18 @@

    - +
    List[str]

    List[str]: A list containing the lines of the VCF file.

    +
    +

    List[str]: A list containing the lines of the VCF file.

    +
    +
    -
    - Source code in src/pheval/prepare/create_spiked_vcf.py -
    - + @@ -4459,7 +4736,11 @@

    List[ProbandCausativeVariant] -

    + @@ -4469,7 +4750,11 @@

    VcfFile -

    + @@ -4479,7 +4764,11 @@

    VcfFile -

    + @@ -4489,7 +4778,11 @@

    Path -

    + @@ -4499,7 +4792,11 @@

    Path -

    + @@ -4507,6 +4804,8 @@

    VcfFile -

    +
     93
    +          
    + Source code in src/pheval/prepare/create_spiked_vcf.py +
     93
      94
      95
      96
    @@ -4414,17 +4684,18 @@ 

    vcf.close() return vcf_contents

    -
    +
    +

    -select_vcf_template(phenopacket_path, proband_causative_variants, hg19_vcf_info, hg38_vcf_info, hg19_vcf_dir, hg38_vcf_dir) + select_vcf_template(phenopacket_path, proband_causative_variants, hg19_vcf_info, hg38_vcf_info, hg19_vcf_dir, hg38_vcf_dir)

    @@ -4433,6 +4704,8 @@

    Path

    The path to the Phenopacket file.

    +
    +

    The path to the Phenopacket file.

    +
    +
    required

    A list of causative variants from the proband.

    +
    +

    A list of causative variants from the proband.

    +
    +
    required

    VCF file info for hg19 template vcf.

    +
    +

    VCF file info for hg19 template vcf.

    +
    +
    required

    CF file info for hg38 template vcf.

    +
    +

    CF file info for hg38 template vcf.

    +
    +
    required

    The directory containing the hg19 VCF files.

    +
    +

    The directory containing the hg19 VCF files.

    +
    +
    required

    The directory containing the hg38 VCF files.

    +
    +

    The directory containing the hg38 VCF files.

    +
    +
    required

    The selected VCF template file based on the assembly information of the proband causative variants.

    +
    +

    The selected VCF template file based on the assembly information of the proband causative variants.

    +
    +
    -
    - Source code in src/pheval/prepare/create_spiked_vcf.py -
    206
    +          
    + Source code in src/pheval/prepare/create_spiked_vcf.py +
    206
     207
     208
     209
    @@ -4609,17 +4912,18 @@ 

    proband_causative_variants[0].assembly, phenopacket_path )

    -
    +
    +

    -spike_and_update_phenopacket(hg19_vcf_info, hg38_vcf_info, hg19_vcf_dir, hg38_vcf_dir, output_dir, phenopacket_path) + spike_and_update_phenopacket(hg19_vcf_info, hg38_vcf_info, hg19_vcf_dir, hg38_vcf_dir, output_dir, phenopacket_path)

    @@ -4629,6 +4933,8 @@

    Spike the VCF files with genetic variants relevant to the provided Phenopacket, update the Phenopacket accordingly, and write the updated Phenopacket to the specified output directory.

    + +

    Parameters:

    @@ -4645,7 +4951,11 @@

    VcfFile -

    + @@ -4655,7 +4965,11 @@

    VcfFile -

    + @@ -4665,7 +4979,11 @@

    Path -

    + @@ -4675,7 +4993,11 @@

    Path -

    + @@ -4685,7 +5007,11 @@

    Path -

    + @@ -4695,7 +5021,11 @@

    Path -

    + @@ -4703,6 +5033,8 @@

    VCF file info for hg19 template vcf.

    +
    +

    VCF file info for hg19 template vcf.

    +
    +
    required

    VCF file info for hg38 template vcf.

    +
    +

    VCF file info for hg38 template vcf.

    +
    +
    required

    The directory containing the hg19 VCF files.

    +
    +

    The directory containing the hg19 VCF files.

    +
    +
    required

    The directory containing the hg38 VCF files.

    +
    +

    The directory containing the hg38 VCF files.

    +
    +
    required

    Directory where the updated Phenopacket will be saved.

    +
    +

    Directory where the updated Phenopacket will be saved.

    +
    +
    required

    Path to the original Phenopacket file.

    +
    +

    Path to the original Phenopacket file.

    +
    +
    required
    + +

    Returns:

    @@ -4716,14 +5048,18 @@

    None -

    +

    None

    +
    +

    None

    +
    +
    -
    - Source code in src/pheval/prepare/create_spiked_vcf.py -
    - + @@ -4842,7 +5185,11 @@

    Path -

    + @@ -4852,7 +5199,11 @@

    VcfFile -

    + @@ -4862,7 +5213,11 @@

    VcfFile -

    + @@ -4872,7 +5227,11 @@

    Path -

    + @@ -4882,7 +5241,11 @@

    Path -

    + @@ -4890,6 +5253,8 @@

    List[str]] -

    +modified_vcf_contents (List[str]): Modified VCF records with spiked variants.

    + +
    534
    +          
    + Source code in src/pheval/prepare/create_spiked_vcf.py +
    534
     535
     536
     537
    @@ -4797,17 +5133,18 @@ 

    ) write_phenopacket(updated_phenopacket, phenopacket_path)

    -
    +
    +

    -spike_vcf_contents(phenopacket, phenopacket_path, hg19_vcf_info, hg38_vcf_info, hg19_vcf_dir, hg38_vcf_dir) + spike_vcf_contents(phenopacket, phenopacket_path, hg19_vcf_info, hg38_vcf_info, hg19_vcf_dir, hg38_vcf_dir)

    @@ -4816,6 +5153,8 @@

    Union[Phenopacket, Family]

    Phenopacket or Family containing causative variants.

    +
    +

    Phenopacket or Family containing causative variants.

    +
    +
    required

    Path to the Phenopacket file.

    +
    +

    Path to the Phenopacket file.

    +
    +
    required

    VCF file info for hg19 template vcf.

    +
    +

    VCF file info for hg19 template vcf.

    +
    +
    required

    VCF file info for hg38 template vcf.

    +
    +

    VCF file info for hg38 template vcf.

    +
    +
    required

    The directory containing the hg19 VCF files.

    +
    +

    The directory containing the hg19 VCF files.

    +
    +
    required

    The directory containing the hg38 VCF files.

    +
    +

    The directory containing the hg38 VCF files.

    +
    +
    required

    A tuple containing: +

    +
    +

    A tuple containing: assembly (str): The genome assembly information extracted from VCF header. -modified_vcf_contents (List[str]): Modified VCF records with spiked variants.

    -
    - Source code in src/pheval/prepare/create_spiked_vcf.py -
    452
    +          
    + Source code in src/pheval/prepare/create_spiked_vcf.py +
    452
     453
     454
     455
    @@ -5000,17 +5369,18 @@ 

    ).construct_vcf(chosen_template_vcf.vcf_file_name), )

    -
    +
    +

    -spike_vcfs(output_dir, phenopacket_path, phenopacket_dir, hg19_template_vcf, hg38_template_vcf, hg19_vcf_dir, hg38_vcf_dir) + spike_vcfs(output_dir, phenopacket_path, phenopacket_dir, hg19_template_vcf, hg38_template_vcf, hg19_vcf_dir, hg38_vcf_dir)

    @@ -5019,6 +5389,8 @@

    Create spiked VCF from either a Phenopacket or a Phenopacket directory.

    + +

    Parameters:

    @@ -5035,7 +5407,11 @@

    Path -

    + @@ -5045,7 +5421,11 @@

    Path -

    + @@ -5055,7 +5435,11 @@

    Path -

    + @@ -5065,7 +5449,11 @@

    Path -

    + @@ -5075,7 +5463,11 @@

    Path -

    + @@ -5085,7 +5477,11 @@

    Path -

    + @@ -5095,7 +5491,11 @@

    Path -

    + @@ -5103,9 +5503,9 @@

    The directory to store the generated spiked VCF file(s).

    +
    +

    The directory to store the generated spiked VCF file(s).

    +
    +
    required

    Path to a single Phenopacket file (optional).

    +
    +

    Path to a single Phenopacket file (optional).

    +
    +
    required

    Path to a directory containing Phenopacket files (optional).

    +
    +

    Path to a directory containing Phenopacket files (optional).

    +
    +
    required

    Path to the hg19 template VCF file (optional).

    +
    +

    Path to the hg19 template VCF file (optional).

    +
    +
    required

    Path to the hg38 template VCF file (optional).

    +
    +

    Path to the hg38 template VCF file (optional).

    +
    +
    required

    The directory containing the hg19 VCF files (optional).

    +
    +

    The directory containing the hg19 VCF files (optional).

    +
    +
    required

    The directory containing the hg38 VCF files (optional).

    +
    +

    The directory containing the hg38 VCF files (optional).

    +
    +
    required
    -
    - Source code in src/pheval/prepare/create_spiked_vcf.py -
    641
    +          
    + Source code in src/pheval/prepare/create_spiked_vcf.py +
    641
     642
     643
     644
    @@ -5183,7 +5583,7 @@ 

    hg38_vcf_dir, )

    -
    +
    diff --git a/api/pheval/prepare/custom_exceptions/index.html b/api/pheval/prepare/custom_exceptions/index.html index e58649b1c..0c41104cb 100644 --- a/api/pheval/prepare/custom_exceptions/index.html +++ b/api/pheval/prepare/custom_exceptions/index.html @@ -11,7 +11,7 @@ - + @@ -856,7 +856,7 @@
  • - src.pheval.prepare.custom_exceptions + custom_exceptions
  • @@ -1221,7 +1221,7 @@
  • - src.pheval.prepare.custom_exceptions + custom_exceptions
  • @@ -1265,6 +1265,7 @@

    Custom exceptions

    +
    @@ -1284,23 +1285,22 @@

    Custom exceptions

    - InputError + InputError

    -

    - Bases: Exception

    +

    + Bases: Exception

    Exception raised for missing required inputs.

    - -
    - Source code in src/pheval/prepare/custom_exceptions.py -
     4
    +            
    + Source code in src/pheval/prepare/custom_exceptions.py +
     4
      5
      6
      7
    @@ -1320,7 +1320,7 @@ 

    def __str__(self): return f"{self.message} -> {self.file} "

    -
    + @@ -1340,6 +1340,7 @@

    +

    @@ -1347,23 +1348,22 @@

    - MutuallyExclusiveOptionError + MutuallyExclusiveOptionError

    -

    - Bases: Option

    +

    + Bases: Option

    Exception raised for when

    - -
    - Source code in src/pheval/prepare/custom_exceptions.py -
    - + @@ -1307,7 +1315,11 @@

    +

    If True, check for complete variant records in the Phenopackets.

    + +

    @@ -1317,7 +1329,11 @@

    +

    If True, check for complete gene records in the Phenopackets.

    + +

    @@ -1327,7 +1343,11 @@

    +

    If True, check for complete disease records in the Phenopackets.

    + +

    @@ -1337,7 +1357,11 @@

    +

    Identifier for updating gene identifiers, if applicable.

    + +

    @@ -1347,7 +1371,11 @@

    Path -

    + @@ -1357,7 +1385,11 @@

    Path -

    + @@ -1367,7 +1399,11 @@

    Path -

    + @@ -1377,7 +1413,11 @@

    Path -

    + @@ -1387,22 +1427,24 @@

    Path -

    +
    16
    +            
    + Source code in src/pheval/prepare/custom_exceptions.py +
    16
     17
     18
     19
    @@ -1405,7 +1405,7 @@ 

    return super(MutuallyExclusiveOptionError, self).handle_parse_result(ctx, opts, args)

    -
    + @@ -1425,6 +1425,7 @@

    +

    diff --git a/api/pheval/prepare/prepare_corpus/index.html b/api/pheval/prepare/prepare_corpus/index.html index a61f0c6fc..cc81d0b34 100644 --- a/api/pheval/prepare/prepare_corpus/index.html +++ b/api/pheval/prepare/prepare_corpus/index.html @@ -11,7 +11,7 @@ - + @@ -870,14 +870,14 @@
  • - src.pheval.prepare.prepare_corpus + prepare_corpus
  • - prepare_corpus() + prepare_corpus
  • @@ -1214,14 +1214,14 @@
  • - src.pheval.prepare.prepare_corpus + prepare_corpus
  • - prepare_corpus() + prepare_corpus
  • @@ -1251,6 +1251,7 @@

    Prepare corpus

    +
    @@ -1266,12 +1267,13 @@

    Prepare corpus

    +

    -prepare_corpus(phenopacket_dir, variant_analysis, gene_analysis, disease_analysis, gene_identifier, hg19_template_vcf, hg38_template_vcf, hg19_vcf_dir, hg38_vcf_dir, output_dir) + prepare_corpus(phenopacket_dir, variant_analysis, gene_analysis, disease_analysis, gene_identifier, hg19_template_vcf, hg38_template_vcf, hg19_vcf_dir, hg38_vcf_dir, output_dir)

    @@ -1281,6 +1283,8 @@

    Path

    The path to the directory containing Phenopackets.

    +
    +

    The path to the directory containing Phenopackets.

    +
    +
    required required required required required

    Path to the hg19 template VCF file (optional), to spike variants into

    +
    +

    Path to the hg19 template VCF file (optional), to spike variants into

    +
    +
    required

    Path to the hg38 template VCF file (optional), to spike variants into

    +
    +

    Path to the hg38 template VCF file (optional), to spike variants into

    +
    +
    required

    Path to the directory containing hg19 template VCF files (optional).

    +
    +

    Path to the directory containing hg19 template VCF files (optional).

    +
    +
    required

    Path to the directory containing hg38 template VCF files (optional).

    +
    +

    Path to the directory containing hg38 template VCF files (optional).

    +
    +
    required

    The directory to save the prepared Phenopackets and, optionally, VCF files.

    +
    +

    The directory to save the prepared Phenopackets and, optionally, VCF files.

    +
    +
    required
    +

    Notes: + To spike variants into VCFs for variant-based analysis at least one of hg19_template_vcf, hg38_template_vcf, + hg19_vcf_dir or hg38_vcf_dir is required.

    -
    - Notes -

    To spike variants into VCFs for variant-based analysis at least one of hg19_template_vcf, hg38_template_vcf, -hg19_vcf_dir or hg38_vcf_dir is required.

    -
    -
    - Source code in src/pheval/prepare/prepare_corpus.py -
    13
    +          
    + Source code in src/pheval/prepare/prepare_corpus.py +
    13
     14
     15
     16
    @@ -1558,7 +1600,7 @@ 

    phenopacket_path, output_dir.joinpath(f"phenopackets/{phenopacket_path.name}") )

    -
    +
    diff --git a/api/pheval/prepare/update_phenopacket/index.html b/api/pheval/prepare/update_phenopacket/index.html index 6acec94cf..746404291 100644 --- a/api/pheval/prepare/update_phenopacket/index.html +++ b/api/pheval/prepare/update_phenopacket/index.html @@ -11,7 +11,7 @@ - + @@ -884,35 +884,35 @@
  • - src.pheval.prepare.update_phenopacket + update_phenopacket
  • - create_updated_phenopacket() + create_updated_phenopacket
  • - create_updated_phenopackets() + create_updated_phenopackets
  • - update_outdated_gene_context() + update_outdated_gene_context
  • - update_phenopackets() + update_phenopackets
  • @@ -1235,35 +1235,35 @@
  • - src.pheval.prepare.update_phenopacket + update_phenopacket
  • - create_updated_phenopacket() + create_updated_phenopacket
  • - create_updated_phenopackets() + create_updated_phenopackets
  • - update_outdated_gene_context() + update_outdated_gene_context
  • - update_phenopackets() + update_phenopackets
  • @@ -1293,6 +1293,7 @@

    Update phenopacket

    +
    @@ -1308,12 +1309,13 @@

    Update phenopacket

    +

    -create_updated_phenopacket(gene_identifier, phenopacket_path, output_dir) + create_updated_phenopacket(gene_identifier, phenopacket_path, output_dir)

    @@ -1322,6 +1324,8 @@

    Update the gene context within the interpretations for a Phenopacket and writes the updated Phenopacket.

    + +

    Parameters:

    @@ -1338,7 +1342,11 @@

    str -

    + @@ -1348,7 +1356,11 @@

    Path -

    + @@ -1358,23 +1370,25 @@

    Path -

    +

    Identifier used to update the gene context.

    +
    +

    Identifier used to update the gene context.

    +
    +
    required

    The path to the input Phenopacket file.

    +
    +

    The path to the input Phenopacket file.

    +
    +
    required

    The directory where the updated Phenopacket will be written.

    +
    +

    The directory where the updated Phenopacket will be written.

    +
    +
    required
    - -
    - Notes -

    The gene_identifier parameter should be chosen from ensembl_id, hgnc_id, or entrez_id -to update to the current gene identifier in the Phenopacket. We recommend using the ENSEMBL namespace -to describe the gene identifiers.

    -
    -
    - Source code in src/pheval/prepare/update_phenopacket.py -
    45
    +      

    Notes: + The gene_identifier parameter should be chosen from ensembl_id, hgnc_id, or entrez_id + to update to the current gene identifier in the Phenopacket. We recommend using the ENSEMBL namespace + to describe the gene identifiers.

    + +
    + Source code in src/pheval/prepare/update_phenopacket.py +
    45
     46
     47
     48
    @@ -1410,17 +1424,18 @@ 

    updated_phenopacket = update_outdated_gene_context(phenopacket_path, gene_identifier, hgnc_data) write_phenopacket(updated_phenopacket, output_dir.joinpath(phenopacket_path.name))

    -
    +
    +

    -create_updated_phenopackets(gene_identifier, phenopacket_dir, output_dir) + create_updated_phenopackets(gene_identifier, phenopacket_dir, output_dir)

    @@ -1430,6 +1445,8 @@

    Update the gene context within the interpretations for a directory of Phenopackets and writes the updated Phenopackets.

    + +

    Parameters:

    @@ -1446,7 +1463,11 @@

    str -

    + @@ -1456,7 +1477,11 @@

    Path -

    + @@ -1466,23 +1491,25 @@

    Path -

    +

    Identifier used to update the gene context.

    +
    +

    Identifier used to update the gene context.

    +
    +
    required

    The path to the input Phenopacket directory.

    +
    +

    The path to the input Phenopacket directory.

    +
    +
    required

    The directory where the updated Phenopackets will be written.

    +
    +

    The directory where the updated Phenopackets will be written.

    +
    +
    required
    - -
    - Notes -

    The gene_identifier parameter should be chosen from ensembl_id, hgnc_id, or entrez_id -to update to the current gene identifier in the Phenopacket. We recommend using the ENSEMBL namespace -to describe the gene identifiers.

    -
    -
    - Source code in src/pheval/prepare/update_phenopacket.py -
    65
    +      

    Notes: + The gene_identifier parameter should be chosen from ensembl_id, hgnc_id, or entrez_id + to update to the current gene identifier in the Phenopacket. We recommend using the ENSEMBL namespace + to describe the gene identifiers.

    + +
    + Source code in src/pheval/prepare/update_phenopacket.py +
    65
     66
     67
     68
    @@ -1526,17 +1553,18 @@ 

    ) write_phenopacket(updated_phenopacket, output_dir.joinpath(phenopacket_path.name))

    -
    +
    +

    -update_outdated_gene_context(phenopacket_path, gene_identifier, hgnc_data) + update_outdated_gene_context(phenopacket_path, gene_identifier, hgnc_data)

    @@ -1545,6 +1573,8 @@

    Update the gene context of the Phenopacket.

    + +

    Parameters:

    @@ -1561,7 +1591,11 @@

    Path -

    + @@ -1571,7 +1605,11 @@

    str -

    + @@ -1581,7 +1619,11 @@

    defaultdict -

    + @@ -1589,6 +1631,8 @@

    The path to the Phenopacket file.

    +
    +

    The path to the Phenopacket file.

    +
    +
    required

    Identifier to update the gene context.

    +
    +

    Identifier to update the gene context.

    +
    +
    required

    The HGNC data used for updating.

    +
    +

    The HGNC data used for updating.

    +
    +
    required
    + +

    Returns:

    @@ -1602,21 +1646,23 @@

    Union[Phenopacket, Family] -

    +

    Union[Phenopacket, Family]: The updated Phenopacket or Family.

    +
    +

    Union[Phenopacket, Family]: The updated Phenopacket or Family.

    +
    +
    - -
    - Notes -

    This function updates the gene context within the Phenopacket or Family instance. -The gene_identifier parameter should be chosen from ensembl_id, hgnc_id, or entrez_id -to update to the current gene identifier in the Phenopacket. We recommend using the ENSEMBL namespace -to describe the gene identifiers.

    -
    -
    - Source code in src/pheval/prepare/update_phenopacket.py -
    @@ -1711,7 +1764,11 @@

    Path -

    + @@ -1721,7 +1778,11 @@

    Path -

    + @@ -1731,23 +1792,25 @@

    Path -

    +
    18
    +      

    Notes: + This function updates the gene context within the Phenopacket or Family instance. + The gene_identifier parameter should be chosen from ensembl_id, hgnc_id, or entrez_id + to update to the current gene identifier in the Phenopacket. We recommend using the ENSEMBL namespace + to describe the gene identifiers.

    + +
    + Source code in src/pheval/prepare/update_phenopacket.py +
    18
     19
     20
     21
    @@ -1666,17 +1712,18 @@ 

    ).update_genomic_interpretations_gene_identifier(interpretations, phenopacket_path) return PhenopacketRebuilder(phenopacket).update_interpretations(updated_interpretations)

    -
    +
    +

    -update_phenopackets(gene_identifier, phenopacket_path, phenopacket_dir, output_dir) + update_phenopackets(gene_identifier, phenopacket_path, phenopacket_dir, output_dir)

    @@ -1685,6 +1732,8 @@

    +

    The gene identifier to be updated.

    +

    +
    required

    The path to a single Phenopacket file.

    +
    +

    The path to a single Phenopacket file.

    +
    +
    required

    The directory containing multiple Phenopacket files.

    +
    +

    The directory containing multiple Phenopacket files.

    +
    +
    required

    The output directory to save the updated Phenopacket files.

    +
    +

    The output directory to save the updated Phenopacket files.

    +
    +
    required
    - -
    - Notes -

    The gene_identifier parameter should be chosen from ensembl_id, hgnc_id, or entrez_id -to update to the current gene identifier in the Phenopacket. We recommend using the ENSEMBL namespace -to describe the gene identifiers.

    -
    -
    - Source code in src/pheval/prepare/update_phenopacket.py -
     89
    +      

    Notes: + The gene_identifier parameter should be chosen from ensembl_id, hgnc_id, or entrez_id + to update to the current gene identifier in the Phenopacket. We recommend using the ENSEMBL namespace + to describe the gene identifiers.

    + +
    + Source code in src/pheval/prepare/update_phenopacket.py +
     89
      90
      91
      92
    @@ -1789,7 +1852,7 @@ 

    elif phenopacket_dir is not None: create_updated_phenopackets(gene_identifier, phenopacket_dir, output_dir)

    -
    +
    diff --git a/api/pheval/run_metadata/index.html b/api/pheval/run_metadata/index.html index 5eba800e9..8ca3f5a13 100644 --- a/api/pheval/run_metadata/index.html +++ b/api/pheval/run_metadata/index.html @@ -11,7 +11,7 @@ - + @@ -449,7 +449,7 @@
  • - src.pheval.run_metadata + run_metadata
  • @@ -1212,7 +1212,7 @@
  • - src.pheval.run_metadata + run_metadata
  • @@ -1249,6 +1249,7 @@

    Run metadata

    +
    @@ -1268,7 +1269,7 @@

    Run metadata

    - BasicOutputRunMetaData + BasicOutputRunMetaData @@ -1281,87 +1282,19 @@

    -

    Class for defining variables for the run metadata.

    - -

    Parameters:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    tool - str -

    Name of the tool implementation

    - required -
    tool_version - str -

    Version of the tool implementation

    - required -
    config - Path -

    Path to the config file located in the input directory

    - required -
    run_timestamp - int -

    Time taken for run to complete

    - required -
    corpus - Path -

    Path to corpus used in pheval run

    - required -
    tool_specific_configuration_options - Any -

    Special field that can be overwritten by tool implementations to - contain any extra tool specific configurations used in the run

    - None -
    - - -
    - Source code in src/pheval/run_metadata.py -
     8
    +      

    Class for defining variables for the run metadata. +Args: + tool (str): Name of the tool implementation + tool_version (str): Version of the tool implementation + config (Path): Path to the config file located in the input directory + run_timestamp (int): Time taken for run to complete + corpus (Path): Path to corpus used in pheval run + tool_specific_configuration_options (Any): Special field that can be overwritten by tool implementations to + contain any extra tool specific configurations used in the run

    + +
    + Source code in src/pheval/run_metadata.py +
     8
      9
     10
     11
    @@ -1401,7 +1334,7 @@ 

    corpus: Path tool_specific_configuration_options: Any = None

    -
    + @@ -1421,6 +1354,7 @@

    + diff --git a/api/pheval/runners/runner/index.html b/api/pheval/runners/runner/index.html index 1ed4c458b..08e14ae71 100644 --- a/api/pheval/runners/runner/index.html +++ b/api/pheval/runners/runner/index.html @@ -11,7 +11,7 @@ - + @@ -931,7 +931,7 @@
  • - src.pheval.runners.runner + runner
  • @@ -953,35 +953,35 @@
  • - build_output_directory_structure() + build_output_directory_structure
  • - construct_meta_data() + construct_meta_data
  • - post_process() + post_process
  • - prepare() + prepare
  • - run() + run
  • @@ -1262,7 +1262,7 @@
  • - src.pheval.runners.runner + runner
  • @@ -1284,35 +1284,35 @@
  • - build_output_directory_structure() + build_output_directory_structure
  • - construct_meta_data() + construct_meta_data
  • - post_process() + post_process
  • - prepare() + prepare
  • - run() + run
  • @@ -1347,6 +1347,7 @@

    Runner

    +
    @@ -1368,19 +1369,21 @@

    Runner

    - DefaultPhEvalRunner + DefaultPhEvalRunner

    -

    - Bases: PhEvalRunner

    +

    + Bases: PhEvalRunner

    DefaultPhEvalRunner

    + +

    Parameters:

    @@ -1395,9 +1398,13 @@

    + - @@ -1405,10 +1412,9 @@

    PhEvalRunner - PhEvalRunner + PhEvalRunner + +
    +

    Abstract PhEvalRunnerClass

    +

    Abstract PhEvalRunnerClass

    required
    - -
    - Source code in src/pheval/runners/runner.py -
    130
    +            
    + Source code in src/pheval/runners/runner.py +
    130
     131
     132
     133
    @@ -1452,7 +1458,7 @@ 

    def post_process(self): print("post processing")

    -
    + @@ -1472,6 +1478,7 @@

    +
    @@ -1479,7 +1486,7 @@

    - PhEvalRunner + PhEvalRunner @@ -1490,16 +1497,15 @@

    -

    - Bases: ABC

    +

    + Bases: ABC

    PhEvalRunner Class

    - -
    - Source code in src/pheval/runners/runner.py -
     12
    +            
    + Source code in src/pheval/runners/runner.py +
     12
      13
      14
      15
    @@ -1731,7 +1737,7 @@ 

    """Construct run output meta data""" return self.meta_data

    -
    + @@ -1745,12 +1751,13 @@

    +

    -build_output_directory_structure() + build_output_directory_structure()

    @@ -1759,9 +1766,9 @@

    build output directory structure

    -
    - Source code in src/pheval/runners/runner.py -
    87
    +          
    + Source code in src/pheval/runners/runner.py +
    87
     88
     89
     90
    @@ -1781,17 +1788,18 @@ 

    if self._get_disease_analysis(): self.pheval_disease_results_dir.mkdir(exist_ok=True)

    -
    +
    +

    -construct_meta_data() + construct_meta_data()

    @@ -1800,25 +1808,26 @@

    - Source code in src/pheval/runners/runner.py -
    125
    +          
    + Source code in src/pheval/runners/runner.py +
    125
     126
     127
    def construct_meta_data(self):
         """Construct run output meta data"""
         return self.meta_data
     
    -
    +
    +

    -post_process() + post_process() abstractmethod @@ -1831,25 +1840,26 @@

    - Source code in src/pheval/runners/runner.py -
    121
    +          
    + Source code in src/pheval/runners/runner.py +
    121
     122
     123
    @abstractmethod
     def post_process(self):
         """post_process"""
     
    -
    +
    +

    -prepare() + prepare() abstractmethod @@ -1862,25 +1872,26 @@

    prepare

    -
    - Source code in src/pheval/runners/runner.py -
    113
    +          
    + Source code in src/pheval/runners/runner.py +
    113
     114
     115
    @abstractmethod
     def prepare(self) -> str:
         """prepare"""
     
    -
    +
    +

    -run() + run() abstractmethod @@ -1893,15 +1904,15 @@

    run

    -
    - Source code in src/pheval/runners/runner.py -
    117
    +          
    + Source code in src/pheval/runners/runner.py +
    117
     118
     119
    @abstractmethod
     def run(self):
         """run"""
     
    -
    +
    @@ -1912,6 +1923,7 @@

    + diff --git a/api/pheval/utils/exomiser/index.html b/api/pheval/utils/exomiser/index.html index 7a34463f9..b0101d9ea 100644 --- a/api/pheval/utils/exomiser/index.html +++ b/api/pheval/utils/exomiser/index.html @@ -11,7 +11,7 @@ - + @@ -978,14 +978,14 @@
  • - src.pheval.utils.exomiser + exomiser
  • - semsim_to_exomiserdb() + semsim_to_exomiserdb
  • @@ -1214,14 +1214,14 @@
  • - src.pheval.utils.exomiser + exomiser
  • - semsim_to_exomiserdb() + semsim_to_exomiserdb
  • @@ -1251,6 +1251,7 @@

    Exomiser

    +
    @@ -1266,12 +1267,13 @@

    Exomiser

    +

    -semsim_to_exomiserdb(input_path, object_prefix, subject_prefix, db_path) + semsim_to_exomiserdb(input_path, object_prefix, subject_prefix, db_path)

    @@ -1280,6 +1282,8 @@

    ingests semsim file into exomiser phenotypic database

    + +

    Parameters:

    @@ -1296,7 +1300,11 @@

    - + @@ -1306,7 +1314,11 @@

    - + @@ -1316,7 +1328,11 @@

    - + @@ -1326,7 +1342,11 @@

    - + @@ -1334,9 +1354,9 @@

    Path

    semsim input file. e.g phenio-plus-hp-mp.0.semsimian.tsv

    +
    +

    semsim input file. e.g phenio-plus-hp-mp.0.semsimian.tsv

    +
    +
    required str

    object prefix. e.g. MP

    +
    +

    object prefix. e.g. MP

    +
    +
    required str

    subject prefix e.g HP

    +
    +

    subject prefix e.g HP

    +
    +
    required Path

    Exomiser Phenotypic Database Folder Path. (e.g. /exomiser_folder/2209_phenotype/2209_phenotype/)

    +
    +

    Exomiser Phenotypic Database Folder Path. (e.g. /exomiser_folder/2209_phenotype/2209_phenotype/)

    +
    +
    required
    -
    - Source code in src/pheval/utils/exomiser.py -
     6
    +          
    + Source code in src/pheval/utils/exomiser.py +
     6
      7
      8
      9
    @@ -1358,7 +1378,7 @@ 

    exomiserdb = ExomiserDB(db_path) exomiserdb.import_from_semsim_file(input_path, object_prefix, subject_prefix)

    -
    +
    diff --git a/api/pheval/utils/file_utils/index.html b/api/pheval/utils/file_utils/index.html index c7ef79e1d..783b9b8e5 100644 --- a/api/pheval/utils/file_utils/index.html +++ b/api/pheval/utils/file_utils/index.html @@ -11,7 +11,7 @@ - + @@ -992,56 +992,56 @@
  • - src.pheval.utils.file_utils + file_utils
  • - all_files() + all_files
  • - ensure_columns_exists() + ensure_columns_exists
  • - ensure_file_exists() + ensure_file_exists
  • - files_with_suffix() + files_with_suffix
  • - is_gzipped() + is_gzipped
  • - normalise_file_name() + normalise_file_name
  • - write_metadata() + write_metadata
  • @@ -1256,56 +1256,56 @@
  • - src.pheval.utils.file_utils + file_utils
  • - all_files() + all_files
  • - ensure_columns_exists() + ensure_columns_exists
  • - ensure_file_exists() + ensure_file_exists
  • - files_with_suffix() + files_with_suffix
  • - is_gzipped() + is_gzipped
  • - normalise_file_name() + normalise_file_name
  • - write_metadata() + write_metadata
  • @@ -1335,6 +1335,7 @@

    File utils

    +
    @@ -1350,12 +1351,13 @@

    File utils

    +

    -all_files(directory) + all_files(directory)

    @@ -1364,6 +1366,8 @@

    Obtains all files from a given directory.

    + +

    Parameters:

    @@ -1380,7 +1384,11 @@

    - + @@ -1388,6 +1396,8 @@

    Path

    The directory path.

    +
    +

    The directory path.

    +
    +
    required
    + +

    Returns:

    @@ -1401,14 +1411,18 @@

    - +
    list[Path]

    list[Path]: A list of Path objects representing all files in the directory.

    +
    +

    list[Path]: A list of Path objects representing all files in the directory.

    +
    +
    -
    - Source code in src/pheval/utils/file_utils.py -
    31
    +          
    + Source code in src/pheval/utils/file_utils.py +
    31
     32
     33
     34
    @@ -1434,17 +1448,18 @@ 

    files.sort() return files

    -
    +
    +

    -ensure_columns_exists(cols, dataframes, err_message='') + ensure_columns_exists(cols, dataframes, err_message='')

    @@ -1460,9 +1475,9 @@

    -
    - Source code in src/pheval/utils/file_utils.py -
     83
    +          
    + Source code in src/pheval/utils/file_utils.py +
     83
      84
      85
      86
    @@ -1508,46 +1523,31 @@ 

    if not all(x in dataframe.columns for x in flat_cols): raise ValueError(err_msg)

    -
    +
    +

    -ensure_file_exists(*files) + ensure_file_exists(*files)

    -

    Ensures the existence of files passed as parameter

    +

    Ensures the existence of files passed as parameter +Raises: + FileNotFoundError: If any file passed as a parameter doesn't exist a FileNotFound Exception will be raised

    -

    Raises:

    - - - - - - - - - - - - - -
    TypeDescription
    - FileNotFoundError -

    If any file passed as a parameter doesn't exist a FileNotFound Exception will be raised

    - -
    - Source code in src/pheval/utils/file_utils.py -
    73
    +          
    + Source code in src/pheval/utils/file_utils.py +
    73
     74
     75
     76
    @@ -1563,17 +1563,18 @@ 

    if not path.isfile(file): raise FileNotFoundError(f"File {file} not found")

    -
    +
    +

    -files_with_suffix(directory, suffix) + files_with_suffix(directory, suffix)

    @@ -1582,6 +1583,8 @@

    Obtains all files ending in a specified suffix from a given directory.

    + +

    Parameters:

    @@ -1598,7 +1601,11 @@

    - + @@ -1608,7 +1615,11 @@

    - + @@ -1616,6 +1627,8 @@

    Path

    The directory path.

    +
    +

    The directory path.

    +
    +
    required str

    The specified suffix to filter files.

    +
    +

    The specified suffix to filter files.

    +
    +
    required
    + +

    Returns:

    @@ -1629,14 +1642,18 @@

    - +
    list[Path]

    list[Path]: A list of Path objects representing files with the specified suffix.

    +
    +

    list[Path]: A list of Path objects representing files with the specified suffix.

    +
    +
    -
    - Source code in src/pheval/utils/file_utils.py -
    15
    +          
    + Source code in src/pheval/utils/file_utils.py +
    15
     16
     17
     18
    @@ -1664,17 +1681,18 @@ 

    files.sort() return files

    -
    +
    +

    -is_gzipped(file_path) + is_gzipped(file_path)

    @@ -1683,6 +1701,8 @@

    Confirms whether a file is gzipped.

    + +

    Parameters:

    @@ -1699,7 +1719,11 @@

    - + @@ -1707,6 +1731,8 @@

    Path

    The path to the file.

    +
    +

    The path to the file.

    +
    +
    required
    + +

    Returns:

    @@ -1720,14 +1746,18 @@

    - +
    bool bool

    True if the file is gzipped, False otherwise.

    +
    +

    True if the file is gzipped, False otherwise.

    +
    +
    -
    - Source code in src/pheval/utils/file_utils.py -
    46
    +          
    + Source code in src/pheval/utils/file_utils.py +
    46
     47
     48
     49
    @@ -1749,17 +1779,18 @@ 

    """ return file_path.name.endswith(".gz")

    -
    +
    +

    -normalise_file_name(file_path) + normalise_file_name(file_path)

    @@ -1768,6 +1799,8 @@

    Normalises the file name by removing diacritical marks (accents) from Unicode characters.

    + +

    Parameters:

    @@ -1784,7 +1817,11 @@

    Path -

    + @@ -1792,6 +1829,8 @@

    The path to the file.

    +
    +

    The path to the file.

    +
    +
    required
    + +

    Returns:

    @@ -1805,14 +1844,18 @@

    str

    - +
    str

    The normalised file name without diacritical marks.

    +
    +

    The normalised file name without diacritical marks.

    +
    +
    -
    - Source code in src/pheval/utils/file_utils.py -
    59
    +          
    + Source code in src/pheval/utils/file_utils.py +
    59
     60
     61
     62
    @@ -1836,17 +1879,18 @@ 

    normalised_file_name = unicodedata.normalize("NFD", str(file_path)) return re.sub("[\u0300-\u036f]", "", normalised_file_name)

    -
    +
    +

    -write_metadata(output_dir, meta_data) + write_metadata(output_dir, meta_data)

    @@ -1855,6 +1899,8 @@

    Write the metadata for a run to a YAML file.

    + +

    Parameters:

    @@ -1871,7 +1917,11 @@

    - + @@ -1881,7 +1931,11 @@

    - + @@ -1889,9 +1943,9 @@

    Path

    The directory where the metadata file will be saved.

    +
    +

    The directory where the metadata file will be saved.

    +
    +
    required BasicOutputRunMetaData

    The metadata to be written.

    +
    +

    The metadata to be written.

    +
    +
    required
    -
    - Source code in src/pheval/utils/file_utils.py -
    108
    +          
    + Source code in src/pheval/utils/file_utils.py +
    108
     109
     110
     111
    @@ -1913,7 +1967,7 @@ 

    yaml.dump(to_dict(meta_data), metadata_file, sort_keys=False, default_style="") metadata_file.close()

    -
    +
    diff --git a/api/pheval/utils/phenopacket_utils/index.html b/api/pheval/utils/phenopacket_utils/index.html index 1f7e13f75..f97621bfc 100644 --- a/api/pheval/utils/phenopacket_utils/index.html +++ b/api/pheval/utils/phenopacket_utils/index.html @@ -11,7 +11,7 @@ - + @@ -1006,7 +1006,7 @@
  • - src.pheval.utils.phenopacket_utils + phenopacket_utils
  • @@ -1021,28 +1021,28 @@
  • - __init__() + __init__
  • - find_identifier() + find_identifier
  • - obtain_gene_symbol_from_identifier() + obtain_gene_symbol_from_identifier
  • - update_genomic_interpretations_gene_identifier() + update_genomic_interpretations_gene_identifier
  • @@ -1069,7 +1069,7 @@
  • - __init__() + __init__
  • @@ -1089,28 +1089,28 @@
  • - __init__() + __init__
  • - add_randomised_hpo() + add_randomised_hpo
  • - add_spiked_vcf_path() + add_spiked_vcf_path
  • - update_interpretations() + update_interpretations
  • @@ -1130,112 +1130,112 @@
  • - __init__() + __init__
  • - causative_variants() + causative_variants
  • - check_incomplete_disease_record() + check_incomplete_disease_record
  • - check_incomplete_gene_record() + check_incomplete_gene_record
  • - check_incomplete_variant_record() + check_incomplete_variant_record
  • - diagnosed_genes() + diagnosed_genes
  • - diagnosed_variants() + diagnosed_variants
  • - diagnoses() + diagnoses
  • - diseases() + diseases
  • - files() + files
  • - interpretations() + interpretations
  • - negated_phenotypic_features() + negated_phenotypic_features
  • - observed_phenotypic_features() + observed_phenotypic_features
  • - phenotypic_features() + phenotypic_features
  • - sample_id() + sample_id
  • - vcf_file_data() + vcf_file_data
  • @@ -1268,42 +1268,42 @@
  • - create_gene_identifier_map() + create_gene_identifier_map
  • - create_hgnc_dict() + create_hgnc_dict
  • - create_json_message() + create_json_message
  • - phenopacket_reader() + phenopacket_reader
  • - read_hgnc_data() + read_hgnc_data
  • - write_phenopacket() + write_phenopacket
  • @@ -1504,7 +1504,7 @@
  • - src.pheval.utils.phenopacket_utils + phenopacket_utils
  • @@ -1519,28 +1519,28 @@
  • - __init__() + __init__
  • - find_identifier() + find_identifier
  • - obtain_gene_symbol_from_identifier() + obtain_gene_symbol_from_identifier
  • - update_genomic_interpretations_gene_identifier() + update_genomic_interpretations_gene_identifier
  • @@ -1567,7 +1567,7 @@
  • - __init__() + __init__
  • @@ -1587,28 +1587,28 @@
  • - __init__() + __init__
  • - add_randomised_hpo() + add_randomised_hpo
  • - add_spiked_vcf_path() + add_spiked_vcf_path
  • - update_interpretations() + update_interpretations
  • @@ -1628,112 +1628,112 @@
  • - __init__() + __init__
  • - causative_variants() + causative_variants
  • - check_incomplete_disease_record() + check_incomplete_disease_record
  • - check_incomplete_gene_record() + check_incomplete_gene_record
  • - check_incomplete_variant_record() + check_incomplete_variant_record
  • - diagnosed_genes() + diagnosed_genes
  • - diagnosed_variants() + diagnosed_variants
  • - diagnoses() + diagnoses
  • - diseases() + diseases
  • - files() + files
  • - interpretations() + interpretations
  • - negated_phenotypic_features() + negated_phenotypic_features
  • - observed_phenotypic_features() + observed_phenotypic_features
  • - phenotypic_features() + phenotypic_features
  • - sample_id() + sample_id
  • - vcf_file_data() + vcf_file_data
  • @@ -1766,42 +1766,42 @@
  • - create_gene_identifier_map() + create_gene_identifier_map
  • - create_hgnc_dict() + create_hgnc_dict
  • - create_json_message() + create_json_message
  • - phenopacket_reader() + phenopacket_reader
  • - read_hgnc_data() + read_hgnc_data
  • - write_phenopacket() + write_phenopacket
  • @@ -1831,6 +1831,7 @@

    Phenopacket utils

    +
    @@ -1850,7 +1851,7 @@

    Phenopacket utils

    - GeneIdentifierUpdater + GeneIdentifierUpdater

    @@ -1861,10 +1862,9 @@

    - Source code in src/pheval/utils/phenopacket_utils.py -
    638
    +            
    + Source code in src/pheval/utils/phenopacket_utils.py +
    638
     639
     640
     641
    @@ -2080,7 +2080,7 @@ 

    ) return updated_interpretations

    -
    + @@ -2094,12 +2094,13 @@

    -__init__(gene_identifier, hgnc_data=None, identifier_map=None) + __init__(gene_identifier, hgnc_data=None, identifier_map=None)

    @@ -2108,6 +2109,8 @@

    Initialise the GeneIdentifierUpdater.

    + +

    Parameters:

    @@ -2124,7 +2127,11 @@

    str -

    + @@ -2134,7 +2141,11 @@

    dict -

    + @@ -2144,7 +2155,11 @@

    dict -

    + @@ -2152,9 +2167,9 @@

    The gene identifier to update to.

    +
    +

    The gene identifier to update to.

    +
    +
    required

    A dictionary containing HGNC data (default: None).

    +
    +

    A dictionary containing HGNC data (default: None).

    +
    +
    None

    A dictionary mapping gene identifiers (default: None).

    +
    +

    A dictionary mapping gene identifiers (default: None).

    +
    +
    None
    -
    - Source code in src/pheval/utils/phenopacket_utils.py -
    - + @@ -2223,6 +2245,8 @@

    str

    - +
    641
    +          
    + Source code in src/pheval/utils/phenopacket_utils.py +
    641
     642
     643
     644
    @@ -2180,17 +2195,18 @@ 

    self.gene_identifier = gene_identifier self.identifier_map = identifier_map

    -
    +
    +

    -find_identifier(gene_symbol) + find_identifier(gene_symbol)

    @@ -2199,6 +2215,8 @@

    str

    The gene symbol to find the identifier for.

    +
    +

    The gene symbol to find the identifier for.

    +
    +
    required str

    The identified gene identifier.

    +
    +

    The identified gene identifier.

    +
    +
    -
    - Source code in src/pheval/utils/phenopacket_utils.py -
    - + @@ -2320,6 +2355,8 @@

    str

    - +
    655
    +          
    + Source code in src/pheval/utils/phenopacket_utils.py +
    655
     656
     657
     658
    @@ -2277,17 +2305,18 @@ 

    if prev_symbol == gene_symbol: return data[self.gene_identifier]

    -
    +
    +

    -obtain_gene_symbol_from_identifier(query_gene_identifier) + obtain_gene_symbol_from_identifier(query_gene_identifier)

    @@ -2296,6 +2325,8 @@

    str

    The gene identifier.

    +
    +

    The gene identifier.

    +
    +
    required str

    The gene symbol corresponding to the identifier.

    +
    +

    The gene symbol corresponding to the identifier.

    +
    +
    -
    - Source code in src/pheval/utils/phenopacket_utils.py -
    - + @@ -2405,6 +2453,8 @@

    List[Interpretation] -

    +
    673
    +          
    + Source code in src/pheval/utils/phenopacket_utils.py +
    673
     674
     675
     676
    @@ -2362,17 +2403,18 @@ 

    """ return self.identifier_map[query_gene_identifier]

    -
    +
    +

    -update_genomic_interpretations_gene_identifier(interpretations, phenopacket_path) + update_genomic_interpretations_gene_identifier(interpretations, phenopacket_path)

    @@ -2381,6 +2423,8 @@

    List[Interpretation]

    List of Interpretation objects.

    +
    +

    List of Interpretation objects.

    +
    +
    required

    List[Interpretation]: Updated list of Interpretation objects.

    +
    +

    List[Interpretation]: Updated list of Interpretation objects.

    +
    +
    -
    - Source code in src/pheval/utils/phenopacket_utils.py -
    @@ -2550,7 +2611,11 @@

    +

    Position of the variant following VCF convention.

    + +

    @@ -2560,7 +2625,11 @@

    +

    Reference allele following VCF convention.

    + +

    @@ -2570,7 +2639,11 @@

    +

    Alternate allele following VCF convention.

    + +

    @@ -2578,10 +2651,9 @@

    - Source code in src/pheval/utils/phenopacket_utils.py -

    713
    +          
    + Source code in src/pheval/utils/phenopacket_utils.py +
    713
     714
     715
     716
    @@ -2491,7 +2545,7 @@ 

    ) return updated_interpretations

    -
    +
    @@ -2502,6 +2556,7 @@

    @@ -2509,7 +2564,7 @@

    - GenomicVariant + GenomicVariant @@ -2524,6 +2579,8 @@

    +

    The chromosome position of the variant recommended to be provided in the following format.

    + +

    required required required required
    48
    +            
    + Source code in src/pheval/utils/phenopacket_utils.py +
    48
     49
     50
     51
    @@ -2617,7 +2689,7 @@ 

    ref: str alt: str

    -
    + @@ -2637,6 +2709,7 @@

    @@ -2644,23 +2717,22 @@

    - IncompatibleGenomeAssemblyError + IncompatibleGenomeAssemblyError

    -

    - Bases: Exception

    +

    + Bases: Exception

    Exception raised for incompatible genome assembly.

    - -
    - Source code in src/pheval/utils/phenopacket_utils.py -
    - + - + - + - + - + - +
    27
    +            
    + Source code in src/pheval/utils/phenopacket_utils.py +
    27
     28
     29
     30
    @@ -2698,7 +2770,7 @@ 

    def __str__(self): return f"{self.message} -> {self.assembly} in {self.phenopacket}"

    -
    + @@ -2712,12 +2784,13 @@

    -__init__(assembly, phenopacket, message='Incompatible Genome Assembly') + __init__(assembly, phenopacket, message='Incompatible Genome Assembly')

    @@ -2726,6 +2799,8 @@

    assemblyassembly str

    Incompatible genome assembly encountered.

    +
    +

    Incompatible genome assembly encountered.

    +
    +
    phenopacketphenopacket Path

    Path to the Phenopacket associated with the error.

    +
    +

    Path to the Phenopacket associated with the error.

    +
    +
    messagemessage str

    Custom error message (default is "Incompatible Genome Assembly").

    +
    +

    Custom error message (default is "Incompatible Genome Assembly").

    +
    +
    -
    - Source code in src/pheval/utils/phenopacket_utils.py -
    30
    +          
    + Source code in src/pheval/utils/phenopacket_utils.py +
    30
     31
     32
     33
    @@ -2788,7 +2875,7 @@ 

    self.message: str = message super().__init__(self.message)

    -
    +
    @@ -2799,6 +2886,7 @@

    @@ -2806,7 +2894,7 @@

    - PhenopacketRebuilder + PhenopacketRebuilder

    @@ -2817,10 +2905,9 @@

    - Source code in src/pheval/utils/phenopacket_utils.py -
    537
    +            
    + Source code in src/pheval/utils/phenopacket_utils.py +
    537
     538
     539
     540
    @@ -2958,7 +3045,7 @@ 

    phenopacket.files.extend(phenopacket_files) return phenopacket

    -
    + @@ -2972,12 +3059,13 @@

    -__init__(phenopacket) + __init__(phenopacket)

    @@ -2986,6 +3074,8 @@

    Initialise PhenopacketUtil

    + +

    Attributes:

    @@ -2997,18 +3087,22 @@

    - + - +
    phenopacketphenopacket Union[Phenopacket, Family]

    Phenopacket or Family object

    +
    +

    Phenopacket or Family object

    +
    +
    -
    - Source code in src/pheval/utils/phenopacket_utils.py -
    - + @@ -3065,6 +3166,8 @@

    Union[Phenopacket, Family] -

    +
    540
    +          
    + Source code in src/pheval/utils/phenopacket_utils.py +
    540
     541
     542
     543
    @@ -3022,17 +3116,18 @@ 

    """ self.phenopacket = phenopacket

    -
    +
    +

    -add_randomised_hpo(randomised_hpo) + add_randomised_hpo(randomised_hpo)

    @@ -3041,6 +3136,8 @@

    [PhenotypicFeature]

    The randomised phenotypic profiles to be added.

    +
    +

    The randomised phenotypic profiles to be added.

    +
    +
    required

    Union[Phenopacket, Family] The Phenopacket or Family object with added randomised profiles.

    +
    +

    Union[Phenopacket, Family] The Phenopacket or Family object with added randomised profiles.

    +
    +
    -
    - Source code in src/pheval/utils/phenopacket_utils.py -
    569
    +          
    + Source code in src/pheval/utils/phenopacket_utils.py +
    569
     570
     571
     572
    @@ -3121,17 +3228,18 @@ 

    phenopacket.phenotypic_features.extend(randomised_hpo) return phenopacket

    -
    +
    +

    -add_spiked_vcf_path(spiked_vcf_file_data) + add_spiked_vcf_path(spiked_vcf_file_data)

    @@ -3139,16 +3247,14 @@

    Add a spiked VCF path to a Phenopacket or Family.

    -
      -
    • spiked_vcf_file_data (File): The VCF file data to be added.
    • -
    -
      -
    • Phenopacket or Family: The Phenopacket or Family object with the added spiked VCF path.
    • -
    - -
    - Source code in src/pheval/utils/phenopacket_utils.py -
    - + @@ -3227,6 +3340,8 @@

    Union[Phenopacket, Family] -

    +
    588
    +

    Args: +- spiked_vcf_file_data (File): The VCF file data to be added.

    +

    Returns: +- Phenopacket or Family: The Phenopacket or Family object with the added spiked VCF path.

    + +
    + Source code in src/pheval/utils/phenopacket_utils.py +
    588
     589
     590
     591
    @@ -3184,17 +3290,18 @@ 

    phenopacket.files.extend(phenopacket_files) return phenopacket

    -
    +
    +

    -update_interpretations(interpretations) + update_interpretations(interpretations)

    @@ -3203,6 +3310,8 @@

    List[Interpretation]

    The updated interpretations to be added.

    +
    +

    The updated interpretations to be added.

    +
    +
    required

    Union[Phenopacket, Family]: The Phenopacket or Family object with updated interpretations.

    +
    +

    Union[Phenopacket, Family]: The Phenopacket or Family object with updated interpretations.

    +
    +
    -
    - Source code in src/pheval/utils/phenopacket_utils.py -
    548
    +          
    + Source code in src/pheval/utils/phenopacket_utils.py +
    548
     549
     550
     551
    @@ -3287,7 +3406,7 @@ 

    phenopacket.interpretations.extend(interpretations) return phenopacket

    -
    +
    @@ -3298,6 +3417,7 @@

    @@ -3305,7 +3425,7 @@

    - PhenopacketUtil + PhenopacketUtil

    @@ -3316,10 +3436,9 @@

    - Source code in src/pheval/utils/phenopacket_utils.py -
    - + @@ -4003,9 +4129,9 @@

    - Source code in src/pheval/utils/phenopacket_utils.py -

    219
    +            
    + Source code in src/pheval/utils/phenopacket_utils.py +
    219
     220
     221
     222
    @@ -3951,7 +4070,7 @@ 

    return True return False

    -
    + @@ -3965,12 +4084,13 @@

    -__init__(phenopacket_contents) + __init__(phenopacket_contents)

    @@ -3979,6 +4099,8 @@

    Union[Phenopacket, Family]

    Phenopacket or Family object

    +
    +

    Phenopacket or Family object

    +
    +
    required
    222
    +          
    + Source code in src/pheval/utils/phenopacket_utils.py +
    222
     223
     224
     225
    @@ -4019,17 +4145,18 @@ 

    """ self.phenopacket_contents = phenopacket_contents

    -
    +
    +

    -causative_variants() + causative_variants()

    @@ -4038,6 +4165,8 @@

    Retrieve a list of causative variants listed in a Phenopacket

    + +

    Returns:

    @@ -4051,14 +4180,18 @@

    List[ProbandCausativeVariant] -

    +

    List[ProbandCausativeVariant]: List of proband causative variants

    +
    +

    List[ProbandCausativeVariant]: List of proband causative variants

    +
    +
    -
    - Source code in src/pheval/utils/phenopacket_utils.py -
    - +
    352
    +          
    + Source code in src/pheval/utils/phenopacket_utils.py +
    352
     353
     354
     355
    @@ -4112,17 +4245,18 @@ 

    all_variants.append(variant_data) return all_variants

    -
    +
    +

    -check_incomplete_disease_record() + check_incomplete_disease_record()

    @@ -4133,6 +4267,8 @@

    bool

    bool

    True if any disease record is incomplete, False otherwise.

    +
    +

    True if any disease record is incomplete, False otherwise.

    +
    +
    -
    - Source code in src/pheval/utils/phenopacket_utils.py -
    - +
    522
    +          
    + Source code in src/pheval/utils/phenopacket_utils.py +
    522
     523
     524
     525
    @@ -4179,17 +4319,18 @@ 

    return True return False

    -
    +
    +

    -check_incomplete_gene_record() + check_incomplete_gene_record()

    @@ -4200,6 +4341,8 @@

    bool

    bool

    True if any gene record is incomplete, False otherwise.

    +
    +

    True if any gene record is incomplete, False otherwise.

    +
    +
    -
    - Source code in src/pheval/utils/phenopacket_utils.py -
    - +
    506
    +          
    + Source code in src/pheval/utils/phenopacket_utils.py +
    506
     507
     508
     509
    @@ -4250,17 +4397,18 @@ 

    return True return False

    -
    +
    +

    -check_incomplete_variant_record() + check_incomplete_variant_record()

    @@ -4272,6 +4420,8 @@

    bool

    bool

    True if any variant record is incomplete, False otherwise.

    +
    +

    True if any variant record is incomplete, False otherwise.

    +
    +
    -
    - Source code in src/pheval/utils/phenopacket_utils.py -
    483
    +          
    + Source code in src/pheval/utils/phenopacket_utils.py +
    483
     484
     485
     486
    @@ -4336,46 +4490,31 @@ 

    return True return False

    -
    +
    +

    -diagnosed_genes() + diagnosed_genes()

    -

    Retrieve the disease causing genes from a phenopacket.

    - -

    Returns:

    - - - - - - - - - - - - - -
    TypeDescription
    - List[ProbandCausativeGene] -

    List[ProbandCausativeGene]: List of causative genes

    +

    Retrieve the disease causing genes from a phenopacket. +Returns: + List[ProbandCausativeGene]: List of causative genes

    -
    - Source code in src/pheval/utils/phenopacket_utils.py -
    446
    +          
    + Source code in src/pheval/utils/phenopacket_utils.py +
    446
     447
     448
     449
    @@ -4401,46 +4540,31 @@ 

    genes = list({gene.gene_symbol: gene for gene in genes}.values()) return genes

    -
    +
    +

    -diagnosed_variants() + diagnosed_variants()

    -

    Retrieve a list of all known causative variants from a phenopacket.

    - -

    Returns:

    - - - - - - - - - - - - - -
    TypeDescription
    - List[GenomicVariant] -

    List[GenomicVariant]: List of causative variants

    +

    Retrieve a list of all known causative variants from a phenopacket. +Returns: + List[GenomicVariant]: List of causative variants

    -
    - Source code in src/pheval/utils/phenopacket_utils.py -
    - +
    460
    +          
    + Source code in src/pheval/utils/phenopacket_utils.py +
    460
     461
     462
     463
    @@ -4484,17 +4608,18 @@ 

    variants.append(variant) return variants

    -
    +
    +

    -diagnoses() + diagnoses()

    @@ -4503,6 +4628,8 @@

    List[ProbandDisease]

    List[ProbandDisease]: List of diagnosed diseases

    +
    +

    List[ProbandDisease]: List of diagnosed diseases

    +
    +
    -
    - Source code in src/pheval/utils/phenopacket_utils.py -
    - +
    331
    +          
    + Source code in src/pheval/utils/phenopacket_utils.py +
    331
     332
     333
     334
    @@ -4539,17 +4670,18 @@ 

    """ return list(set(self._diagnosis_from_interpretations() + self._diagnosis_from_disease()))

    -
    +
    +

    -diseases() + diseases()

    @@ -4558,6 +4690,8 @@

    List[Disease]

    List[Disease]: List of diseases

    +
    +

    List[Disease]: List of diseases

    +
    +
    -
    - Source code in src/pheval/utils/phenopacket_utils.py -
    - +
    283
    +          
    + Source code in src/pheval/utils/phenopacket_utils.py +
    283
     284
     285
     286
    @@ -4600,17 +4738,18 @@ 

    else: return self.phenopacket_contents.diseases

    -
    +
    +

    -files() + files()

    @@ -4619,6 +4758,8 @@

    List[File]

    List[File]: List of files associated with a phenopacket

    +
    +

    List[File]: List of files associated with a phenopacket

    +
    +
    -
    - Source code in src/pheval/utils/phenopacket_utils.py -
    380
    +          
    + Source code in src/pheval/utils/phenopacket_utils.py +
    380
     381
     382
     383
    @@ -4655,17 +4800,18 @@ 

    """ return self.phenopacket_contents.files

    -
    +
    +

    -interpretations() + interpretations()

    @@ -4674,6 +4820,8 @@

    Retrieve a list of interpretations from a Phenopacket

    + +

    Returns:

    @@ -4687,14 +4835,18 @@

    List[Interpretation] -

    +

    List[Interpretation]: List of interpretations

    +
    +

    List[Interpretation]: List of interpretations

    +
    +
    -
    - Source code in src/pheval/utils/phenopacket_utils.py -
    - +
    340
    +          
    + Source code in src/pheval/utils/phenopacket_utils.py +
    340
     341
     342
     343
    @@ -4716,17 +4868,18 @@ 

    else: return self.phenopacket_contents.interpretations

    -
    +
    +

    -negated_phenotypic_features() + negated_phenotypic_features()

    @@ -4735,6 +4888,8 @@

    List[PhenotypicFeature]

    List[PhenotypicFeature]: List of negated HPO terms

    +
    +

    List[PhenotypicFeature]: List of negated HPO terms

    +
    +
    -
    - Source code in src/pheval/utils/phenopacket_utils.py -
    - +
    269
    +          
    + Source code in src/pheval/utils/phenopacket_utils.py +
    269
     270
     271
     272
    @@ -4781,17 +4940,18 @@ 

    negated_phenotypic_features.append(p) return negated_phenotypic_features

    -
    +
    +

    -observed_phenotypic_features() + observed_phenotypic_features()

    @@ -4800,6 +4960,8 @@

    List[PhenotypicFeature]

    List[PhenotypicFeature]: List of observed HPO terms

    +
    +

    List[PhenotypicFeature]: List of observed HPO terms

    +
    +
    -
    - Source code in src/pheval/utils/phenopacket_utils.py -
    254
    +          
    + Source code in src/pheval/utils/phenopacket_utils.py +
    254
     255
     256
     257
    @@ -4848,17 +5014,18 @@ 

    phenotypic_features.append(p) return phenotypic_features

    -
    +
    +

    -phenotypic_features() + phenotypic_features()

    @@ -4867,6 +5034,8 @@

    Retrieve a list of all HPO terms

    + +

    Returns:

    @@ -4880,14 +5049,18 @@

    List[PhenotypicFeature] -

    +

    List[PhenotypicFeature]: List of HPO terms

    +
    +

    List[PhenotypicFeature]: List of HPO terms

    +
    +
    -
    - Source code in src/pheval/utils/phenopacket_utils.py -
    242
    +          
    + Source code in src/pheval/utils/phenopacket_utils.py +
    242
     243
     244
     245
    @@ -4909,17 +5082,18 @@ 

    else: return self.phenopacket_contents.phenotypic_features

    -
    +
    +

    -sample_id() + sample_id()

    @@ -4928,6 +5102,8 @@

    +

    Sample ID

    +

    +
    -
    - Source code in src/pheval/utils/phenopacket_utils.py -
    230
    +          
    + Source code in src/pheval/utils/phenopacket_utils.py +
    230
     231
     232
     233
    @@ -4970,17 +5150,18 @@ 

    else: return self.phenopacket_contents.subject.id

    -
    +
    +

    -vcf_file_data(phenopacket_path, vcf_dir) + vcf_file_data(phenopacket_path, vcf_dir)

    @@ -4989,6 +5170,8 @@

    Retrieve the genome assembly and VCF file name from a phenopacket.

    + +

    Parameters:

    @@ -5005,7 +5188,11 @@

    Path -

    + @@ -5015,7 +5202,11 @@

    Path -

    + @@ -5023,6 +5214,8 @@

    The path to the phenopacket file.

    +
    +

    The path to the phenopacket file.

    +
    +
    required

    The directory path where the VCF file is stored.

    +
    +

    The directory path where the VCF file is stored.

    +
    +
    required
    + +

    Returns:

    @@ -5036,11 +5229,17 @@

    File

    - +
    File

    The VCF file with updated URI pointing to the specified directory.

    +
    +

    The VCF file with updated URI pointing to the specified directory.

    +
    +
    + +

    Raises:

    @@ -5054,26 +5253,34 @@

    IncorrectFileFormatError -

    + - +

    If the provided file is not in .vcf or .vcf.gz format.

    +
    +

    If the provided file is not in .vcf or .vcf.gz format.

    +
    +
    IncompatibleGenomeAssemblyError

    If the genome assembly of the VCF file is not compatible.

    +
    +

    If the genome assembly of the VCF file is not compatible.

    +
    +
    -
    +
    Note

    This function searches for a VCF file within the provided list of files, validates its format, and checks if the genome assembly is compatible. If the conditions are met, it updates the URI of the VCF file to the specified directory and returns the modified file object.

    -
    - Source code in src/pheval/utils/phenopacket_utils.py -
    @@ -5196,24 +5410,25 @@

    +

    The ENSEMBL gene identifier for the result entry

    + +

    389
    +          
    + Source code in src/pheval/utils/phenopacket_utils.py +
    389
     390
     391
     392
    @@ -5137,7 +5344,7 @@ 

    vcf_data.uri = str(vcf_dir.joinpath(Path(vcf_data.uri).name)) return vcf_data

    -
    +
    @@ -5148,6 +5355,7 @@

    +
    @@ -5155,7 +5363,7 @@

    - ProbandCausativeGene + ProbandCausativeGene @@ -5170,6 +5378,8 @@

    +

    Symbol representing the gene

    +

    +

    required required
    - -
    - Notes -

    While we recommend providing the gene identifier in the ENSEMBL namespace, -any matching format used in Phenopacket interpretations and result output is acceptable -for result matching purposes in the analysis.

    -
    - -
    - Source code in src/pheval/utils/phenopacket_utils.py -
    @@ -5313,7 +5535,11 @@

    +

    Genome assembly

    + +

    @@ -5323,7 +5549,11 @@

    GenomicVariant -

    + @@ -5333,7 +5563,11 @@

    +

    Genotype information for the variant

    + +

    @@ -5343,7 +5577,11 @@

    +

    Additional information about the variant (default is an empty string)

    + +

    @@ -5351,10 +5589,9 @@

    - Source code in src/pheval/utils/phenopacket_utils.py -

     88
    +      

    Notes: + While we recommend providing the gene identifier in the ENSEMBL namespace, + any matching format used in Phenopacket interpretations and result output is acceptable + for result matching purposes in the analysis.

    + +
    + Source code in src/pheval/utils/phenopacket_utils.py +
     88
      89
      90
      91
    @@ -5245,7 +5460,7 @@ 

    gene_symbol: str gene_identifier: str

    -
    + @@ -5265,6 +5480,7 @@

    @@ -5272,7 +5488,7 @@

    - ProbandCausativeVariant + ProbandCausativeVariant @@ -5287,6 +5503,8 @@

    +

    ID of the proband

    +

    +
    required required

    Genomic variant associated with the proband

    +
    +

    Genomic variant associated with the proband

    +
    +
    required required ''
    @@ -5458,7 +5702,11 @@

    +

    Identifier for the disease result entry in the OMIM namespace

    + +

    @@ -5466,16 +5714,15 @@

    +
    Notes

    While we recommend providing the disease identifier in the OMIM namespace, any matching format used in Phenopacket interpretations and result output is acceptable for result matching purposes in the analysis.

    - -
    - Source code in src/pheval/utils/phenopacket_utils.py -

    68
    +            
    + Source code in src/pheval/utils/phenopacket_utils.py +
    68
     69
     70
     71
    @@ -5390,7 +5627,7 @@ 

    genotype: str info: str = ""

    -
    + @@ -5410,6 +5647,7 @@

    @@ -5417,7 +5655,7 @@

    - ProbandDisease + ProbandDisease @@ -5432,6 +5670,8 @@

    +

    Name of the disease

    +

    +
    required required
    106
    +            
    + Source code in src/pheval/utils/phenopacket_utils.py +
    106
     107
     108
     109
    @@ -5509,7 +5756,7 @@ 

    disease_name: str disease_identifier: str

    -
    + @@ -5529,15 +5776,17 @@

    -create_gene_identifier_map() + create_gene_identifier_map()

    @@ -5546,6 +5795,8 @@

    +

    A mapping of gene identifiers to gene symbols.

    +

    +
    -
    +
    Notes

    The dictionary structure: { @@ -5572,9 +5827,9 @@

    - Source code in src/pheval/utils/phenopacket_utils.py -
    - +
    176
    +          
    + Source code in src/pheval/utils/phenopacket_utils.py +
    176
     177
     178
     179
    @@ -5618,17 +5873,18 @@ 

    identifier_map[row["refseq_accession"]] = row["symbol"] return identifier_map

    -
    +
    +

    -create_hgnc_dict() + create_hgnc_dict()

    @@ -5637,6 +5893,8 @@

    defaultdict

    A dictionary containing gene symbols as keys and their associated gene information.

    +
    +

    A dictionary containing gene symbols as keys and their associated gene information.

    +
    +
    -
    +
    Notes

    The dictionary structure: { @@ -5669,9 +5931,9 @@

    - Source code in src/pheval/utils/phenopacket_utils.py -
    139
    +          
    + Source code in src/pheval/utils/phenopacket_utils.py +
    139
     140
     141
     142
    @@ -5741,17 +6003,18 @@ 

    return hgnc_data

    -
    +
    +

    -create_json_message(phenopacket) + create_json_message(phenopacket)

    @@ -5759,16 +6022,14 @@

    Create a JSON message for writing to a file.

    -
      -
    • phenopacket (Union[Phenopacket, Family]): The Phenopacket or Family object to convert to JSON.
    • -
    -
      -
    • str: A JSON-formatted string representation of the Phenopacket or Family object.
    • -
    - -
    - Source code in src/pheval/utils/phenopacket_utils.py -
    - + @@ -5833,6 +6101,8 @@

    Union[Phenopacket, Family] -

    +
    608
    +

    Args: +- phenopacket (Union[Phenopacket, Family]): The Phenopacket or Family object to convert to JSON.

    +

    Returns: +- str: A JSON-formatted string representation of the Phenopacket or Family object.

    + +
    + Source code in src/pheval/utils/phenopacket_utils.py +
    608
     609
     610
     611
    @@ -5790,17 +6051,18 @@ 

    """ return MessageToJson(phenopacket)

    -
    +
    +

    -phenopacket_reader(file) + phenopacket_reader(file)

    @@ -5809,6 +6071,8 @@

    Path

    Path to the Phenopacket file

    +
    +

    Path to the Phenopacket file

    +
    +
    required

    Union[Phenopacket, Family]: Contents of the Phenopacket file as a Phenopacket or Family object

    +
    +

    Union[Phenopacket, Family]: Contents of the Phenopacket file as a Phenopacket or Family object

    +
    +
    -
    - Source code in src/pheval/utils/phenopacket_utils.py -
    + -
    200
    +          
    + Source code in src/pheval/utils/phenopacket_utils.py +
    200
     201
     202
     203
    @@ -5887,17 +6161,18 @@ 

    else: return Parse(json.dumps(phenopacket), Phenopacket())

    -
    +
    +

    -read_hgnc_data() + read_hgnc_data()

    @@ -5906,6 +6181,8 @@

    pd.DataFrame + DataFrame +

    +
    +

    pd.DataFrame: DataFrame containing the HGNC data.

    +

    pd.DataFrame: DataFrame containing the HGNC data.

    -
    - Source code in src/pheval/utils/phenopacket_utils.py -
    + - @@ -5995,7 +6283,11 @@

    Path -

    + @@ -6003,6 +6295,8 @@

    +

    None

    + +

    125
    +          
    + Source code in src/pheval/utils/phenopacket_utils.py +
    125
     126
     127
     128
    @@ -5950,17 +6231,18 @@ 

    dtype=str, )

    -
    +
    +

    -write_phenopacket(phenopacket, output_file) + write_phenopacket(phenopacket, output_file)

    @@ -5969,6 +6251,8 @@

    Phenopacket or Family +

    +
    +

    The Phenopacket or Family object to be written.

    +

    The Phenopacket or Family object to be written.

    required

    The Path object representing the file to write the Phenopacket data.

    +
    +

    The Path object representing the file to write the Phenopacket data.

    +
    +
    required
    -
    - Source code in src/pheval/utils/phenopacket_utils.py -
    621
    +          
    + Source code in src/pheval/utils/phenopacket_utils.py +
    621
     622
     623
     624
    @@ -6053,7 +6351,7 @@ 

    outfile.write(phenopacket_json) outfile.close()

    -
    +
    diff --git a/api/pheval/utils/semsim_utils/index.html b/api/pheval/utils/semsim_utils/index.html index 6fcff257e..aea320e1e 100644 --- a/api/pheval/utils/semsim_utils/index.html +++ b/api/pheval/utils/semsim_utils/index.html @@ -11,7 +11,7 @@ - + @@ -1020,63 +1020,63 @@
  • - src.pheval.utils.semsim_utils + semsim_utils
  • - diff_semsim() + diff_semsim
  • - filter_non_0_score() + filter_non_0_score
  • - get_percentage_diff() + get_percentage_diff
  • - parse_semsim() + parse_semsim
  • - percentage_diff() + percentage_diff
  • - semsim_analysis() + semsim_analysis
  • - semsim_heatmap_plot() + semsim_heatmap_plot
  • - validate_semsim_file_comparison() + validate_semsim_file_comparison
  • @@ -1263,63 +1263,63 @@
  • - src.pheval.utils.semsim_utils + semsim_utils
  • - diff_semsim() + diff_semsim
  • - filter_non_0_score() + filter_non_0_score
  • - get_percentage_diff() + get_percentage_diff
  • - parse_semsim() + parse_semsim
  • - percentage_diff() + percentage_diff
  • - semsim_analysis() + semsim_analysis
  • - semsim_heatmap_plot() + semsim_heatmap_plot
  • - validate_semsim_file_comparison() + validate_semsim_file_comparison
  • @@ -1349,6 +1349,7 @@

    Semsim utils

    +
    @@ -1366,12 +1367,13 @@

    Semsim utils

    +

    -diff_semsim(semsim_left, semsim_right, score_column, absolute_diff) + diff_semsim(semsim_left, semsim_right, score_column, absolute_diff)

    @@ -1380,6 +1382,8 @@

    Calculates score difference between two semantic similarity profiles

    + +

    Parameters:

    @@ -1394,9 +1398,13 @@

    + - @@ -1404,9 +1412,13 @@

    + - @@ -1416,7 +1428,11 @@

    - + @@ -1426,7 +1442,11 @@

    - + @@ -1434,6 +1454,8 @@

    semsim_left - pd.DataFrame + DataFrame + +
    +

    first semantic similarity dataframe

    +

    first semantic similarity dataframe

    required
    semsim_right - pd.DataFrame + DataFrame + +
    +

    second semantic similarity dataframe

    +

    second semantic similarity dataframe

    required str

    Score column that will be computed (e.g. jaccard_similarity)

    +
    +

    Score column that will be computed (e.g. jaccard_similarity)

    +
    +
    required bool

    Whether the difference is absolute (True) or percentage (False).

    +
    +

    Whether the difference is absolute (True) or percentage (False).

    +
    +
    required
    + +

    Returns:

    @@ -1445,16 +1467,20 @@

    + -
    - pd.DataFrame + DataFrame + +
    +

    pd.DataFrame: A dataframe with terms and its scores differences

    +

    pd.DataFrame: A dataframe with terms and its scores differences

    -
    - Source code in src/pheval/utils/semsim_utils.py -
    + - @@ -1545,7 +1578,11 @@

    +

    Column to be filtered

    + +

    @@ -1553,6 +1590,8 @@

    pd.DataFrame + DataFrame + +

    -
    42
    +          
    + Source code in src/pheval/utils/semsim_utils.py +
    42
     43
     44
     45
    @@ -1500,17 +1526,18 @@ 

    ) return df[["subject_id", "object_id", f"{score_column}_x", f"{score_column}_y", "diff"]]

    -
    +
    +

    -filter_non_0_score(data, col) + filter_non_0_score(data, col)

    @@ -1519,6 +1546,8 @@

    pd.DataFrame + DataFrame +

    +
    +

    Dirty dataframe

    +

    Dirty dataframe

    required required +
    +

    pd.DataFrame: Filtered dataframe

    +

    pd.DataFrame: Filtered dataframe

    -
    - Source code in src/pheval/utils/semsim_utils.py -
    @@ -1640,7 +1690,11 @@

    +

    first number in comparison

    + +

    @@ -1648,6 +1702,8 @@

    +

    percentage difference between two numbers

    + +

    14
    +          
    + Source code in src/pheval/utils/semsim_utils.py +
    14
     15
     16
     17
    @@ -1595,17 +1638,18 @@ 

    """ return data[data[col] != 0]

    -
    +
    +

    -get_percentage_diff(current_number, previous_number) + get_percentage_diff(current_number, previous_number)

    @@ -1614,6 +1658,8 @@

    +

    second number in comparison

    +

    +
    required required
    -
    - Source code in src/pheval/utils/semsim_utils.py -
    138
    +          
    + Source code in src/pheval/utils/semsim_utils.py +
    138
     139
     140
     141
    @@ -1708,17 +1768,18 @@ 

    except ZeroDivisionError: return None

    -
    +
    +

    -parse_semsim(df, cols) + parse_semsim(df, cols)

    @@ -1727,6 +1788,8 @@

    Parses semantic similarity profiles converting the score column as a numeric value and dropping the null ones

    + +

    Parameters:

    @@ -1741,9 +1804,13 @@

    + - @@ -1753,7 +1820,11 @@

    - + @@ -1761,6 +1832,8 @@

    df - pd.DataFrame + DataFrame + +
    +

    semantic similarity profile dataframe

    +

    semantic similarity profile dataframe

    required list

    list of columns that will be selected on semsim data

    +
    +

    list of columns that will be selected on semsim data

    +
    +
    required
    + +

    Returns:

    @@ -1772,16 +1845,20 @@

    + -
    - pd.DataFrame + DataFrame + +
    +

    pd.Dataframe: parsed semantic similarity dataframe

    +

    pd.Dataframe: parsed semantic similarity dataframe

    -
    - Source code in src/pheval/utils/semsim_utils.py -
    27
    +          
    + Source code in src/pheval/utils/semsim_utils.py +
    27
     28
     29
     30
    @@ -1807,17 +1884,18 @@ 

    df.replace("None", numpy.nan).dropna(subset=cols[-1], inplace=True) return df

    -
    +
    +

    -percentage_diff(semsim_left, semsim_right, score_column, output) + percentage_diff(semsim_left, semsim_right, score_column, output)

    @@ -1826,6 +1904,8 @@

    Compares two semantic similarity profiles

    + +

    Parameters:

    @@ -1842,7 +1922,11 @@

    - + @@ -1852,7 +1936,11 @@

    - + @@ -1862,7 +1950,11 @@

    - + @@ -1872,7 +1964,11 @@

    - + @@ -1880,9 +1976,9 @@

    Path

    File path of the first semantic similarity profile

    +
    +

    File path of the first semantic similarity profile

    +
    +
    required Path

    File path of the second semantic similarity profile

    +
    +

    File path of the second semantic similarity profile

    +
    +
    required str

    Score column that will be computed (e.g. jaccard_similarity)

    +
    +

    Score column that will be computed (e.g. jaccard_similarity)

    +
    +
    required Path

    Output path for the difference tsv file

    +
    +

    Output path for the difference tsv file

    +
    +
    required
    -
    - Source code in src/pheval/utils/semsim_utils.py -
    67
    +          
    + Source code in src/pheval/utils/semsim_utils.py +
    67
     68
     69
     70
    @@ -1904,17 +2000,18 @@ 

    clean_df = semsim_analysis(semsim_left, semsim_right, score_column, absolute_diff=False) clean_df.sort_values(by="diff", ascending=False).to_csv(output, sep="\t", index=False)

    -
    +
    +

    -semsim_analysis(semsim_left, semsim_right, score_column, absolute_diff=True) + semsim_analysis(semsim_left, semsim_right, score_column, absolute_diff=True)

    @@ -1923,6 +2020,8 @@

    semsim_analysis

    + +

    Parameters:

    @@ -1939,7 +2038,11 @@

    - + @@ -1949,7 +2052,11 @@

    - + @@ -1959,7 +2066,11 @@

    - + @@ -1969,7 +2080,11 @@

    - + @@ -1977,6 +2092,8 @@

    Path

    File path of the first semantic similarity profile

    +
    +

    File path of the first semantic similarity profile

    +
    +
    required Path

    File path of the second semantic similarity profile

    +
    +

    File path of the second semantic similarity profile

    +
    +
    required str

    Score column that will be computed (e.g. jaccard_similarity)

    +
    +

    Score column that will be computed (e.g. jaccard_similarity)

    +
    +
    required bool

    Whether the difference is absolute (True) or percentage (False).

    +
    +

    Whether the difference is absolute (True) or percentage (False).

    +
    +
    True
    + +

    Returns:

    @@ -1988,16 +2105,20 @@

    + -
    - pd.DataFrame + DataFrame + +
    +

    [pd.DataFrame]: DataFrame with the differences between two semantic similarity profiles

    +

    [pd.DataFrame]: DataFrame with the differences between two semantic similarity profiles

    -
    - Source code in src/pheval/utils/semsim_utils.py -
    - + @@ -2098,7 +2226,11 @@

    Path -

    + @@ -2108,7 +2240,11 @@

    +

    Score column that will be computed (e.g. jaccard_similarity)

    + +

    @@ -2116,9 +2252,9 @@

    - Source code in src/pheval/utils/semsim_utils.py -

     94
    +          
    + Source code in src/pheval/utils/semsim_utils.py +
     94
      95
      96
      97
    @@ -2053,17 +2174,18 @@ 

    diff_df = diff_semsim(semsim_left, semsim_right, score_column, absolute_diff) return filter_non_0_score(diff_df, "diff")

    -
    +
    +

    -semsim_heatmap_plot(semsim_left, semsim_right, score_column) + semsim_heatmap_plot(semsim_left, semsim_right, score_column)

    @@ -2072,6 +2194,8 @@

    Path

    File path of the first semantic similarity profile

    +
    +

    File path of the first semantic similarity profile

    +
    +
    required

    File path of the second semantic similarity profile

    +
    +

    File path of the second semantic similarity profile

    +
    +
    required required
    80
    +          
    + Source code in src/pheval/utils/semsim_utils.py +
    80
     81
     82
     83
    @@ -2142,80 +2278,34 @@ 

    fig = px.imshow(df, text_auto=True) fig.show()

    -
    +
    +

    -validate_semsim_file_comparison(semsim_left, semsim_right) + validate_semsim_file_comparison(semsim_left, semsim_right)

    -

    Checks if files exist and whether they're different

    - -

    Parameters:

    - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    semsim_left - Path -

    File path of the first semantic similarity profile

    - required -
    semsim_right - Path -

    File path of the second semantic similarity profile

    - required -
    - -

    Raises:

    - - - - - - - - - - - - - -
    TypeDescription
    - Exception -

    FileNotFoundException

    +

    Checks if files exist and whether they're different +Args: + semsim_left (Path): File path of the first semantic similarity profile + semsim_right (Path): File path of the second semantic similarity profile +Raises: + Exception: FileNotFoundException

    -
    - Source code in src/pheval/utils/semsim_utils.py -
    124
    +          
    + Source code in src/pheval/utils/semsim_utils.py +
    124
     125
     126
     127
    @@ -2239,7 +2329,7 @@ 

    raise Exception(errmsg) file_utils.ensure_file_exists(semsim_left, semsim_right)

    -
    +
    diff --git a/api/pheval/utils/utils/index.html b/api/pheval/utils/utils/index.html index b6d67a6db..654b7e880 100644 --- a/api/pheval/utils/utils/index.html +++ b/api/pheval/utils/utils/index.html @@ -11,7 +11,7 @@ - + @@ -1034,28 +1034,28 @@
  • - src.pheval.utils.utils + utils
  • - rand() + rand
  • - semsim_scramble() + semsim_scramble
  • - semsim_scramble_df() + semsim_scramble_df
  • @@ -1228,28 +1228,28 @@
  • - src.pheval.utils.utils + utils
  • - rand() + rand
  • - semsim_scramble() + semsim_scramble
  • - semsim_scramble_df() + semsim_scramble_df
  • @@ -1279,6 +1279,7 @@

    Utils

    +
    @@ -1296,95 +1297,31 @@

    Utils

    +

    -rand(df, min_num, max_num, scramble_factor) + rand(df, min_num, max_num, scramble_factor)

    -

    Numeric scrambling

    - -

    Parameters:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    df - pd.DataFrame -

    dataframe records

    - required -
    min_num - int -

    min value from this records

    - required -
    max_num - int -

    max value from this records

    - required -
    scramble_factor - float -

    scramble factor scalar

    - required -
    - -

    Returns:

    - - - - - - - - - - - - - -
    Name TypeDescription
    float - float -

    randomized number

    - -
    - Source code in src/pheval/utils/utils.py -
    13
    +      

    Numeric scrambling +Args: + df (pd.DataFrame): dataframe records + min_num (int): min value from this records + max_num (int): max value from this records + scramble_factor (float): scramble factor scalar +Returns: + float: randomized number

    + +
    + Source code in src/pheval/utils/utils.py +
    13
     14
     15
     16
    @@ -1416,17 +1353,18 @@ 

    info_log.error(df, exc_info=err) return df

    -
    +
    +

    -semsim_scramble(input, output, columns_to_be_scrambled, scramble_factor=0.5) + semsim_scramble(input, output, columns_to_be_scrambled, scramble_factor=0.5)

    @@ -1446,9 +1384,9 @@

    Returns: pd.Dataframe: scrambled dataframe

    -
    - Source code in src/pheval/utils/utils.py -
    31
    +          
    + Source code in src/pheval/utils/utils.py +
    31
     32
     33
     34
    @@ -1494,80 +1432,35 @@ 

    dataframe = semsim_scramble_df(semsim, columns_to_be_scrambled, scramble_factor) dataframe.to_csv(output, sep="\t", index=False)

    -
    +
    +

    -semsim_scramble_df(dataframe, columns_to_be_scrambled, scramble_factor) + semsim_scramble_df(dataframe, columns_to_be_scrambled, scramble_factor)

    -

    scramble_semsim_df

    - -

    Parameters:

    - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    dataframe - pd.DataFrame -

    dataframe that contains semsim profile

    - required -
    columns_to_be_scrambled - List[str] - - required -
    - -

    Returns:

    - - - - - - - - - - - - - -
    TypeDescription
    - pd.DataFrame -

    pd.Dataframe: scrambled dataframe

    - -
    - Source code in src/pheval/utils/utils.py -
    56
    +      

    scramble_semsim_df +Args: + dataframe (pd.DataFrame): dataframe that contains semsim profile + scramble_factor (float) scalar scramble factor + columns_to_be_scrambled (List[str]): +Returns: + pd.Dataframe: scrambled dataframe

    + +
    + Source code in src/pheval/utils/utils.py +
    56
     57
     58
     59
    @@ -1603,7 +1496,7 @@ 

    dataframe[col] = dataframe[col].apply(rand, args=(min_num, max_num, scramble_factor)) return dataframe

    -
    +
    diff --git a/assets/_mkdocstrings.css b/assets/_mkdocstrings.css index a65078d02..57a23e10f 100644 --- a/assets/_mkdocstrings.css +++ b/assets/_mkdocstrings.css @@ -1,18 +1,13 @@ -/* Don't capitalize names. */ -h5.doc-heading { - text-transform: none !important; -} - -/* Avoid breaking parameters name, etc. in table cells. */ +/* Avoid breaking parameter names, etc. in table cells. */ .doc-contents td code { word-break: normal !important; } -/* For pieces of Markdown rendered in table cells. */ -.doc-contents td p { - margin-top: 0 !important; - margin-bottom: 0 !important; +/* No line break before first paragraph of descriptions. */ +.doc-md-description, +.doc-md-description>p:first-child { + display: inline; } /* Max width for docstring sections tables. */ @@ -21,16 +16,99 @@ h5.doc-heading { display: table !important; width: 100%; } + .doc .md-typeset__table tr { display: table-row; } -/* Avoid line breaks in rendered fields. */ -.field-body p { - display: inline; -} - /* Defaults in Spacy table style. */ .doc-param-default { float: right; } + +/* Symbols in Navigation and ToC. */ +:root, +[data-md-color-scheme="default"] { + --doc-symbol-attribute-fg-color: #953800; + --doc-symbol-function-fg-color: #8250df; + --doc-symbol-method-fg-color: #8250df; + --doc-symbol-class-fg-color: #0550ae; + --doc-symbol-module-fg-color: #5cad0f; + + --doc-symbol-attribute-bg-color: #9538001a; + --doc-symbol-function-bg-color: #8250df1a; + --doc-symbol-method-bg-color: #8250df1a; + --doc-symbol-class-bg-color: #0550ae1a; + --doc-symbol-module-bg-color: #5cad0f1a; +} + +[data-md-color-scheme="slate"] { + --doc-symbol-attribute-fg-color: #ffa657; + --doc-symbol-function-fg-color: #d2a8ff; + --doc-symbol-method-fg-color: #d2a8ff; + --doc-symbol-class-fg-color: #79c0ff; + --doc-symbol-module-fg-color: #baff79; + + --doc-symbol-attribute-bg-color: #ffa6571a; + --doc-symbol-function-bg-color: #d2a8ff1a; + --doc-symbol-method-bg-color: #d2a8ff1a; + --doc-symbol-class-bg-color: #79c0ff1a; + --doc-symbol-module-bg-color: #baff791a; +} + +code.doc-symbol { + border-radius: .1rem; + font-size: .85em; + padding: 0 .3em; + font-weight: bold; +} + +code.doc-symbol-attribute { + color: var(--doc-symbol-attribute-fg-color); + background-color: var(--doc-symbol-attribute-bg-color); +} + +code.doc-symbol-attribute::after { + content: "attr"; +} + +code.doc-symbol-function { + color: var(--doc-symbol-function-fg-color); + background-color: var(--doc-symbol-function-bg-color); +} + +code.doc-symbol-function::after { + content: "func"; +} + +code.doc-symbol-method { + color: var(--doc-symbol-method-fg-color); + background-color: var(--doc-symbol-method-bg-color); +} + +code.doc-symbol-method::after { + content: "meth"; +} + +code.doc-symbol-class { + color: var(--doc-symbol-class-fg-color); + background-color: var(--doc-symbol-class-bg-color); +} + +code.doc-symbol-class::after { + content: "class"; +} + +code.doc-symbol-module { + color: var(--doc-symbol-module-fg-color); + background-color: var(--doc-symbol-module-bg-color); +} + +code.doc-symbol-module::after { + content: "mod"; +} + +.doc-signature .autorefs { + color: inherit; + border-bottom: 1px dotted currentcolor; +} diff --git a/contact/index.html b/contact/index.html index 65bf6eeb6..361582c00 100644 --- a/contact/index.html +++ b/contact/index.html @@ -11,7 +11,7 @@ - + diff --git a/contributing/index.html b/contributing/index.html index c23ff6239..e79080273 100644 --- a/contributing/index.html +++ b/contributing/index.html @@ -11,7 +11,7 @@ - + diff --git a/developing_a_pheval_plugin/index.html b/developing_a_pheval_plugin/index.html index d0bb7b6b4..cc0c4369c 100644 --- a/developing_a_pheval_plugin/index.html +++ b/developing_a_pheval_plugin/index.html @@ -11,7 +11,7 @@ - + @@ -1098,7 +1098,7 @@
  • - src.pheval.runners.runner.PhEvalRunner + PhEvalRunner
  • @@ -1200,10 +1200,10 @@
  • - src.pheval.utils.phenopacket_utils.PhenopacketUtil + PhenopacketUtil -