Skip to content

Commit 27d52da

Browse files
committed
add calclib to docs
1 parent 71dbccf commit 27d52da

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

docs/conf.py

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
autoapi_dirs = [
3030
"../pgscatalog.corelib/src/pgscatalog",
3131
"../pgscatalog.matchlib/src/pgscatalog",
32+
"../pgscatalog.calclib/src/pgscatalog",
3233
]
3334
# see _templates/autoapi/index.rst for autoapi fix
3435
autoapi_template_dir = "_templates/autoapi"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from .polygenicscore import PolygenicScore
2+
3+
__all__ = ["PolygenicScore"]

pgscatalog.calclib/src/pgscatalog/calclib/polygenicscore.py

+2
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ def __repr__(self):
6565
return f"{type(self).__name__}(sampleset={repr(self.sampleset)}, path={repr(self.path)}, df={df})"
6666

6767
def read(self):
68+
"""Read a PGS file as a pandas dataframe"""
6869
if self.df is None:
6970
df = (
7071
pd.read_table(self.path)
@@ -86,6 +87,7 @@ def average(self):
8687
return self.df
8788

8889
def write(self, outdir, split=False):
90+
"""Write a PGS to a compressed TSV"""
8991
outdir = pathlib.Path(outdir)
9092
if split:
9193
for sampleset, group in self.df.groupby("sampleset"):

0 commit comments

Comments
 (0)