Fine-Mapping Plan
gentropy.dataset.fine_mapping.FineMappingRoute
¶
Bases: StrEnum
Enum representing the route of the fine-mapping method.
Source code in src/gentropy/dataset/fine_mapping.py
20 21 22 23 24 | |
MULTI_SUSIE_ROUTE = 'multi_susie_route'
class-attribute
instance-attribute
¶
Route for multi-SuSiE fine-mapping methods.
gentropy.dataset.fine_mapping.FineMappingPlanner
dataclass
¶
Bases: Dataset
Class representing a planner for fine-mapping methods.
Examples:¶
data = [("run1", "study1", "multi_susie_route", [("constraint1", True), ("constraint2", False)]), ... ("run2", "study2", "multi_susie_route", [("constraint2", False),])] df = spark.createDataFrame(data, schema=FineMappingPlanner.get_schema()) from gentropy.dataset.fine_mapping import FineMappingPlanner planner = FineMappingPlanner(df) assert isinstance(planner, FineMappingPlanner) planner.df.show(truncate=False) +-----+-------+-----------------+-------------------------------------------+ |runId|studyId|route |constraints | +-----+-------+-----------------+-------------------------------------------+ |run1 |study1 |multi_susie_route|[{constraint1, true}, {constraint2, false}]| |run2 |study2 |multi_susie_route|[{constraint2, false}] | +-----+-------+-----------------+-------------------------------------------+
Source code in src/gentropy/dataset/fine_mapping.py
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 83 84 85 86 87 88 89 90 | |
get_schema() -> t.StructType
classmethod
¶
Get the schema of the planner.
Returns:
| Type | Description |
|---|---|
StructType
|
t.StructType: The schema of the planner. |
Source code in src/gentropy/dataset/fine_mapping.py
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 | |