Skip to content

Commit

Permalink
Fix sorting of variants
Browse files Browse the repository at this point in the history
  • Loading branch information
fellen31 committed Nov 14, 2024
1 parent e45ff43 commit 8569e0c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Try to use the following format:
- The optional fields Source and Version are allowed in the VCF header([#106](https://github.com/Clinical-Genomics/genmod/pull/106))
- Released the constraint on Python 3.8 (collections, pkg_resources to importlib, tests) ([#142](https://github.com/Clinical-Genomics/genmod/pull/142))
- Update annotation examples ([#144](https://github.com/Clinical-Genomics/genmod/pull/144))

- Fixed sorting of variants ([#152](https://github.com/Clinical-Genomics/genmod/pull/152))

## [3.9]
- Fixed wrong models when chromosome X was named `chrX` and not `X` ([#135](https://github.com/Clinical-Genomics/genmod/pull/135))
Expand Down
5 changes: 2 additions & 3 deletions genmod/vcf_tools/sort_variants.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,8 @@ def sort_variants(infile, mode='chromosome'):
'sort',
]
if mode == 'chromosome':
command.append('-n')
command.append('-k1')
command.append('-k3')
command.append('-k1,1V') # Version sorting to deal with e.g. Un_* contigs
command.append('-k3,3n') # Sorting positions numerically

elif mode == 'rank':
command.append('-rn')
Expand Down

0 comments on commit 8569e0c

Please sign in to comment.