A library to decode “bitfield” information in dbSNP. In VCF format, bitfiled is contained in the “VP” field in the INFO column.

Further details of the format is shown in

how to install

gem install bio-dbsnp

how to use

require 'bio-dbsnp'

vp = "050000000000000000000200"
bf = Bio::NCBI::Dbsnp::Bitfield.parse vp
bf.version #=> 5
bf.variation_class #=> :dips

See lib/bio/ncbi/dbsnp/bitfield.rb for implementation. spec/bio-dbsnp_spec.rb also describes a usage.


Copyright © 2011 Hiroyuki Mishima (missy at, @mishimahryk at Twitter). See LICENSE.txt (the MIT Licence) for further details.