Skip to content

Commit

Permalink
Merge branch 'main' into issue-442
Browse files Browse the repository at this point in the history
  • Loading branch information
korikuzma authored Sep 17, 2024
2 parents 1a35b71 + 10157c3 commit d9a37b2
Show file tree
Hide file tree
Showing 3 changed files with 168 additions and 114 deletions.
14 changes: 7 additions & 7 deletions docs/extras/vcf_annotator.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The examples run from the root of the vrs-python directory and assumes that `inp
To see the help page:

```commandline
python3 -m src.ga4gh.vrs.extras.vcf_annotation --help
vrs-annotate vcf --help
```

### Use local SeqRepo Data Proxy with default root directory
Expand All @@ -20,10 +20,10 @@ The tool uses a SeqRepo data proxy. By default, the local instance at `/usr/loca
Example of how to run:

```commandline
python3 -m src.ga4gh.vrs.extras.vcf_annotation --vcf_in input.vcf.gz --vcf_out output.vcf.gz --vrs_pickle_out vrs_objects.pkl
vrs-annotate vcf input.vcf.gz --vcf_out output.vcf.gz --vrs_pickle_out vrs_objects.pkl
```

`--vcf_in` specifies the path of the input VCF file to annotate. `--vcf_out` specifies the path of the output annotated VCF file. The `--vrs_pickle_out` specifies the path of the output pickle file containing VRS data (Both vcf_out and vrs_pickle_out are optional, but at least one __must__ be provided).
Pass the path of the input VCF file as the argument to the script. Use either `--vcf_out` to specify the path of the output annotated VCF file, or `--vrs_pickle_out` to specify the path of the output pickle file containing VRS data (both `vcf_out` and `vrs_pickle_out` are optional, but at least one __must__ be provided).

### Use local SeqRepo Data Proxy with different

Expand All @@ -32,7 +32,7 @@ You can change the root directory of SeqRepo by using `seqrepo_root_dir`.
To use the local SeqRepo data proxy with SeqRepo root directory at `vrs-python/seqrepo/latest`:

```commandline
python3 -m src.ga4gh.vrs.extras.vcf_annotation --vcf_in input.vcf.gz --vcf_out output.vcf.gz --vrs_pickle_out vrs_objects.pkl --seqrepo_root_dir vrs-python/seqrepo/latest
vrs-annotate vcf input.vcf.gz --vcf_out output.vcf.gz --vrs_pickle_out vrs_objects.pkl --seqrepo_root_dir vrs-python/seqrepo/latest
```

### Use the REST SeqRepo Data Proxy with default base url
Expand All @@ -42,15 +42,15 @@ You can change the data proxy type by using: `--seqrepo_dp_type` (options are `l
To use the REST SeqRepo data proxy at default url: `http://localhost:5000/seqrepo`:

```commandline
python3 -m src.ga4gh.vrs.extras.vcf_annotation --vcf_in input.vcf.gz --vcf_out output.vcf.gz --vrs_pickle_out vrs_objects.pkl --seqrepo_dp_type rest
vrs-annotate vcf input.vcf.gz --vcf_out output.vcf.gz --vrs_pickle_out vrs_objects.pkl --seqrepo_dp_type rest
```

### Use the REST SeqRepo Data Proxy with different base url
You can change the SeqRepo REST base url by using: `--seqrepo_base_url`.

To use the REST SeqRepo data proxy, at custom url: `http://custom.url:5000/seqrepo`:
```commandline
python3 -m src.ga4gh.vrs.extras.vcf_annotation --vcf_in input.vcf.gz --vcf_out output.vcf.gz --vrs_pickle_out vrs_objects.pkl --seqrepo_dp_type rest --seqrepo_base_url http://custom.url:5000/seqrepo
vrs-annotate vcf input.vcf.gz --vcf_out output.vcf.gz --vrs_pickle_out vrs_objects.pkl --seqrepo_dp_type rest --seqrepo_base_url http://custom.url:5000/seqrepo
```

### Other Options
Expand All @@ -67,4 +67,4 @@ python3 -m src.ga4gh.vrs.extras.vcf_annotation --vcf_in input.vcf.gz --vcf_out o
>Require validation checks to pass in order to return a VRS object
`--help`
>Show the options available
>Show the options available
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ Changelog = "https://github.com/ga4gh/vrs-python/releases"
Source = "https://github.com/ga4gh/vrs-python"
"Bug Tracker" = "https://github.com/ga4gh/vrs-python/issues"

[project.scripts]
vrs-annotate = "ga4gh.vrs.extras.vcf_annotation:_cli"

[build-system]
requires = ["setuptools>=65.3", "setuptools_scm>=8"]
build-backend = "setuptools.build_meta"
Expand Down
Loading

0 comments on commit d9a37b2

Please sign in to comment.