Skip to content

Commit

Permalink
Add wiki example code links, update changelog summary
Browse files Browse the repository at this point in the history
  • Loading branch information
davmlaw committed Mar 21, 2023
1 parent fbc8909 commit 938bf7f
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ We currently support ~905k transcripts (vs ~141k in UTA v.20210129)

See [changelog](https://github.com/SACGF/cdot/blob/main/CHANGELOG.md)

* 2023-02-23 - pyHGVS related bugfixes
2023-03-31:
* #31 - Fasta file Biocommons HGVS SeqFetcher implementation
* #38 - bugfix for Biocommons HGVS get_tx_for_region

## Install

Expand All @@ -33,7 +35,7 @@ from hgvs.assemblymapper import AssemblyMapper
from cdot.hgvs.dataproviders import JSONDataProvider, RESTDataProvider
hdp = RESTDataProvider() # Uses API server at cdot.cc
# hdp = JSONDataProvider(["./cdot-0.2.10.refseq.grch37.json.gz"]) # Uses local JSON file
# hdp = JSONDataProvider(["./cdot-0.2.14.refseq.grch37.json.gz"]) # Uses local JSON file
am = AssemblyMapper(hdp,
assembly_name='GRCh37',
Expand All @@ -44,6 +46,8 @@ var_c = hp.parse_hgvs_variant('NM_001637.3:c.1582G>A')
am.c_to_g(var_c)
```

[more Biocommons examples](https://github.com/SACGF/cdot/wiki/Biocommons-HGVS-example-code):

[PyHGVS](https://github.com/counsyl/hgvs) example:

```
Expand All @@ -53,10 +57,12 @@ from cdot.pyhgvs.pyhgvs_transcript import JSONPyHGVSTranscriptFactory, RESTPyHGV
genome = FastaFile("/data/annotation/fasta/GCF_000001405.25_GRCh37.p13_genomic.fna.gz")
factory = RESTPyHGVSTranscriptFactory()
# factory = JSONPyHGVSTranscriptFactory(["./cdot-0.2.12.refseq.grch37.json.gz"]) # Uses local JSON file
# factory = JSONPyHGVSTranscriptFactory(["./cdot-0.2.14.refseq.grch37.json.gz"]) # Uses local JSON file
pyhgvs.parse_hgvs_name('NM_001637.3:c.1582G>A', genome, get_transcript=factory.get_transcript_grch37)
```

[more PyHGVS examples](https://github.com/SACGF/cdot/wiki/PyHGVS-example-code):

## Q. What's the performance like?

* UTA public DB: 1-1.5 seconds / transcript
Expand Down

0 comments on commit 938bf7f

Please sign in to comment.