Commit a358048
authored
Mergelines (#15)
* dictionary comparison
* fixed issue so FORMAT sample values in VCF file are all present
* added format to compare_and_merge_lines
* edited format to compare_and_merge_lines
* tidy
* tidy
* edited test function name
* edited test function name
* edited test function
* deal with nested dictionaries better
* reformatting function format_sample_values
* tests passed
* Extensive Refactor
Major changes to convertGVFtoVCF:
- removed compare_and_merge lines and placed functions into VCFlines file
Major changes to VCF line:
- improved single responsibility principle
- added many functions.
Function moved from VCFlines to Utils.py (build_iupac_ambiguitycode)
New files added:
- Lookup.py for referencing
- New test files: test_assisting_converter, test_logger, test_utils, test_vcfline (separated out tests to match the file structure)
Optimised the function: read_in_gvf_file by removing extraneous for loop
* removed redundant code and moved code to setUp
* added comments
* removed empty lines
* focused on removing INFO string. Use info_dict to store values. Uses __str__ to write the vcf line object
* check for presence in dictionary before deletion
* correct formatting IMPRECISE in INFO
* removed dead code
* removed dead code
* removed empty line
* added comments
* removed dead code
* replaced with f-string
* minor edit
* ordered the format keys and format the FORMAT keys string in __str__
* minor docstring edit
* removed format_values_by_sample_string
* removed duplicate merged VCF lines. removed extraneous ID in INFO
* adjusted algorithm for merging
* edited testing
* minor edit
* edited test_format_sample_values1 parent 7af0590 commit a358048
File tree
10 files changed
+892
-666
lines changed- convert_gvf_to_vcf
- tests
10 files changed
+892
-666
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
99 | | - | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
37 | 61 | | |
38 | 62 | | |
39 | 63 | | |
40 | 64 | | |
41 | 65 | | |
42 | 66 | | |
43 | 67 | | |
44 | | - | |
| 68 | + | |
| 69 | + | |
45 | 70 | | |
46 | 71 | | |
47 | 72 | | |
| |||
54 | 79 | | |
55 | 80 | | |
56 | 81 | | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
62 | 85 | | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
0 commit comments