Question: Convert BED(UCSC) to VCF
1
gravatar for Ishtiaq Ahmad Khan
4.3 years ago by
Pakistan
Ishtiaq Ahmad Khan50 wrote:

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. 

assembly • 6.3k views
ADD COMMENTlink modified 4.3 years ago • written 4.3 years ago by Ishtiaq Ahmad Khan50
2
gravatar for komal.rathi
4.3 years ago by
komal.rathi3.4k
Children's Hospital of Philadelphia, Philadelphia, PA
komal.rathi3.4k wrote:

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.

ADD COMMENTlink modified 4.3 years ago • written 4.3 years ago by komal.rathi3.4k
1
gravatar for Ishtiaq Ahmad Khan
4.3 years ago by
Pakistan
Ishtiaq Ahmad Khan50 wrote:

I successfully run CrossMap. It was my first experience at Biostars and happened to be so nice. Thank you very much for your help.  

ADD COMMENTlink written 4.3 years ago by Ishtiaq Ahmad Khan50

Just curious--did you end up using either of my tweaks?  Which one ended up working for you?

ADD REPLYlink written 4.3 years ago by Mitch Bekritsky1.2k
0
gravatar for Ishtiaq Ahmad Khan
4.3 years ago by
Pakistan
Ishtiaq Ahmad Khan50 wrote:

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?

 

 

ADD COMMENTlink written 4.3 years ago by Ishtiaq Ahmad Khan50
2

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.

 

ADD REPLYlink modified 4.3 years ago • written 4.3 years ago by Mitch Bekritsky1.2k

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

ADD REPLYlink modified 3.9 years ago • written 3.9 years ago by morovatunc400

What python version did you use?

ADD REPLYlink written 4.3 years ago by Zaag720

Python 2.7.3

ADD REPLYlink written 4.3 years ago by Ishtiaq Ahmad Khan50
0
gravatar for Ishtiaq Ahmad Khan
4.3 years ago by
Pakistan
Ishtiaq Ahmad Khan50 wrote:

I tried first and it worked. 

export PYTHONPATH=/home/user/CrossMap/usr/local/lib/python2.7/site-packages:$PYTHONPATH
ADD COMMENTlink written 4.3 years ago by Ishtiaq Ahmad Khan50
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: 972 users visited in the last hour