checkVCF File "./checkVCF.py", line 67 errors
0
0
Entering edit mode
5.6 years ago
zhangcc89 • 0
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 • 1.7k views
ADD COMMENT
2
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY
2
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

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

ADD REPLY

Login before adding your answer.

Traffic: 1617 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6