Skip to content

LD Index

gentropy.dataset.ld_index.LDIndex dataclass

Bases: Dataset

Dataset containing linkage desequilibrium information between variants.

Source code in src/gentropy/dataset/ld_index.py
14
15
16
17
18
19
20
21
22
23
24
25
@dataclass
class LDIndex(Dataset):
    """Dataset containing linkage desequilibrium information between variants."""

    @classmethod
    def get_schema(cls: type[LDIndex]) -> StructType:
        """Provides the schema for the LDIndex dataset.

        Returns:
            StructType: Schema for the LDIndex dataset
        """
        return parse_spark_schema("ld_index.json")

get_schema() -> StructType classmethod

Provides the schema for the LDIndex dataset.

Returns:

Name Type Description
StructType StructType

Schema for the LDIndex dataset

Source code in src/gentropy/dataset/ld_index.py
18
19
20
21
22
23
24
25
@classmethod
def get_schema(cls: type[LDIndex]) -> StructType:
    """Provides the schema for the LDIndex dataset.

    Returns:
        StructType: Schema for the LDIndex dataset
    """
    return parse_spark_schema("ld_index.json")

Schema

root
 |-- variantId: string (nullable = false)
 |-- chromosome: string (nullable = false)
 |-- ldSet: array (nullable = false)
 |    |-- element: struct (containsNull = false)
 |    |    |-- tagVariantId: string (nullable = false)
 |    |    |-- rValues: array (nullable = false)
 |    |    |    |-- element: struct (containsNull = false)
 |    |    |    |    |-- population: string (nullable = false)
 |    |    |    |    |-- r: double (nullable = false)