Skip to content

Commit

Permalink
fix: vendor ldsc into the package
Browse files Browse the repository at this point in the history
  • Loading branch information
zietzm committed Oct 10, 2024
1 parent 21eb61f commit 724ab6e
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 64 deletions.
14 changes: 5 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "maxgcp"
version = "0.1.3"
version = "0.1.4"
description = "Optimized phenotype definitions boost GWAS power"
authors = [
{name = "zietzm", email = "[email protected]"}
Expand All @@ -12,9 +12,10 @@ dependencies = [
"typer>=0.12.4",
"rich>=13.7.1",
"polars>=1.5.0",
"igwas",
"ldsc",
"pymbend",
"igwas>=0.1.0",
"pymbend>=0.1.0",
"bitarray>=2.9.2",
"pyzstd>=0.16.1",
]
readme = "README.md"
requires-python = ">= 3.10"
Expand Down Expand Up @@ -49,8 +50,3 @@ dev-dependencies = [
"ruff>=0.6.2",
"pytest>=8.3.2",
]

[tool.uv.sources]
igwas = { git = "https://github.com/tatonetti-lab/indirect-gwas" }
ldsc = { git = "https://github.com/zietzm/ldsc", branch = "py3" }
pymbend = { git = "https://github.com/zietzm/pymbend" }
12 changes: 6 additions & 6 deletions src/maxgcp/cli/ldsc.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
from pathlib import Path
from typing import Annotated

import ldsc.scripts.ldsc
import ldsc.scripts.munge_sumstats
import typer

from maxgcp.ldsc.scripts import ldsc, munge_sumstats

logger = logging.getLogger("rich")

app = typer.Typer(
Expand Down Expand Up @@ -50,7 +50,7 @@ def ldsc_munge(
] = 0.0,
) -> None:
"""Process a GWAS summary statistics file using LDSC."""
args = ldsc.scripts.munge_sumstats.parser.parse_args(
args = munge_sumstats.parser.parse_args(
[
"--sumstats",
gwas_path.as_posix(),
Expand All @@ -70,7 +70,7 @@ def ldsc_munge(
f"{signed_sumstat_col},{signed_sumstat_null}",
]
)
ldsc.scripts.munge_sumstats.munge_sumstats(args)
munge_sumstats.munge_sumstats(args)


@app.command(name="rg")
Expand All @@ -92,7 +92,7 @@ def ldsc_rg(
],
) -> None:
"""Compute genetic covariances using LDSC."""
args = ldsc.scripts.ldsc.parser.parse_args(
args = ldsc.parser.parse_args(
[
"--rg",
",".join(p.as_posix() for p in gwas_paths),
Expand All @@ -104,4 +104,4 @@ def ldsc_rg(
output_stem.as_posix(),
]
)
ldsc.scripts.ldsc.main(args)
ldsc.main(args)
1 change: 1 addition & 0 deletions src/maxgcp/ldsc
Submodule ldsc added at 16ae5e
Empty file removed tests/__init__.py
Empty file.
64 changes: 15 additions & 49 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 724ab6e

Please sign in to comment.