Skip to content

L2G Feature

gentropy.method.l2g.feature_factory.L2GFeature dataclass

Bases: Dataset

Locus-to-gene feature dataset.

Source code in src/gentropy/dataset/l2g_feature.py
14
15
16
17
18
19
20
21
22
23
24
25
@dataclass
class L2GFeature(Dataset):
    """Locus-to-gene feature dataset."""

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

        Returns:
            StructType: Schema for the L2GFeature dataset
        """
        return parse_spark_schema("l2g_feature.json")

get_schema() -> StructType classmethod

Provides the schema for the L2GFeature dataset.

Returns:

Name Type Description
StructType StructType

Schema for the L2GFeature dataset

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

    Returns:
        StructType: Schema for the L2GFeature dataset
    """
    return parse_spark_schema("l2g_feature.json")

Schema

root
 |-- studyLocusId: long (nullable = false)
 |-- geneId: string (nullable = false)
 |-- featureName: string (nullable = false)
 |-- featureValue: float (nullable = false)