generate ¶
Function to generate information.
transmission ¶
transmission(genotypes_lf: LazyFrame, index_name: str, mother_name: str, father_name: str) -> DataFrame
Compute how each variant are transmite to index case.
Parameters:
-
genotypes_lf
(LazyFrame
) –Genotypes polars.LazyFrame,
gt
column are required. -
index_name
(str
) –Sample name of index case.
-
mother_name
(str
) –Sample name of mother.
-
father_name
(str
) –Sample name of father.
Returns:
-
DataFrame
–polars.DataFrame with transmission information. With genotyping information for index, mother and father. If any of them isn't present value are set to polars.Null. Columns transmission contains a string: concat(chr(index_gt + 33), chr(mother_gt + 33), chr(father_gt + 33)), transmission:
#~!
mean homozygote diploide variant not present in father but with no information about mother.
Raises:
-
NoGTError
–if genotypes_lf not containts gt column.
Source code in src/variantplaner/generate.py
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 |
|
transmission_ped ¶
transmission_ped(genotypes_lf: LazyFrame, pedigree_lf: LazyFrame) -> DataFrame
Compute transmission of each variants.
Warning: only the first sample with two parent are considered.
Parameters:
-
genotypes_lf
(LazyFrame
) –Genotypes polars.LazyFrame,
gt
column are required. -
pedigree_lf
(LazyFrame
) –Pedigree polars.LazyFrame.
Returns:
-
DataFrame
–DataFrame with transmission information
Raises:
-
NoGTError
–If genotypes_lf not contains gt column.
Source code in src/variantplaner/generate.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
|