We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I noticed that when I try to fetch a chromosome which is not part of the vcf on a FastaVariant I get an error:
~/.venvPyfaidx/lib/python3.7/site-packages/pyfaidx/__init__.py in __iter__(self) 837 end = start + line_len 838 if end < len(self): --> 839 yield self[start:end] 840 else: 841 yield self[start:] ~/.venvPyfaidx/lib/python3.7/site-packages/pyfaidx/__init__.py in __getitem__(self, n) 821 if start < 0: 822 start = len(self) + start --> 823 return self._fa.get_seq(self.name, start + 1, stop)[::step] 824 825 elif isinstance(n, integer_types): ~/.venvPyfaidx/lib/python3.7/site-packages/pyfaidx/__init__.py in get_seq(self, name, start, end) 1164 seq_mut = list(seq.seq) 1165 del seq.seq -> 1166 var = self.vcf.fetch(name, start - 1, end) 1167 for record in var: 1168 if record.is_snp: # skip indels ~/.venvPyfaidx/lib/python3.7/site-packages/vcf/parser.py in fetch(self, chrom, start, end) 629 chrom = chrom[3:] 630 --> 631 self.reader = self._tabix.fetch(chrom, start, end) 632 return self 633 pysam/libctabix.pyx in pysam.libctabix.TabixFile.fetch() ValueError: could not create iterator for region 'MT:1-60'
I propose a fix in a PR.
The text was updated successfully, but these errors were encountered:
Versions used:
(.venvPyfaidx) [ldelisle@helvetios X]$ python --version Python 3.7.7 (.venvPyfaidx) [ldelisle@helvetios X]$ pip list | grep pyfaidx pyfaidx 0.6.2
Also obtained with python 3.9.7. A minimal test to see it is in the PR #180
Sorry, something went wrong.
Fixed in #180
No branches or pull requests
I noticed that when I try to fetch a chromosome which is not part of the vcf on a FastaVariant I get an error:
I propose a fix in a PR.
The text was updated successfully, but these errors were encountered: