Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/hn-finemapping' into hn-finemapping
Browse files Browse the repository at this point in the history
  • Loading branch information
hlnicholls committed Oct 18, 2023
2 parents d6258e8 + 72d5479 commit 1dd8ff2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/otg/dataset/fm_data_extraction.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,14 +172,14 @@ def get_matching_snps(
filtered_LDMatrix = filtered_LDMatrix.filter(filtered_LDMatrix['variantIdCol'].cast('string').isin(unique_variant_ids))
fm_filtered_LDMatrix = filtered_LDMatrix.drop("variantIdCol")
return fm_filtered_LDMatrix, fm_filtered_StudyLocus

def allele_flip_check(
self: FMDataExtraction,
fm_filtered_StudyLocus: DataFrame,
SNP_ids_38: list,
) -> DataFrame:
"""Check alleles match between LD matrix and summary statistics.
Function unused as currently not needed with gnomad data"""
df = self.session.createDataFrame(SNP_ids_38, StringType()).toDF("ID")

Expand Down
4 changes: 2 additions & 2 deletions src/otg/method/susie.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

import numpy as np
import pandas as pd
from pyspark.sql import DataFrame
import scipy.linalg
import scipy.special
from pyspark.sql import DataFrame
from scipy.optimize import minimize, minimize_scalar

from otg.common.session import Session
Expand All @@ -17,7 +17,7 @@
@dataclass
class SuSiE:
"""SuSiE fine-mapping of a study locus from fine-mapping-inf package.
Copied untested from fine-mapping-inf package as a placeholder
https://github.com/FinucaneLab/fine-mapping-inf
"""
Expand Down
4 changes: 1 addition & 3 deletions src/otg/susie.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

from __future__ import annotations


from dataclasses import dataclass

if TYPE_CHECKING:
Expand All @@ -14,11 +13,10 @@
import scipy.linalg
import scipy.special

from otg.common.session import Session
from otg.config import SuSiEStepConfig
from otg.method.susie import SuSiE

from otg.common.session import Session


@dataclass
class SuSiEStep(SuSiEStepConfig):
Expand Down

0 comments on commit 1dd8ff2

Please sign in to comment.