This is a test version of Biostars. For the public version, visit https://www.biostars.org.
locuszoom error

Hi there, I downloaded locuszoom in it's entirty from their github page. I have everything in order but when I attempt to run the following I get an error:

locuszoom_test/bin/locuszoom --metal chr7.snx13.marker.locuszoom.metal --ld chr7.imputed.concat.sorted.nomono.80.recode.maf01.pheno.vcf.2.ld.locuszoom.input --refsnp rs1533245 --prefix chr7.snx13.rs1533245
/share/hennlab/progs/locuszoom_test/bin/../src/m2zfast.py:82: SyntaxWarning: invalid escape sequence '\d'
  RE_SNP_1000G = re.compile("chr(\d+|[a-zA-z]+):(\d+)$");
/share/hennlab/progs/locuszoom_test/bin/../src/m2zfast.py:83: SyntaxWarning: invalid escape sequence '\d'
  RE_SNP_RS = re.compile("rs(\d+)");
/share/hennlab/progs/locuszoom_test/bin/../src/m2zfast.py:82: SyntaxWarning: invalid escape sequence '\d'
  RE_SNP_1000G = re.compile("chr(\d+|[a-zA-z]+):(\d+)$");
/share/hennlab/progs/locuszoom_test/bin/../src/m2zfast.py:83: SyntaxWarning: invalid escape sequence '\d'
  RE_SNP_RS = re.compile("rs(\d+)");
Traceback (most recent call last):
  File "/share/hennlab/progs/locuszoom_test/bin/locuszoom", line 26, in <module>
    from m2zfast import main
  File "/share/hennlab/progs/locuszoom_test/bin/../src/m2zfast.py", line 109
    exec "self.%s = v" % str(k);
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'exec'. Did you mean exec(...)?

Has anyone gotten this before? Not sure how to fix it

locuszoom

1 answer

This error seems to be related to python version. As noted on the locuszoom page you need to use python v.2.7+ (v.3.x can't be used). Your default python is v.3.x. If you have python 2.7+. available on your machine then be sure to use that.

You're 100% correct, I loaded 2.7 but the default was overriding it. Creating a conda env with only 2.7 worked. Thank you!

Log in to answer this question.