Hello, I'm trying to filter variants from vcf files obtained using lobSTR. I get some errors while calling lobSTR_filter_vcf.py script:
Traceback (most recent call last):
File "/home/rich/Scrivania/Tool_Espansioni/lobSTR-bin-Linux-x86_64-4.0.6/share/lobSTR/scripts/lobSTR_filter_vcf.py", line 97, in <module>
reader = vcf.Reader(open(args.vcf, "rb"))
File "/home/rich/miniconda3/lib/python3.6/site-packages/vcf/parser.py", line 300, in __init__
self._parse_metainfo()
File "/home/rich/miniconda3/lib/python3.6/site-packages/vcf/parser.py", line 319, in _parse_metainfo
while line.startswith('##'):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str
I don't know Python language, but I found that writing the letter 'b' before '##' should solve my problem. When I do this, I get new error messages:
Traceback (most recent call last):
File "/home/rich/Scrivania/Tool_Espansioni/lobSTR-bin-Linux-x86_64-4.0.6/share/lobSTR/scripts/lobSTR_filter_vcf.py", line 97, in <module>
reader = vcf.Reader(open(args.vcf, "rb"))
File "/home/rich/miniconda3/lib/python3.6/site-packages/vcf/parser.py", line 300, in __init__
self._parse_metainfo()
File "/home/rich/miniconda3/lib/python3.6/site-packages/vcf/parser.py", line 353, in _parse_metainfo
fields = self._row_pattern.split(line[1:])
TypeError: cannot use a string pattern on a bytes-like object
Probably I should not edit the scripts, but I've been trying for over a week and didn't manage to solve this...Any suggestions?