type: allele_score 

table:
  filename: All_20180418_chr.vcf.gz
  index_filename: All_20180418_chr.vcf.gz.tbi


scores:
  - id: RS
    column_name: RS
    type: str
    desc: dbSNP ID (i.e. rs number)
    histogram:
      type: "null"
      reason: "Histogram is not available for this score."

  - id: RSPOS
    column_name: RSPOS
    type: int
    desc: Chr position reported in dbSNP
    histogram:
      type: "null"
      reason: "Histogram is not available for this score."

  - id: RV
    column_name: RV
    type: bool
    desc: RS orientation is reversed
    histogram:
      type: categorical
      y_log_scale: True

  - id: VP
    column_name: VP
    type: str
    desc: Variation Property. Documentation is at ftp://ftp.ncbi.nlm.nih.gov/snp/specs/dbSNP_BitField_latest.pdf
    histogram:
      type: categorical
      plot_function: "customplot1.py:plot_rightlabels"
      y_log_scale: True     
      displayed_values_count: 10
      label_rotation: 90


  - id: GENEINFO
    column_name: GENEINFO
    type: str
    desc: Pairs each of gene symbol:gene id. The gene symbol and id are delimited by a colon (:) and each pair is delimited by a vertical bar (|)
    histogram:
      type: categorical
      plot_function: "customplot1.py:plot_rightlabels"
      y_log_scale: True     
      displayed_values_count: 10
      label_rotation: 90

  - id: dbSNPBuildID
    column_name: dbSNPBuildID
    type: int
    desc: First dbSNP Build for RS
    histogram:
      type: categorical
      y_log_scale: True
      displayed_values_count: 10
      label_rotation: 90

  - id: SAO
    column_name: SAO
    type: int
    desc: "Variant Allele Origin: 0 - unspecified, 1 - Germline, 2 - Somatic, 3 - Both"
    histogram:
      type: categorical
      y_log_scale: True

  - id: SSR
    column_name: SSR
    type: int
    desc: Variant Suspect Reason Codes (may be more than one value added together) 0 - unspecified, 1 - Paralog, 2 - byEST, 4 - oldAlign, 8 - Para_EST, 16 - 1kg_failed, 1024 - other
    histogram:
      type: categorical
      y_log_scale: True

  - id: WGT
    column_name: WGT
    type: int
    desc: Weight, 00 - unmapped, 1 - weight 1, 2 - weight 2, 3 - weight 3 or more
    histogram:
      type: categorical
      y_log_scale: True

  - id: VC
    column_name: VC
    type: str
    desc: Variation Class
    histogram:
      type: categorical
      y_log_scale: True

  - id: PM
    column_name: PM
    type: bool
    desc: Variant is Precious(Clinical,Pubmed Cited)
    histogram:
      type: categorical
      y_log_scale: True

  - id: TPA
    column_name: TPA
    type: bool
    desc: Provisional Third Party Annotation(TPA) (currently rs from PHARMGKB who will give phenotype data)
    histogram:
      type: categorical
      y_log_scale: True

  - id: PMC
    column_name: PMC
    type: bool
    desc: Links exist to PubMed Central article
    histogram:
      type: categorical
      y_log_scale: True

  - id: S3D
    column_name: S3D
    type: bool
    desc: Has 3D structure - SNP3D table
    histogram:
      type: categorical
      y_log_scale: True

  - id: SLO
    column_name: SLO
    type: bool
    desc: Has SubmitterLinkOut - From SNP->SubSNP->Batch.link_out
    histogram:
      type: categorical
      y_log_scale: True

  - id: NSF
    column_name: NSF
    type: bool
    desc: Has non-synonymous frameshift A coding region variation where one allele in the set changes all downstream amino acids. FxnClass = 44
    histogram:
      type: categorical
      y_log_scale: True

  - id: NSM
    column_name: NSM
    type: bool
    desc: Has non-synonymous missense A coding region variation where one allele in the set changes protein peptide. FxnClass = 42
    histogram:
      type: categorical
      y_log_scale: True

  - id: NSN
    column_name: NSN
    type: bool
    desc: Has non-synonymous nonsense A coding region variation where one allele in the set changes to STOP codon (TER). FxnClass = 41
    histogram:
      type: categorical
      y_log_scale: True

  - id: REF
    column_name: REF
    type: bool
    desc: Has reference A coding region variation where one allele in the set is identical to the reference sequence. FxnCode = 8
    histogram:
      type: categorical
      y_log_scale: True

  - id: SYN
    column_name: SYN
    type: bool
    desc: Has synonymous A coding region variation where one allele in the set does not change the encoded amino acid. FxnCode = 3
    histogram:
      type: categorical
      y_log_scale: True

  - id: U3
    column_name: U3
    type: bool
    desc: In 3' UTR Location is in an untranslated region (UTR). FxnCode = 53
    histogram:
      type: categorical
      y_log_scale: True

  - id: U5
    column_name: U5
    type: bool
    desc: In 5' UTR Location is in an untranslated region (UTR). FxnCode = 55
    histogram:
      type: categorical
      y_log_scale: True

  - id: ASS
    column_name: ASS
    type: bool
    desc: In acceptor splice site FxnCode = 73
    histogram:
      type: categorical
      y_log_scale: True

  - id: DSS
    column_name: DSS
    type: bool
    desc: In donor splice-site FxnCode = 75
    histogram:
      type: categorical
      y_log_scale: True

  - id: INT
    column_name: INT
    type: bool
    desc: In Intron FxnCode = 6
    histogram:
      type: categorical
      y_log_scale: True

  - id: R3
    column_name: R3
    type: bool
    desc: In 3' gene region FxnCode = 13
    histogram:
      type: categorical
      y_log_scale: True

  - id: R5
    column_name: R5
    type: bool
    desc: In 5' gene region FxnCode = 15
    histogram:
      type: categorical
      y_log_scale: True

  - id: OTH
    column_name: OTH
    type: bool
    desc: Has other variant with exactly the same set of mapped positions on NCBI refernce assembly.
    histogram:
      type: categorical
      y_log_scale: True

  - id: CFL
    column_name: CFL
    type: bool
    desc: Has Assembly conflict. This is for weight 1 and 2 variant that maps to different chromosomes on different assemblies.
    histogram:
      type: categorical
      y_log_scale: True

  - id: ASP
    column_name: ASP
    type: bool
    desc: Is Assembly specific. This is set if the variant only maps to one assembly
    histogram:
      type: categorical
      y_log_scale: True

  - id: MUT
    column_name: MUT
    type: bool
    desc: "Is mutation (journal citation, explicit fact): a low frequency variation that is cited in journal and other reputable sources"
    histogram:
      type: categorical
      y_log_scale: True

  - id: VLD
    column_name: VLD
    type: bool
    desc: Is Validated. This bit is set if the variant has 2+ minor allele count based on frequency or genotype data.
    histogram:
      type: categorical
      y_log_scale: True

  - id: G5A
    column_name: G5A
    type: bool
    desc: ">5% minor allele frequency in each and all populations"
    histogram:
      type: categorical
      y_log_scale: True

  - id: G5
    column_name: G5
    type: bool
    desc: ">5% minor allele frequency in 1+ populations"
    histogram:
      type: categorical
      y_log_scale: True

  - id: HD
    column_name: HD
    type: bool
    desc: Marker is on high density genotyping kit (50K density or greater). The variant may have phenotype associations present in dbGaP.
    histogram:
      type: categorical
      y_log_scale: True

  - id: GNO
    column_name: GNO
    type: int # bool
    desc: Genotypes available. The variant has individual genotype (in SubInd table).
    histogram:
      type: categorical
      y_log_scale: True

  - id: KGPhase1
    column_name: KGPhase1
    type: bool
    desc: 1000 Genome phase 1 (incl. June Interim phase 1)
    histogram:
      type: categorical
      y_log_scale: True

  - id: KGPhase3
    column_name: KGPhase3
    type: bool
    desc: 1000 Genome phase 3
    histogram:
      type: categorical
      y_log_scale: True

  - id: CDA
    column_name: CDA
    type: bool
    desc: Variation is interrogated in a clinical diagnostic assay
    histogram:
      type: categorical
      y_log_scale: True

  - id: LSD
    column_name: LSD
    type: bool
    desc: Submitted from a locus-specific database
    histogram:
      type: categorical
      y_log_scale: True

  - id: MTP
    column_name: MTP
    type: bool
    desc: Microattribution/third-party annotation(TPA:GWAS,PAGE)
    histogram:
      type: categorical
      y_log_scale: True

  - id: OM
    column_name: OM
    type: bool
    desc: Has OMIM/OMIA
    histogram:
      type: categorical
      y_log_scale: True

  - id: NOC
    column_name: NOC
    type: bool
    desc: Contig allele not present in variant allele list. The reference sequence allele at the mapped position is not present in the variant allele list, adjusted for orientation.
    histogram:
      type: categorical
      y_log_scale: True

  - id: WTD
    column_name: WTD
    type: bool
    desc: Is Withdrawn by submitter If one member ss is withdrawn by submitter, then this bit is set. If all member ss' are withdrawn, then the rs is deleted to SNPHistory
    histogram:
      type: categorical
      y_log_scale: True

  - id: NOV
    column_name: NOV
    type: bool
    desc: Rs cluster has non-overlapping allele sets. True when rs set has more than 2 alleles from different submissions and these sets share no alleles in common.
    histogram:
      type: categorical
      y_log_scale: True

  - id: CAF
    column_name: CAF
    type: str
    desc: An ordered, comma delimited list of allele frequencies based on 1000Genomes, starting with the reference allele followed by alternate alleles as ordered in the ALT column. Where a 1000Genomes alternate allele is not in the dbSNPs alternate allele set, the allele is added to the ALT column. The minor allele is the second largest value in the list, and was previuosly reported in VCF as the GMAF. This is the GMAF reported on the RefSNP and EntrezSNP pages and VariationReporter
    histogram:
      type: "null"
      reason: "Histogram is not available for this score."

  - id: COMMON
    column_name: COMMON
    type: int
    desc: RS is a common SNP. A common SNP is one that has at least one 1000Genomes population with a minor allele of frequency >= 1% and for which 2 or more founders contribute to that minor allele frequency.
    histogram:
      type: categorical
      y_log_scale: True

  - id: TOPMED
    column_name: TOPMED
    type: str
    desc: An ordered, comma delimited list of allele frequencies based on TOPMed, starting with the reference allele followed by alternate alleles as ordered in the ALT column. The TOPMed minor allele is the second largest value in the list.
    histogram:
      type: "null"
      reason: "Histogram is not available for this score."


default_annotation:
  - source: RS
    name: dbSNP_RS

merge_vcf_scores: true

default_annotation:
  - source: RS
    name: dbSNP_RS
         
meta:
  summary: |
      dbSNP: A public database of genetic variations for research and clinical use.
  description: |

      The Database of Single Nucleotide Polymorphisms (dbSNP), maintained by the NCBI, is a key repository of genetic variation data, including SNPs, small insertions, deletions, and other minor variants. Widely used in research, dbSNP aids studies of population diversity, disease associations, and evolutionary biology. Each variant has a unique Reference SNP ID (rsID), like rs12345, used across scientific studies and databases. Integrated with tools such as ClinVar and RefSeq, dbSNP is essential for annotating variants, exploring their genomic locations, and assessing potential impacts. Freely accessible online, it supports large-scale analyses and is indispensable for research and clinical genomics.
      
      
      [Sherry et al., dbSNP-Database for Single Nucleotide Polymorphisms and Other Classes of Minor Genetic Variation, 
      Genome Research 1999](https://genome.cshlp.org/content/9/8/677.long)
      
      Downloaded on: 10/29/24 
      
      [https://ftp.ncbi.nih.gov/snp/organisms/human\_9606\_b151\_GRCh38p7/VCF/All\_20180418.vcf.gz](https://ftp.ncbi.nih.gov/snp/organisms/human_9606_b151_GRCh38p7/VCF/All_20180418.vcf.gz)
      
      Processing details: dataPrep.sh removes rows above header and remaps chromosome names to have `chr` prefix.
      
  labels:
    reference_genome: hg38/genomes/GRCh38-hg38
