{"id":47344895,"url":"https://github.com/elimuinformatics/vcf2hl7v2","last_synced_at":"2026-03-17T23:11:28.669Z","repository":{"id":40333078,"uuid":"362943458","full_name":"elimuinformatics/vcf2hl7v2","owner":"elimuinformatics","description":"vcf2hl7v2: a utility to convert VCF files into HL7 V2 format for genomics-EHR integration","archived":false,"fork":false,"pushed_at":"2022-11-09T18:28:32.000Z","size":613,"stargazers_count":4,"open_issues_count":3,"forks_count":3,"subscribers_count":10,"default_branch":"master","last_synced_at":"2023-10-25T20:39:06.785Z","etag":null,"topics":["hl7","hl7v2","vcf"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elimuinformatics.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-04-29T20:47:15.000Z","updated_at":"2023-10-25T20:39:06.786Z","dependencies_parsed_at":"2023-01-22T11:45:56.401Z","dependency_job_id":null,"html_url":"https://github.com/elimuinformatics/vcf2hl7v2","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/elimuinformatics/vcf2hl7v2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elimuinformatics%2Fvcf2hl7v2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elimuinformatics%2Fvcf2hl7v2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elimuinformatics%2Fvcf2hl7v2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elimuinformatics%2Fvcf2hl7v2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elimuinformatics","download_url":"https://codeload.github.com/elimuinformatics/vcf2hl7v2/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elimuinformatics%2Fvcf2hl7v2/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30635156,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-17T22:38:22.569Z","status":"ssl_error","status_checked_at":"2026-03-17T22:38:11.804Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hl7","hl7v2","vcf"],"created_at":"2026-03-17T23:11:28.001Z","updated_at":"2026-03-17T23:11:28.654Z","avatar_url":"https://github.com/elimuinformatics.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## **VCF to HL7 V2 Converter**\n\n### Introduction\n\nVCF-formatted files are the lingua franca of next-generation sequencing, whereas HL7 Version 2 messaging format is the predominant means by which labs send structured results to Electronic Health Records (EHRs). EHRs can directly import HL7 V2 formatted results that conform to the [HL7 Lab Results Interface Implementation Guide](https://www.hl7.org/documentcenter/public/standards/dstu/V251_IG_LRI_R1_STU3_2018JUN.pdf). Here, we provide an open source utility for converting variants from VCF format into HL7 V2 format. Details of the translation logic are on the [manual page](https://github.com/elimuinformatics/vcf2hl7v2/blob/master/docs/Manual.md).\n\n### Install\nBefore installing vcf2hl7v2 you need to install cython and wheel.\n```\npip install cython wheel\n```\nNow, install vcf2hl7v2 binary from pip.\n```\npip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ vcf2hl7v2\n```\n\n### Quick Examples\n(some sample VCF files are [here](https://github.com/elimuinformatics/vcf2hl7v2/tree/master/vcf2hl7v2/test))\n\n```python\n\u003e\u003e\u003e import vcf2hl7v2\n\u003e\u003e\u003e vcf_hl7v2_converter = vcf2hl7v2.Converter('sample.vcf', 'GRCh37')\n\u003e\u003e\u003e vcf_hl7v2_converter.convert()\n```\n\n### Logging\n\nYou can use python standard [logging](https://docs.python.org/3/library/logging.html) to enable logs. Two loggers ('vcf2hl7v2.general') and ('vcf2hl7v2.invalidrecord') are available to configure.\n* **vcf2hl7v2.general**: standard library logs. \n* **vcf2hl7v2.invalidrecord**: logs all the records from vcf file which are in conversion region but are not converted to HL7 V2 format.\n\n```python\n\u003e\u003e\u003e import logging\n# create logger\n\u003e\u003e\u003e logger = logging.getLogger('vcf2hl7v2.invalidrecord')\n\u003e\u003e\u003e logger.setLevel(logging.DEBUG)\n# create console handler and set level to debug\n\u003e\u003e\u003e ch = logging.FileHandler('invalidrecord.log')\n\u003e\u003e\u003e ch.setLevel(logging.DEBUG)\n# create formatter\n\u003e\u003e\u003e formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')\n# add formatter to ch\n\u003e\u003e\u003e ch.setFormatter(formatter)\n# add ch to logger\n\u003e\u003e\u003e logger.addHandler(ch)\n```\n\n### Scope\n\nSoftware converts somatic and germline simple variants (SNVs, MNVs, Indels), along with zygosity and phase relationships, for autosomes, sex chromosomes, and mitochondrial DNA. Select clinical annotations (e.g. clinical significance, phenotype), supplied in a separate annotation file are incorporated into the conversion.\n\n* Not supported\n    * **Structural variants**: Software does not support conversion of structural variants (where INFO.SVTYPE is present). \n    * **Alt contigs**: Software does not support conversion of variants aligned to Alt contigs. We recommend caution in using this software against VCFs generated with an alternate-locus aware variant caller, as variants mapped to Alt contigs will not be converted.\n    * **Query liftover**: Software assumes that regions (conversion region, studied region) and VCF are based on the same genomic build. \n    * **Chromosome synonyms (e.g. '1' vs. 'chr1')**: Software assumes that chromosome representation is consistent between regions (e.g. in BED files) and VCF. For instance, if VCF uses 'chr1', then BED file must also use 'chr1' \n\n### License and Limitations\n\nSoftware is available for use under an [Apache 2.0 license](https://opensource.org/licenses/Apache-2.0), and is intended solely for experimental use, to help further Genomics-EHR integration exploration. Software is expressly not ready to be used with identifiable patient data or in delivering care to patients. Code issues should be tracked here. Comments and questions can also be directed to info@elimu.io or srikarchamala@gmail.com.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felimuinformatics%2Fvcf2hl7v2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felimuinformatics%2Fvcf2hl7v2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felimuinformatics%2Fvcf2hl7v2/lists"}