Extract specific variants by rsID

#1

I have a list of variants that I am interested in (I know that they exist in gnomad and have downloaded the full exome dataset to my local machine) - I would like to produce a file containing just these variants, for example with their MAF, polyphen score etc. Is there a way to search by rsID and output the variants to a file? Any help would be appreciated.

B

0 Likes

#2

You have a list of rsIDs, right? About how many?

You can do something like:

ht # gnomad exomes table
rsids # python list of rsids

ht = ht.filter(hl.literal(set(rsids)).contains(ht.rsid))

0 Likes

#3

Many thanks. This worked!

0 Likes