Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Oct 13, 2023
1 parent 3c2c358 commit 20aeeea
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
14 changes: 6 additions & 8 deletions src/otg/dataset/fm_data_extraction.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,24 @@
from __future__ import annotations

from dataclasses import dataclass

from typing import TYPE_CHECKING

from otg.common.session import Session
from otg.dataset.dataset import Dataset

if TYPE_CHECKING:
from pyspark.sql import Column, DataFrame
from pyspark.sql.types import StructType

from typing import Tuple

import hail as hl
import pandas as pd
import numpy as np
import pandas as pd
import pyspark.sql.functions as f
from hail.linalg import BlockMatrix
from pyspark.sql import DataFrame
from pyspark.sql.functions import col, concat, lit
from pyspark.sql.functions import array
from typing import Tuple

from pyspark.sql.functions import array, col, concat, lit


@dataclass
Expand All @@ -33,14 +31,14 @@ class FMDataExtraction(Dataset):

def get_FM_study_locus(self: FMDataExtraction, sumstats: DataFrame) -> Tuple[DataFrame, list]:
"""Get summary statistics for a locus.
Args:
sumstats (DataFrame): summary statistics dataframe to select locus from (currently using all UKBB as an example)
Returns:
lead_SNP_id (str): The lead SNP ID as a string in the format chr1:1234:A:T (needed for hail GRCh38 contigs).
fm_study_locus (DataFrame): A filtered DataFrame containing summary statistics for a specific locus.
"""
# Getting row with the smallest pValueExponent (getting an example lead SNP)
smallest_pValue_row = sumstats.orderBy(col("pValueExponent")).first()
Expand Down
3 changes: 0 additions & 3 deletions src/otg/finemapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,8 @@

from dataclasses import dataclass

import hail as hl

from otg.common.session import Session
from otg.config import FinemappingStepConfig
from otg.dataset.study_locus import StudyLocus
from otg.method.finemapping import Finemapping


Expand Down

0 comments on commit 20aeeea

Please sign in to comment.