I am using liftOver to convert hg19-hg38. I made BED file from VCF to run liftOver. How can I convert output BED(HG38) to VCF format.
Instead of doing multiple conversions, you can use CrossMap to convert VCF (hg19) <-> VCF (hg38). Other than VCF, it can support SAM/BAM, Wiggle/BigWig, BED, GFF/GTF file formats.
Or you can use NCBI remap.
I successfully run CrossMap. It was my first experience at Biostars and happened to be so nice. Thank you very much for your help.
Thank you komal. I have installed CrossMap. I tried to run
python CrossMap.py
It generates following error message
Traceback (most recent call last):
File "CrossMap.py", line 26, in <module>
from cmmodule import ireader
ImportError: No module named cmmodule
Do you think it is not properly installed?
cmmodule is a directory within CrossMap lib that contains python modules for CrossMap.py. I can think of two ways you can add the lib directory to your python path. You can do it in BASH by running something like
export PYTHONPATH=/home/user/CrossMap/usr/local/lib/python2.7/site-packages:$PYTHONPATH taken from here: http://crossmap.sourceforge.net/#installation
After you export the directory to PYTHONPATH, you should be able to run CrossMap as usual. I don't like doing this since then it's in my path until my next logout. More importantly, I'll have to remember to export PYTHONPATH in every new session where I want to run CrossMap, and I know I'll forget this.
Instead, I added these three lines to my code just before "import optparse", and the script adds lib to the python path on its own:
PARENTPATH = os.path.abspath(os.path.join(os.path.dirname(__file__), "..")) LIBPATH = os.path.join(PARENTPATH, "lib") sys.path.append(LIBPATH)
As long as bin and lib are sister directories, this should work. Let me know if you want any more explanation about why it does.
Sir, I am having the same problem about running Crossmap. I got the same cmmodule error. But since I have python through home-brew. I guess it caused a problem. Could you help to solve my problem ? or I you could teach me how to catch a fish I would also be glad. Thank you very much for your help.
edit:
btw, my python site packages are located the path below.
/usr/local/lib/python2.7/site-packages
I tried first and it worked.
export PYTHONPATH=/home/user/CrossMap/usr/local/lib/python2.7/site-packages:$PYTHONPATH