Question: checkVCF File "./checkVCF.py", line 67 errors
0
gravatar for zhangcc89
18 months ago by
zhangcc890
zhangcc890 wrote:
clairedeiMac:~ claire$ cd /Volumes/mac7cc/checkVCF-master
clairedeiMac:checkVCF-master claire$ python checkVCF.py -r hs37d5.fa -o test example.vcf.gz
  File "checkVCF.py", line 67
    print('Cannot .fai index file', file=sys.stderr) 
                                        ^
SyntaxError: invalid syntax
clairedeiMac:checkVCF-master claire$ python checkVCF.py -r human_g1k_v37.fasta -o out chr1.vcf.gz
  File "checkVCF.py", line 67
    print('Cannot .fai index file', file=sys.stderr) 
                                        ^
SyntaxError: invalid syntax
clairedeiMac:checkVCF-master claire$ ./checkVCF.py -r hs37d5.fa -o test example.vcf.gz
  File "./checkVCF.py", line 67
    print('Cannot .fai index file', file=sys.stderr) 
                                        ^
SyntaxError: invalid syntax
clairedeiMac:checkVCF-master claire$ 
clairedeiMac:checkVCF-master claire$

code: https://github.com/zhanxw/checkVCF

gwas • 591 views
ADD COMMENTlink modified 18 months ago by WouterDeCoster44k • written 18 months ago by zhangcc890
2

To be quite honest with you, putting error code without syntax highlighting (I did that for you now using the code option 10101), any details or at least one single sentence of explanation is quite disrespectful towards a community driven by volunteers that offers free help. Please put in some effort and add the a bit of explanation. The way your questions is now, you are probably not motivating anyone to help you.

ADD REPLYlink written 18 months ago by ATpoint42k

Thanks for help and kind reminding. Unable to run the sample program based on the downloaded file.I am a newer. I don't know what the reason is.

ADD REPLYlink written 18 months ago by zhangcc890
2

It looks like you are trying to run a python3 script with python2.

ADD REPLYlink written 18 months ago by finswimmer14k

Thanks very much. I have updated python to version3. However, the following questions appear.

  File "checkVCF.py", line 162, in <module>
    banner(logger)
  File "checkVCF.py", line 128, in banner
    print >> logger, "checkVCF.py -- check validity of VCF file for meta-analysis" 

**TypeError:** unsupported operand type(s) for >>: 'builtin_function_or_method' and 'Logger'. Did you mean "print(<message>, file=<output_stream>)"?
ADD REPLYlink written 18 months ago by zhangcc890

Python 3.6.5 |Anaconda, Inc.| (default, Apr 26 2018, 08:42:37)

ADD REPLYlink written 18 months ago by zhangcc890

The script you are using hasn't been updated in 3 years, and likely is no longer supported. I can fix the error you have there, but there might be more errors afterwards.

The error message already tells you what to change...

Did you mean "print(<message>, file=<output_stream>)"?

ADD REPLYlink written 18 months ago by WouterDeCoster44k

Thanks very much. I found a new tool to solve the problems.

ADD REPLYlink written 18 months ago by zhangcc890
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1035 users visited in the last hour