Skip to content

finngen_sumstat_preprocess

gentropy.finngen_sumstat_preprocess.FinnGenSumstatPreprocessStep

FinnGen sumstats preprocessing.

Source code in src/gentropy/finngen_sumstat_preprocess.py
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
class FinnGenSumstatPreprocessStep:
    """FinnGen sumstats preprocessing."""

    def __init__(
        self, session: Session, raw_sumstats_path: str, out_sumstats_path: str
    ) -> None:
        """Run FinnGen summary stats preprocessing step.

        Args:
            session (Session): Session object.
            raw_sumstats_path (str): Input raw summary stats path.
            out_sumstats_path (str): Output summary stats path.
        """
        # Process summary stats.
        (
            FinnGenSummaryStats.from_source(session.spark, raw_file=raw_sumstats_path)
            .df.write.mode(session.write_mode)
            .parquet(out_sumstats_path)
        )

__init__(session: Session, raw_sumstats_path: str, out_sumstats_path: str) -> None

Run FinnGen summary stats preprocessing step.

Parameters:

Name Type Description Default
session Session

Session object.

required
raw_sumstats_path str

Input raw summary stats path.

required
out_sumstats_path str

Output summary stats path.

required
Source code in src/gentropy/finngen_sumstat_preprocess.py
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
def __init__(
    self, session: Session, raw_sumstats_path: str, out_sumstats_path: str
) -> None:
    """Run FinnGen summary stats preprocessing step.

    Args:
        session (Session): Session object.
        raw_sumstats_path (str): Input raw summary stats path.
        out_sumstats_path (str): Output summary stats path.
    """
    # Process summary stats.
    (
        FinnGenSummaryStats.from_source(session.spark, raw_file=raw_sumstats_path)
        .df.write.mode(session.write_mode)
        .parquet(out_sumstats_path)
    )