Welcome to symetrics’s documentation!

Indices and tables

API Documentation for symetrics_api module

Note: Please download the necessary database and lookup dataset first

  • Gnomad Database: https://github.com/KalinNonchev/gnomAD_DB
  • Symetrics Lookup files: 10.5281/zenodo.1003981 - for update
class symetrics.Symetrics(db)[source]
connect_to_database()[source]

This initalize the connection of the symetrics database set when an instance of the class is created

Args:

None

Returns:

conn: an sqlite3 connection object linked to the symetrics database

get_gnomad_constraints(data='', gene='')[source]

Get the constraints from gnomad (synonymous z score, missense z score, loss of function z scores, probability of loss of function intolerance) of a given gene

Args:

gene: A string representing the HGNC Symbol of a gene

Returns:

gnomad_data: A dictionary of the synonymous z score, missense z score, loss of function z scores, probability of loss of function intolerance)

Examples:

>>> from symetrics import *
>>> symetrics = Symetrics('symetrics.db')
>>> gnomad = symetrics.get_gnomad_constraints(gene = 'A1BG')
get_gnomad_data(variant: VariantObject)[source]

Get the gnomad information related to the alleles of the given variant (allele count, allele number and allele frequency)

Args:

variant: A VariantObject instance representing the chromosome, position, reference allele and alternative allele of a variant

Returns:

gnomad_data: A dictionary containing the AC, AN, AF and variant information

Examples:

>>> from symetrics import *
>>> symetrics = Symetrics('symetrics.db')
>>> variant_hg19 = VariantObject(chr='7',pos='91763673',ref='C',alt='A',genome=GenomeReference.hg19)
>>> variant_hg38 = VariantObject(chr='7',pos='91763673',ref='C',alt='A',genome=GenomeReference.hg38)
>>> gnomad_hg19 = symetrics.get_gnomad_data(variant_hg19)
>>> gnomad_hg38 = symetrics.get_gnomad_data(variant_hg38)
get_prop_score(group='SYNVEP', gene='')[source]

Get the SYMETRICS score for a given gene abd metrics group. The score was calculated from the pooled z proportion test of different metrics group with their corresponding threhold:

  • SYNVEP: 0.5

  • GERP: 4

  • CpG:

  • CpG_exon: 1

  • RSCU:

  • dRSCU:

  • SpliceAI: 0.8

  • SURF: 0.3

Args:

gene: A string representing the HGNC Symbol of a gene

Returns:

scores: A dictionary returning the pvalues and fdr acquired from the test and the score before and after scaling.

Examples:

>>> from symetrics import *
>>> symetrics = Symetrics('symetrics.db')
>>> score = symetrics.get_prop_score(group = 'SYNVEP',gene = 'A1BG')
get_silva_score(variant: VariantObject)[source]

Get the RSCU, dRSCU, GERP and CpG/CpG_Exon of a given variant (reference: hg19)

Args:

variant: A VariantObject instance representing the chromosome, position, reference allele and alternative allele of a variant

Returns:

silva_scores: A dictionary returning the scores along with the variant information.

Examples:

>>> from symetrics import *
>>> symetrics = Symetrics('symetrics.db')
>>> variant = VariantObject(chr='7',pos='91763673',ref='C',alt='A',genome=GenomeReference.hg19)
>>> silva = symetrics.get_silva_scores(variant)
get_spliceai_score(variant: VariantObject)[source]

Get the SpliceAI a given variant (reference: hg38) https://spliceailookup.broadinstitute.org/

Args:

variant: A VariantObject instance representing the chromosome, position, reference allele and alternative allele of a variant

Returns:

spliceai_score: A dictionary returning the scores along with the variant information.

Examples:

>>> from symetrics import *
>>> symetrics = Symetrics('symetrics.db')
>>> variant = VariantObject(chr='7',pos='91763673',ref='C',alt='A',genome=GenomeReference.hg38)
>>> spliceai = symetrics.get_spliceai_score(variant)
get_surf_score(variant: VariantObject)[source]

Get the SURF a given variant (reference: hg38)

Args:

variant: A VariantObject instance representing the chromosome, position, reference allele and alternative allele of a variant

Returns:

surf_scores: A dictionary returning the scores along with the variant information.

Examples:

>>> from symetrics import *
>>> symetrics = Symetrics('symetrics.db')
>>> variant = VariantObject(chr='7',pos='91763673',ref='C',alt='A',genome=GenomeReference.hg38)
>>> surf = symetrics.get_surf_score(variant)
get_synvep_score(variant: VariantObject)[source]

Get the SYNVEP a given variant (reference: hg38/hg19) https://services.bromberglab.org/synvep/home

Args:

variant: A VariantObject instance representing the chromosome, position, reference allele and alternative allele of a variant

Returns:

synvep_scores: A dictionary returning the scores along with the variant information.

Examples:

>>> from symetrics import *
>>> symetrics = Symetrics('symetrics.db')
>>> variant_hg19 = VariantObject(chr='7',pos='91763673',ref='C',alt='A',genome=GenomeReference.hg19)
>>> variant_hg38 = VariantObject(chr='7',pos='91763673',ref='C',alt='A',genome=GenomeReference.hg38)
>>> synvep_hg19 = symetrics.get_synvep_score(variant_hg19)
>>> synvep_hg38 = symetrics.get_synvep_score(variant_hg38)
liftover(variant: VariantObject)[source]

Perform a conversion of the variant position based from their original reference to a target reference. If hg38 is given, it will be converted to hg19 and otherwise

Args:

variant: A VariantObject instance representing the chromosome, position, reference allele and alternative allele of a variant

Returns:

liftover_variant: A VariantObject instance representing the chromosome, position, reference allele and alternative allele of a variant after liftover

Exampless:

>>> from symetrics import *
>>> symetrics = Symetrics('symetrics.db')
>>> variant_hg19 = VariantObject(chr='7',pos='91763673',ref='C',alt='A',genome=GenomeReference.hg19)
>>> variant_hg38 = symetrics_db.liftover(variant_hg19)