# Cant write out vep annotated vcf file

**URL:** <https://discuss.hail.is/t/cant-write-out-vep-annotated-vcf-file/826>\
**Category:** Hail Query & hailctl\
**Created:** [January 9, 2019, 2:32pm UTC](https://discuss.hail.is/t/cant-write-out-vep-annotated-vcf-file/826 "2019-01-09T14:32:26Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mathias\_Hansen](https://avatars.discourse-cdn.com/v4/letter/m/94ad74/32.png) [@Mathias\_Hansen](https://discuss.hail.is/u/Mathias_Hansen)\
**Post date:** [January 9, 2019, 2:32pm UTC](https://discuss.hail.is/t/cant-write-out-vep-annotated-vcf-file/826/1 "2019-01-09T14:32:26Z")

</div>

I have no problem using export\_vcf on a normal MatrixTable after filtering, but when i use vep to annotate the file and apply the same function, it gives me an IO:Error, file or directory does not exist.  
I have checked and the directory to which I try to write does exist.  
What is wrong?  
KR Mathias.

---

<div class="post-metadata">

**Author:** ![tpoterba](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/tpoterba/32/61_2.png) [@tpoterba](https://discuss.hail.is/u/tpoterba)\
**Post date:** [January 9, 2019, 3:16pm UTC](https://discuss.hail.is/t/cant-write-out-vep-annotated-vcf-file/826/2 "2019-01-09T15:16:44Z")

</div>

What’s the full stack trace? This is probably an error related to VEP, not write.

---

<div class="post-metadata">

**Author:** ![Mathias\_Hansen](https://avatars.discourse-cdn.com/v4/letter/m/94ad74/32.png) [@Mathias\_Hansen](https://discuss.hail.is/u/Mathias_Hansen)\
**Post date:** [January 16, 2019, 12:19pm UTC](https://discuss.hail.is/t/cant-write-out-vep-annotated-vcf-file/826/3 "2019-01-16T12:19:49Z")

</div>

You are probably right, this is another example of failure.

 ![vep_error](https://canada1.discourse-cdn.com/flex036/uploads/hail/original/1X/7bc3262ab8d574411927017da7eca11fb515d208.jpeg) ![vep_error1](https://canada1.discourse-cdn.com/flex036/uploads/hail/original/1X/bc6f71b9844a61c053634dd04209b317a63c3c4b.jpeg)

---

<div class="post-metadata">

**Author:** ![tpoterba](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/tpoterba/32/61_2.png) [@tpoterba](https://discuss.hail.is/u/tpoterba)\
**Post date:** [January 16, 2019, 1:15pm UTC](https://discuss.hail.is/t/cant-write-out-vep-annotated-vcf-file/826/4 "2019-01-16T13:15:58Z")

</div>

What VEP config are you using?

---

<div class="post-metadata">

**Author:** ![Mathias\_Hansen](https://avatars.discourse-cdn.com/v4/letter/m/94ad74/32.png) [@Mathias\_Hansen](https://discuss.hail.is/u/Mathias_Hansen)\
**Post date:** [January 18, 2019, 1:15pm UTC](https://discuss.hail.is/t/cant-write-out-vep-annotated-vcf-file/826/5 "2019-01-18T13:15:13Z")

</div>

I use a modified version of the one here:  
[https://hail.is/docs/0.2/methods/genetics.html?highlight=vep#hail.methods.vep](https://hail.is/docs/0.2/methods/genetics.html?highlight=vep#hail.methods.vep)  
I realised that I forgot to edit /vep to my own version, just vep. Unfortunately my changes in the configuration file has not solved the problem, see my current error message. The command works fine outside of hail.  
KR  
 ![27](https://canada1.discourse-cdn.com/flex036/uploads/hail/original/1X/d1d84d3738bcb39586b78481332e075f5dbc68a1.png)

---

<div class="post-metadata">

**Author:** ![tpoterba](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/tpoterba/32/61_2.png) [@tpoterba](https://discuss.hail.is/u/tpoterba)\
**Post date:** [January 18, 2019, 6:22pm UTC](https://discuss.hail.is/t/cant-write-out-vep-annotated-vcf-file/826/6 "2019-01-18T18:22:01Z")

</div>

You can use VEP like that on the machines running the Hail worker processes, not just the driver process, right?

---

<div class="post-metadata">

**Author:** ![Mathias\_Hansen](https://avatars.discourse-cdn.com/v4/letter/m/94ad74/32.png) [@Mathias\_Hansen](https://discuss.hail.is/u/Mathias_Hansen)\
**Post date:** [January 21, 2019, 9:11am UTC](https://discuss.hail.is/t/cant-write-out-vep-annotated-vcf-file/826/7 "2019-01-21T09:11:24Z")

</div>

I am not sure what you mean, but I am able to source the Hail environment and then successfully run the command (in command line) seen in the screenshot without errors (vep --format vcf …). I should mention that i add the “-i vcf” variable.

---

<div class="post-metadata">

**Author:** ![Mathias\_Hansen](https://avatars.discourse-cdn.com/v4/letter/m/94ad74/32.png) [@Mathias\_Hansen](https://discuss.hail.is/u/Mathias_Hansen)\
**Post date:** [January 24, 2019, 9:45am UTC](https://discuss.hail.is/t/cant-write-out-vep-annotated-vcf-file/826/8 "2019-01-24T09:45:49Z")

</div>

Any suggestions?

---

<div class="post-metadata">

**Author:** ![tpoterba](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/tpoterba/32/61_2.png) [@tpoterba](https://discuss.hail.is/u/tpoterba)\
**Post date:** [January 24, 2019, 2:27pm UTC](https://discuss.hail.is/t/cant-write-out-vep-annotated-vcf-file/826/9 "2019-01-24T14:27:28Z")

</div>

I think it should be possible to print VEP’s error output in this error message. I’ll look into that today.

---

<div class="post-metadata">

**Author:** ![tpoterba](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/tpoterba/32/61_2.png) [@tpoterba](https://discuss.hail.is/u/tpoterba)\
**Post date:** [January 24, 2019, 10:34pm UTC](https://discuss.hail.is/t/cant-write-out-vep-annotated-vcf-file/826/10 "2019-01-24T22:34:31Z")

</div>

Sorry, quite busy today. I should be able to look tomorrow afternoon.

---

<div class="post-metadata">

**Author:** ![Mathias\_Hansen](https://avatars.discourse-cdn.com/v4/letter/m/94ad74/32.png) [@Mathias\_Hansen](https://discuss.hail.is/u/Mathias_Hansen)\
**Post date:** [January 31, 2019, 10:57am UTC](https://discuss.hail.is/t/cant-write-out-vep-annotated-vcf-file/826/11 "2019-01-31T10:57:10Z")

</div>

and?

---

<div class="post-metadata">

**Author:** ![tpoterba](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/tpoterba/32/61_2.png) [@tpoterba](https://discuss.hail.is/u/tpoterba)\
**Post date:** [January 31, 2019, 2:25pm UTC](https://discuss.hail.is/t/cant-write-out-vep-annotated-vcf-file/826/12 "2019-01-31T14:25:20Z")

</div>

Thanks for the reminder - working through a backlog after a group retreat Mon/Tues.

I’ve opened [this pull request](https://github.com/hail-is/hail/pull/5224) but I’m not totally sure it will work. I found this hard to test when I poked around at it last week.

---

<div class="post-metadata">

**Author:** ![Mathias\_Hansen](https://avatars.discourse-cdn.com/v4/letter/m/94ad74/32.png) [@Mathias\_Hansen](https://discuss.hail.is/u/Mathias_Hansen)\
**Post date:** [March 1, 2019, 1:31pm UTC](https://discuss.hail.is/t/cant-write-out-vep-annotated-vcf-file/826/13 "2019-03-01T13:31:09Z")

</div>

any news?

---

<div class="post-metadata">

**Author:** ![tpoterba](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/tpoterba/32/61_2.png) [@tpoterba](https://discuss.hail.is/u/tpoterba)\
**Post date:** [March 1, 2019, 1:32pm UTC](https://discuss.hail.is/t/cant-write-out-vep-annotated-vcf-file/826/14 "2019-03-01T13:32:13Z")

</div>

that pull request was merged 16 days ago. Can you try again?

---

<div class="post-metadata">

**Author:** ![Mathias\_Hansen](https://avatars.discourse-cdn.com/v4/letter/m/94ad74/32.png) [@Mathias\_Hansen](https://discuss.hail.is/u/Mathias_Hansen)\
**Post date:** [March 21, 2019, 8:56am UTC](https://discuss.hail.is/t/cant-write-out-vep-annotated-vcf-file/826/15 "2019-03-21T08:56:12Z")

</div>

After updating the same error occurs. Another thing: it seems like the update for some reason has introduced a bug so that visually the job doesn’t update fluently in the GUI (jupyter notebook). The process looked like it was stuck running a simple function for hours. I actually thought there was an error in the function, but returning to jupyter today, I see that the all of my workflow completed (until the error).  
KR

---

<div class="post-metadata">

**Author:** ![tpoterba](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/tpoterba/32/61_2.png) [@tpoterba](https://discuss.hail.is/u/tpoterba)\
**Post date:** [March 21, 2019, 12:27pm UTC](https://discuss.hail.is/t/cant-write-out-vep-annotated-vcf-file/826/16 "2019-03-21T12:27:02Z")

</div>

> [@Mathias\_Hansen](#):
>
> visually the job doesn’t update fluently in the GUI (jupyter notebook)

You mean the jupyter-spark progress bar? The Spark progress bar and everything related is super finicky.

To clarify, you’re still getting the “VEP returned error code 2” error, right?

---

<div class="post-metadata">

**Author:** ![Mathias\_Hansen](https://avatars.discourse-cdn.com/v4/letter/m/94ad74/32.png) [@Mathias\_Hansen](https://discuss.hail.is/u/Mathias_Hansen)\
**Post date:** [March 21, 2019, 1:23pm UTC](https://discuss.hail.is/t/cant-write-out-vep-annotated-vcf-file/826/17 "2019-03-21T13:23:12Z")

</div>

I get that error, yes. I mean that when I run Hail in jupyter-notebook, the progress of each block of code that I run, doesn’t seem to update accordingly to the actually completed blocks.

---

<div class="post-metadata">

**Author:** ![tpoterba](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/tpoterba/32/61_2.png) [@tpoterba](https://discuss.hail.is/u/tpoterba)\
**Post date:** [March 21, 2019, 7:45pm UTC](https://discuss.hail.is/t/cant-write-out-vep-annotated-vcf-file/826/18 "2019-03-21T19:45:41Z")

</div>

> [@Mathias\_Hansen](#):
>
> the progress of each block of code that I run

How are you measuring this? With the `[*]` icons in the cells, or the jupyter spark progress bar?

---

<div class="post-metadata">

**Author:** ![Mathias\_Hansen](https://avatars.discourse-cdn.com/v4/letter/m/94ad74/32.png) [@Mathias\_Hansen](https://discuss.hail.is/u/Mathias_Hansen)\
**Post date:** [March 22, 2019, 9:29am UTC](https://discuss.hail.is/t/cant-write-out-vep-annotated-vcf-file/826/19 "2019-03-22T09:29:18Z")

</div>

The [\*] icon.

---

<div class="post-metadata">

**Author:** ![Mathias\_Hansen](https://avatars.discourse-cdn.com/v4/letter/m/94ad74/32.png) [@Mathias\_Hansen](https://discuss.hail.is/u/Mathias_Hansen)\
**Post date:** [March 28, 2019, 8:39am UTC](https://discuss.hail.is/t/cant-write-out-vep-annotated-vcf-file/826/20 "2019-03-28T08:39:48Z")

</div>

Any progress?

[Next page](https://discuss.hail.is/t/cant-write-out-vep-annotated-vcf-file/826.md?page=2)
