Skip to content

Commit 485e8cd

Browse files
committed
Merge branch 'other/MITY-18-replace-mity-report' of github.com:KCCG/mity into feature/MITY-32-rewrite-commands-and-add-classes
2 parents 4a5b235 + 4a69298 commit 485e8cd

9 files changed

+35
-57969
lines changed

docs/mity-report-annotations.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# mity report annotations
2+
3+
## Adding new annotations
4+
5+
1. Place annotations file (and index file) in `mitylib/annot`.
6+
2. Add a new vcfanno entry for the file in `vcfanno-config.toml`
7+
3. Add new fields in `annotations` and `excel_headers` in `report-config.yaml`.
8+
9+
```yaml
10+
excel_headers:
11+
- SAMPLE
12+
- HGVS
13+
- GENE/LOCUS
14+
...
15+
- YOUR NEW EXCEL HEADER
16+
```
17+
18+
Note that the order of headers in this yaml file represents the order of columns in the final excel file.
19+
20+
```yaml
21+
vcf_headers:
22+
annotations:
23+
GenBank_frequency_mitomap: GENBANK FREQUENCY MITOMAP
24+
MGRB_AC: MGRB AC
25+
MGRB_AN: MGRB AN
26+
...
27+
your_annotation_field_name: YOUR NEW EXCEL HEADER
28+
```
29+
30+
Note that `your_annotation_field_name` needs to match the info field name exactly.

mitylib/report.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
TODO: Mity report description.
2+
Adds annotations and generates mity excel report from VCF file.
33
"""
44

55
import logging
@@ -60,7 +60,9 @@ def find_highest_impact(self, impacts):
6060
if "LOW" in impacts:
6161
return "LOW"
6262

63-
raise ValueError("Unknown SO term.")
63+
logging.warning("Unknown SO term.")
64+
65+
return ""
6466

6567
def get_vep_values(self, variant):
6668
"""
@@ -393,7 +395,7 @@ def make_table(self):
393395
# that this is still valid.
394396
if "Genbank_frequency_mitomap" in sample.keys():
395397
allele_frequency_mitomap = round(
396-
float(sample["GenBank_frequency_mitomap"]) / 32050, 3
398+
float(sample["GenBank_frequency_mitomap"]) / 32059, 3
397399
)
398400
else:
399401
allele_frequency_mitomap = "."

mitylib/unzipped-annot/anticodon_positions.bed

Lines changed: 0 additions & 66 deletions
This file was deleted.

0 commit comments

Comments
 (0)