---

type: allele_score

table:
  filename: gnomad.genomes.r3.0.extract.tsv.gz
  format: tabix

  # defined by score_type
  # VCF like variant description
  chrom:
    name: CHROM
  pos_begin:
    name: POS
  pos_end:
    name: POS
  reference:
    name: REF
  alternative:
    name: ALT

scores:
  - id: AC
    name: AC
    type: int
    desc: "Number of alternative alleles in the all gnomAD v3.0 genome samples."
    histogram:
      type: number
      number_of_bins: 100
      view_range:
        min: 0
        max: 150000
      y_log_scale: True
  - id: AN
    name: AN
    type: int
    desc: "Number of genotyped individuals in the all gnomAD v3.0 genome samples."
    histogram:
      type: number
      number_of_bins: 100
      view_range:
        min: 0
        max: 150000
      y_log_scale: True
  - id: AF
    name: AF
    type: float
    desc: "Alternative allele frequency in the all gnomAD v3.0 genome samples."
    histogram:
      type: number
      number_of_bins: 126
      view_range:
        min: 0.0
        max: 1.0
      y_log_scale: True
      x_log_scale: True
      x_min_log: 0.00001

  - id: AF_percent
    name: AF_percent
    type: float
    desc: "Alternative allele frequency represented as a percent in the all gnomAD v3.0 genome samples."
    histogram:
      type: number
      number_of_bins: 126
      view_range:
        min: 0.0
        max: 100.0
      y_log_scale: True
      x_log_scale: True
      x_min_log: 0.001


default_annotation:
  - source: AF_percent
    name: genome_gnomad_v3_af_percent
  - source: AC
    name: genome_gnomad_v3_ac
  - source: AN
    name: genome_gnomad_v3_an


meta: 
  summary: |

    gnomAD v3.0 variants built from ~150,000 samples with whole genome sequence data. 
    
  description: |
    ## gnomAD genomes v3.0

    Original gnomAD genomes v3.0 is downloaded on October 17, 2020
    from https://gnomad.broadinstitute.org/.

    tabix -s 1 -b 2 -e 2 -f gnomad.genomes.r3.0.extract.tsv.gz

  labels:
    reference_genome: hg38/genomes/GRCh38-hg38
