@@ -36,6 +36,7 @@ class ScoringFile:
36
36
37
37
You can make ``ScoringFiles`` with a path to a scoring file with minimal metadata:
38
38
39
+ >>> from ..lib import GenomeBuild
39
40
>>> sf = ScoringFile(Config.ROOT_DIR / "tests" / "data" / "custom.txt")
40
41
>>> sf # doctest: +ELLIPSIS
41
42
ScoringFile('.../custom.txt', target_build=None)
@@ -279,6 +280,8 @@ def download(self, directory, overwrite=False):
279
280
:returns: None
280
281
281
282
>>> import tempfile, os
283
+ >>> from ..lib import GenomeBuild
284
+
282
285
>>> with tempfile.TemporaryDirectory() as tmp_dir:
283
286
... ScoringFile("PGS000001").download(tmp_dir)
284
287
... print(os.listdir(tmp_dir))
@@ -320,6 +323,7 @@ def normalise(
320
323
321
324
Takes care of quality control.
322
325
326
+ >>> from ..lib import GenomeBuild
323
327
>>> testpath = Config.ROOT_DIR / "tests" / "data" / "PGS000001_hmPOS_GRCh38.txt.gz"
324
328
>>> variants = ScoringFile(testpath).normalise()
325
329
>>> for x in variants: # doctest: +ELLIPSIS
@@ -383,6 +387,7 @@ class ScoringFiles:
383
387
384
388
You can use publications or trait accessions to instantiate:
385
389
390
+ >>> from ..lib import GenomeBuild
386
391
>>> ScoringFiles("PGP000001", target_build=GenomeBuild.GRCh37)
387
392
ScoringFiles('PGS000001', 'PGS000002', 'PGS000003', target_build=GenomeBuild.GRCh37)
388
393
0 commit comments