|
def | __init__ (s, vcfReader, pedReader, pen, det, mode, minCov, missing, perm) |
| Constructor. More...
|
|
def | GetListEntries (s, theList, positions) |
| Returns a list that contains the elements of theList at positions positions. More...
|
|
def | ParsePedfile (s, pedReader, vcfReader) |
| Extract sample phenotypes from the pedfile. More...
|
|
def | GetGenotypes (s, variantLine) |
| Returns two list of genotypes for all samples in variantLine. More...
|
|
def | GetIntersectInds (s, list1, list2) |
| Returns a list of indices of elements of list1 that are also in list2. More...
|
|
def | InGenotypeGroup (s, g1, g2, mode) |
| Returns if g1 is in a genotype group with g2. More...
|
|
def | IsRetained (s, pos, genotypes, alleles, mode) |
| Returns, if the variant is retained and the p-value of the Fisher test. More...
|
|
def | InRegion (s, pos, mode) |
| Returns if the position is valid for this mode. More...
|
|
def | DoMendelianFiltrationOne (s) |
| Perform the Mendelian Filtration for s.mode as mode of inheritance. More...
|
|
def | DoMendelianFiltrationAll (s, allModes) |
| Perform the Mendelian Filtration for all possible modi of inheritance. More...
|
|
def | DoMendelianFiltrationAny (s, allModes) |
| Perform the Mendelian Filtration for any mode of inherintace. More...
|
|
The genotypes that are expected of causal variants in affected samples.
It must be one of the following:
* homRef: homozygous reference
* homAlt: homozygous alternative
* hetRefAlt: heterozygous reference / alternative
* hetAltAlt: heterozygous alternative / alternative
* hemRef: hemizygous reference / -
* hemAlt: hemizygous alternative / -
* unk: unknown genotype. This occurs for example, when a genotype call is
not accepted due to small coverage. It is not correct to assume
homRef then.
def cls.MendelianFiltering.CMendelianFiltering.DoMendelianFiltrationAll |
( |
|
s, |
|
|
|
allModes |
|
) |
| |
Perform the Mendelian Filtration for all possible modi of inheritance.
Perform the Mendelian Filtration for all possible modi of inheritance.
Write each variant from the input to the output and add a column for
each mode of inheritance, which holds 1, if the variant is retained
for this mode of inheritance and 0, if the variant is exluded for
this mode of inheritance.
@param allModes All modes of inheritance. Currently
cmd.MendelianFiltrator.INHERITANCEMODELS
def cls.MendelianFiltering.CMendelianFiltering.GetGenotypes |
( |
|
s, |
|
|
|
variantLine |
|
) |
| |
Returns two list of genotypes for all samples in variantLine.
Returns a tuple of two lists, which hold the genotype information
for all samples in the order they are listed in the vcfReader.FirstLine
1st list: genotypeList = [hem_alt, hom_alt, ...]
2nd list: alleleList = [[1], [2,2], ...]
@param variantLine A line from the input vcf file.
@return A tuple of two lists.
def cls.MendelianFiltering.CMendelianFiltering.InGenotypeGroup |
( |
|
s, |
|
|
|
g1, |
|
|
|
g2, |
|
|
|
mode |
|
) |
| |
Returns if g1 is in a genotype group with g2.
Returns, if g1 and g2 have the same effect of the phenotype with
respect to the mode. E.g. g1=[1,1] and mode = autDom. Then return
true for g2=[0,1] (because g2 has THE alt allele 1 and that suffices
for dominant), but g2=[2,2] returns false, because 2 is another alt
allele than 1, even though it is hom_alt.
@param g1 Genotype 1
@param g2 Genotype 2
@param mode The Mendelian mode under which to compare g1 and g2.
@return @c True, if g1 is in a genotype group with g2, @c False else.
def cls.MendelianFiltering.CMendelianFiltering.InRegion |
( |
|
s, |
|
|
|
pos, |
|
|
|
mode |
|
) |
| |
Returns if the position is valid for this mode.
Returns if the genomic position pos is inside the regions defined
by s.RegionsPerMode for the given mode
@param pos @c List The genomic position to check as [CHR, COORD]
@param mode The Mendelian mode of inheritance. One of
s.RegionsPerMode.keys()
@return @c True, if pos is inside the regions defined in
s.RegionsPerMode. @c False, else.
def cls.MendelianFiltering.CMendelianFiltering.IsRetained |
( |
|
s, |
|
|
|
pos, |
|
|
|
genotypes, |
|
|
|
alleles, |
|
|
|
mode |
|
) |
| |
Returns, if the variant is retained and the p-value of the Fisher test.
Returns a tuple of
(boolean, float). First value is true
, if the variant is retained under the given mode for the given samples, False
, if the variant does not suffice the assumptions of the model. Second value is the p-value of the Fisher exact test with the null hypothesis that the genotypes are equally distributed between affected and unaffected samples.
- Parameters
-
pos | The genomic position as a list. Format [CHR, COORD] |
genotypes | List The return value of s.GetGenotypes[0] |
alleles | List The return value of s.GetGenotypes[1] |
mode | The Medelian mode of inheritance. One of cmd.MendelianFiltrator.INHERITANCEMODELS |
- Returns
True
, if the variant is retained. False
, if the variant is filtered out.