Skip to content

Commit

Permalink
Fixed error for vci parsing on diploid vci file
Browse files Browse the repository at this point in the history
  • Loading branch information
mattjvincent committed Jun 6, 2018
1 parent 112be5e commit a7d69a5
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion g2gtools/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
__version__ = '0.2.5'
__version__ = '0.2.6'
__author__ = 'Matthew Vincent and Kwangbom \"KB\" Choi, The Jackson Laboratory'
__email__ = 'matt.vincent@jax.org'
8 changes: 6 additions & 2 deletions g2gtools/vci.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,8 +294,12 @@ def parse(self, reverse):
total_num_lines_processed += 1


interval = Interval(pos_from, self.contigs[contig],
IntervalInfo(contig, pos_to, pos_to + (self.contigs[contig] - pos_from), None, None, None, None))
if self.is_diploid():
interval = Interval(pos_from, self.contigs[contig[:-2]],
IntervalInfo(contig, pos_to, pos_to + (self.contigs[contig[:-2]] - pos_from), None, None, None, None))
else:
interval = Interval(pos_from, self.contigs[contig],
IntervalInfo(contig, pos_to, pos_to + (self.contigs[contig] - pos_from), None, None, None, None))

mapping_tree[contig].insert_interval(interval)

Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.2.5
current_version = 0.2.6
commit = True
tag = True

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

setup(
name='g2gtools',
version='0.2.5',
version='0.2.6',
description="A suite of tools for the reconstruction of personal diploid genomes and better coordinate conversion",
long_description=readme + '\n\n' + history,
author='Matthew J. Vincent and Kwangbom "KB" Choi, The Jackson Laboratory',
Expand Down

0 comments on commit a7d69a5

Please sign in to comment.