This is a test version of Biostars. For the public version, visit https://www.biostars.org.
checkVCF File "./checkVCF.py", line 67 errors
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

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.

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.

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

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>)"?

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

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>)"?

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

0 answers

No answers yet.

Log in to answer this question.