Detecting PLINK version fails with new version
welchr opened this issue · 0 comments
From Daniele:
We recently upgraded PLINK to latest version (we are running v1.90b4 now) and the regex in the ‘check_plink_version’ function in main.py was not working anymore:
Traceback (most recent call last):
File "/usr/local/bin/swiss", line 23, in
main()
File "/shared/Software/swiss-1.0b5/lib/python2.7/site-packages/swiss/main.py", line 979, in main
(opts,args) = get_settings(arg_string)
File "/shared/Software/swiss-1.0b5/lib/python2.7/site-packages/swiss/main.py", line 543, in get_settings
check_plink_version(opts.plink_path)
File "/shared/Software/swiss-1.0b5/lib/python2.7/site-packages/swiss/main.py", line 285, in check_plink_version
x, y, beta, z = re.search("v(\d+).(\d+)b?(\d+)?.(\w+)",version_string).groups()
AttributeError: 'NoneType' object has no attribute 'groups'
I changed it in “v(\d+).(\d+)b?(\d+)(\w+)” and it works (but it’s not probably the best regex).