# Annotating with CADD, gnomad, Clinvar & dbNSFP on UKB RAP

**URL:** https://discuss.hail.is/t/annotating-with-cadd-gnomad-clinvar-dbnsfp-on-ukb-rap/2654
**Category:** Feature Requests
**Created:** [May 9, 2022, 1:33pm UTC](https://discuss.hail.is/t/annotating-with-cadd-gnomad-clinvar-dbnsfp-on-ukb-rap/2654 "2022-05-09T13:33:08Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![dint](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/dint/32/780_2.png) [@dint](https://discuss.hail.is/u/dint)
#### Post date: [May 9, 2022, 1:33pm UTC](https://discuss.hail.is/t/annotating-with-cadd-gnomad-clinvar-dbnsfp-on-ukb-rap/2654/1 "2022-05-09T13:33:08Z")

</div>

i’m just wondering if you can specify cadd, gnomad, clinvar and dbNSFP options when annotating with hail on dxjupyterlab\_spark\_cluster o the UKB RAP? From the hail website, the following command can be used on your matrix file to annotate with these features:

_db = hl.experimental.DB(region=‘us’, cloud=‘gcp’)_

_mt = db.annotate\_rows\_db(mt, ‘CADD’, ‘clinvar\_gene\_summary’, ‘clinvar\_variant\_summary’, ‘dbNSFP\_genes’, ‘dbNSFP\_variants’, ‘dbSNP\_rsid’, ‘gnomad\_exome\_sites’)_

weblink: [Hail | Annotation Database](https://hail.is/docs/0.2/annotation_database_ui.html)

Unfortunately, this command does not work on hail when using the spark jupyterlab python3 console. The error that is given is:

_Hail version: 0.2.78-b17627756568_

_Error summary: IOException: No FileSystem for scheme: gs_

I know the EU version of this hail command is not available but it is available on the US version. Since the UKB RAP is based in London, is there any workaround for this?

Any help with this would be great.

---

<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: [May 9, 2022, 1:34pm UTC](https://discuss.hail.is/t/annotating-with-cadd-gnomad-clinvar-dbnsfp-on-ukb-rap/2654/2 "2022-05-09T13:34:28Z")

</div>

Before we chase this down further, could you update to the latest version? 0.2.78 is pretty old.

---

<div class="post-metadata">

### Author: ![danking](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/danking/32/43_2.png) [@danking](https://discuss.hail.is/u/danking)
#### Post date: [May 9, 2022, 1:47pm UTC](https://discuss.hail.is/t/annotating-with-cadd-gnomad-clinvar-dbnsfp-on-ukb-rap/2654/3 "2022-05-09T13:47:34Z")

</div>

> [@dint](#):
>
> _Error summary: IOException: No FileSystem for scheme: gs_

This means the version of Spark made available to you by DNANexus lacks the Google Cloud Storage “hadoop connector.” Moreover, AFAIK, DNANexus is a thin wrapper around AWS. You won’t be able to read data out of Google Cloud Storage into AWS without incurring significant cost. You should explicitly set the cloud to `aws`:

```python3
db = hl.experimental.DB(region='us', cloud='aws')

```

---

<div class="post-metadata">

### Author: ![dint](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/dint/32/780_2.png) [@dint](https://discuss.hail.is/u/dint)
#### Post date: [May 9, 2022, 1:51pm UTC](https://discuss.hail.is/t/annotating-with-cadd-gnomad-clinvar-dbnsfp-on-ukb-rap/2654/4 "2022-05-09T13:51:21Z")

</div>

Ah ok, and will this workaround the fact that the UKB RAP uses London based AWS services?

Also, Hail 0.2.78 is the only version of Hail provided by the UKB RAP afaik, unless there is a way of updating this manually on the RAP.

---

<div class="post-metadata">

### Author: ![danking](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/danking/32/43_2.png) [@danking](https://discuss.hail.is/u/danking)
#### Post date: [May 9, 2022, 2:17pm UTC](https://discuss.hail.is/t/annotating-with-cadd-gnomad-clinvar-dbnsfp-on-ukb-rap/2654/5 "2022-05-09T14:17:29Z")

</div>

Ah, yeah, this is a good point. You’ll pay 0.02 USD per GB to stream the data out of our US East buckets to Europe. Most of the datasets you’re referencing aren’t _that_ large, but it is a cost. If you’ll be using these datasets frequently, you can also copy them directly out of our S3 bucket into one you control in the London region. We ship a JSON file with the pip package which identifies the URL for every dataset. You can also see [that file in our GitHub repository](https://github.com/hail-is/hail/blob/main/hail/python/hail/experimental/datasets.json).

---

<div class="post-metadata">

### Author: ![dint](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/dint/32/780_2.png) [@dint](https://discuss.hail.is/u/dint)
#### Post date: [May 9, 2022, 3:08pm UTC](https://discuss.hail.is/t/annotating-with-cadd-gnomad-clinvar-dbnsfp-on-ukb-rap/2654/6 "2022-05-09T15:08:24Z")

</div>

Ah cheers. It seems to run when ‘aws’ is specified. Just wondering when exporting to a .tsv file how do I specify exporting the annotate\_db columns? Before when I was exporting my vep annotations I used this code:  
_annotated\_mt2.vep.export(“file:///opt/notebooks/ukb23148\_c1\_b0\_v1.annotate.tsv.gz”, header=True, delimiter=’\t’)_

---

<div class="post-metadata">

### Author: ![danking](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/danking/32/43_2.png) [@danking](https://discuss.hail.is/u/danking)
#### Post date: [May 9, 2022, 3:37pm UTC](https://discuss.hail.is/t/annotating-with-cadd-gnomad-clinvar-dbnsfp-on-ukb-rap/2654/7 "2022-05-09T15:37:45Z")

</div>

Take a look at `mt.describe()`. Each dataset should be added under its own name. You can export any Hail Table as a TSV, so consider doing this:

```auto
ht = mt.rows()
ht.select('CADD', 'clinvar_gene_summary', ...).export('...', ...)

```

I’d also give a careful thought to why you need a TSV. You can store all this information in an efficient binary format, the Hail Table format:

```auto
ht = mt.rows()
ht.select(...).write('...')

```

Writing a TSV, in contrast, requires concatenation of the TSV into one big TSV. This requires streaming through all the data on a single core. As such, it’s somewhat slow.

---

<div class="post-metadata">

### Author: ![dint](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/dint/32/780_2.png) [@dint](https://discuss.hail.is/u/dint)
#### Post date: [May 25, 2022, 1:56pm UTC](https://discuss.hail.is/t/annotating-with-cadd-gnomad-clinvar-dbnsfp-on-ukb-rap/2654/8 "2022-05-25T13:56:55Z")

</div>

Hi Dan,

Cheers for the info, I’m just trying to export this now as a VCF. I want to export as a VCF as I want to filter my variants on my own server and not on DNAnexus. In order to export as a vcf I had to manually select which annotations I would like in the info field using this code:  
_annotated\_mt = annotated\_mt.annotate\_rows(info=annotated\_mt.info.annotate(CADD\_PHRED=annotated\_mt.CADD[“PHRED\_score”]))_

However, when I try exporting as a VCF I get the following error:  
_Error summary: VCFParseError: unexpected end of line_

I can export as a.tsv file from a hail table but this does not contain the genotype information so it makes it a bit trickier for variant filtering on DNAnexus. As well as this, some annotations were not inputted into the info field as simple strings or floats and could not be exported. Example:

annotated\_mt = annotated\_mt.annotate\_rows(info=annotated\_mt.info.annotate(gnomAD\_pLI = annotated\_mt.dbNSFP\_genes[“gnomAD\_pLI”]))

Just wondering if there is a simpler way to export annotations in a VCF file for variant filtering.
