genmod 3.8.2__tar.gz → 3.9__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.
- {genmod-3.8.2/genmod.egg-info → genmod-3.9}/PKG-INFO +5 -16
- {genmod-3.8.2 → genmod-3.9}/README.md +23 -67
- {genmod-3.8.2 → genmod-3.9}/genmod/annotate_models/genetic_models.py +1 -1
- {genmod-3.8.2 → genmod-3.9}/genmod/commands/score_compounds.py +5 -1
- {genmod-3.8.2 → genmod-3.9}/genmod/score_variants/compound_scorer.py +8 -3
- {genmod-3.8.2 → genmod-3.9/genmod.egg-info}/PKG-INFO +5 -16
- {genmod-3.8.2 → genmod-3.9}/genmod.egg-info/entry_points.txt +1 -0
- {genmod-3.8.2 → genmod-3.9}/genmod.egg-info/requires.txt +1 -0
- {genmod-3.8.2 → genmod-3.9}/setup.py +4 -4
- {genmod-3.8.2 → genmod-3.9}/LICENSE.txt +0 -0
- {genmod-3.8.2 → genmod-3.9}/MANIFEST.in +0 -0
- {genmod-3.8.2 → genmod-3.9}/examples/dominant_trio.ped +0 -0
- {genmod-3.8.2 → genmod-3.9}/examples/multi_allele_example.vcf +0 -0
- {genmod-3.8.2 → genmod-3.9}/examples/multi_family.ped +0 -0
- {genmod-3.8.2 → genmod-3.9}/examples/recessive_trio.ped +0 -0
- {genmod-3.8.2 → genmod-3.9}/examples/small_1000G.vcf +0 -0
- {genmod-3.8.2 → genmod-3.9}/examples/small_1000G.vcf.gz +0 -0
- {genmod-3.8.2 → genmod-3.9}/examples/small_1000G.vcf.gz.tbi +0 -0
- {genmod-3.8.2 → genmod-3.9}/examples/small_1000G_CADD.tsv.gz +0 -0
- {genmod-3.8.2 → genmod-3.9}/examples/small_1000G_CADD.tsv.gz.tbi +0 -0
- {genmod-3.8.2 → genmod-3.9}/examples/small_CADD.tsv.gz +0 -0
- {genmod-3.8.2 → genmod-3.9}/examples/small_CADD.tsv.gz.tbi +0 -0
- {genmod-3.8.2 → genmod-3.9}/examples/small_dbNSFP.txt.gz +0 -0
- {genmod-3.8.2 → genmod-3.9}/examples/small_dbNSFP.txt.gz.tbi +0 -0
- {genmod-3.8.2 → genmod-3.9}/examples/small_vep.vcf +0 -0
- {genmod-3.8.2 → genmod-3.9}/examples/test_phased_compounds.vcf +0 -0
- {genmod-3.8.2 → genmod-3.9}/examples/test_vcf.vcf +0 -0
- {genmod-3.8.2 → genmod-3.9}/examples/test_vcf_regions.vcf +0 -0
- {genmod-3.8.2 → genmod-3.9}/examples/test_vcf_regions_models.vcf +0 -0
- {genmod-3.8.2 → genmod-3.9}/examples/test_vcf_regions_models_scored.vcf +0 -0
- {genmod-3.8.2 → genmod-3.9}/genmod/__init__.py +0 -0
- {genmod-3.8.2 → genmod-3.9}/genmod/annotate_models/__init__.py +0 -0
- {genmod-3.8.2 → genmod-3.9}/genmod/annotate_models/fix_variant.py +0 -0
- {genmod-3.8.2 → genmod-3.9}/genmod/annotate_models/make_haploblocks.py +0 -0
- {genmod-3.8.2 → genmod-3.9}/genmod/annotate_models/model_score.py +0 -0
- {genmod-3.8.2 → genmod-3.9}/genmod/annotate_models/models/__init__.py +0 -0
- {genmod-3.8.2 → genmod-3.9}/genmod/annotate_models/models/compound_model.py +0 -0
- {genmod-3.8.2 → genmod-3.9}/genmod/annotate_models/models/dominant_model.py +0 -0
- {genmod-3.8.2 → genmod-3.9}/genmod/annotate_models/models/recessive_model.py +0 -0
- {genmod-3.8.2 → genmod-3.9}/genmod/annotate_models/models/x_models.py +0 -0
- {genmod-3.8.2 → genmod-3.9}/genmod/annotate_models/variant_annotator.py +0 -0
- {genmod-3.8.2 → genmod-3.9}/genmod/annotate_regions/__init__.py +0 -0
- {genmod-3.8.2 → genmod-3.9}/genmod/annotate_regions/get_features.py +0 -0
- {genmod-3.8.2 → genmod-3.9}/genmod/annotate_regions/parse_annotations.py +0 -0
- {genmod-3.8.2 → genmod-3.9}/genmod/annotate_variants/__init__.py +0 -0
- {genmod-3.8.2 → genmod-3.9}/genmod/annotate_variants/add_annotations.py +0 -0
- {genmod-3.8.2 → genmod-3.9}/genmod/annotate_variants/annotate.py +0 -0
- {genmod-3.8.2 → genmod-3.9}/genmod/annotate_variants/read_tabix_files.py +0 -0
- {genmod-3.8.2 → genmod-3.9}/genmod/annotations/__init__.py +0 -0
- {genmod-3.8.2 → genmod-3.9}/genmod/annotations/ensembl_genes_37.txt.gz +0 -0
- {genmod-3.8.2 → genmod-3.9}/genmod/annotations/ensembl_genes_38.txt.gz +0 -0
- {genmod-3.8.2 → genmod-3.9}/genmod/commands/__init__.py +0 -0
- {genmod-3.8.2 → genmod-3.9}/genmod/commands/analyze.py +0 -0
- {genmod-3.8.2 → genmod-3.9}/genmod/commands/annotate_models.py +0 -0
- {genmod-3.8.2 → genmod-3.9}/genmod/commands/annotate_variant.py +0 -0
- {genmod-3.8.2 → genmod-3.9}/genmod/commands/base.py +0 -0
- {genmod-3.8.2 → genmod-3.9}/genmod/commands/filter_variants.py +0 -0
- {genmod-3.8.2 → genmod-3.9}/genmod/commands/genmod_sort.py +0 -0
- {genmod-3.8.2 → genmod-3.9}/genmod/commands/score_variants.py +0 -0
- {genmod-3.8.2 → genmod-3.9}/genmod/commands/summarize_variants.py +0 -0
- {genmod-3.8.2 → genmod-3.9}/genmod/commands/utils.py +0 -0
- {genmod-3.8.2 → genmod-3.9}/genmod/configs/genmod_test.v1.5.ini +0 -0
- {genmod-3.8.2 → genmod-3.9}/genmod/configs/rank_model_cmms_v1.7.ini +0 -0
- {genmod-3.8.2 → genmod-3.9}/genmod/configs/rank_model_cmms_v1.9.ini +0 -0
- {genmod-3.8.2 → genmod-3.9}/genmod/errors/__init__.py +0 -0
- {genmod-3.8.2 → genmod-3.9}/genmod/errors/warning.py +0 -0
- {genmod-3.8.2 → genmod-3.9}/genmod/log.py +0 -0
- {genmod-3.8.2 → genmod-3.9}/genmod/score_variants/__init__.py +0 -0
- {genmod-3.8.2 → genmod-3.9}/genmod/score_variants/cap_rank_score_to_min_bound.py +0 -0
- {genmod-3.8.2 → genmod-3.9}/genmod/score_variants/check_plugins.py +0 -0
- {genmod-3.8.2 → genmod-3.9}/genmod/score_variants/config_parser.py +0 -0
- {genmod-3.8.2 → genmod-3.9}/genmod/score_variants/rank_score_variant_definitions.py +0 -0
- {genmod-3.8.2 → genmod-3.9}/genmod/score_variants/score_function.py +0 -0
- {genmod-3.8.2 → genmod-3.9}/genmod/score_variants/score_variant.py +0 -0
- {genmod-3.8.2 → genmod-3.9}/genmod/utils/__init__.py +0 -0
- {genmod-3.8.2 → genmod-3.9}/genmod/utils/check_individuals.py +0 -0
- {genmod-3.8.2 → genmod-3.9}/genmod/utils/get_batches.py +0 -0
- {genmod-3.8.2 → genmod-3.9}/genmod/utils/get_features.py +0 -0
- {genmod-3.8.2 → genmod-3.9}/genmod/utils/get_priority.py +0 -0
- {genmod-3.8.2 → genmod-3.9}/genmod/utils/is_number.py +0 -0
- {genmod-3.8.2 → genmod-3.9}/genmod/utils/pair_generator.py +0 -0
- {genmod-3.8.2 → genmod-3.9}/genmod/utils/variant_printer.py +0 -0
- {genmod-3.8.2 → genmod-3.9}/genmod/vcf_tools/__init__.py +0 -0
- {genmod-3.8.2 → genmod-3.9}/genmod/vcf_tools/add_metadata.py +0 -0
- {genmod-3.8.2 → genmod-3.9}/genmod/vcf_tools/add_variant_information.py +0 -0
- {genmod-3.8.2 → genmod-3.9}/genmod/vcf_tools/check_info_header.py +0 -0
- {genmod-3.8.2 → genmod-3.9}/genmod/vcf_tools/genotype.py +0 -0
- {genmod-3.8.2 → genmod-3.9}/genmod/vcf_tools/get_genotypes.py +0 -0
- {genmod-3.8.2 → genmod-3.9}/genmod/vcf_tools/header_parser.py +0 -0
- {genmod-3.8.2 → genmod-3.9}/genmod/vcf_tools/parse_variant.py +0 -0
- {genmod-3.8.2 → genmod-3.9}/genmod/vcf_tools/print_headers.py +0 -0
- {genmod-3.8.2 → genmod-3.9}/genmod/vcf_tools/print_variants.py +0 -0
- {genmod-3.8.2 → genmod-3.9}/genmod/vcf_tools/sort_variants.py +0 -0
- {genmod-3.8.2 → genmod-3.9}/genmod.egg-info/SOURCES.txt +0 -0
- {genmod-3.8.2 → genmod-3.9}/genmod.egg-info/dependency_links.txt +0 -0
- {genmod-3.8.2 → genmod-3.9}/genmod.egg-info/top_level.txt +0 -0
- {genmod-3.8.2 → genmod-3.9}/setup.cfg +0 -0
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
Metadata-Version: 2
|
|
1
|
+
Metadata-Version: 1.2
|
|
2
2
|
Name: genmod
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.9
|
|
4
4
|
Summary: Annotate genetic inheritance models in variant files
|
|
5
|
-
Home-page: http://github.com/
|
|
5
|
+
Home-page: http://github.com/Clinical-Genomics/genmod
|
|
6
6
|
Author: Mans Magnusson
|
|
7
7
|
Author-email: mans.magnusson@scilifelab.se
|
|
8
8
|
License: MIT License
|
|
9
|
+
Description: Tool for annotating patterns of genetic inheritance in Variant Call Format (VCF) files.
|
|
9
10
|
Keywords: inheritance,vcf,variants
|
|
11
|
+
Platform: UNKNOWN
|
|
10
12
|
Classifier: Programming Language :: Python
|
|
11
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
12
13
|
Classifier: License :: OSI Approved :: MIT License
|
|
13
14
|
Classifier: Development Status :: 4 - Beta
|
|
14
15
|
Classifier: Operating System :: MacOS :: MacOS X
|
|
@@ -16,15 +17,3 @@ Classifier: Operating System :: Unix
|
|
|
16
17
|
Classifier: Intended Audience :: Science/Research
|
|
17
18
|
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
|
|
18
19
|
Requires-Python: ~=3.8.0
|
|
19
|
-
License-File: LICENSE.txt
|
|
20
|
-
Requires-Dist: ped_parser>=1.6.6
|
|
21
|
-
Requires-Dist: pytabix>=0.1
|
|
22
|
-
Requires-Dist: pytest>=7.3.1
|
|
23
|
-
Requires-Dist: interval_tree>=0.3.4
|
|
24
|
-
Requires-Dist: click>=8.1.3
|
|
25
|
-
Requires-Dist: configobj>=5.0.8
|
|
26
|
-
Requires-Dist: intervaltree>=3.1.0
|
|
27
|
-
Requires-Dist: extract_vcf>=0.5
|
|
28
|
-
Requires-Dist: vcftoolbox>=1.5.1
|
|
29
|
-
|
|
30
|
-
Tool for annotating patterns of genetic inheritance in Variant Call Format (VCF) files.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
[](https://doi.org/10.5281/zenodo.3841142)
|
|
6
|
-
|
|
6
|
+
![Build Status - GitHub][actions-build-status]
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
**GENMOD** is a simple to use command line tool for annotating and analyzing genomic variations in the [VCF](http://samtools.github.io/hts-specs/VCFv4.1.pdf) file format.
|
|
@@ -17,7 +17,7 @@ The tools in the genmod suite are:
|
|
|
17
17
|
- **genmod score**, Score the variants of a vcf based on their annotation
|
|
18
18
|
- **genmod filter**, Filter the variants of a vcf based on their annotation
|
|
19
19
|
|
|
20
|
-
##Installation
|
|
20
|
+
## Installation
|
|
21
21
|
|
|
22
22
|
**GENMOD**
|
|
23
23
|
|
|
@@ -25,18 +25,16 @@ The tools in the genmod suite are:
|
|
|
25
25
|
|
|
26
26
|
or
|
|
27
27
|
|
|
28
|
-
git clone https://github.com/
|
|
28
|
+
git clone https://github.com/Clinical-Genomics/genmod.git
|
|
29
29
|
cd genmod
|
|
30
30
|
python setup.py install
|
|
31
31
|
|
|
32
32
|
|
|
33
|
-
##
|
|
33
|
+
## Usage
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
*This is an overview, for more in depth documentation see [documentation](http://moonso.github.io/genmod/)*
|
|
35
|
+
*This is an overview, for more in depth documentation see [documentation](https://Clinical-Genomics.github.io/genmod)*
|
|
37
36
|
|
|
38
|
-
|
|
39
|
-
### Example: ###
|
|
37
|
+
### Example
|
|
40
38
|
|
|
41
39
|
|
|
42
40
|
The following command should work when installed successfully. The files are distributed with the package.
|
|
@@ -139,17 +137,18 @@ $genmod models <vcf_file> -f/--family_file <family.ped>
|
|
|
139
137
|
|
|
140
138
|
```
|
|
141
139
|
|
|
142
|
-
|
|
143
|
-
|
|
140
|
+
#### genmod annotate
|
|
144
141
|
|
|
142
|
+
```
|
|
145
143
|
genmod annotate variant_file.vcf
|
|
144
|
+
```
|
|
146
145
|
|
|
147
146
|
This will print a new vcf to standard out with all variants annotated according to the statements below.
|
|
148
147
|
All individuals described in the [ped](http://pngu.mgh.harvard.edu/~purcell/plink/data.shtml#ped) file must be present in the vcf file
|
|
149
148
|
|
|
150
149
|
See examples in the folder ```genmod/examples```.
|
|
151
150
|
|
|
152
|
-
**From version 1.9 genmod can split multiallelic calls in
|
|
151
|
+
**From version 1.9 genmod can split multiallelic calls in VCFs: use flag `-split/--split_variants`.**
|
|
153
152
|
|
|
154
153
|
To get an example of how splitting variants work, run genmod on the file ```examples/multi_allele_example.vcf``` with the dominant trio.
|
|
155
154
|
That is:
|
|
@@ -157,12 +156,6 @@ That is:
|
|
|
157
156
|
|
|
158
157
|
Compare the result when not using the ```-split``` flag.
|
|
159
158
|
|
|
160
|
-
Genmod is distributed with a annotation database that is built from the refGene data.
|
|
161
|
-
If the user wants to build a new annotation set use the command below:
|
|
162
|
-
|
|
163
|
-
genmod build_annotation [--type] annotation_file
|
|
164
|
-
|
|
165
|
-
|
|
166
159
|
Each variant in the VCF-file will be annotated with which genetic models that are followed in the family if a family file
|
|
167
160
|
(ped file) is provided.
|
|
168
161
|
|
|
@@ -184,7 +177,7 @@ It is possible to run without a family file, in this case all variants will be a
|
|
|
184
177
|
|
|
185
178
|
[Variant Effect Predictor](http://www.ensembl.org/info/docs/tools/vep/index.html)(vep) annotations are supported, use the ```--vep```-flag if variants are already annotated with vep.
|
|
186
179
|
|
|
187
|
-
**GENMOD** will add
|
|
180
|
+
**GENMOD** will add entries to the INFO column for the given VCF file depending on what information is given.
|
|
188
181
|
|
|
189
182
|
If ```--vep``` is NOT provided:
|
|
190
183
|
|
|
@@ -222,36 +215,7 @@ All annotations will be present only if they have a value.
|
|
|
222
215
|
- If you want canonical splice site region to be bigger than 2 base pairs on each side of the exons, use `-splice/--splice_padding <integer>`
|
|
223
216
|
- The `-strict/--strict` flag tells **genmod** to only annotate genetic models if they are proved by the data. If a variant is not called in a family member it will not be annotated.
|
|
224
217
|
|
|
225
|
-
|
|
226
|
-
###genmod build_annotation###
|
|
227
|
-
|
|
228
|
-
genmod build_annotation [--type] [-o/--outdir] annotation_file
|
|
229
|
-
|
|
230
|
-
The following file formats are supported for building new annotations:
|
|
231
|
-
|
|
232
|
-
- bed
|
|
233
|
-
- ccds
|
|
234
|
-
- gtf
|
|
235
|
-
- gene_pred
|
|
236
|
-
|
|
237
|
-
The user can also specify the amount of positions around exon boundaries that should be considered as splice sites. Use
|
|
238
|
-
|
|
239
|
-
```--splice_padding INTEGER```
|
|
240
|
-
|
|
241
|
-
###genmod analyze###
|
|
242
|
-
|
|
243
|
-
From version 1.6 there is also a tool for analyzing the variants annotated by **genmod**. This tool will look at all variants in a vcf and do an analysis based on which inheritance patterns they follow. The variants are then ranked based on the cadd scores, the highest ranked variants for each category is printed to screen and the full list for each category is printed to new vcf files.
|
|
244
|
-
Run with:
|
|
245
|
-
|
|
246
|
-
genmod analyze path/to/file.vcf
|
|
247
|
-
|
|
248
|
-
For more information do
|
|
249
|
-
|
|
250
|
-
genmod analyze --help
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
### genmod sort ###
|
|
254
|
-
|
|
218
|
+
#### genmod sort
|
|
255
219
|
|
|
256
220
|
Sort a VCF file based on Rank Score.
|
|
257
221
|
|
|
@@ -269,18 +233,9 @@ Options:
|
|
|
269
233
|
--help Show this message and exit.
|
|
270
234
|
```
|
|
271
235
|
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
Tool to get basic statistics of the annotated in a vcf file.
|
|
275
|
-
Run
|
|
276
|
-
|
|
277
|
-
genmod summarize --help
|
|
236
|
+
## Conditions for Genetic Models
|
|
278
237
|
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
## Conditions for Genetic Models ##
|
|
282
|
-
|
|
283
|
-
### Short explanation of genotype calls in VCF format:###
|
|
238
|
+
### Short explanation of genotype calls in VCF format
|
|
284
239
|
|
|
285
240
|
Since we only look at humans, that are diploid, the genotypes represent what we see on both alleles in a single position.
|
|
286
241
|
0 represents the reference sequence, 1 is the first of the alternative alleles, 2 second alternative and so on.
|
|
@@ -290,8 +245,7 @@ Some chromosomes are only present in one copy in humans, here it is allowed to o
|
|
|
290
245
|
|
|
291
246
|
If phasing has been done the pairs are not unordered anymore and the delimiter is then changed to '|', so one can be heterozygote in two ways; 0|1 or 1|0.
|
|
292
247
|
|
|
293
|
-
|
|
294
|
-
### Autosomal Recessive ###
|
|
248
|
+
### Autosomal Recessive
|
|
295
249
|
|
|
296
250
|
For this model individuals can be carriers so healthy individuals can be heterozygous. Both alleles need to have the variant for an individual to be sick so a healthy individual can not be homozygous alternative and a sick individual *has* to be homozygous alternative.
|
|
297
251
|
|
|
@@ -300,14 +254,13 @@ For this model individuals can be carriers so healthy individuals can be heteroz
|
|
|
300
254
|
* Variant is considered _de novo_ if both parents are genotyped and do not carry the variant
|
|
301
255
|
|
|
302
256
|
|
|
303
|
-
### Autosomal Dominant
|
|
257
|
+
### Autosomal Dominant
|
|
304
258
|
|
|
305
259
|
* Affected individuals have to be heterozygous (het.)
|
|
306
260
|
* Healthy individuals cannot have the alternative variant
|
|
307
261
|
* Variant is considered _de novo_ if both parents are genotyped and do not carry the variant
|
|
308
262
|
|
|
309
|
-
|
|
310
|
-
### Autosomal Compound Heterozygote ###
|
|
263
|
+
### Autosomal Compound Heterozygote
|
|
311
264
|
|
|
312
265
|
This model includes pairs of exonic variants that are present within the same gene.
|
|
313
266
|
**The default behaviour of GENMOD is to look for compounds only in exonic/canonical splice sites**.
|
|
@@ -326,7 +279,7 @@ If the user wants all variants in genes checked use the flag -gene/--whole_gene.
|
|
|
326
279
|
* If only one or no variant is found in parents it is considered _de novo_
|
|
327
280
|
|
|
328
281
|
|
|
329
|
-
### X-Linked Dominant
|
|
282
|
+
### X-Linked Dominant
|
|
330
283
|
|
|
331
284
|
These traits are inherited on the x-chromosome, of which men have one allele and women have two.
|
|
332
285
|
|
|
@@ -338,7 +291,7 @@ These traits are inherited on the x-chromosome, of which men have one allele and
|
|
|
338
291
|
* If sex is female variant is considered _de novo_ if none of the parents carry the variant
|
|
339
292
|
|
|
340
293
|
|
|
341
|
-
### X Linked Recessive
|
|
294
|
+
### X Linked Recessive
|
|
342
295
|
|
|
343
296
|
* Variant has to be on chromosome X
|
|
344
297
|
* Affected males have to be het. or hom. alt. (het is theoretically not possible in males, but can occur due to Pseudo Autosomal Regions).
|
|
@@ -347,4 +300,7 @@ These traits are inherited on the x-chromosome, of which men have one allele and
|
|
|
347
300
|
* Healthy males cannot carry the variant
|
|
348
301
|
* If sex is male the variant is considered _de novo_ if mother is genotyped and does not carry the variant
|
|
349
302
|
* If sex is female variant is considered _de novo_ if not both parents carry the variant
|
|
350
|
-
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
[actions-build-status]: https://github.com/Clinical-Genomics/genmod/actions/workflows/build_and_publish.yml/badge.svg
|
|
@@ -144,7 +144,7 @@ def check_genetic_models(variant_batch, families, phased = False,
|
|
|
144
144
|
|
|
145
145
|
# Only check X-linked for the variants in the X-chromosome:
|
|
146
146
|
# For X-linked we do not need to check the other models
|
|
147
|
-
if variant['CHROM']
|
|
147
|
+
if variant['CHROM'] in ['X', 'chrX']:
|
|
148
148
|
if check_X_recessive(variant, family, strict):
|
|
149
149
|
variant['inheritance_models'][family_id]['XR'] = True
|
|
150
150
|
for individual_id in individuals:
|
|
@@ -45,8 +45,10 @@ util.abstract_sockets_supported = False
|
|
|
45
45
|
is_flag=True,
|
|
46
46
|
help='If variants are annotated with the Variant Effect Predictor.'
|
|
47
47
|
)
|
|
48
|
+
@click.option('--threshold', type=int, help="Threshold for model-dependent penalty if no compounds with passing score", default=9)
|
|
49
|
+
@click.option('--penalty', type=int, help="Penalty applied together with --threshold", default=6)
|
|
48
50
|
@click.pass_context
|
|
49
|
-
def compound(context, variant_file, silent, outfile, vep, processes, temp_dir):
|
|
51
|
+
def compound(context, variant_file, silent, outfile, vep, threshold: int, penalty: int, processes, temp_dir):
|
|
50
52
|
"""
|
|
51
53
|
Score compound variants in a vcf file based on their rank score.
|
|
52
54
|
"""
|
|
@@ -110,6 +112,8 @@ def compound(context, variant_file, silent, outfile, vep, processes, temp_dir):
|
|
|
110
112
|
task_queue=variant_queue,
|
|
111
113
|
results_queue=results,
|
|
112
114
|
individuals=individuals,
|
|
115
|
+
threshold=threshold,
|
|
116
|
+
penalty=penalty,
|
|
113
117
|
)
|
|
114
118
|
for i in range(num_scorers)
|
|
115
119
|
]
|
|
@@ -90,7 +90,7 @@ class CompoundScorer(Process):
|
|
|
90
90
|
the results queue.
|
|
91
91
|
"""
|
|
92
92
|
|
|
93
|
-
def __init__(self, task_queue, results_queue, individuals):
|
|
93
|
+
def __init__(self, task_queue, results_queue, individuals, threshold: int, penalty: int):
|
|
94
94
|
"""
|
|
95
95
|
Initialize the VariantAnnotator
|
|
96
96
|
|
|
@@ -119,6 +119,9 @@ class CompoundScorer(Process):
|
|
|
119
119
|
logger.debug("Setting up individuals")
|
|
120
120
|
self.individuals = individuals
|
|
121
121
|
|
|
122
|
+
self.threshold = threshold
|
|
123
|
+
self.penalty = penalty
|
|
124
|
+
|
|
122
125
|
if len(self.individuals) == 1:
|
|
123
126
|
self.models = ['AR_comp', 'AR_comp_dn', 'AD', 'AD_dn']
|
|
124
127
|
else:
|
|
@@ -235,7 +238,7 @@ class CompoundScorer(Process):
|
|
|
235
238
|
for compound_id in compound_list:
|
|
236
239
|
compound_rank_score = rank_scores[rank_score_type][compound_id]
|
|
237
240
|
if compound_rank_score > get_rank_score(rank_score_type=rank_score_type,
|
|
238
|
-
threshold=
|
|
241
|
+
threshold=self.threshold,
|
|
239
242
|
min_rank_score_value=variant_rankscore_normalization_bounds[variant_id][0],
|
|
240
243
|
max_rank_score_value=variant_rankscore_normalization_bounds[variant_id][1]
|
|
241
244
|
):
|
|
@@ -246,7 +249,7 @@ class CompoundScorer(Process):
|
|
|
246
249
|
logger.debug("correcting rank score for {0}".format(
|
|
247
250
|
variant_id))
|
|
248
251
|
current_rank_score -= get_rank_score_as_magnitude(rank_score_type=rank_score_type,
|
|
249
|
-
rank_score=
|
|
252
|
+
rank_score=self.penalty,
|
|
250
253
|
min_rank_score_value=variant_rankscore_normalization_bounds[variant_id][0],
|
|
251
254
|
max_rank_score_value=variant_rankscore_normalization_bounds[variant_id][1]
|
|
252
255
|
)
|
|
@@ -267,6 +270,8 @@ class CompoundScorer(Process):
|
|
|
267
270
|
new_compound = "{0}>{1}".format(compound_id, compound_score)
|
|
268
271
|
scored_compound_list.append(new_compound)
|
|
269
272
|
|
|
273
|
+
# Sort compound variants lexicographically
|
|
274
|
+
scored_compound_list.sort()
|
|
270
275
|
new_compound_string = "{0}:{1}".format(
|
|
271
276
|
compound_family_id, '|'.join(scored_compound_list))
|
|
272
277
|
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
Metadata-Version: 2
|
|
1
|
+
Metadata-Version: 1.2
|
|
2
2
|
Name: genmod
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.9
|
|
4
4
|
Summary: Annotate genetic inheritance models in variant files
|
|
5
|
-
Home-page: http://github.com/
|
|
5
|
+
Home-page: http://github.com/Clinical-Genomics/genmod
|
|
6
6
|
Author: Mans Magnusson
|
|
7
7
|
Author-email: mans.magnusson@scilifelab.se
|
|
8
8
|
License: MIT License
|
|
9
|
+
Description: Tool for annotating patterns of genetic inheritance in Variant Call Format (VCF) files.
|
|
9
10
|
Keywords: inheritance,vcf,variants
|
|
11
|
+
Platform: UNKNOWN
|
|
10
12
|
Classifier: Programming Language :: Python
|
|
11
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
12
13
|
Classifier: License :: OSI Approved :: MIT License
|
|
13
14
|
Classifier: Development Status :: 4 - Beta
|
|
14
15
|
Classifier: Operating System :: MacOS :: MacOS X
|
|
@@ -16,15 +17,3 @@ Classifier: Operating System :: Unix
|
|
|
16
17
|
Classifier: Intended Audience :: Science/Research
|
|
17
18
|
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
|
|
18
19
|
Requires-Python: ~=3.8.0
|
|
19
|
-
License-File: LICENSE.txt
|
|
20
|
-
Requires-Dist: ped_parser>=1.6.6
|
|
21
|
-
Requires-Dist: pytabix>=0.1
|
|
22
|
-
Requires-Dist: pytest>=7.3.1
|
|
23
|
-
Requires-Dist: interval_tree>=0.3.4
|
|
24
|
-
Requires-Dist: click>=8.1.3
|
|
25
|
-
Requires-Dist: configobj>=5.0.8
|
|
26
|
-
Requires-Dist: intervaltree>=3.1.0
|
|
27
|
-
Requires-Dist: extract_vcf>=0.5
|
|
28
|
-
Requires-Dist: vcftoolbox>=1.5.1
|
|
29
|
-
|
|
30
|
-
Tool for annotating patterns of genetic inheritance in Variant Call Format (VCF) files.
|
|
@@ -20,11 +20,11 @@ except (IOError, ImportError, RuntimeError):
|
|
|
20
20
|
long_description = 'Tool for annotating patterns of genetic inheritance in Variant Call Format (VCF) files.'
|
|
21
21
|
|
|
22
22
|
setup(name='genmod',
|
|
23
|
-
version='3.
|
|
23
|
+
version='3.9',
|
|
24
24
|
description='Annotate genetic inheritance models in variant files',
|
|
25
25
|
author = 'Mans Magnusson',
|
|
26
26
|
author_email = 'mans.magnusson@scilifelab.se',
|
|
27
|
-
url = 'http://github.com/
|
|
27
|
+
url = 'http://github.com/Clinical-Genomics/genmod',
|
|
28
28
|
license = 'MIT License',
|
|
29
29
|
python_requires="~=3.8.0",
|
|
30
30
|
install_requires=[
|
|
@@ -36,7 +36,8 @@ setup(name='genmod',
|
|
|
36
36
|
'configobj >= 5.0.8',
|
|
37
37
|
'intervaltree >= 3.1.0',
|
|
38
38
|
'extract_vcf >= 0.5',
|
|
39
|
-
'vcftoolbox >= 1.5.1'
|
|
39
|
+
'vcftoolbox >= 1.5.1',
|
|
40
|
+
'six >= 1.16.0',
|
|
40
41
|
],
|
|
41
42
|
packages=find_packages(
|
|
42
43
|
exclude=('tests*', 'docs', 'examples', 'configs')
|
|
@@ -52,7 +53,6 @@ setup(name='genmod',
|
|
|
52
53
|
keywords = ['inheritance', 'vcf', 'variants'],
|
|
53
54
|
classifiers = [
|
|
54
55
|
"Programming Language :: Python",
|
|
55
|
-
"Programming Language :: Python :: 3.8",
|
|
56
56
|
"License :: OSI Approved :: MIT License",
|
|
57
57
|
"Development Status :: 4 - Beta",
|
|
58
58
|
"Operating System :: MacOS :: MacOS X",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|