genmod 3.10__tar.gz → 3.10.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (190) hide show
  1. {genmod-3.10 → genmod-3.10.2}/CHANGELOG.md +13 -0
  2. {genmod-3.10 → genmod-3.10.2}/PKG-INFO +1 -2
  3. {genmod-3.10 → genmod-3.10.2}/docs/commands/score-compounds.md +1 -1
  4. {genmod-3.10 → genmod-3.10.2}/docs/index.md +1 -2
  5. {genmod-3.10 → genmod-3.10.2}/genmod/annotate_models/variant_annotator.py +1 -1
  6. {genmod-3.10 → genmod-3.10.2}/genmod/annotate_variants/annotate.py +2 -1
  7. {genmod-3.10 → genmod-3.10.2}/genmod/commands/annotate_models.py +6 -1
  8. {genmod-3.10 → genmod-3.10.2}/genmod/commands/score_compounds.py +14 -3
  9. {genmod-3.10 → genmod-3.10.2}/genmod/score_variants/compound_scorer.py +12 -3
  10. {genmod-3.10 → genmod-3.10.2}/genmod/score_variants/score_function.py +11 -4
  11. {genmod-3.10 → genmod-3.10.2}/genmod/utils/variant_printer.py +6 -2
  12. {genmod-3.10 → genmod-3.10.2}/genmod/vcf_tools/sort_variants.py +1 -1
  13. genmod-3.10.2/mkdocs.yml +22 -0
  14. {genmod-3.10 → genmod-3.10.2}/pyproject.toml +6 -2
  15. {genmod-3.10 → genmod-3.10.2}/tests/score_variants/test_score_function.py +21 -0
  16. genmod-3.10.2/uv.lock +2733 -0
  17. genmod-3.10/mkdocs.yml +0 -20
  18. genmod-3.10/uv.lock +0 -1045
  19. {genmod-3.10 → genmod-3.10.2}/.github/workflows/build_and_publish.yml +0 -0
  20. {genmod-3.10 → genmod-3.10.2}/.github/workflows/check_format.yml +0 -0
  21. {genmod-3.10 → genmod-3.10.2}/.github/workflows/keep_a_changelog.yml +0 -0
  22. {genmod-3.10 → genmod-3.10.2}/.github/workflows/lint.yml +0 -0
  23. {genmod-3.10 → genmod-3.10.2}/.github/workflows/test.yml +0 -0
  24. {genmod-3.10 → genmod-3.10.2}/.gitignore +0 -0
  25. {genmod-3.10 → genmod-3.10.2}/.python-version +0 -0
  26. {genmod-3.10 → genmod-3.10.2}/.travis.yml +0 -0
  27. {genmod-3.10 → genmod-3.10.2}/CITATION.cff +0 -0
  28. {genmod-3.10 → genmod-3.10.2}/DEVELOPING.md +0 -0
  29. {genmod-3.10 → genmod-3.10.2}/Dockerfile +0 -0
  30. {genmod-3.10 → genmod-3.10.2}/Dockerfile.pytest +0 -0
  31. {genmod-3.10 → genmod-3.10.2}/LICENSE.txt +0 -0
  32. {genmod-3.10 → genmod-3.10.2}/MANIFEST.in +0 -0
  33. {genmod-3.10 → genmod-3.10.2}/Makefile +0 -0
  34. {genmod-3.10 → genmod-3.10.2}/README.md +0 -0
  35. {genmod-3.10 → genmod-3.10.2}/artwork/tree_man.JPG +0 -0
  36. {genmod-3.10 → genmod-3.10.2}/docs/commands/annotate-models.md +0 -0
  37. {genmod-3.10 → genmod-3.10.2}/docs/commands/annotate-variants.md +0 -0
  38. {genmod-3.10 → genmod-3.10.2}/docs/commands/build-annotation.md +0 -0
  39. {genmod-3.10 → genmod-3.10.2}/docs/commands/filter-variants.md +0 -0
  40. {genmod-3.10 → genmod-3.10.2}/docs/commands/score-variants.md +0 -0
  41. {genmod-3.10 → genmod-3.10.2}/docs/commands/sort-variants.md +0 -0
  42. {genmod-3.10 → genmod-3.10.2}/docs/genetic-models.md +0 -0
  43. {genmod-3.10 → genmod-3.10.2}/examples/dominant_trio.ped +0 -0
  44. {genmod-3.10 → genmod-3.10.2}/examples/multi_allele_example.vcf +0 -0
  45. {genmod-3.10 → genmod-3.10.2}/examples/multi_family.ped +0 -0
  46. {genmod-3.10 → genmod-3.10.2}/examples/readme.md +0 -0
  47. {genmod-3.10 → genmod-3.10.2}/examples/recessive_trio.ped +0 -0
  48. {genmod-3.10 → genmod-3.10.2}/examples/score_test.ini +0 -0
  49. {genmod-3.10 → genmod-3.10.2}/examples/small_1000G.vcf +0 -0
  50. {genmod-3.10 → genmod-3.10.2}/examples/small_1000G.vcf.gz +0 -0
  51. {genmod-3.10 → genmod-3.10.2}/examples/small_1000G.vcf.gz.tbi +0 -0
  52. {genmod-3.10 → genmod-3.10.2}/examples/small_1000G_CADD.tsv +0 -0
  53. {genmod-3.10 → genmod-3.10.2}/examples/small_1000G_CADD.tsv.gz +0 -0
  54. {genmod-3.10 → genmod-3.10.2}/examples/small_1000G_CADD.tsv.gz.tbi +0 -0
  55. {genmod-3.10 → genmod-3.10.2}/examples/small_CADD.tsv +0 -0
  56. {genmod-3.10 → genmod-3.10.2}/examples/small_CADD.tsv.gz +0 -0
  57. {genmod-3.10 → genmod-3.10.2}/examples/small_CADD.tsv.gz.tbi +0 -0
  58. {genmod-3.10 → genmod-3.10.2}/examples/small_dbNSFP.txt +0 -0
  59. {genmod-3.10 → genmod-3.10.2}/examples/small_dbNSFP.txt.gz +0 -0
  60. {genmod-3.10 → genmod-3.10.2}/examples/small_dbNSFP.txt.gz.tbi +0 -0
  61. {genmod-3.10 → genmod-3.10.2}/examples/small_geneset.gtf +0 -0
  62. {genmod-3.10 → genmod-3.10.2}/examples/small_vep.vcf +0 -0
  63. {genmod-3.10 → genmod-3.10.2}/examples/test_phased_compounds.vcf +0 -0
  64. {genmod-3.10 → genmod-3.10.2}/examples/test_vcf.vcf +0 -0
  65. {genmod-3.10 → genmod-3.10.2}/examples/test_vcf_regions.vcf +0 -0
  66. {genmod-3.10 → genmod-3.10.2}/examples/test_vcf_regions_models.vcf +0 -0
  67. {genmod-3.10 → genmod-3.10.2}/examples/test_vcf_regions_models_scored.vcf +0 -0
  68. {genmod-3.10 → genmod-3.10.2}/genmod/__init__.py +0 -0
  69. {genmod-3.10 → genmod-3.10.2}/genmod/annotate_models/__init__.py +0 -0
  70. {genmod-3.10 → genmod-3.10.2}/genmod/annotate_models/fix_variant.py +0 -0
  71. {genmod-3.10 → genmod-3.10.2}/genmod/annotate_models/genetic_models.py +0 -0
  72. {genmod-3.10 → genmod-3.10.2}/genmod/annotate_models/make_haploblocks.py +0 -0
  73. {genmod-3.10 → genmod-3.10.2}/genmod/annotate_models/model_score.py +0 -0
  74. {genmod-3.10 → genmod-3.10.2}/genmod/annotate_models/models/__init__.py +0 -0
  75. {genmod-3.10 → genmod-3.10.2}/genmod/annotate_models/models/compound_model.py +0 -0
  76. {genmod-3.10 → genmod-3.10.2}/genmod/annotate_models/models/dominant_model.py +0 -0
  77. {genmod-3.10 → genmod-3.10.2}/genmod/annotate_models/models/recessive_model.py +0 -0
  78. {genmod-3.10 → genmod-3.10.2}/genmod/annotate_models/models/x_models.py +0 -0
  79. {genmod-3.10 → genmod-3.10.2}/genmod/annotate_regions/__init__.py +0 -0
  80. {genmod-3.10 → genmod-3.10.2}/genmod/annotate_regions/get_features.py +0 -0
  81. {genmod-3.10 → genmod-3.10.2}/genmod/annotate_regions/parse_annotations.py +0 -0
  82. {genmod-3.10 → genmod-3.10.2}/genmod/annotate_variants/__init__.py +0 -0
  83. {genmod-3.10 → genmod-3.10.2}/genmod/annotate_variants/add_annotations.py +0 -0
  84. {genmod-3.10 → genmod-3.10.2}/genmod/annotate_variants/read_tabix_files.py +0 -0
  85. {genmod-3.10 → genmod-3.10.2}/genmod/annotations/__init__.py +0 -0
  86. {genmod-3.10 → genmod-3.10.2}/genmod/annotations/ensembl_genes_37.txt.gz +0 -0
  87. {genmod-3.10 → genmod-3.10.2}/genmod/annotations/ensembl_genes_38.txt.gz +0 -0
  88. {genmod-3.10 → genmod-3.10.2}/genmod/commands/__init__.py +0 -0
  89. {genmod-3.10 → genmod-3.10.2}/genmod/commands/analyze.py +0 -0
  90. {genmod-3.10 → genmod-3.10.2}/genmod/commands/annotate_variant.py +0 -0
  91. {genmod-3.10 → genmod-3.10.2}/genmod/commands/base.py +0 -0
  92. {genmod-3.10 → genmod-3.10.2}/genmod/commands/filter_variants.py +0 -0
  93. {genmod-3.10 → genmod-3.10.2}/genmod/commands/genmod_sort.py +0 -0
  94. {genmod-3.10 → genmod-3.10.2}/genmod/commands/score_variants.py +0 -0
  95. {genmod-3.10 → genmod-3.10.2}/genmod/commands/summarize_variants.py +0 -0
  96. {genmod-3.10 → genmod-3.10.2}/genmod/commands/utils.py +0 -0
  97. {genmod-3.10 → genmod-3.10.2}/genmod/configs/genmod_test.v1.5.ini +0 -0
  98. {genmod-3.10 → genmod-3.10.2}/genmod/configs/rank_model_cmms_v1.7.ini +0 -0
  99. {genmod-3.10 → genmod-3.10.2}/genmod/configs/rank_model_cmms_v1.9.ini +0 -0
  100. {genmod-3.10 → genmod-3.10.2}/genmod/errors/__init__.py +0 -0
  101. {genmod-3.10 → genmod-3.10.2}/genmod/errors/warning.py +0 -0
  102. {genmod-3.10 → genmod-3.10.2}/genmod/log.py +0 -0
  103. {genmod-3.10 → genmod-3.10.2}/genmod/score_variants/__init__.py +0 -0
  104. {genmod-3.10 → genmod-3.10.2}/genmod/score_variants/cap_rank_score_to_min_bound.py +0 -0
  105. {genmod-3.10 → genmod-3.10.2}/genmod/score_variants/check_plugins.py +0 -0
  106. {genmod-3.10 → genmod-3.10.2}/genmod/score_variants/config_parser.py +0 -0
  107. {genmod-3.10 → genmod-3.10.2}/genmod/score_variants/rank_score_variant_definitions.py +0 -0
  108. {genmod-3.10 → genmod-3.10.2}/genmod/score_variants/score_variant.py +0 -0
  109. {genmod-3.10 → genmod-3.10.2}/genmod/utils/__init__.py +0 -0
  110. {genmod-3.10 → genmod-3.10.2}/genmod/utils/check_individuals.py +0 -0
  111. {genmod-3.10 → genmod-3.10.2}/genmod/utils/get_batches.py +0 -0
  112. {genmod-3.10 → genmod-3.10.2}/genmod/utils/get_features.py +0 -0
  113. {genmod-3.10 → genmod-3.10.2}/genmod/utils/get_priority.py +0 -0
  114. {genmod-3.10 → genmod-3.10.2}/genmod/utils/is_number.py +0 -0
  115. {genmod-3.10 → genmod-3.10.2}/genmod/utils/pair_generator.py +0 -0
  116. {genmod-3.10 → genmod-3.10.2}/genmod/vcf_tools/__init__.py +0 -0
  117. {genmod-3.10 → genmod-3.10.2}/genmod/vcf_tools/add_metadata.py +0 -0
  118. {genmod-3.10 → genmod-3.10.2}/genmod/vcf_tools/add_variant_information.py +0 -0
  119. {genmod-3.10 → genmod-3.10.2}/genmod/vcf_tools/check_info_header.py +0 -0
  120. {genmod-3.10 → genmod-3.10.2}/genmod/vcf_tools/genotype.py +0 -0
  121. {genmod-3.10 → genmod-3.10.2}/genmod/vcf_tools/get_genotypes.py +0 -0
  122. {genmod-3.10 → genmod-3.10.2}/genmod/vcf_tools/header_parser.py +0 -0
  123. {genmod-3.10 → genmod-3.10.2}/genmod/vcf_tools/parse_variant.py +0 -0
  124. {genmod-3.10 → genmod-3.10.2}/genmod/vcf_tools/print_headers.py +0 -0
  125. {genmod-3.10 → genmod-3.10.2}/genmod/vcf_tools/print_variants.py +0 -0
  126. {genmod-3.10 → genmod-3.10.2}/pytest.ini +0 -0
  127. {genmod-3.10 → genmod-3.10.2}/setup.cfg +0 -0
  128. {genmod-3.10 → genmod-3.10.2}/tests/__init__.py +0 -0
  129. {genmod-3.10 → genmod-3.10.2}/tests/annotate_regions/test_bed_parser.py +0 -0
  130. {genmod-3.10 → genmod-3.10.2}/tests/annotate_regions/test_build_region_trees.py +0 -0
  131. {genmod-3.10 → genmod-3.10.2}/tests/annotate_regions/test_get_interval.py +0 -0
  132. {genmod-3.10 → genmod-3.10.2}/tests/annotate_variants/test_add_annotations.py +0 -0
  133. {genmod-3.10 → genmod-3.10.2}/tests/conftest.py +0 -0
  134. {genmod-3.10 → genmod-3.10.2}/tests/fixtures/annotate_models/one_ind.ped +0 -0
  135. {genmod-3.10 → genmod-3.10.2}/tests/fixtures/annotate_variant/small_1000G.vcf.gz +0 -0
  136. {genmod-3.10 → genmod-3.10.2}/tests/fixtures/annotate_variant/small_1000G.vcf.gz.tbi +0 -0
  137. {genmod-3.10 → genmod-3.10.2}/tests/fixtures/annotate_variant/small_1000G_CADD.tsv.gz +0 -0
  138. {genmod-3.10 → genmod-3.10.2}/tests/fixtures/annotate_variant/small_1000G_CADD.tsv.gz.tbi +0 -0
  139. {genmod-3.10 → genmod-3.10.2}/tests/fixtures/annotate_variant/small_1000G_chr.vcf.gz +0 -0
  140. {genmod-3.10 → genmod-3.10.2}/tests/fixtures/annotate_variant/small_1000G_chr.vcf.gz.tbi +0 -0
  141. {genmod-3.10 → genmod-3.10.2}/tests/fixtures/annotate_variant/small_1000G_maxAF.vcf +0 -0
  142. {genmod-3.10 → genmod-3.10.2}/tests/fixtures/annotate_variant/small_1000G_maxAF.vcf.gz +0 -0
  143. {genmod-3.10 → genmod-3.10.2}/tests/fixtures/annotate_variant/small_1000G_maxAF.vcf.gz.tbi +0 -0
  144. {genmod-3.10 → genmod-3.10.2}/tests/fixtures/annotate_variant/small_CADD.tsv.gz +0 -0
  145. {genmod-3.10 → genmod-3.10.2}/tests/fixtures/annotate_variant/small_CADD.tsv.gz.tbi +0 -0
  146. {genmod-3.10 → genmod-3.10.2}/tests/fixtures/comp_check.vcf +0 -0
  147. {genmod-3.10 → genmod-3.10.2}/tests/fixtures/duo.ped +0 -0
  148. {genmod-3.10 → genmod-3.10.2}/tests/fixtures/empty.vcf +0 -0
  149. {genmod-3.10 → genmod-3.10.2}/tests/fixtures/one_ind.ped +0 -0
  150. {genmod-3.10 → genmod-3.10.2}/tests/fixtures/recessive_trio.ped +0 -0
  151. {genmod-3.10 → genmod-3.10.2}/tests/fixtures/reduced_penetrance.tsv +0 -0
  152. {genmod-3.10 → genmod-3.10.2}/tests/fixtures/resources/small_spidex.tsv +0 -0
  153. {genmod-3.10 → genmod-3.10.2}/tests/fixtures/resources/small_spidex.tsv.gz +0 -0
  154. {genmod-3.10 → genmod-3.10.2}/tests/fixtures/resources/small_spidex.tsv.gz.tbi +0 -0
  155. {genmod-3.10 → genmod-3.10.2}/tests/fixtures/score_variants/genmod_example.ini +0 -0
  156. {genmod-3.10 → genmod-3.10.2}/tests/fixtures/test_vcf.vcf +0 -0
  157. {genmod-3.10 → genmod-3.10.2}/tests/fixtures/test_vcf_annotated.vcf +0 -0
  158. {genmod-3.10 → genmod-3.10.2}/tests/fixtures/test_vcf_annotated_empty.vcf +0 -0
  159. {genmod-3.10 → genmod-3.10.2}/tests/fixtures/test_vcf_annotated_scored.vcf +0 -0
  160. {genmod-3.10 → genmod-3.10.2}/tests/fixtures/test_vcf_regions.vcf +0 -0
  161. {genmod-3.10 → genmod-3.10.2}/tests/fixtures/test_vcf_regions_with_chr.vcf +0 -0
  162. {genmod-3.10 → genmod-3.10.2}/tests/functionality/test_annotate_models.py +0 -0
  163. {genmod-3.10 → genmod-3.10.2}/tests/functionality/test_annotate_variant.py +0 -0
  164. {genmod-3.10 → genmod-3.10.2}/tests/functionality/test_filter_variants.py +0 -0
  165. {genmod-3.10 → genmod-3.10.2}/tests/functionality/test_score_variants.py +0 -0
  166. {genmod-3.10 → genmod-3.10.2}/tests/functionality/test_score_variants_ranks_score_is_float.py +0 -0
  167. {genmod-3.10 → genmod-3.10.2}/tests/functionality/test_sort_variants.py +0 -0
  168. {genmod-3.10 → genmod-3.10.2}/tests/functionality/test_utils.py +0 -0
  169. {genmod-3.10 → genmod-3.10.2}/tests/genetic_models/test_dominant_model.py +0 -0
  170. {genmod-3.10 → genmod-3.10.2}/tests/genetic_models/test_x_dominant.py +0 -0
  171. {genmod-3.10 → genmod-3.10.2}/tests/genetic_models/test_x_recessive.py +0 -0
  172. {genmod-3.10 → genmod-3.10.2}/tests/score_variants/test_category_score.py +0 -0
  173. {genmod-3.10 → genmod-3.10.2}/tests/score_variants/test_config_parser.py +0 -0
  174. {genmod-3.10 → genmod-3.10.2}/tests/score_variants/test_rankscore_capping.py +0 -0
  175. {genmod-3.10 → genmod-3.10.2}/tests/utils/test_check_individuals.py +0 -0
  176. {genmod-3.10 → genmod-3.10.2}/tests/utils/test_check_vep_annotation.py +0 -0
  177. {genmod-3.10 → genmod-3.10.2}/tests/utils/test_generate_pairs.py +0 -0
  178. {genmod-3.10 → genmod-3.10.2}/tests/utils/test_get_annotation.py +0 -0
  179. {genmod-3.10 → genmod-3.10.2}/tests/utils/test_get_batches.py +0 -0
  180. {genmod-3.10 → genmod-3.10.2}/tests/utils/test_get_priority.py +0 -0
  181. {genmod-3.10 → genmod-3.10.2}/tests/utils/test_get_rank_score.py +0 -0
  182. {genmod-3.10 → genmod-3.10.2}/tests/utils/test_is_number.py +0 -0
  183. {genmod-3.10 → genmod-3.10.2}/tests/utils/test_variant_printer.py +0 -0
  184. {genmod-3.10 → genmod-3.10.2}/tests/variant_annotation/test_get_frequencies.py +0 -0
  185. {genmod-3.10 → genmod-3.10.2}/tests/variant_annotation/test_get_haploblocks.py +0 -0
  186. {genmod-3.10 → genmod-3.10.2}/tests/variant_annotation/test_get_tabix_records.py +0 -0
  187. {genmod-3.10 → genmod-3.10.2}/tests/vcf_tools/test_genotype.py +0 -0
  188. {genmod-3.10 → genmod-3.10.2}/tests/vcf_tools/test_header_parser.py +0 -0
  189. {genmod-3.10 → genmod-3.10.2}/tests/vcf_tools/test_parse_variant.py +0 -0
  190. {genmod-3.10 → genmod-3.10.2}/tests/vcf_tools/test_sorting.py +0 -0
@@ -8,6 +8,19 @@ Please add a new candidate release at the top after changing the latest one. Fee
8
8
 
9
9
  Try to use the following format:
10
10
 
11
+ ## [3.10.2]
12
+ ### Fixed
13
+ - Add scoring normalisation for flag lookup mode ([#177](https://github.com/Clinical-Genomics/genmod/pull/177))
14
+ - Fix crash on test for missing annotation key for phased mode ([#178](https://github.com/Clinical-Genomics/genmod/pull/178))
15
+ - Bugfixes related to multiprocessing stability and error handling ([#183](https://github.com/Clinical-Genomics/genmod/pull/183) and [#186](https://github.com/Clinical-Genomics/genmod/pull/186))
16
+ - Removed unused dependency ([#182](https://github.com/Clinical-Genomics/genmod/pull/182))
17
+
18
+ ## [3.10.1]
19
+ ### Fixed
20
+ - Documentation formatting for more modern mkdocs (pages to nav) ([#168](https://github.com/Clinical-Genomics/genmod/pull/168))
21
+ - Stable sort in bioconda (BusyBox sort) not recognizing long options ([#170](https://github.com/Clinical-Genomics/genmod/pull/170))
22
+ - Unstable `Annotation=` order in `genmod annotate --regions` ([#173](https://github.com/Clinical-Genomics/genmod/pull/173))
23
+
11
24
  ## [3.10]
12
25
  ### Changed
13
26
  - Use `uv` with `hatchling` to build and publish ([#104](https://github.com/Clinical-Genomics/genmod/issues/143))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: genmod
3
- Version: 3.10
3
+ Version: 3.10.2
4
4
  Summary: Annotate genetic inheritance models in Variant Call Format (VCF) files
5
5
  Project-URL: Repository, http://github.com/Clinical-Genomics/genmod
6
6
  Project-URL: Changelog, https://github.com/Clinical-Genomics/genmod/blob/main/CHANGELOG.md
@@ -29,7 +29,6 @@ Requires-Dist: intervaltree>=3.1.0
29
29
  Requires-Dist: ped-parser
30
30
  Requires-Dist: pytabix
31
31
  Requires-Dist: six
32
- Requires-Dist: vcftoolbox
33
32
  Description-Content-Type: text/markdown
34
33
 
35
34
  # GENMOD #
@@ -3,7 +3,7 @@
3
3
  This module performs ranking of compound variants.
4
4
 
5
5
  > [!WARNING]
6
- > Ranking of compound variants is only done for the the first family in the VCF.
6
+ > Ranking of compound variants is only done for the first family in the VCF.
7
7
 
8
8
  During the ranking of these compounds the rank score might be modified in place.
9
9
  See `genmod/score_variants/compound_scorer.py:L248`.
@@ -2,7 +2,7 @@
2
2
 
3
3
  <p align="center">
4
4
  <a href="https://github.com/Clinical-Genomics/genmod">
5
- <img src="https://github.com/Clinical-Genomics/genmod/raw/master/artwork/tree_man.JPG"/>
5
+ <img src="https://github.com/Clinical-Genomics/genmod/blob/main/artwork/tree_man.JPG"/>
6
6
  </a>
7
7
  </p>
8
8
 
@@ -10,7 +10,6 @@ Annotating and analyzing primarily genetic models in the [VCF](http://samtools.g
10
10
 
11
11
  ## Overview ##
12
12
 
13
-
14
13
  The main function is to annotate **accurate patterns of inheritance** for each
15
14
  variant in a vcf file including one or several families of arbitrary size.
16
15
 
@@ -130,7 +130,7 @@ class VariantAnnotator(Process):
130
130
 
131
131
  variant["compound_candidate"] = False
132
132
 
133
- if variant["annotation"]:
133
+ if variant.get("annotation"):
134
134
  variant["compound_candidate"] = True
135
135
  self.logger.debug("Set compound_candidate to True")
136
136
 
@@ -37,8 +37,9 @@ def annotate_variant(variant, annotation_arguments):
37
37
  regions = None
38
38
  if "region_trees" in annotation_arguments:
39
39
  regions = get_region(chrom, start, end, annotation_arguments["region_trees"])
40
+ sorted_regions = sorted(regions)
40
41
  if regions:
41
- info.append("Annotation={0}".format(",".join(regions)))
42
+ info.append("Annotation={0}".format(",".join(sorted_regions)))
42
43
 
43
44
  if "exac" in annotation_arguments:
44
45
  reader = annotation_arguments["exac"]
@@ -317,8 +317,13 @@ def models(
317
317
  logger.info("Seting up the variant printer")
318
318
  if len(model_checkers) == 1:
319
319
  print_headers(head=head, outfile=outfile, silent=silent)
320
+ if hasattr(outfile, "name"):
321
+ outfile_name = outfile.name
322
+ outfile.close()
323
+ else:
324
+ outfile_name = outfile
320
325
  variant_printer = VariantPrinter(
321
- task_queue=results, head=head, mode="normal", outfile=outfile
326
+ task_queue=results, head=head, mode="normal", outfile=outfile_name
322
327
  )
323
328
  else:
324
329
  # We use a temp file to store the processed variants
@@ -17,8 +17,9 @@ import os
17
17
  import sys
18
18
  from codecs import open
19
19
  from datetime import datetime
20
- from multiprocessing import JoinableQueue, Manager, cpu_count, util
20
+ from multiprocessing import JoinableQueue, Manager, cpu_count, log_to_stderr, util
21
21
  from tempfile import NamedTemporaryFile
22
+ from time import sleep
22
23
 
23
24
  import click
24
25
 
@@ -29,7 +30,8 @@ from genmod.vcf_tools import HeaderParser, add_metadata, print_headers, print_va
29
30
 
30
31
  from .utils import get_file_handle, outfile, processes, silent, temp_dir, variant_file
31
32
 
32
- logger = logging.getLogger(__name__)
33
+ logger = log_to_stderr(logging.INFO)
34
+ logging.basicConfig(stream=sys.stderr, force=True)
33
35
  util.abstract_sockets_supported = False
34
36
 
35
37
 
@@ -160,6 +162,15 @@ def compound(
160
162
  for i in range(num_scorers):
161
163
  variant_queue.put(None)
162
164
 
165
+ # Before joining on variant_queue, check whether workers have completed
166
+ # or failed, to avoid main process deadlock on never-decreasing queue semaphore.
167
+ while any([worker.is_alive() for worker in compound_scorers]):
168
+ sleep(1) # Don't churn CPU
169
+ for worker in compound_scorers:
170
+ if not worker.is_alive() and worker.exitcode != 0:
171
+ raise RuntimeError(f"Worker {worker} failed")
172
+ logger.debug(f"Worker {worker} alive")
173
+
163
174
  variant_queue.join()
164
175
  results.put(None)
165
176
  variant_printer.join()
@@ -172,7 +183,7 @@ def compound(
172
183
  for line in f:
173
184
  print_variant(variant_line=line, outfile=outfile, mode="modified", silent=silent)
174
185
  except Exception as e:
175
- logger.warning(e)
186
+ logger.error(e)
176
187
  for worker in compound_scorers:
177
188
  worker.terminate()
178
189
  variant_printer.terminate()
@@ -14,7 +14,8 @@ Copyright (c) 2013 __MyCompanyName__. All rights reserved.
14
14
  from __future__ import division, print_function
15
15
 
16
16
  import logging
17
- from multiprocessing import Process
17
+ import traceback
18
+ from multiprocessing import Process, log_to_stderr
18
19
  from typing import Dict, List, Tuple, Union
19
20
 
20
21
  from genmod.score_variants.cap_rank_score_to_min_bound import cap_rank_score_to_min_bound
@@ -26,7 +27,7 @@ from genmod.score_variants.score_variant import (
26
27
  )
27
28
  from genmod.vcf_tools import add_vcf_info, replace_vcf_info
28
29
 
29
- logger = logging.getLogger(__name__)
30
+ logger = log_to_stderr(level=logging.INFO)
30
31
 
31
32
 
32
33
  def get_rank_score(
@@ -169,7 +170,7 @@ class CompoundScorer(Process):
169
170
  )
170
171
  return variant_rankscore_normalization_bounds
171
172
 
172
- def run(self):
173
+ def _run(self):
173
174
  """Run the consuming"""
174
175
  logger.info("%s: Starting!" % self.proc_name)
175
176
  # Check if there are any batches in the queue
@@ -349,3 +350,11 @@ class CompoundScorer(Process):
349
350
  self.task_queue.task_done()
350
351
 
351
352
  return
353
+
354
+ def run(self, *args, **kwargs):
355
+ # Wrapper for catching errors in main method
356
+ try:
357
+ return self._run(*args, **kwargs)
358
+ except Exception as e:
359
+ logger.fatal(f"{e}:{traceback.format_exc()}")
360
+ raise e
@@ -29,8 +29,10 @@ class ModeLookup(Enum):
29
29
  STRING = 2
30
30
  # Score lookup in tree
31
31
  TREE = 3
32
+ # Score lookup is by determining if there is a value (flag set) or not
33
+ FLAG = 4
32
34
  # User provided score value
33
- UNBOUNDED_USER_DEFINED = 4
35
+ UNBOUNDED_USER_DEFINED = 5
34
36
 
35
37
 
36
38
  class ScoreFunction(object):
@@ -211,7 +213,8 @@ class ScoreFunction(object):
211
213
  mode_value: bool = bool(self._value_dict)
212
214
  mode_str: bool = bool(self._string_dict)
213
215
  mode_tree: bool = bool(self._interval_tree)
214
- if sum([mode_value, mode_str, mode_tree]) > 1:
216
+ mode_flag: bool = bool(self._reported_score)
217
+ if sum([mode_value, mode_str, mode_tree, mode_flag]) > 1:
215
218
  raise ValueError(
216
219
  "Unable to accurately determine what mapping to use for determining score range"
217
220
  )
@@ -221,6 +224,8 @@ class ScoreFunction(object):
221
224
  return ModeLookup.STRING
222
225
  if mode_tree:
223
226
  return ModeLookup.TREE
227
+ if mode_flag:
228
+ return ModeLookup.FLAG
224
229
 
225
230
  @property
226
231
  def score_range(self) -> List[float]:
@@ -247,18 +252,20 @@ class ScoreFunction(object):
247
252
  scores: list = []
248
253
  for interval in self._interval_tree.all_intervals:
249
254
  scores.append(interval.data) # tree.interval -> score
255
+ elif self._scoring_mode == ModeLookup.FLAG:
256
+ scores: list = []
257
+ scores.append(float(self._reported_score))
250
258
  else:
251
259
  raise NotImplementedError("Unknown scoring mode", self._scoring_mode)
252
260
 
253
- # Append set_reported and set_not_reported scores (as they're part of score value set)
254
261
  scores.append(float(self._not_reported_score))
255
- scores.append(float(self._reported_score))
256
262
 
257
263
  if not isinstance(scores, list) and len(scores) > 0:
258
264
  raise KeyError("Found no score values", scores)
259
265
  for score_value in scores:
260
266
  if not isinstance(score_value, float):
261
267
  raise TypeError("Invalid score type", score_value)
268
+
262
269
  return scores
263
270
 
264
271
  @property
@@ -12,12 +12,16 @@ Copyright (c) 2013 __MyCompanyName__. All rights reserved.
12
12
  from __future__ import print_function
13
13
 
14
14
  import logging
15
+ import sys
15
16
  from codecs import open
16
- from multiprocessing import Process
17
+ from multiprocessing import Process, log_to_stderr
17
18
 
18
19
  from genmod.utils import get_chromosome_priority, get_rank_score
19
20
  from genmod.vcf_tools import print_variant
20
21
 
22
+ logger = log_to_stderr(logging.INFO)
23
+ logging.basicConfig(stream=sys.stderr, force=True)
24
+
21
25
 
22
26
  class VariantPrinter(Process):
23
27
  """
@@ -45,7 +49,7 @@ class VariantPrinter(Process):
45
49
 
46
50
  def __init__(self, task_queue, head, mode="chromosome", outfile=None, silent=False):
47
51
  Process.__init__(self)
48
- self.logger = logging.getLogger(__name__)
52
+ self.logger = logger
49
53
  self.task_queue = task_queue
50
54
  self.outfile = outfile
51
55
  self.header = head.header
@@ -39,7 +39,7 @@ def sort_variants(infile, mode="chromosome"):
39
39
  if mode == "chromosome":
40
40
  command.append("-k1,1V") # Version sorting to deal with e.g. Un_* contigs
41
41
  command.append("-k3,3n") # Sorting positions numerically
42
- command.append("--stable")
42
+ command.append("-s")
43
43
 
44
44
  elif mode == "rank":
45
45
  command.append("-rn")
@@ -0,0 +1,22 @@
1
+ ---
2
+ site_name: genmod docs
3
+ site_description: Project documentation with Markdown
4
+ site_author: Måns Magnusson
5
+ site_url: https://clinical-genomics.github.io/genmod
6
+ repo_url: https://github.com/Clinical-Genomics/genmod
7
+
8
+ nav:
9
+ - Home: 'index.md'
10
+ - Genetic Models: 'genetic-models.md'
11
+ - Commands:
12
+ - Annotating Variants: 'commands/annotate-variants.md'
13
+ - Annotate Genetic Models: 'commands/annotate-models.md'
14
+ - Filter Variants: 'commands/filter-variants.md'
15
+ - Sort Variants: 'commands/sort-variants.md'
16
+ - Build References: 'commands/build-annotation.md'
17
+ - Score compounds: 'commands/score-compounds.md'
18
+ - Score variants: 'commands/score-variants.md'
19
+
20
+ dev_addr: "0.0.0.0:4000"
21
+ theme: mkdocs
22
+ docs_dir: docs
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "genmod"
3
- version = "3.10"
3
+ version = "3.10.2"
4
4
  description = "Annotate genetic inheritance models in Variant Call Format (VCF) files"
5
5
  authors = [{name="Mans Magnuson", email="mans.magnusson@scilifelab.se"}, {name="Tor Björgen", email="tor.bjorgen@scilifelab.se"}, {name="Felix Lenner", email="felix.lenner@scilifelab.se"}, {name="Anders Jemt", email="anders.jemt@scilifelab.se"}, {name="Daniel Nilsson", email="daniel.nilsson@ki.se"}]
6
6
  license = {text = "MIT License"}
@@ -33,7 +33,6 @@ dependencies = [
33
33
  "importlib_resources",
34
34
  "intervaltree >= 3.1.0",
35
35
  "extract_vcf",
36
- "vcftoolbox",
37
36
  "six",
38
37
  ]
39
38
 
@@ -71,3 +70,8 @@ lint = [
71
70
  "isort>=5.11.5",
72
71
  "ruff>=0.8.0",
73
72
  ]
73
+ docs = [
74
+ "mkdocs",
75
+ "mkdocs-material",
76
+ "markdown-include",
77
+ ]
@@ -134,3 +134,24 @@ def test_score_mode_string_lookup():
134
134
  # THEN expect the proper min max values
135
135
  assert score_function.score_min == -100
136
136
  assert score_function.score_max == 2
137
+
138
+
139
+ def test_score_mode_flag_lookup():
140
+ """Test ScoreFunctions min max bounds property."""
141
+ # GIVEN a score function with a flag reported/not_reported score
142
+ score_function = ScoreFunction(match_type="flag")
143
+ not_reported_score = -100
144
+ reported_score = 10
145
+ score_function.set_not_reported(not_reported_score)
146
+ score_function.set_reported(reported_score)
147
+
148
+ # WHEN accessing min max plugin score
149
+ # THEN expect the proper min max values
150
+ assert score_function.score_min == not_reported_score
151
+ assert score_function.score_max == reported_score
152
+
153
+ # WHEN asking for a missing value, THEN not reported is flagged and scored
154
+ assert score_function.get_score(None) == not_reported_score
155
+
156
+ # WHEN asking for a set value, THEN reported is flagged and scored
157
+ assert score_function.get_score("c'est une pipe") == reported_score