Other features
List of features¶
gentropy.dataset.l2g_features.other.GeneCountFeature
dataclass
¶
Bases: L2GFeature
Counts the number of genes within a specified window size from the study locus.
Source code in src/gentropy/dataset/l2g_features/other.py
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 |
|
compute(study_loci_to_annotate: StudyLocus | L2GGoldStandard, feature_dependency: dict[str, Any]) -> GeneCountFeature
classmethod
¶
Computes the gene count feature.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
study_loci_to_annotate
|
StudyLocus | L2GGoldStandard
|
The dataset containing study loci that will be used for annotation |
required |
feature_dependency
|
dict[str, Any]
|
Dictionary containing dependencies, with gene index and window size |
required |
Returns:
Name | Type | Description |
---|---|---|
GeneCountFeature |
GeneCountFeature
|
Feature dataset |
Source code in src/gentropy/dataset/l2g_features/other.py
136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 |
|
gentropy.dataset.l2g_features.other.ProteinGeneCountFeature
dataclass
¶
Bases: L2GFeature
Counts the number of protein coding genes within a specified window size from the study locus.
Source code in src/gentropy/dataset/l2g_features/other.py
170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 |
|
compute(study_loci_to_annotate: StudyLocus | L2GGoldStandard, feature_dependency: dict[str, Any]) -> ProteinGeneCountFeature
classmethod
¶
Computes the gene count feature.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
study_loci_to_annotate
|
StudyLocus | L2GGoldStandard
|
The dataset containing study loci that will be used for annotation |
required |
feature_dependency
|
dict[str, Any]
|
Dictionary containing dependencies, with gene index and window size |
required |
Returns:
Name | Type | Description |
---|---|---|
ProteinGeneCountFeature |
ProteinGeneCountFeature
|
Feature dataset |
Source code in src/gentropy/dataset/l2g_features/other.py
176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 |
|
gentropy.dataset.l2g_features.other.ProteinCodingFeature
dataclass
¶
Bases: L2GFeature
Indicates whether a gene is protein-coding within a specified window size from the study locus.
Source code in src/gentropy/dataset/l2g_features/other.py
211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 |
|
compute(study_loci_to_annotate: StudyLocus | L2GGoldStandard, feature_dependency: dict[str, Any]) -> ProteinCodingFeature
classmethod
¶
Computes the protein coding feature.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
study_loci_to_annotate
|
StudyLocus | L2GGoldStandard
|
The dataset containing study loci that will be used for annotation |
required |
feature_dependency
|
dict[str, Any]
|
Dictionary containing dependencies, including gene index |
required |
Returns:
Name | Type | Description |
---|---|---|
ProteinCodingFeature |
ProteinCodingFeature
|
Feature dataset with 1 if the gene is protein-coding, 0 otherwise |
Source code in src/gentropy/dataset/l2g_features/other.py
217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 |
|
gentropy.dataset.l2g_features.other.CredibleSetConfidenceFeature
dataclass
¶
Bases: L2GFeature
Distance of the sentinel variant to gene TSS. This is not weighted by the causal probability.
Source code in src/gentropy/dataset/l2g_features/other.py
251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 |
|
compute(study_loci_to_annotate: StudyLocus | L2GGoldStandard, feature_dependency: dict[str, Any]) -> CredibleSetConfidenceFeature
classmethod
¶
Computes the feature.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
study_loci_to_annotate
|
StudyLocus | L2GGoldStandard
|
The dataset containing study loci that will be used for annotation |
required |
feature_dependency
|
dict[str, Any]
|
Dataset that contains the distance information |
required |
Returns:
Name | Type | Description |
---|---|---|
CredibleSetConfidenceFeature |
CredibleSetConfidenceFeature
|
Feature dataset |
Source code in src/gentropy/dataset/l2g_features/other.py
257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 |
|
score_credible_set_confidence(confidence_column: Column) -> Column
classmethod
¶
Expression that assigns a score to the credible set confidence.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
confidence_column
|
Column
|
Confidence column in the StudyLocus object |
required |
Returns:
Name | Type | Description |
---|---|---|
Column |
Column
|
A confidence score between 0 and 1 |
Source code in src/gentropy/dataset/l2g_features/other.py
307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 |
|
Common logic¶
gentropy.dataset.l2g_features.other.common_genecount_feature_logic(study_loci_to_annotate: StudyLocus | L2GGoldStandard, *, gene_index: GeneIndex, feature_name: str, genomic_window: int, protein_coding_only: bool = False) -> DataFrame
¶
Computes the feature.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
study_loci_to_annotate
|
StudyLocus | L2GGoldStandard
|
The dataset containing study loci that will be used for annotation |
required |
gene_index
|
GeneIndex
|
Dataset containing information related to all genes in release. |
required |
feature_name
|
str
|
The name of the feature |
required |
genomic_window
|
int
|
The maximum window size to consider |
required |
protein_coding_only
|
bool
|
Whether to only consider protein coding genes in calculation. |
False
|
Returns:
Name | Type | Description |
---|---|---|
DataFrame |
DataFrame
|
Feature dataset |
Source code in src/gentropy/dataset/l2g_features/other.py
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 47 48 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 |
|
gentropy.dataset.l2g_features.other.is_protein_coding_feature_logic(study_loci_to_annotate: StudyLocus | L2GGoldStandard, *, gene_index: GeneIndex, feature_name: str, genomic_window: int) -> DataFrame
¶
Computes the feature to indicate if a gene is protein-coding or not.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
study_loci_to_annotate
|
StudyLocus | L2GGoldStandard
|
The dataset containing study loci that will be used for annotation |
required |
gene_index
|
GeneIndex
|
Dataset containing information related to all genes in release. |
required |
feature_name
|
str
|
The name of the feature |
required |
genomic_window
|
int
|
The maximum window size to consider |
required |
Returns:
Name | Type | Description |
---|---|---|
DataFrame |
DataFrame
|
Feature dataset, with 1 if the gene is protein-coding, 0 if not. |
Source code in src/gentropy/dataset/l2g_features/other.py
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 121 122 123 124 125 126 127 |
|