sritchie73 / liftOverPlink

A wrapper for liftOver for converting plink genotype data between different genome reference builds
GNU General Public License v2.0
48 stars 22 forks source link

Error reading/writing files to lift BED #4

Open mcfefa opened 5 years ago

mcfefa commented 5 years ago

I'm trying to use liftOverPlink.py and have run into errors that appear to me to be read/writing the files. Below is the output I get when I try running the liftOverPlink.py.

[user@pilotace imputed]$ python liftOverPlink.py --map imputed_chr10_plink_att1.map --out chr10_imputed_hg38_20180114 --chain hg19ToHg38.over.chain.gz --bin /home/user/liftOver
Converting MAP file to UCSC BED file...
SUCC:  map->bed succ
Lifting BED file...
sh: /home/user/liftOver: is a directory
Traceback (most recent call last):
  File "liftOverPlink.py", line 30, in myopen
    h = gzip.open(fn)
  File "/share/apps/python-3.7.1/lib/python3.7/gzip.py", line 53, in open
    binary_file = GzipFile(filename, gz_mode, compresslevel)
  File "/share/apps/python-3.7.1/lib/python3.7/gzip.py", line 163, in __init__
    fileobj = self.myfileobj = builtins.open(filename, mode or 'rb')
FileNotFoundError: [Errno 2] No such file or directory: 'chr10_imputed_hg38_20180114.bed.unlifted'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "liftOverPlink.py", line 172, in <module>
    makesure(liftBed(oldBed, newBed, unlifted, args.chainFile, liftOverPath),
  File "liftOverPlink.py", line 64, in liftBed
    for ln in myopen(params['UNLIFTED']):
  File "liftOverPlink.py", line 34, in myopen
    return open(fn)
FileNotFoundError: [Errno 2] No such file or directory: 'chr10_imputed_hg38_20180114.bed.unlifted'

I'm using python version 3.7.1. No additional files have been added to the directory during the first few steps that seemed to be completed successfully. Any insight that could be given would be greatly appreciated.

Kyulhee commented 5 years ago

I cannot sure whether you already solve that problem, I think it's same problem that I went through. You should typed path and liftOver binary, not path of binary only. For example, /home/user/liftOver/liftOver.