This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Extract gnomad AF for specific position and REF/ALT allele with R

Hi,

I've a list of genomic position and ref / alt allele such as :

# A tibble: 10 x 4
   chrom       pos ref   alt  
   <chr>     <int> <chr> <chr>
 1 1      16953672 C     T    
 2 2      96971401 A     G    
 3 2     211421264 G     A    
 4 5      55298397 A     G    
 5 10    104235799 G     GT   
 6 11       784219 T     C    
 7 19     55671382 C     T    
 8 X     142804304 A     AT   
 9 10     88615391 A     T    
10 19     15789302 T     C

I installed the MafDb.gnomAD.r2.1.hs37d5 package to annotate these positions.

https://bioconductor.org/packages/release/data/annotation/html/MafDb.gnomAD.r2.1.hs37d5.html

However when I want to specify the ref and alt allele in the gscores request I've a warning :

mafdb <- MafDb.gnomAD.r2.1.hs37d5
gscores(mafdb, GRanges("1:569474"),ref="A",alt="T")
GRanges object with 1 range and 1 metadata column:
      seqnames    ranges strand |        AF
         <Rle> <IRanges>  <Rle> | <numeric>
  [1]        1    569474      * |     6e-04
  -------
  seqinfo: 1 sequence from hs37d5 genome; no seqlengths
Warning message:
In .scores_snrs(x, ranges, pop, summaryFun, quantized, scores.only,  :
  arguments 'ref' and 'alt' are given but there is only one score per genomic position.

However some positions in gnomad may have different ref / alt allele (but same chrom and pos). For instance :

https://gnomad.broadinstitute.org/variant/4-106155467-G-A and https://gnomad.broadinstitute.org/variant/4-106155467-G-C that have respectively 0.00003548 and 0.000003993 of allele frequency in the general population.

How can I specify ref and alt to have the correct AF ?

Thanks

r gnomad af allele frequency annotation

0 answers

No answers yet.

Log in to answer this question.