Skip to content

Commit 072044e

Browse files
Document Python API for VCF
Closes #364
1 parent 479ec84 commit 072044e

File tree

3 files changed

+26
-2
lines changed

3 files changed

+26
-2
lines changed

bio2zarr/vcf.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1608,7 +1608,7 @@ def mkschema(
16081608

16091609
def convert(
16101610
vcfs,
1611-
out_path,
1611+
vcz_path,
16121612
*,
16131613
variants_chunk_size=None,
16141614
samples_chunk_size=None,
@@ -1617,6 +1617,12 @@ def convert(
16171617
show_progress=False,
16181618
icf_path=None,
16191619
):
1620+
"""
1621+
Convert the VCF data at the specified list of paths
1622+
to VCF Zarr format stored at the specified path.
1623+
1624+
.. todo:: Document parameters
1625+
"""
16201626
if icf_path is None:
16211627
cm = temp_icf_path(prefix="vcf2zarr")
16221628
else:
@@ -1631,7 +1637,7 @@ def convert(
16311637
)
16321638
encode(
16331639
icf_path,
1634-
out_path,
1640+
vcz_path,
16351641
variants_chunk_size=variants_chunk_size,
16361642
samples_chunk_size=samples_chunk_size,
16371643
worker_processes=worker_processes,

docs/_toc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ chapters:
66
sections:
77
- file: vcf2zarr/tutorial
88
- file: vcf2zarr/cli_ref
9+
- file: vcf2zarr/python_api
910
- file: plink2zarr/overview
1011
sections:
1112
- file: plink2zarr/cli_ref

docs/vcf2zarr/python_api.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
(sec-vcf2zarr-python-api)=
2+
# Python API
3+
4+
Basic usage:
5+
```python
6+
import bio2zarr.vcf as v2z
7+
8+
v2z.convert([vcf_path], vcz_path)
9+
```
10+
11+
## API reference
12+
13+
```{eval-rst}
14+
15+
.. autofunction:: bio2zarr.vcf.convert
16+
17+
```

0 commit comments

Comments
 (0)