Body: <p>I am trying to get screenshots from alignments of reads to a genome in <a href="http://software.broadinstitute.org/software/igv/" rel="nofollow noreferrer">IGV</a> (Integrated Genome Viewer) using <a href="https://github.com/macarthur-lab/igv_utils/tree/master/igv_plotter" rel="nofollow noreferrer">igv_plotter</a>.</p>
  
  <pre><code>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 &lt;module&gt;
      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
  </code></pre>
  
  <p>locus_file.txt only contains this: <code>I:10,000-20,000</code>. 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 <code>igv_plotter -h</code>. I could not find Xvfb using brew.</p>
  
  <p>Alternatively, is there another programmatic way of taking images of aligned reads to a reference, similar to the one below?<a href="https://i.sstatic.net/Ie14x.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/Ie14x.png" alt="reads aligned to a reference"></a></p>
  
  <p>Opening IGV and making a screenshot is not a viable option for me, as I would like to export hundreds or thousands or regions.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-03-13T12:15:45.423Z
Comments.Text: 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?
Comments.UserDisplayName: llrs
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-03-13T12:18:15.480Z
Comments.Text: @Llopis Maybe because the result is unusable (importing it in Illustrator yields rubbish that’s very time-consuming to unravel).
Comments.UserDisplayName: Konrad Rudolph
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-03-13T12:24:27.490Z
Comments.Text: Did you install XQuartz on your macOS? It should include Xvfb.
Comments.UserDisplayName: Konrad Rudolph
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-03-13T12:54:57.723Z
Comments.Text: @Llopis, I want to automate this for thousands of regions, so opening the GUI is not an option.
Comments.UserDisplayName: Biomagician
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-03-13T12:57:08.523Z
Comments.Text: @KonradRudolph XQuartz is installed on my macOS. Not sure what it is for but I can open it and it works like a Terminal.
Comments.UserDisplayName: Biomagician
Tags: <phylogenetics><visualization><igv>
Title: igv_plotter error: Xvfb did not start
ThreadText: # igv_plotter error: Xvfb did not start
  
  (Asked by: username_0 on 2018-03-13)
  
  I am trying to get screenshots from alignments of reads to a genome in [IGV](http://software.broadinstitute.org/software/igv/) (Integrated Genome Viewer) using [igv\_plotter](https://github.com/macarthur-lab/igv_utils/tree/master/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?[![reads aligned to a reference](https://i.sstatic.net/Ie14x.png)](https://i.sstatic.net/Ie14x.png)
  
  Opening IGV and making a screenshot is not a viable option for me, as I would like to export hundreds or thousands or regions.
  
  **Tags:** phylogenetics, visualization, igv
  
  > **Comments:**
  > **username_1**: 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?  
  > **username_2**: @Llopis Maybe because the result is unusable (importing it in Illustrator yields rubbish that’s very time-consuming to unravel).  
  > **username_2**: Did you install XQuartz on your macOS? It should include Xvfb.  
  > **username_0**: @Llopis, I want to automate this for thousands of regions, so opening the GUI is not an option.  
  > **username_0**: @username_2 XQuartz is installed on my macOS. Not sure what it is for but I can open it and it works like a Terminal.  
  
  ---
  
  ## 0 answers
  
  