I am trying to get screenshots from alignments of reads to a genome in IGV (Integrated Genome Viewer) using igv_plotter.

igv_plotter --genome ref.fa readsSorted.bam --locus-file locus_file.txt --max-memory 10G

Traceback (most recent call last):
  File "/Users/user/anaconda/envs/python3env/bin/igv_plotter", line 140, in <module>
  File "/Users/user/anaconda/envs/python3env/lib/python3.6/site-packages/igv_api.py", line 256, in execute
  File "/Users/user/anaconda/envs/python3env/lib/python3.6/site-packages/igv_api.py", line 387, in _execute_impl
  File "/Users/user/anaconda/envs/python3env/lib/python3.6/site-packages/xvfbwrapper.py", line 79, in start
    raise RuntimeError('Xvfb did not start')
RuntimeError: Xvfb did not start

locus_file.txt only contains this: I:10,000-20,000. From reading online, it seems that this Xvfb is what I need to be able to use IGV without a GUI. I am working on Mac High Sierra and I don't know if I can install Xvfb on Mac OS X or how I can do it. I was quickly out of my depths on the online posts about Xvfb on Mac. I checked that I installed igv_plotter correctly by successfully pulling out the help with igv_plotter -h. I could not find Xvfb using brew.

Alternatively, is there another programmatic way of taking images of aligned reads to a reference, similar to the one below?reads aligned to a reference

Opening IGV and making a screenshot is not a viable option for me, as I would like to export hundreds or thousands or regions.

  • $\begingroup$ Hi, What is your question getting igv_plotter to work or find an alternative? If the first, why don't you use the gui to make the screenshots? $\endgroup$ – llrs Mar 13 '18 at 12:15
  • $\begingroup$ @Llopis Maybe because the result is unusable (importing it in Illustrator yields rubbish that’s very time-consuming to unravel). $\endgroup$ – Konrad Rudolph Mar 13 '18 at 12:18
  • $\begingroup$ Did you install XQuartz on your macOS? It should include Xvfb. $\endgroup$ – Konrad Rudolph Mar 13 '18 at 12:24
  • $\begingroup$ @Llopis, I want to automate this for thousands of regions, so opening the GUI is not an option. $\endgroup$ – charlesdarwin Mar 13 '18 at 12:54
  • $\begingroup$ @KonradRudolph XQuartz is installed on my macOS. Not sure what it is for but I can open it and it works like a Terminal. $\endgroup$ – charlesdarwin Mar 13 '18 at 12:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.