bio-vcf 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Gemfile +16 -0
- data/Gemfile.lock +78 -0
- data/LICENSE.txt +20 -0
- data/README.md +120 -0
- data/Rakefile +58 -0
- data/VERSION +1 -0
- data/bin/bio-vcf +121 -0
- data/features/step_definitions/bio-vcf_steps.rb +0 -0
- data/features/support/env.rb +13 -0
- data/lib/bio-vcf.rb +15 -0
- data/lib/bio-vcf/vcf.rb +3 -0
- data/lib/bio-vcf/vcfgenotypefield.rb +43 -0
- data/lib/bio-vcf/vcfheader.rb +42 -0
- data/lib/bio-vcf/vcfline.rb +11 -0
- data/lib/bio-vcf/vcfrecord.rb +55 -0
- data/test/data/input/somaticsniper.vcf +87 -0
- metadata +163 -0
data/Gemfile
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
source "http://rubygems.org"
|
2
|
+
# Add dependencies required to use your gem here.
|
3
|
+
# Example:
|
4
|
+
# gem "activesupport", ">= 2.3.5"
|
5
|
+
|
6
|
+
# Add dependencies to develop your gem here.
|
7
|
+
# Include everything needed to run rake, tests, features, etc.
|
8
|
+
group :development do
|
9
|
+
gem "minitest", "~> 5.0.7"
|
10
|
+
gem "rspec", "~> 2.8.0"
|
11
|
+
gem "cucumber", ">= 0"
|
12
|
+
gem "jeweler", "~> 1.8.4", :git => "https://github.com/technicalpickles/jeweler.git"
|
13
|
+
gem "bundler", ">= 1.0.21"
|
14
|
+
# gem "bio", ">= 1.4.2"
|
15
|
+
gem "rdoc", "~> 3.12"
|
16
|
+
end
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,78 @@
|
|
1
|
+
GIT
|
2
|
+
remote: https://github.com/technicalpickles/jeweler.git
|
3
|
+
revision: f7e0a55a207d83f56637dd8fbabf26a803410faf
|
4
|
+
specs:
|
5
|
+
jeweler (1.8.7)
|
6
|
+
builder
|
7
|
+
bundler (~> 1.0)
|
8
|
+
git (>= 1.2.5)
|
9
|
+
github_api (= 0.10.1)
|
10
|
+
highline (>= 1.6.15)
|
11
|
+
nokogiri (= 1.5.10)
|
12
|
+
rake
|
13
|
+
rdoc
|
14
|
+
|
15
|
+
GEM
|
16
|
+
remote: http://rubygems.org/
|
17
|
+
specs:
|
18
|
+
addressable (2.3.5)
|
19
|
+
builder (3.2.2)
|
20
|
+
cucumber (1.3.2)
|
21
|
+
builder (>= 2.1.2)
|
22
|
+
diff-lcs (>= 1.1.3)
|
23
|
+
gherkin (~> 2.12.0)
|
24
|
+
multi_json (~> 1.3)
|
25
|
+
diff-lcs (1.1.3)
|
26
|
+
faraday (0.8.8)
|
27
|
+
multipart-post (~> 1.2.0)
|
28
|
+
gherkin (2.12.1)
|
29
|
+
multi_json (~> 1.3)
|
30
|
+
git (1.2.6)
|
31
|
+
github_api (0.10.1)
|
32
|
+
addressable
|
33
|
+
faraday (~> 0.8.1)
|
34
|
+
hashie (>= 1.2)
|
35
|
+
multi_json (~> 1.4)
|
36
|
+
nokogiri (~> 1.5.2)
|
37
|
+
oauth2
|
38
|
+
hashie (2.0.5)
|
39
|
+
highline (1.6.19)
|
40
|
+
httpauth (0.2.0)
|
41
|
+
json (1.8.0)
|
42
|
+
jwt (0.1.8)
|
43
|
+
multi_json (>= 1.5)
|
44
|
+
minitest (5.0.7)
|
45
|
+
multi_json (1.8.0)
|
46
|
+
multi_xml (0.5.5)
|
47
|
+
multipart-post (1.2.0)
|
48
|
+
nokogiri (1.5.10)
|
49
|
+
oauth2 (0.9.2)
|
50
|
+
faraday (~> 0.8)
|
51
|
+
httpauth (~> 0.2)
|
52
|
+
jwt (~> 0.1.4)
|
53
|
+
multi_json (~> 1.0)
|
54
|
+
multi_xml (~> 0.5)
|
55
|
+
rack (~> 1.2)
|
56
|
+
rack (1.5.2)
|
57
|
+
rake (10.1.0)
|
58
|
+
rdoc (3.12.2)
|
59
|
+
json (~> 1.4)
|
60
|
+
rspec (2.8.0)
|
61
|
+
rspec-core (~> 2.8.0)
|
62
|
+
rspec-expectations (~> 2.8.0)
|
63
|
+
rspec-mocks (~> 2.8.0)
|
64
|
+
rspec-core (2.8.0)
|
65
|
+
rspec-expectations (2.8.0)
|
66
|
+
diff-lcs (~> 1.1.2)
|
67
|
+
rspec-mocks (2.8.0)
|
68
|
+
|
69
|
+
PLATFORMS
|
70
|
+
ruby
|
71
|
+
|
72
|
+
DEPENDENCIES
|
73
|
+
bundler (>= 1.0.21)
|
74
|
+
cucumber
|
75
|
+
jeweler (~> 1.8.4)!
|
76
|
+
minitest (~> 5.0.7)
|
77
|
+
rdoc (~> 3.12)
|
78
|
+
rspec (~> 2.8.0)
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2013 Pjotr Prins
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,120 @@
|
|
1
|
+
# bio-vcf
|
2
|
+
|
3
|
+
[](http://travis-ci.org/pjotrp/bioruby-vcf)
|
4
|
+
|
5
|
+
Yet another VCF parser. This one may give better performance and
|
6
|
+
useful command line filtering.
|
7
|
+
|
8
|
+
The VCF format is commonly used for variant calling between NGS
|
9
|
+
samples. The fast parser needs to carry some state, recorded for each
|
10
|
+
file in VcfHeader, which contains the VCF file header. Individual
|
11
|
+
lines (variant calls) first go through a raw parser returning an array
|
12
|
+
of fields. Further (lazy) parsing is handled through VcfRecord.
|
13
|
+
|
14
|
+
Health warning: Early days, your mileage may vary because I add
|
15
|
+
features as I go along! If something is not working, check out the
|
16
|
+
code. It is easy to add features.
|
17
|
+
|
18
|
+
## Installation
|
19
|
+
|
20
|
+
```sh
|
21
|
+
gem install bio-vcf
|
22
|
+
```
|
23
|
+
|
24
|
+
## Quick start
|
25
|
+
|
26
|
+
## Command line interface (CLI)
|
27
|
+
|
28
|
+
Get the version of the VCF file
|
29
|
+
|
30
|
+
```ruby
|
31
|
+
bio-vcf -q --eval-once header.version < file.vcf
|
32
|
+
4.1
|
33
|
+
```
|
34
|
+
|
35
|
+
Get the column headers
|
36
|
+
|
37
|
+
```ruby
|
38
|
+
bio-vcf -q -eval-once 'header.column_names.join(",")' < file.vcf
|
39
|
+
CHROM,POS,ID,REF,ALT,QUAL,FILTER,INFO,FORMAT,NORMAL,TUMOR
|
40
|
+
```
|
41
|
+
|
42
|
+
The 'fields' array contains unprocessed data (strings). Print first
|
43
|
+
five raw fields
|
44
|
+
|
45
|
+
```ruby
|
46
|
+
bio-vcf --eval 'fields[0..4].join("\t")' < file.vcf
|
47
|
+
```
|
48
|
+
|
49
|
+
Add a filter to display the fields on chromosome 12
|
50
|
+
|
51
|
+
```ruby
|
52
|
+
bio-vcf --filter 'fields[0]=="12"' --eval 'fields[0..4].join("\t")' < file.vcf
|
53
|
+
```
|
54
|
+
|
55
|
+
It gets better when we start using processed data, represented by an
|
56
|
+
object named 'rec'. Position is a value, so we can filter a range
|
57
|
+
|
58
|
+
```ruby
|
59
|
+
bio-vcf --filter 'rec.chrom=="12" and rec.pos>96_641_270 and rec.pos<96_641_276' < file.vcf
|
60
|
+
```
|
61
|
+
|
62
|
+
With subfields defined by rec.format
|
63
|
+
|
64
|
+
```ruby
|
65
|
+
bio-vcf --filter 'rec.tumor.ss != 2' < file.vcf
|
66
|
+
```
|
67
|
+
|
68
|
+
Output
|
69
|
+
|
70
|
+
```ruby
|
71
|
+
bio-vcf --filter 'rec.tumor.gq>30' --eval '[rec.ref,rec.alt,rec.tumor.bcount,rec.tumor.gq,rec.normal.gq].join("\t")' < file.vcf
|
72
|
+
```
|
73
|
+
|
74
|
+
Show the count of the bases that were scored as somatic
|
75
|
+
|
76
|
+
```ruby
|
77
|
+
bio-vcf --eval 'rec.alt+"\t"+rec.tumor.bcount.split(",")[["A","C","G","T"].index(rec.alt)]+"\t"+rec.tumor.gq.to_s' < file.vcf
|
78
|
+
```
|
79
|
+
|
80
|
+
Actually, we have a convenience implementation for bcount, so this is the same
|
81
|
+
|
82
|
+
```ruby
|
83
|
+
bio-vcf --eval 'rec.alt+"\t"+rec.tumor.bcount[rec.alt].to_s+"\t"+rec.tumor.gq.to_s' < file.vcf
|
84
|
+
```
|
85
|
+
|
86
|
+
Filter on the somatic results that were scored at least 4 times
|
87
|
+
|
88
|
+
```ruby
|
89
|
+
bio-vcf --filter 'rec.alt.size==1 and rec.tumor.bcount[rec.alt]>4' < test.vcf
|
90
|
+
```
|
91
|
+
|
92
|
+
Similar for base quality scores
|
93
|
+
|
94
|
+
```ruby
|
95
|
+
bio-vcf --filter 'rec.alt.size==1 and rec.tumor.amq[rec.alt]>30' < test.vcf
|
96
|
+
```
|
97
|
+
|
98
|
+
|
99
|
+
## Project home page
|
100
|
+
|
101
|
+
Information on the source tree, documentation, examples, issues and
|
102
|
+
how to contribute, see
|
103
|
+
|
104
|
+
http://github.com/pjotrp/bioruby-vcf
|
105
|
+
|
106
|
+
## Cite
|
107
|
+
|
108
|
+
If you use this software, please cite one of
|
109
|
+
|
110
|
+
* [BioRuby: bioinformatics software for the Ruby programming language](http://dx.doi.org/10.1093/bioinformatics/btq475)
|
111
|
+
* [Biogem: an effective tool-based approach for scaling up open source software development in bioinformatics](http://dx.doi.org/10.1093/bioinformatics/bts080)
|
112
|
+
|
113
|
+
## Biogems.info
|
114
|
+
|
115
|
+
This Biogem is published at (http://biogems.info/index.html#bio-vcf)
|
116
|
+
|
117
|
+
## Copyright
|
118
|
+
|
119
|
+
Copyright (c) 2014 Pjotr Prins. See LICENSE.txt for further details.
|
120
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,58 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require 'rubygems'
|
4
|
+
require 'bundler'
|
5
|
+
begin
|
6
|
+
Bundler.setup(:default, :development)
|
7
|
+
rescue Bundler::BundlerError => e
|
8
|
+
$stderr.puts e.message
|
9
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
10
|
+
exit e.status_code
|
11
|
+
end
|
12
|
+
require 'rake'
|
13
|
+
|
14
|
+
require 'jeweler'
|
15
|
+
Jeweler::Tasks.new do |gem|
|
16
|
+
# gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
|
17
|
+
gem.name = "bio-vcf"
|
18
|
+
gem.homepage = "http://github.com/pjotrp/bioruby-vcf"
|
19
|
+
gem.license = "MIT"
|
20
|
+
gem.summary = %Q{VCF parser}
|
21
|
+
gem.description = %Q{Smart parser for VCF format}
|
22
|
+
gem.email = "pjotr.public01@thebird.nl"
|
23
|
+
gem.authors = ["Pjotr Prins"]
|
24
|
+
# dependencies defined in Gemfile
|
25
|
+
end
|
26
|
+
Jeweler::RubygemsDotOrgTasks.new
|
27
|
+
|
28
|
+
# require 'rspec/core'
|
29
|
+
# require 'rspec/core/rake_task'
|
30
|
+
# RSpec::Core::RakeTask.new(:spec) do |spec|
|
31
|
+
# spec.pattern = FileList['spec/**/*_spec.rb']
|
32
|
+
# end
|
33
|
+
|
34
|
+
# RSpec::Core::RakeTask.new(:rcov) do |spec|
|
35
|
+
# spec.pattern = 'spec/**/*_spec.rb'
|
36
|
+
# spec.rcov = true
|
37
|
+
# end
|
38
|
+
|
39
|
+
require 'rake/testtask'
|
40
|
+
|
41
|
+
Rake::TestTask.new do |t|
|
42
|
+
t.pattern = "spec/*_spec.rb"
|
43
|
+
end
|
44
|
+
|
45
|
+
require 'cucumber/rake/task'
|
46
|
+
Cucumber::Rake::Task.new(:features)
|
47
|
+
|
48
|
+
task :default => :spec
|
49
|
+
|
50
|
+
require 'rdoc/task'
|
51
|
+
Rake::RDocTask.new do |rdoc|
|
52
|
+
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
53
|
+
|
54
|
+
rdoc.rdoc_dir = 'rdoc'
|
55
|
+
rdoc.title = "bio-vcf #{version}"
|
56
|
+
rdoc.rdoc_files.include('README*')
|
57
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
58
|
+
end
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.0.1
|
data/bin/bio-vcf
ADDED
@@ -0,0 +1,121 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#
|
3
|
+
# BioRuby vcf plugin
|
4
|
+
# Author:: Pjotr Prins
|
5
|
+
#
|
6
|
+
# Copyright (C) 2014 Pjotr Prins <pjotr.prins@thebird.nl>
|
7
|
+
|
8
|
+
USAGE = "Vcf parser"
|
9
|
+
|
10
|
+
gempath = File.dirname(File.dirname(__FILE__))
|
11
|
+
$: << File.join(gempath,'lib')
|
12
|
+
|
13
|
+
VERSION_FILENAME=File.join(gempath,'VERSION')
|
14
|
+
version = File.new(VERSION_FILENAME).read.chomp
|
15
|
+
|
16
|
+
require 'bio-vcf'
|
17
|
+
require 'optparse'
|
18
|
+
|
19
|
+
# Uncomment when using the bio-logger
|
20
|
+
# require 'bio-logger'
|
21
|
+
# log = Bio::Log::LoggerPlus.new 'vcf'
|
22
|
+
# log.outputters = Bio::Log::Outputter.stderr
|
23
|
+
# Bio::Log::CLI.logger('stderr')
|
24
|
+
# Bio::Log::CLI.trace('info')
|
25
|
+
|
26
|
+
options = { show_help: false}
|
27
|
+
opts = OptionParser.new do |o|
|
28
|
+
o.banner = "Usage: #{File.basename($0)} [options] filename\ne.g. #{File.basename($0)} --rdf < test/data/input/somaticsniper.vcf"
|
29
|
+
|
30
|
+
o.on_tail('--filter cmd',String, 'Evaluate filter on each record') do |cmd|
|
31
|
+
options[:filter] = cmd
|
32
|
+
end
|
33
|
+
o.on_tail('-e cmd', '--eval cmd',String, 'Evaluate command on each record') do |cmd|
|
34
|
+
options[:eval] = cmd
|
35
|
+
end
|
36
|
+
o.on_tail('--eval-once cmd',String, 'Evaluate command once') do |cmd|
|
37
|
+
options[:eval_once] = true
|
38
|
+
options[:eval] = cmd
|
39
|
+
end
|
40
|
+
o.on("--rdf", "Generate RDF") do |b|
|
41
|
+
options[:rdf] = true
|
42
|
+
end
|
43
|
+
|
44
|
+
# Uncomment the following when using the bio-logger
|
45
|
+
# o.separator ""
|
46
|
+
# o.on("--logger filename",String,"Log to file (default stderr)") do | name |
|
47
|
+
# Bio::Log::CLI.logger(name)
|
48
|
+
# end
|
49
|
+
#
|
50
|
+
# o.on("--trace options",String,"Set log level (default INFO, see bio-logger)") do | s |
|
51
|
+
# Bio::Log::CLI.trace(s)
|
52
|
+
# end
|
53
|
+
#
|
54
|
+
o.on("-q", "--quiet", "Run quietly") do |q|
|
55
|
+
# Bio::Log::CLI.trace('error')
|
56
|
+
options[:quiet] = true
|
57
|
+
end
|
58
|
+
#
|
59
|
+
# o.on("-v", "--verbose", "Run verbosely") do |v|
|
60
|
+
# Bio::Log::CLI.trace('info')
|
61
|
+
# end
|
62
|
+
#
|
63
|
+
# o.on("--debug", "Show debug messages") do |v|
|
64
|
+
# Bio::Log::CLI.trace('debug')
|
65
|
+
# end
|
66
|
+
|
67
|
+
o.separator ""
|
68
|
+
o.on_tail('-h', '--help', 'display this help and exit') do
|
69
|
+
options[:show_help] = true
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
include BioVcf
|
74
|
+
|
75
|
+
begin
|
76
|
+
opts.parse!(ARGV)
|
77
|
+
|
78
|
+
$stderr.print "vcf #{version} (biogem Ruby #{RUBY_VERSION}) by Pjotr Prins 2014\n" if !options[:quiet]
|
79
|
+
|
80
|
+
|
81
|
+
if options[:show_help]
|
82
|
+
print opts
|
83
|
+
print USAGE
|
84
|
+
exit 1
|
85
|
+
end
|
86
|
+
|
87
|
+
$stderr.print "Options: ",options,"\n" if !options[:quiet]
|
88
|
+
|
89
|
+
header = VcfHeader.new
|
90
|
+
|
91
|
+
STDIN.each_line do | line |
|
92
|
+
if line =~ /^##fileformat=/
|
93
|
+
# ---- We have a new file header
|
94
|
+
header = VcfHeader.new
|
95
|
+
header.add(line)
|
96
|
+
STDIN.each_line do | headerline |
|
97
|
+
if headerline !~ /^#/
|
98
|
+
line = headerline
|
99
|
+
break # end of header
|
100
|
+
end
|
101
|
+
header.add(headerline)
|
102
|
+
end
|
103
|
+
end
|
104
|
+
# ---- Parse VCF record line
|
105
|
+
# fields = VcfLine.parse(line,header.columns)
|
106
|
+
fields = VcfLine.parse(line)
|
107
|
+
rec = VcfRecord.new(fields,header)
|
108
|
+
if !options[:filter] or (options[:filter] and eval(options[:filter]))
|
109
|
+
if options[:eval]
|
110
|
+
print eval(options[:eval])
|
111
|
+
exit(1) if options[:eval_once]
|
112
|
+
else
|
113
|
+
# Default behaviour
|
114
|
+
print fields.join("\t")
|
115
|
+
end
|
116
|
+
print "\n"
|
117
|
+
end
|
118
|
+
end
|
119
|
+
|
120
|
+
end
|
121
|
+
|
File without changes
|
@@ -0,0 +1,13 @@
|
|
1
|
+
require 'bundler'
|
2
|
+
begin
|
3
|
+
Bundler.setup(:default, :development)
|
4
|
+
rescue Bundler::BundlerError => e
|
5
|
+
$stderr.puts e.message
|
6
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
7
|
+
exit e.status_code
|
8
|
+
end
|
9
|
+
|
10
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__) + '/../../lib')
|
11
|
+
require 'bio-vcf'
|
12
|
+
|
13
|
+
require 'rspec/expectations'
|
data/lib/bio-vcf.rb
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
# Please require your code below, respecting the naming conventions in the
|
2
|
+
# bioruby directory tree.
|
3
|
+
#
|
4
|
+
# For example, say you have a plugin named bio-plugin, the only uncommented
|
5
|
+
# line in this file would be
|
6
|
+
#
|
7
|
+
# require 'bio/bio-plugin/plugin'
|
8
|
+
#
|
9
|
+
# In this file only require other files. Avoid other source code.
|
10
|
+
|
11
|
+
require 'bio-vcf/vcf'
|
12
|
+
require 'bio-vcf/vcfheader'
|
13
|
+
require 'bio-vcf/vcfline'
|
14
|
+
require 'bio-vcf/vcfgenotypefield'
|
15
|
+
require 'bio-vcf/vcfrecord'
|
data/lib/bio-vcf/vcf.rb
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
module BioVcf
|
2
|
+
|
3
|
+
class VcfNucleotides
|
4
|
+
def initialize list
|
5
|
+
@list = list
|
6
|
+
end
|
7
|
+
|
8
|
+
def [] idx
|
9
|
+
idx = ["A","C","G","T"].index(idx) if idx.kind_of?(String)
|
10
|
+
return 0 if idx == nil
|
11
|
+
@list[idx].to_i
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
class VcfGenotypeField
|
16
|
+
def initialize s, format, header
|
17
|
+
@values = s.split(/:/)
|
18
|
+
@format = format
|
19
|
+
@header = header
|
20
|
+
end
|
21
|
+
|
22
|
+
def bcount
|
23
|
+
VcfNucleotides.new(@values[@format['BCOUNT']].split(','))
|
24
|
+
end
|
25
|
+
|
26
|
+
def bq
|
27
|
+
VcfNucleotides.new(@values[@format['BQ']].split(','))
|
28
|
+
end
|
29
|
+
|
30
|
+
def amq
|
31
|
+
VcfNucleotides.new(@values[@format['AMQ']].split(','))
|
32
|
+
end
|
33
|
+
|
34
|
+
|
35
|
+
def method_missing(m, *args, &block)
|
36
|
+
v = @values[@format[m.to_s.upcase]]
|
37
|
+
v = v.to_i if v =~ /^\d+$/
|
38
|
+
v = v.to_f if v =~ /^\d+\.\d+$/
|
39
|
+
v
|
40
|
+
end
|
41
|
+
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
|
2
|
+
module BioVcf
|
3
|
+
|
4
|
+
module VcfHeaderParser
|
5
|
+
def VcfHeaderParser.get_column_names(lines)
|
6
|
+
lines.each do | line |
|
7
|
+
if line =~ /^#[^#]/
|
8
|
+
names = line.split
|
9
|
+
names[0].sub!(/^#/,'')
|
10
|
+
return names
|
11
|
+
end
|
12
|
+
end
|
13
|
+
nil
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
class VcfHeader
|
18
|
+
|
19
|
+
attr_reader :lines
|
20
|
+
|
21
|
+
def initialize
|
22
|
+
@lines = []
|
23
|
+
end
|
24
|
+
|
25
|
+
def add line
|
26
|
+
@lines << line.strip
|
27
|
+
end
|
28
|
+
|
29
|
+
def version
|
30
|
+
@version ||= lines[0].scan(/##fileformat=VCFv(\d+\.\d+)/)[0][0]
|
31
|
+
end
|
32
|
+
|
33
|
+
def column_names
|
34
|
+
@column_names ||= VcfHeaderParser::get_column_names(@lines)
|
35
|
+
end
|
36
|
+
|
37
|
+
def columns
|
38
|
+
@column ||= column_names.size
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
module BioVcf
|
2
|
+
module VcfLine
|
3
|
+
|
4
|
+
# Split a line into fields and check size
|
5
|
+
def VcfLine.parse line,expected_size=nil
|
6
|
+
fields = line.strip.split(/\t/)
|
7
|
+
raise "Expected #{expected_size} fields but got #{fields.size} in "+fields.to_s if expected_size and fields.size != expected_size
|
8
|
+
fields
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,55 @@
|
|
1
|
+
module BioVcf
|
2
|
+
|
3
|
+
module VcfRecordParser
|
4
|
+
def VcfRecordParser.get_format s
|
5
|
+
h = {}
|
6
|
+
s.split(/:/).each_with_index { |v,i| h[v] = i }
|
7
|
+
h
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
class VcfRecord
|
12
|
+
|
13
|
+
def initialize fields, header
|
14
|
+
@header = header
|
15
|
+
@fields = fields
|
16
|
+
end
|
17
|
+
|
18
|
+
def chrom
|
19
|
+
@fields[0]
|
20
|
+
end
|
21
|
+
|
22
|
+
def pos
|
23
|
+
@pos ||= @fields[1].to_i
|
24
|
+
end
|
25
|
+
|
26
|
+
def ids
|
27
|
+
@ids ||= @fields[2].split(';')
|
28
|
+
end
|
29
|
+
|
30
|
+
def id
|
31
|
+
ids[0]
|
32
|
+
end
|
33
|
+
|
34
|
+
def ref
|
35
|
+
@refs ||= @fields[3]
|
36
|
+
end
|
37
|
+
|
38
|
+
def alt
|
39
|
+
@alt ||= @fields[4]
|
40
|
+
end
|
41
|
+
|
42
|
+
def format
|
43
|
+
@format ||= VcfRecordParser.get_format(@fields[8])
|
44
|
+
end
|
45
|
+
|
46
|
+
def normal
|
47
|
+
@normal ||= VcfGenotypeField.new(@fields[9],format,@header)
|
48
|
+
end
|
49
|
+
|
50
|
+
def tumor
|
51
|
+
@tumor ||= VcfGenotypeField.new(@fields[10],format,@header)
|
52
|
+
end
|
53
|
+
|
54
|
+
end
|
55
|
+
end
|
@@ -0,0 +1,87 @@
|
|
1
|
+
##fileformat=VCFv4.1
|
2
|
+
##fileDate=20140121
|
3
|
+
##phasing=none
|
4
|
+
##reference=file:///data/GENOMES/human_GATK_GRCh37/GRCh37_gatk.fasta
|
5
|
+
##FORMAT=<ID=GT,Number=1,Type=String,Description="Genotype">
|
6
|
+
##FORMAT=<ID=IGT,Number=1,Type=String,Description="Genotype when called independently (only filled if called in joint prior mode)">
|
7
|
+
##FORMAT=<ID=DP,Number=1,Type=Integer,Description="Total read depth">
|
8
|
+
##FORMAT=<ID=DP4,Number=4,Type=Integer,Description="# high-quality ref-forward bases, ref-reverse, alt-forward and alt-reverse bases">
|
9
|
+
##FORMAT=<ID=BCOUNT,Number=4,Type=Integer,Description="Occurrence count for each base at this site (A,C,G,T)">
|
10
|
+
##FORMAT=<ID=GQ,Number=1,Type=Integer,Description="Genotype quality">
|
11
|
+
##FORMAT=<ID=JGQ,Number=1,Type=Integer,Description="Joint genotype quality (only filled if called in join prior mode)">
|
12
|
+
##FORMAT=<ID=VAQ,Number=1,Type=Integer,Description="Variant allele quality">
|
13
|
+
##FORMAT=<ID=BQ,Number=.,Type=Integer,Description="Average base quality">
|
14
|
+
##FORMAT=<ID=MQ,Number=1,Type=Integer,Description="Average mapping quality across all reads">
|
15
|
+
##FORMAT=<ID=AMQ,Number=.,Type=Integer,Description="Average mapping quality for each allele present in the genotype">
|
16
|
+
##FORMAT=<ID=SS,Number=1,Type=Integer,Description="Variant status relative to non-adjacent Normal, 0=wildtype,1=germline,2=somatic,3=LOH,4=unknown">
|
17
|
+
##FORMAT=<ID=SSC,Number=1,Type=Integer,Description="Somatic Score">
|
18
|
+
#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT NORMAL TUMOR
|
19
|
+
1 1636394 . C T . . . GT:IGT:DP:DP4:BCOUNT:GQ:JGQ:VAQ:BQ:MQ:AMQ:SS:SSC 0/0:0/0:17:12,5,0,0:0,17,0,0:75:36:0:56:37:37:0:. 0/1:0/1:6:3,1,1,1:0,4,0,2:29:36:29:60,60:37:37,37:2:36
|
20
|
+
1 36217006 . C T . . . GT:IGT:DP:DP4:BCOUNT:GQ:JGQ:VAQ:BQ:MQ:AMQ:SS:SSC 0/0:0/0:21:9,12,0,0:0,21,0,0:90:31:0:60:37:37:0:. 0/1:0/1:6:2,2,0,2:0,4,0,2:24:31:24:60,53:37:37,37:2:31
|
21
|
+
1 46527674 . G A . . . GT:IGT:DP:DP4:BCOUNT:GQ:JGQ:VAQ:BQ:MQ:AMQ:SS:SSC 0/0:0/0:9:6,3,0,0:0,0,9,0:54:37:0:60:37:37:0:. 0/1:0/1:4:2,0,0,2:2,0,2,0:30:37:30:60,60:37:37,37:2:34
|
22
|
+
1 108417572 . C T . . . GT:IGT:DP:DP4:BCOUNT:GQ:JGQ:VAQ:BQ:MQ:AMQ:SS:SSC 0/0:0/0:7:5,2,0,0:0,7,0,0:48:42:0:41:37:37:0:. 0/1:0/1:4:2,0,1,1:0,2,0,2:30:42:35:60,60:37:37,37:2:31
|
23
|
+
1 155170305 . C T . . . GT:IGT:DP:DP4:BCOUNT:GQ:JGQ:VAQ:BQ:MQ:AMQ:SS:SSC 0/0:0/0:9:5,4,0,0:0,9,0,0:54:34:0:59:37:37:0:. 0/1:0/1:6:3,1,2,0:0,4,0,2:27:34:27:44,60:37:37,37:2:32
|
24
|
+
1 155449089 . G A . . . GT:IGT:DP:DP4:BCOUNT:GQ:JGQ:VAQ:BQ:MQ:AMQ:SS:SSC 0/0:0/0:9:5,4,0,0:0,0,9,0:54:37:0:60:37:37:0:. 0/1:0/1:4:1,1,0,2:2,0,2,0:30:37:30:60,60:37:37,37:2:34
|
25
|
+
1 169847826 . G A . . . GT:IGT:DP:DP4:BCOUNT:GQ:JGQ:VAQ:BQ:MQ:AMQ:SS:SSC 0/0:0/0:9:6,3,0,0:0,0,9,0:54:37:0:60:37:37:0:. 0/1:0/1:4:2,0,2,0:2,0,2,0:30:37:30:60,60:37:37,37:2:34
|
26
|
+
1 203098164 . C T . . . GT:IGT:DP:DP4:BCOUNT:GQ:JGQ:VAQ:BQ:MQ:AMQ:SS:SSC 0/0:0/0:10:3,7,0,0:0,10,0,0:57:40:0:53:37:37:0:. 0/1:0/1:3:1,0,2,0:0,1,0,2:1:40:33:60,60:37:37,37:2:37
|
27
|
+
2 39213209 . G A . . . GT:IGT:DP:DP4:BCOUNT:GQ:JGQ:VAQ:BQ:MQ:AMQ:SS:SSC 0/0:0/0:16:8,8,0,0:0,0,16,0:75:42:0:56:37:37:0:. 0/1:0/1:4:2,0,1,1:2,0,2,0:30:42:35:60,59:37:37,37:2:42
|
28
|
+
2 86691250 . G A . . . GT:IGT:DP:DP4:BCOUNT:GQ:JGQ:VAQ:BQ:MQ:AMQ:SS:SSC 0/0:0/0:8:6,2,0,0:0,0,8,0:51:42:0:59:37:37:0:. 0/1:0/1:4:2,0,1,1:2,0,2,0:30:42:35:60,60:37:37,37:2:33
|
29
|
+
2 88874243 . G A . . . GT:IGT:DP:DP4:BCOUNT:GQ:JGQ:VAQ:BQ:MQ:AMQ:SS:SSC 0/0:0/0:17:12,5,0,0:0,0,17,0:78:34:0:59:37:37:0:. 0/1:0/1:5:2,1,0,2:2,0,3,0:27:34:27:60,60:37:37,37:2:34
|
30
|
+
2 121728044 . G A . . . GT:IGT:DP:DP4:BCOUNT:GQ:JGQ:VAQ:BQ:MQ:AMQ:SS:SSC 0/0:0/0:9:6,3,0,0:0,0,9,0:54:42:0:55:37:37:0:. 0/1:0/1:4:1,1,1,1:2,0,2,0:35:42:35:60,57:37:37,37:2:36
|
31
|
+
2 170062591 . G A . . . GT:IGT:DP:DP4:BCOUNT:GQ:JGQ:VAQ:BQ:MQ:AMQ:SS:SSC 0/0:0/0:9:4,5,0,0:0,0,9,0:54:39:0:60:37:37:0:. 0/1:0/1:5:2,1,1,1:2,0,3,0:32:39:32:60,60:37:37,37:2:35
|
32
|
+
2 216257844 . G A . . . GT:IGT:DP:DP4:BCOUNT:GQ:JGQ:VAQ:BQ:MQ:AMQ:SS:SSC 0/0:0/0:7:2,5,0,0:0,0,7,0:48:40:0:60:37:37:0:. 0/1:0/1:3:1,0,0,2:2,0,1,0:1:40:33:60,60:37:37,37:2:30
|
33
|
+
2 222322623 . C T . . . GT:IGT:DP:DP4:BCOUNT:GQ:JGQ:VAQ:BQ:MQ:AMQ:SS:SSC 0/0:0/0:15:6,9,0,0:0,15,0,0:72:33:0:60:37:37:0:. 0/1:0/1:7:4,1,1,1:0,5,0,2:26:33:26:60,60:37:37,37:2:33
|
34
|
+
3 25675413 . A T . . . GT:IGT:DP:DP4:BCOUNT:GQ:JGQ:VAQ:BQ:MQ:AMQ:SS:SSC 0/0:0/0:8:6,2,0,0:8,0,0,0:51:32:0:59:37:37:0:. 0/1:0/1:4:1,1,0,2:2,0,0,2:6:32:25:34,37:37:37,37:2:30
|
35
|
+
3 36779638 . C T . . . GT:IGT:DP:DP4:BCOUNT:GQ:JGQ:VAQ:BQ:MQ:AMQ:SS:SSC 0/0:0/0:13:8,5,0,0:0,13,0,0:66:36:0:60:37:37:0:. 0/1:0/1:6:1,3,1,1:0,4,0,2:29:36:29:60,60:37:37,37:2:36
|
36
|
+
3 123458847 . T C . . . GT:IGT:DP:DP4:BCOUNT:GQ:JGQ:VAQ:BQ:MQ:AMQ:SS:SSC 0/0:0/0:10:4,6,0,0:0,0,0,10:54:39:0:41:37:37:0:. 0/1:0/1:5:1,2,1,1:0,2,0,3:32:39:32:55,45:37:37,37:2:35
|
37
|
+
3 124351308 . G A . . . GT:IGT:DP:DP4:BCOUNT:GQ:JGQ:VAQ:BQ:MQ:AMQ:SS:SSC 0/0:0/0:8:7,1,0,0:0,0,8,0:51:42:0:58:37:37:0:. 0/1:0/1:4:1,1,1,1:2,0,2,0:35:42:35:60,60:37:37,37:2:33
|
38
|
+
3 142171996 . C T . . . GT:IGT:DP:DP4:BCOUNT:GQ:JGQ:VAQ:BQ:MQ:AMQ:SS:SSC 0/0:0/0:10:8,2,0,0:0,10,0,0:57:37:0:59:37:37:0:. 0/1:0/1:4:0,2,2,0:0,2,0,2:30:37:30:60,60:37:37,37:2:35
|
39
|
+
3 189526168 . G A . . . GT:IGT:DP:DP4:BCOUNT:GQ:JGQ:VAQ:BQ:MQ:AMQ:SS:SSC 0/0:0/0:23:11,12,0,0:0,0,23,0:96:36:0:59:37:37:0:. 0/1:0/1:6:1,3,1,1:2,0,4,0:29:36:29:60,60:37:37,37:2:36
|
40
|
+
4 82058553 . C T . . . GT:IGT:DP:DP4:BCOUNT:GQ:JGQ:VAQ:BQ:MQ:AMQ:SS:SSC 0/0:0/0:7:6,1,0,0:0,7,0,0:48:37:0:60:37:37:0:. 0/1:0/1:4:2,0,2,0:0,2,0,2:30:37:30:60,60:37:37,37:2:30
|
41
|
+
4 122769998 . C T . . . GT:IGT:DP:DP4:BCOUNT:GQ:JGQ:VAQ:BQ:MQ:AMQ:SS:SSC 0/0:0/0:7:7,0,0,0:0,7,0,0:48:40:0:54:37:37:0:. 0/1:0/1:3:1,0,2,0:0,1,0,2:1:40:33:60,60:37:37,37:2:30
|
42
|
+
5 13850856 . G C . . . GT:IGT:DP:DP4:BCOUNT:GQ:JGQ:VAQ:BQ:MQ:AMQ:SS:SSC 0/0:0/0:8:3,5,0,0:0,0,8,0:51:40:0:51:37:37:0:. 0/1:0/1:3:0,1,2,0:0,2,1,0:1:40:33:49,60:37:37,37:2:33
|
43
|
+
5 132038609 . C T . . . GT:IGT:DP:DP4:BCOUNT:GQ:JGQ:VAQ:BQ:MQ:AMQ:SS:SSC 0/0:0/0:12:10,2,0,0:0,12,0,0:63:33:0:58:37:37:0:. 0/1:0/1:7:3,2,1,1:0,5,0,2:26:33:26:60,60:37:37,37:2:33
|
44
|
+
5 137756599 . C T . . . GT:IGT:DP:DP4:BCOUNT:GQ:JGQ:VAQ:BQ:MQ:AMQ:SS:SSC 0/0:0/0:13:7,6,0,0:0,13,0,0:66:31:0:60:37:37:0:. 0/1:0/1:6:2,2,2,0:0,4,0,2:24:31:24:60,60:37:37,37:2:31
|
45
|
+
5 141974902 . C T . . . GT:IGT:DP:DP4:BCOUNT:GQ:JGQ:VAQ:BQ:MQ:AMQ:SS:SSC 0/0:0/0:14:9,5,0,0:0,14,0,0:69:40:0:60:37:37:0:. 0/1:0/1:3:1,0,2,0:0,1,0,2:1:40:33:60,60:37:37,37:2:40
|
46
|
+
6 2749400 . C T . . . GT:IGT:DP:DP4:BCOUNT:GQ:JGQ:VAQ:BQ:MQ:AMQ:SS:SSC 0/0:0/0:10:8,2,0,0:0,10,0,0:57:35:0:60:37:37:0:. 0/1:0/1:4:2,0,0,2:0,2,0,2:28:35:28:60,39:37:37,37:2:34
|
47
|
+
7 95217113 . G A . . . GT:IGT:DP:DP4:BCOUNT:GQ:JGQ:VAQ:BQ:MQ:AMQ:SS:SSC 0/0:0/0:7:5,2,0,0:0,0,7,0:48:36:0:60:37:37:0:. 0/1:0/1:6:1,3,1,1:2,0,4,0:29:36:29:60,60:37:37,37:2:30
|
48
|
+
7 140434525 . G A . . . GT:IGT:DP:DP4:BCOUNT:GQ:JGQ:VAQ:BQ:MQ:AMQ:SS:SSC 0/0:0/0:14:8,6,0,0:0,0,14,0:69:31:0:59:37:37:0:. 0/1:0/1:6:3,1,0,2:2,0,4,0:24:31:24:60,58:37:37,37:2:31
|
49
|
+
7 151856059 . C T . . . GT:IGT:DP:DP4:BCOUNT:GQ:JGQ:VAQ:BQ:MQ:AMQ:SS:SSC 0/0:0/0:20:9,10,1,0:0,19,0,1:50:33:0:59:37:37:0:. 0/1:0/1:7:1,4,1,1:0,5,0,2:26:33:26:60,60:37:37,37:2:30
|
50
|
+
8 42958817 . C T . . . GT:IGT:DP:DP4:BCOUNT:GQ:JGQ:VAQ:BQ:MQ:AMQ:SS:SSC 0/0:0/0:12:6,6,0,0:0,12,0,0:60:36:0:55:37:37:0:. 0/1:0/1:7:4,1,1,1:0,5,0,2:29:36:29:48,60:37:37,37:2:35
|
51
|
+
8 131070237 . A G . . . GT:IGT:DP:DP4:BCOUNT:GQ:JGQ:VAQ:BQ:MQ:AMQ:SS:SSC 0/0:0/0:13:9,4,0,0:13,0,0,0:66:39:0:60:37:37:0:. 0/1:0/1:5:2,1,1,1:3,0,2,0:32:39:32:60,60:37:37,37:2:39
|
52
|
+
8 141711010 . C T . . . GT:IGT:DP:DP4:BCOUNT:GQ:JGQ:VAQ:BQ:MQ:AMQ:SS:SSC 0/0:0/0:10:8,2,0,0:0,10,0,0:57:40:0:59:37:37:0:. 0/1:0/1:3:1,0,2,0:0,1,0,2:1:40:33:60,55:37:37,37:2:37
|
53
|
+
8 145059674 . C T . . . GT:IGT:DP:DP4:BCOUNT:GQ:JGQ:VAQ:BQ:MQ:AMQ:SS:SSC 0/0:0/0:14:7,7,0,0:0,14,0,0:69:34:0:56:37:37:0:. 0/1:0/1:5:2,1,0,2:0,3,0,2:27:34:27:60,60:37:37,37:2:34
|
54
|
+
9 111651620 . A T . . . GT:IGT:DP:DP4:BCOUNT:GQ:JGQ:VAQ:BQ:MQ:AMQ:SS:SSC 0/0:0/0:7:4,3,0,0:7,0,0,0:48:92:0:60:37:37:0:. 0/1:0/1:7:1,2,3,1:3,0,0,4:58:92:85:60,60:37:37,37:2:31
|
55
|
+
9 111685156 . G A . . . GT:IGT:DP:DP4:BCOUNT:GQ:JGQ:VAQ:BQ:MQ:AMQ:SS:SSC 0/0:0/0:13:9,4,0,0:0,0,13,0:66:37:0:60:37:37:0:. 0/1:0/1:4:1,1,2,0:2,0,2,0:12:37:30:60,37:37:37,37:2:37
|
56
|
+
10 6525571 . G A . . . GT:IGT:DP:DP4:BCOUNT:GQ:JGQ:VAQ:BQ:MQ:AMQ:SS:SSC 0/0:0/0:8:0,8,0,0:0,0,8,0:51:37:0:55:37:37:0:. 0/1:0/1:4:1,1,0,2:2,0,2,0:30:37:30:60,60:37:37,37:2:32
|
57
|
+
10 97197246 . C T . . . GT:IGT:DP:DP4:BCOUNT:GQ:JGQ:VAQ:BQ:MQ:AMQ:SS:SSC 0/0:0/0:10:7,3,0,0:0,10,0,0:57:39:0:58:37:37:0:. 0/1:0/1:5:3,0,1,1:0,3,0,2:32:39:32:60,53:37:37,37:2:36
|
58
|
+
11 58949455 . G A . . . GT:IGT:DP:DP4:BCOUNT:GQ:JGQ:VAQ:BQ:MQ:AMQ:SS:SSC 0/0:0/0:12:8,4,0,0:0,0,12,0:60:33:0:54:37:37:0:. 0/1:0/1:7:3,2,1,1:2,0,5,0:26:33:26:60,36:37:37,37:2:33
|
59
|
+
11 65481082 . G A . . . GT:IGT:DP:DP4:BCOUNT:GQ:JGQ:VAQ:BQ:MQ:AMQ:SS:SSC 0/0:0/0:17:12,5,0,0:0,0,17,0:78:45:0:58:37:37:0:. 0/1:0/1:3:0,1,1,1:2,0,1,0:1:45:34:60,60:37:37,37:2:45
|
60
|
+
11 94180424 . G A . . . GT:IGT:DP:DP4:BCOUNT:GQ:JGQ:VAQ:BQ:MQ:AMQ:SS:SSC 0/0:0/0:23:17,6,0,0:0,0,23,0:96:34:0:56:37:37:0:. 0/1:0/1:5:2,1,2,0:2,0,3,0:27:34:27:60,59:37:37,37:2:34
|
61
|
+
11 121036021 . C T . . . GT:IGT:DP:DP4:BCOUNT:GQ:JGQ:VAQ:BQ:MQ:AMQ:SS:SSC 0/0:0/0:12:3,9,0,0:0,12,0,0:63:31:0:59:37:37:0:. 0/1:0/1:6:4,0,0,2:0,4,0,2:24:31:24:59,60:37:37,37:2:31
|
62
|
+
12 994952 . C T . . . GT:IGT:DP:DP4:BCOUNT:GQ:JGQ:VAQ:BQ:MQ:AMQ:SS:SSC 0/0:0/0:9:1,8,0,0:0,9,0,0:54:33:0:59:37:37:0:. 0/1:0/1:7:2,3,1,1:0,5,0,2:26:33:26:51,55:37:37,37:2:32
|
63
|
+
12 69233187 . C T . . . GT:IGT:DP:DP4:BCOUNT:GQ:JGQ:VAQ:BQ:MQ:AMQ:SS:SSC 0/0:0/0:9:5,4,0,0:0,9,0,0:51:33:0:53:37:37:0:. 0/1:0/1:7:4,1,1,1:0,5,0,2:26:33:26:60,60:37:37,37:2:30
|
64
|
+
12 77436879 . G A . . . GT:IGT:DP:DP4:BCOUNT:GQ:JGQ:VAQ:BQ:MQ:AMQ:SS:SSC 0/0:0/0:10:4,6,0,0:0,0,10,0:57:34:0:60:37:37:0:. 0/1:0/1:5:2,1,0,2:2,0,3,0:27:34:27:60,60:37:37,37:2:33
|
65
|
+
12 96641273 . G A . . . GT:IGT:DP:DP4:BCOUNT:GQ:JGQ:VAQ:BQ:MQ:AMQ:SS:SSC 0/0:0/0:8:4,4,0,0:0,0,8,0:51:33:0:60:37:37:0:. 0/1:0/1:7:2,3,1,1:2,0,5,0:26:33:26:60,50:37:37,37:2:30
|
66
|
+
12 110813986 . G A . . . GT:IGT:DP:DP4:BCOUNT:GQ:JGQ:VAQ:BQ:MQ:AMQ:SS:SSC 0/0:0/0:8:4,4,0,0:0,0,8,0:51:39:0:59:37:37:0:. 0/1:0/1:5:1,2,1,1:2,0,3,0:32:39:32:60,60:37:37,37:2:33
|
67
|
+
12 122825587 . C T . . . GT:IGT:DP:DP4:BCOUNT:GQ:JGQ:VAQ:BQ:MQ:AMQ:SS:SSC 0/0:0/0:21:12,9,0,0:0,21,0,0:90:34:0:59:37:37:0:. 0/1:0/1:5:3,0,2,0:0,3,0,2:27:34:27:60,60:37:37,37:2:34
|
68
|
+
14 30135337 . C T . . . GT:IGT:DP:DP4:BCOUNT:GQ:JGQ:VAQ:BQ:MQ:AMQ:SS:SSC 0/0:0/0:7:5,2,0,0:0,7,0,0:48:40:0:60:37:37:0:. 0/1:0/1:3:1,0,0,2:0,1,0,2:1:40:33:60,60:37:37,37:2:30
|
69
|
+
14 51398458 . G A . . . GT:IGT:DP:DP4:BCOUNT:GQ:JGQ:VAQ:BQ:MQ:AMQ:SS:SSC 0/0:0/0:9:4,5,0,0:0,0,9,0:54:36:0:55:37:37:0:. 0/1:0/1:6:0,4,1,1:2,0,4,0:29:36:29:60,59:37:37,37:2:33
|
70
|
+
15 43170722 . C T . . . GT:IGT:DP:DP4:BCOUNT:GQ:JGQ:VAQ:BQ:MQ:AMQ:SS:SSC 0/0:0/0:11:6,5,0,0:0,11,0,0:60:31:0:60:37:37:0:. 0/1:0/1:6:4,0,2,0:0,4,0,2:24:31:24:56,54:37:37,37:2:31
|
71
|
+
15 50862183 . C A . . . GT:IGT:DP:DP4:BCOUNT:GQ:JGQ:VAQ:BQ:MQ:AMQ:SS:SSC 0/0:0/0:9:7,2,0,0:0,9,0,0:54:35:0:60:37:37:0:. 0/1:0/1:4:0,2,0,2:2,2,0,0:28:35:28:45,59:37:37,37:2:33
|
72
|
+
15 64332347 . C T . . . GT:IGT:DP:DP4:BCOUNT:GQ:JGQ:VAQ:BQ:MQ:AMQ:SS:SSC 0/0:0/0:7:6,1,0,0:0,7,0,0:48:39:0:60:37:37:0:. 0/1:0/1:5:3,0,1,1:0,3,0,2:32:39:32:58,56:37:37,37:2:30
|
73
|
+
15 80845030 . C T . . . GT:IGT:DP:DP4:BCOUNT:GQ:JGQ:VAQ:BQ:MQ:AMQ:SS:SSC 0/0:0/0:9:1,8,0,0:0,9,0,0:54:31:0:60:37:37:0:. 0/1:0/1:6:2,2,2,0:0,4,0,2:24:31:24:60,60:37:37,37:2:30
|
74
|
+
16 1812938 . G A . . . GT:IGT:DP:DP4:BCOUNT:GQ:JGQ:VAQ:BQ:MQ:AMQ:SS:SSC 0/0:0/0:11:8,3,0,0:0,0,11,0:60:34:0:46:37:37:0:. 0/1:0/1:5:1,2,1,1:2,0,3,0:27:34:27:46,55:37:37,37:2:33
|
75
|
+
16 3582808 . G A . . . GT:IGT:DP:DP4:BCOUNT:GQ:JGQ:VAQ:BQ:MQ:AMQ:SS:SSC 0/0:0/0:10:6,4,0,0:0,0,10,0:57:34:0:59:37:37:0:. 0/1:0/1:5:0,3,2,0:2,0,3,0:27:34:27:60,60:37:37,37:2:33
|
76
|
+
16 14042032 . C T . . . GT:IGT:DP:DP4:BCOUNT:GQ:JGQ:VAQ:BQ:MQ:AMQ:SS:SSC 0/0:0/0:7:6,1,0,0:0,7,0,0:48:37:0:60:37:37:0:. 0/1:0/1:4:0,2,2,0:0,2,0,2:30:37:30:57,60:37:37,37:2:30
|
77
|
+
16 23619204 . G A . . . GT:IGT:DP:DP4:BCOUNT:GQ:JGQ:VAQ:BQ:MQ:AMQ:SS:SSC 0/0:0/0:7:5,2,0,0:0,0,7,0:48:42:0:60:37:37:0:. 0/1:0/1:4:1,1,1,1:2,0,2,0:35:42:35:60,60:37:37,37:2:31
|
78
|
+
17 41256142 . G A . . . GT:IGT:DP:DP4:BCOUNT:GQ:JGQ:VAQ:BQ:MQ:AMQ:SS:SSC 0/0:0/0:8:5,3,0,0:0,0,8,0:51:40:0:60:37:37:0:. 0/1:0/1:3:0,1,2,0:2,0,1,0:1:40:33:57,60:37:37,37:2:33
|
79
|
+
17 61784013 . C T . . . GT:IGT:DP:DP4:BCOUNT:GQ:JGQ:VAQ:BQ:MQ:AMQ:SS:SSC 0/0:0/0:9:6,3,0,0:0,9,0,0:54:45:0:60:37:37:0:. 0/1:0/1:3:0,1,1,1:0,1,0,2:1:45:34:60,60:37:37,37:2:36
|
80
|
+
18 45423074 . C T . . . GT:IGT:DP:DP4:BCOUNT:GQ:JGQ:VAQ:BQ:MQ:AMQ:SS:SSC 0/0:0/0:16:8,8,0,0:0,16,0,0:75:46:0:53:37:37:0:. 0/1:0/1:10:3,4,3,0:0,7,0,3:39:46:39:60,60:37:37,37:2:46
|
81
|
+
18 60985432 . G A . . . GT:IGT:DP:DP4:BCOUNT:GQ:JGQ:VAQ:BQ:MQ:AMQ:SS:SSC 0/0:0/0:14:9,4,0,1:0,0,13,0:32:42:0:60:37:37:0:. 0/1:0/1:4:2,0,1,1:2,0,2,0:30:42:35:60,57:37:37,37:2:41
|
82
|
+
19 39664512 . C T . . . GT:IGT:DP:DP4:BCOUNT:GQ:JGQ:VAQ:BQ:MQ:AMQ:SS:SSC 0/0:0/0:14:8,6,0,0:0,14,0,0:69:42:0:60:37:37:0:. 0/1:0/1:4:0,2,1,1:0,2,0,2:30:42:35:60,60:37:37,37:2:42
|
83
|
+
19 49473085 . G C . . . GT:IGT:DP:DP4:BCOUNT:GQ:JGQ:VAQ:BQ:MQ:AMQ:SS:SSC 0/0:0/0:8:4,4,0,0:0,0,8,0:51:37:0:60:37:37:0:. 0/1:0/1:4:1,1,2,0:0,2,2,0:30:37:30:48,56:37:37,37:2:32
|
84
|
+
20 34135210 . C T . . . GT:IGT:DP:DP4:BCOUNT:GQ:JGQ:VAQ:BQ:MQ:AMQ:SS:SSC 0/0:0/0:8:2,6,0,0:0,8,0,0:51:36:0:59:37:37:0:. 0/1:0/1:6:2,2,1,1:0,4,0,2:29:36:29:60,60:37:37,37:2:32
|
85
|
+
20 35663882 . G A . . . GT:IGT:DP:DP4:BCOUNT:GQ:JGQ:VAQ:BQ:MQ:AMQ:SS:SSC 0/0:0/0:7:2,5,0,0:0,0,7,0:48:37:0:56:37:37:0:. 0/1:0/1:4:1,1,0,2:2,0,2,0:30:37:30:60,60:37:37,37:2:30
|
86
|
+
X 70341572 . C T . . . GT:IGT:DP:DP4:BCOUNT:GQ:JGQ:VAQ:BQ:MQ:AMQ:SS:SSC 0/0:0/0:11:6,5,0,0:0,11,0,0:60:33:0:56:37:37:0:. 0/1:0/1:7:3,2,1,1:0,5,0,2:26:33:26:58,60:37:37,37:2:33
|
87
|
+
X 123164862 . G A . . . GT:IGT:DP:DP4:BCOUNT:GQ:JGQ:VAQ:BQ:MQ:AMQ:SS:SSC 0/0:0/0:7:5,2,0,0:0,0,7,0:48:40:0:59:37:37:0:. 0/1:0/1:3:1,0,2,0:2,0,1,0:1:40:33:60,60:37:37,37:2:30
|
metadata
ADDED
@@ -0,0 +1,163 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: bio-vcf
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Pjotr Prins
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2014-01-23 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: minitest
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 5.0.7
|
22
|
+
type: :development
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 5.0.7
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: rspec
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ~>
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: 2.8.0
|
38
|
+
type: :development
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ~>
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: 2.8.0
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: cucumber
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
type: :development
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: jeweler
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ~>
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: 1.8.4
|
70
|
+
type: :development
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ~>
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: 1.8.4
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
name: bundler
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
82
|
+
requirements:
|
83
|
+
- - ! '>='
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: 1.0.21
|
86
|
+
type: :development
|
87
|
+
prerelease: false
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ! '>='
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: 1.0.21
|
94
|
+
- !ruby/object:Gem::Dependency
|
95
|
+
name: rdoc
|
96
|
+
requirement: !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
98
|
+
requirements:
|
99
|
+
- - ~>
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: '3.12'
|
102
|
+
type: :development
|
103
|
+
prerelease: false
|
104
|
+
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
106
|
+
requirements:
|
107
|
+
- - ~>
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '3.12'
|
110
|
+
description: Smart parser for VCF format
|
111
|
+
email: pjotr.public01@thebird.nl
|
112
|
+
executables:
|
113
|
+
- bio-vcf
|
114
|
+
extensions: []
|
115
|
+
extra_rdoc_files:
|
116
|
+
- LICENSE.txt
|
117
|
+
- README.md
|
118
|
+
files:
|
119
|
+
- Gemfile
|
120
|
+
- Gemfile.lock
|
121
|
+
- LICENSE.txt
|
122
|
+
- README.md
|
123
|
+
- Rakefile
|
124
|
+
- VERSION
|
125
|
+
- bin/bio-vcf
|
126
|
+
- features/step_definitions/bio-vcf_steps.rb
|
127
|
+
- features/support/env.rb
|
128
|
+
- lib/bio-vcf.rb
|
129
|
+
- lib/bio-vcf/vcf.rb
|
130
|
+
- lib/bio-vcf/vcfgenotypefield.rb
|
131
|
+
- lib/bio-vcf/vcfheader.rb
|
132
|
+
- lib/bio-vcf/vcfline.rb
|
133
|
+
- lib/bio-vcf/vcfrecord.rb
|
134
|
+
- test/data/input/somaticsniper.vcf
|
135
|
+
homepage: http://github.com/pjotrp/bioruby-vcf
|
136
|
+
licenses:
|
137
|
+
- MIT
|
138
|
+
post_install_message:
|
139
|
+
rdoc_options: []
|
140
|
+
require_paths:
|
141
|
+
- lib
|
142
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
143
|
+
none: false
|
144
|
+
requirements:
|
145
|
+
- - ! '>='
|
146
|
+
- !ruby/object:Gem::Version
|
147
|
+
version: '0'
|
148
|
+
segments:
|
149
|
+
- 0
|
150
|
+
hash: 751802321492035161
|
151
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
152
|
+
none: false
|
153
|
+
requirements:
|
154
|
+
- - ! '>='
|
155
|
+
- !ruby/object:Gem::Version
|
156
|
+
version: '0'
|
157
|
+
requirements: []
|
158
|
+
rubyforge_project:
|
159
|
+
rubygems_version: 1.8.23
|
160
|
+
signing_key:
|
161
|
+
specification_version: 3
|
162
|
+
summary: VCF parser
|
163
|
+
test_files: []
|