Skip to content

Commit db0648c

Browse files
committed
fixes #26: vcf are converted to 1 based
1 parent 0f8d231 commit db0648c

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

kipoiseq/extractors/vcf_seq.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,10 +162,10 @@ def _variant_to_sequence(self, variants):
162162
"""
163163
for v in variants:
164164
ref = Sequence(name=v.CHROM, seq=v.REF,
165-
start=v.POS, end=v.POS + len(v.REF))
165+
start=v.start, end=v.start + len(v.REF))
166166
# TO DO: consider alternative alleles.
167167
alt = Sequence(name=v.CHROM, seq=v.ALT[0],
168-
start=v.POS, end=v.POS + len(v.ALT[0]))
168+
start=v.start, end=v.start + len(v.ALT[0]))
169169
yield ref, alt
170170

171171
def _split_overlapping(self, variant_pairs, anchor):

tests/data/test.vcf.gz

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)