# igv_plotter error: Xvfb did not start

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>
igv_robot.execute()
File "/Users/user/anaconda/envs/python3env/lib/python3.6/site-packages/igv_api.py", line 256, in execute
self._execute_impl(self.__command_queue)
File "/Users/user/anaconda/envs/python3env/lib/python3.6/site-packages/igv_api.py", line 387, in _execute_impl
fake_display.start()
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?

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

• 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? – llrs Mar 13 '18 at 12:15
• @Llopis Maybe because the result is unusable (importing it in Illustrator yields rubbish that’s very time-consuming to unravel). – Konrad Rudolph Mar 13 '18 at 12:18
• Did you install XQuartz on your macOS? It should include Xvfb. – Konrad Rudolph Mar 13 '18 at 12:24
• @Llopis, I want to automate this for thousands of regions, so opening the GUI is not an option. – charlesdarwin Mar 13 '18 at 12:54
• @KonradRudolph XQuartz is installed on my macOS. Not sure what it is for but I can open it and it works like a Terminal. – charlesdarwin Mar 13 '18 at 12:57