|
ConsDB
1.0
Tool for creating consensus genomes from variant databases.
|
Public Member Functions | |
| def | __init__ (self, pos, ref, var, major=0, minor=0, clin=[], afs=[], var_type='', pop_afs={}) |
| def | __add__ (self, v) |
| def | __eq__ (self, v) |
| def | __iadd__ (self, v) |
| def | __repr__ (self) |
| def | __str__ (self) |
| def | af (self) |
| def | calc_afs (self) |
| def | calc_pop_afs (self, pop) |
| def | is_major (self) |
| def | is_empty (self) |
| def | pop_af (self, pop) |
| def | var_code (self) |
Public Attributes | |
| pos | |
| ref | |
| var | |
| major | |
| minor | |
| clin | |
| afs | |
| var_type | |
| pop_afs | |
A sub-class to represent a variant.
Attributes
--------------------
pos : int
Base position of the variant
ref : str
Reference base(s)
var : str
Variant base(s)
major : int
Number of studies that show this variant with AF >= 0.5
minor : int
Number of studies that show this variant with AF < 0.5
clin : list
List of clinical relevances
afs : list
List of allele frequencies, stores as tuples of
(# patients showing var, # patients in study)
var_type : str
What type of variant (SNP, indel, or blank)
pop_afs : dict
Dict containing population allele frequencies
Methods
--------------------
af()
Get a representative allele frequency for the variant
calc_afs()
Calculate float allele frequencies from afs list
calc_pop_afs(pop)
Calculate float allele frequencies for the given population
is_major()
Return if the variant represents a major allele
is_empty()
Return if the variant has no studies supporting it
pop_af(pop)
Get a representative population allele frequency for the variant
and given population.
var_code()
Get the representative variant code for the variant
| def RSEntry.RSEntry.RSVar.__init__ | ( | self, | |
| pos, | |||
| ref, | |||
| var, | |||
major = 0, |
|||
minor = 0, |
|||
clin = [], |
|||
afs = [], |
|||
var_type = '', |
|||
pop_afs = {} |
|||
| ) |
Initialize an instance of the RSVar class. Requires a position, reference allele, and variant allele. All other information is oprtional, and will either be left blank or inferred (in the case of var_type). Parameters: pos: Variant position ref: Reference sequence at the variant position var: Variant sequence major: Number of studies in dbSNP listing this variant as major minor: Number of studies in dbSNP listing this variant as minor clin: Clinical significance of this variant afs: Allele frequency of this allele var_type: Variant type (SNP or indel) of this allele pop_afs: Population allele frequencies
| def RSEntry.RSEntry.RSVar.__add__ | ( | self, | |
| v | |||
| ) |
Implement addition for two RSVar objects.
| def RSEntry.RSEntry.RSVar.__eq__ | ( | self, | |
| v | |||
| ) |
Implement equality checking for two RSVar objects.
| def RSEntry.RSEntry.RSVar.__iadd__ | ( | self, | |
| v | |||
| ) |
Implement incremental addition.
| def RSEntry.RSEntry.RSVar.__repr__ | ( | self | ) |
Implement repr operator.
| def RSEntry.RSEntry.RSVar.__str__ | ( | self | ) |
Implement str operator.
| def RSEntry.RSEntry.RSVar.af | ( | self | ) |
Get a representative allele frequency for the variant.
| def RSEntry.RSEntry.RSVar.calc_afs | ( | self | ) |
Calculate float allele frequencies from afs list.
| def RSEntry.RSEntry.RSVar.calc_pop_afs | ( | self, | |
| pop | |||
| ) |
Calculate float allele frequencies from afs list. Parameters: pop: Population to use
| def RSEntry.RSEntry.RSVar.is_empty | ( | self | ) |
Return if the variant has no studies supporting it.
| def RSEntry.RSEntry.RSVar.is_major | ( | self | ) |
Return if the variant represents a major allele.
| def RSEntry.RSEntry.RSVar.pop_af | ( | self, | |
| pop | |||
| ) |
Get a representative population allele frequency for the variant and given population. Parameters: pop: Population to use
| def RSEntry.RSEntry.RSVar.var_code | ( | self | ) |
Get the representative variant code for the variant.
1.8.17