Giter Site home page Giter Site logo

vcf2fhir-retro's Introduction

VCF to FHIR Converter

Introduction

VCF-formatted files are the lingua franca of next-generation sequencing, whereas HL7 FHIR is emerging as a standard language for electronic health record interoperability. A growing number of clinical genomics applications are emerging, based on the HL7 FHIR Genomics standard. Here, we provide an open source utility for converting variants from VCF format into HL7 FHIR Genomics format.Details of the translation logic are on the manual page. Conceptually, the utility takes a VCF as input and outputs a FHIR Genomics report.

Install

pip install vcf2fhir

Quick Examples

>>> import vcf2fhir
>>> oVcf2Fhir = vcf2fhir.Converter('sample.vcf', 'GRCh37')
>>> oVcf2Fhir.convert()

Logging

You can use python standard logging to enable logs. Two logger ('vcf2fhir.general') and ('vcf2fhir.invalidrecord') are avialble to configure.

  • vcf2fhir.general: standard library logs.
  • vcf2fhir.invalidrecord: logs all the records from vcf file which are in conversion region but are not converted to fhir format.
>>> import logging
# create logger
>>> logger = logging.getLogger('vcf2fhir.invalidrecord')
>>> logger.setLevel(logging.DEBUG)
# create console handler and set level to debug
>>> ch = logging.FileHandler('invalidrecord.log')
>> ch.setLevel(logging.DEBUG)
# create formatter
>>> formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
# add formatter to ch
>>> ch.setFormatter(formatter)
# add ch to logger
>>> logger.addHandler(ch)

Scope

Software converts simple variants (SNVs, Indels), along with zygosity and phase relationships, for autosomes, sex chromosomes, and mitochondrial DNA.

  • Not supported
    • Structural variants: Software does not support conversion of structural variants.
    • 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.
    • Query liftover: Software assumes that regions (conversion region, studied region, noncallable region) and VCF are based on the same genomic build.
    • 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'

License and Limitations

Software is available for use under an Apache 2.0 license, 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 [email protected] or [email protected].

vcf2fhir-retro's People

Contributors

srgothi92 avatar srikarchamala avatar

Stargazers

 avatar  avatar endrebak.ada avatar Shubham Londhe avatar

Watchers

James Cloos avatar Shubham Londhe avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.