bio-ngs 0.3.2.alpha.01

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.
Files changed (76) hide show
  1. data/.document +5 -0
  2. data/Gemfile +39 -0
  3. data/Gemfile.lock +81 -0
  4. data/LICENSE.txt +28 -0
  5. data/README.rdoc +240 -0
  6. data/Rakefile +60 -0
  7. data/VERSION +1 -0
  8. data/bin/biongs +35 -0
  9. data/bio-ngs.gemspec +215 -0
  10. data/ext/mkrf_conf.rb +87 -0
  11. data/lib/bio-ngs.rb +54 -0
  12. data/lib/bio/appl/ngs/bcl2qseq.rb +93 -0
  13. data/lib/bio/appl/ngs/blast.rb +36 -0
  14. data/lib/bio/appl/ngs/bowtie-inspect.rb +50 -0
  15. data/lib/bio/appl/ngs/cufflinks.rb +489 -0
  16. data/lib/bio/appl/ngs/fastx.rb +170 -0
  17. data/lib/bio/appl/ngs/samtools.rb +118 -0
  18. data/lib/bio/appl/ngs/sff_extract.rb +23 -0
  19. data/lib/bio/appl/ngs/tophat.rb +158 -0
  20. data/lib/bio/ngs/converter.rb +100 -0
  21. data/lib/bio/ngs/core_ext.rb +12 -0
  22. data/lib/bio/ngs/db.rb +66 -0
  23. data/lib/bio/ngs/db/migrate/homology/201105030707_create_blastout.rb +22 -0
  24. data/lib/bio/ngs/db/migrate/homology/201105030709_create_goannotation.rb +29 -0
  25. data/lib/bio/ngs/db/migrate/ontology/201105030708_create_go.rb +18 -0
  26. data/lib/bio/ngs/db/migrate/ontology/201105030710_create_gene_go.rb +17 -0
  27. data/lib/bio/ngs/db/migrate/ontology/201105030711_create_gene.rb +16 -0
  28. data/lib/bio/ngs/db/models.rb +1 -0
  29. data/lib/bio/ngs/db/models/homology.rb +8 -0
  30. data/lib/bio/ngs/db/models/ontology.rb +16 -0
  31. data/lib/bio/ngs/ext/bin/common/fastq_coverage_graph.sh +161 -0
  32. data/lib/bio/ngs/ext/bin/common/sff_extract +1505 -0
  33. data/lib/bio/ngs/ext/bin/linux/samtools +0 -0
  34. data/lib/bio/ngs/ext/bin/osx/samtools +0 -0
  35. data/lib/bio/ngs/ext/versions.yaml +73 -0
  36. data/lib/bio/ngs/graphics.rb +189 -0
  37. data/lib/bio/ngs/homology.rb +102 -0
  38. data/lib/bio/ngs/ontology.rb +103 -0
  39. data/lib/bio/ngs/quality.rb +64 -0
  40. data/lib/bio/ngs/record.rb +50 -0
  41. data/lib/bio/ngs/task.rb +46 -0
  42. data/lib/bio/ngs/utils.rb +176 -0
  43. data/lib/development_tasks.rb +34 -0
  44. data/lib/enumerable.rb +37 -0
  45. data/lib/tasks/bwa.thor +126 -0
  46. data/lib/tasks/convert.thor +454 -0
  47. data/lib/tasks/history.thor +51 -0
  48. data/lib/tasks/homology.thor +121 -0
  49. data/lib/tasks/ontology.thor +93 -0
  50. data/lib/tasks/project.thor +51 -0
  51. data/lib/tasks/quality.thor +142 -0
  52. data/lib/tasks/rna.thor +126 -0
  53. data/lib/tasks/sff_extract.thor +9 -0
  54. data/lib/templates/README.tt +43 -0
  55. data/lib/templates/db.tt +6 -0
  56. data/lib/wrapper.rb +225 -0
  57. data/spec/converter_qseq_spec.rb +56 -0
  58. data/spec/fixture/s_1_1_1108_qseq.txt +100 -0
  59. data/spec/quality_spec.rb +40 -0
  60. data/spec/sff_extract_spec.rb +98 -0
  61. data/spec/spec_helper.rb +55 -0
  62. data/spec/tophat_spec.rb +99 -0
  63. data/spec/utils_spec.rb +22 -0
  64. data/test/conf/test_db.yml +4 -0
  65. data/test/data/blastoutput.xml +69 -0
  66. data/test/data/gene-GO.json +1 -0
  67. data/test/data/goa_uniprot +27 -0
  68. data/test/data/goslim_goa.obo +1763 -0
  69. data/test/helper.rb +18 -0
  70. data/test/test_bio-ngs.rb +17 -0
  71. data/test/test_db.rb +21 -0
  72. data/test/test_homology.rb +102 -0
  73. data/test/test_ngs.rb +21 -0
  74. data/test/test_ontology.rb +74 -0
  75. data/test/test_utils.rb +29 -0
  76. metadata +460 -0
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.3.2.alpha.01
data/bin/biongs ADDED
@@ -0,0 +1,35 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ module Bio
4
+ module Ngs
5
+
6
+ path = File.expand_path(File.dirname(__FILE__))
7
+ $:<<File.join(File.dirname(path),"lib")
8
+ require 'bio-ngs'
9
+
10
+ path = File.expand_path(File.dirname(__FILE__))
11
+ Dir.glob(File.join(File.dirname(path),"lib","tasks","*.thor")) do |thorfile|
12
+ Thor::Util.load_thorfile(thorfile)
13
+ end
14
+
15
+ class Runner < Thor::Runner
16
+
17
+ def help(meth = nil)
18
+ if meth && !self.respond_to?(meth)
19
+ initialize_thorfiles(meth)
20
+ klass, task = Thor::Util.find_class_and_task_by_namespace(meth)
21
+ klass.start(["-h", task].compact, :shell => self.shell)
22
+ else
23
+ puts "\nBio-NGS is an official BioRuby plugin for Next Generation Sequencing data analysis and workflows.\n\n"
24
+ puts "To view the full list of available tasks and commands type:\n\n"
25
+ puts "\tbiongs -T\n\n"
26
+ puts "To get information on specific tasks type:\n\n"
27
+ puts "\tbiongs help [TASK]\n\n"
28
+ end
29
+ end
30
+
31
+ end
32
+ $thor_runner = true
33
+ Runner.start
34
+ end
35
+ end
data/bio-ngs.gemspec ADDED
@@ -0,0 +1,215 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{bio-ngs}
8
+ s.version = "0.3.2.alpha.01"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
11
+ s.authors = [%q{Francesco Strozzi}, %q{Raoul J.P. Bonnal}]
12
+ s.date = %q{2011-10-10}
13
+ s.description = %q{bio-ngs provides a framework for handling NGS data with BioRuby}
14
+ s.email = %q{francesco.strozzi@gmail.com}
15
+ s.executables = [%q{biongs}]
16
+ s.extensions = [%q{ext/mkrf_conf.rb}]
17
+ s.extra_rdoc_files = [
18
+ "LICENSE.txt",
19
+ "README.rdoc"
20
+ ]
21
+ s.files = [
22
+ ".document",
23
+ "Gemfile",
24
+ "Gemfile.lock",
25
+ "LICENSE.txt",
26
+ "README.rdoc",
27
+ "Rakefile",
28
+ "VERSION",
29
+ "bin/biongs",
30
+ "bio-ngs.gemspec",
31
+ "ext/mkrf_conf.rb",
32
+ "lib/bio-ngs.rb",
33
+ "lib/bio/appl/ngs/bcl2qseq.rb",
34
+ "lib/bio/appl/ngs/blast.rb",
35
+ "lib/bio/appl/ngs/bowtie-inspect.rb",
36
+ "lib/bio/appl/ngs/cufflinks.rb",
37
+ "lib/bio/appl/ngs/fastx.rb",
38
+ "lib/bio/appl/ngs/samtools.rb",
39
+ "lib/bio/appl/ngs/sff_extract.rb",
40
+ "lib/bio/appl/ngs/tophat.rb",
41
+ "lib/bio/ngs/converter.rb",
42
+ "lib/bio/ngs/core_ext.rb",
43
+ "lib/bio/ngs/db.rb",
44
+ "lib/bio/ngs/db/migrate/homology/201105030707_create_blastout.rb",
45
+ "lib/bio/ngs/db/migrate/homology/201105030709_create_goannotation.rb",
46
+ "lib/bio/ngs/db/migrate/ontology/201105030708_create_go.rb",
47
+ "lib/bio/ngs/db/migrate/ontology/201105030710_create_gene_go.rb",
48
+ "lib/bio/ngs/db/migrate/ontology/201105030711_create_gene.rb",
49
+ "lib/bio/ngs/db/models.rb",
50
+ "lib/bio/ngs/db/models/homology.rb",
51
+ "lib/bio/ngs/db/models/ontology.rb",
52
+ "lib/bio/ngs/ext/bin/common/fastq_coverage_graph.sh",
53
+ "lib/bio/ngs/ext/bin/common/sff_extract",
54
+ "lib/bio/ngs/ext/bin/linux/samtools",
55
+ "lib/bio/ngs/ext/bin/osx/samtools",
56
+ "lib/bio/ngs/ext/versions.yaml",
57
+ "lib/bio/ngs/graphics.rb",
58
+ "lib/bio/ngs/homology.rb",
59
+ "lib/bio/ngs/ontology.rb",
60
+ "lib/bio/ngs/quality.rb",
61
+ "lib/bio/ngs/record.rb",
62
+ "lib/bio/ngs/task.rb",
63
+ "lib/bio/ngs/utils.rb",
64
+ "lib/development_tasks.rb",
65
+ "lib/enumerable.rb",
66
+ "lib/tasks/bwa.thor",
67
+ "lib/tasks/convert.thor",
68
+ "lib/tasks/history.thor",
69
+ "lib/tasks/homology.thor",
70
+ "lib/tasks/ontology.thor",
71
+ "lib/tasks/project.thor",
72
+ "lib/tasks/quality.thor",
73
+ "lib/tasks/rna.thor",
74
+ "lib/tasks/sff_extract.thor",
75
+ "lib/templates/README.tt",
76
+ "lib/templates/db.tt",
77
+ "lib/wrapper.rb",
78
+ "spec/converter_qseq_spec.rb",
79
+ "spec/fixture/s_1_1_1108_qseq.txt",
80
+ "spec/quality_spec.rb",
81
+ "spec/sff_extract_spec.rb",
82
+ "spec/spec_helper.rb",
83
+ "spec/tophat_spec.rb",
84
+ "spec/utils_spec.rb",
85
+ "test/conf/test_db.yml",
86
+ "test/data/blastoutput.xml",
87
+ "test/data/gene-GO.json",
88
+ "test/data/goa_uniprot",
89
+ "test/data/goslim_goa.obo",
90
+ "test/helper.rb",
91
+ "test/test_bio-ngs.rb",
92
+ "test/test_db.rb",
93
+ "test/test_homology.rb",
94
+ "test/test_ngs.rb",
95
+ "test/test_ontology.rb",
96
+ "test/test_utils.rb"
97
+ ]
98
+ s.homepage = %q{http://github.com/helios/bioruby-ngs}
99
+ s.licenses = [%q{MIT}]
100
+ s.require_paths = [%q{lib}]
101
+ s.rubygems_version = %q{1.8.6}
102
+ s.summary = %q{bio-ngs provides a framework for handling NGS data with BioRuby}
103
+ s.test_files = [
104
+ "spec/converter_qseq_spec.rb",
105
+ "spec/quality_spec.rb",
106
+ "spec/sff_extract_spec.rb",
107
+ "spec/spec_helper.rb",
108
+ "spec/tophat_spec.rb",
109
+ "spec/utils_spec.rb",
110
+ "test/helper.rb",
111
+ "test/test_bio-ngs.rb",
112
+ "test/test_db.rb",
113
+ "test/test_homology.rb",
114
+ "test/test_ngs.rb",
115
+ "test/test_ontology.rb",
116
+ "test/test_utils.rb"
117
+ ]
118
+
119
+ if s.respond_to? :specification_version then
120
+ s.specification_version = 3
121
+
122
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
123
+ s.add_runtime_dependency(%q<bio>, [">= 1.4.2"])
124
+ s.add_runtime_dependency(%q<bio-bwa>, [">= 0.2.2"])
125
+ s.add_runtime_dependency(%q<bio-samtools>, [">= 0.0.0"])
126
+ s.add_runtime_dependency(%q<thor>, [">= 0.14.6"])
127
+ s.add_runtime_dependency(%q<rubyvis>, [">= 0.5.0"])
128
+ s.add_runtime_dependency(%q<daemons>, [">= 1.1.0"])
129
+ s.add_runtime_dependency(%q<ruby-ensembl-api>, [">= 1.0.1"])
130
+ s.add_runtime_dependency(%q<activerecord>, [">= 3.0.5"])
131
+ s.add_runtime_dependency(%q<sqlite3>, [">= 1.3.3"])
132
+ s.add_runtime_dependency(%q<bio-blastxmlparser>, [">= 0"])
133
+ s.add_runtime_dependency(%q<progressbar>, [">= 0.9.0"])
134
+ s.add_development_dependency(%q<shoulda>, [">= 0"])
135
+ s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
136
+ s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
137
+ s.add_development_dependency(%q<rcov>, [">= 0"])
138
+ s.add_development_dependency(%q<bio>, [">= 1.4.2"])
139
+ s.add_development_dependency(%q<thor>, [">= 0.14.6"])
140
+ s.add_development_dependency(%q<ffi>, [">= 1.0.6"])
141
+ s.add_development_dependency(%q<rubyvis>, [">= 0.5.0"])
142
+ s.add_development_dependency(%q<rspec>, [">= 2.5.0"])
143
+ s.add_development_dependency(%q<daemons>, [">= 1.1.0"])
144
+ s.add_development_dependency(%q<bio-samtools>, [">= 0.0.0"])
145
+ s.add_development_dependency(%q<ruby-ensembl-api>, [">= 1.0.1"])
146
+ s.add_development_dependency(%q<bio-bwa>, [">= 0.2.2"])
147
+ s.add_development_dependency(%q<activerecord>, [">= 3.0.5"])
148
+ s.add_development_dependency(%q<sqlite3>, [">= 1.3.3"])
149
+ s.add_development_dependency(%q<bio-blastxmlparser>, [">= 0"])
150
+ s.add_development_dependency(%q<progressbar>, [">= 0.9.0"])
151
+ s.add_development_dependency(%q<json>, [">= 0"])
152
+ else
153
+ s.add_dependency(%q<bio>, [">= 1.4.2"])
154
+ s.add_dependency(%q<bio-bwa>, [">= 0.2.2"])
155
+ s.add_dependency(%q<bio-samtools>, [">= 0.0.0"])
156
+ s.add_dependency(%q<thor>, [">= 0.14.6"])
157
+ s.add_dependency(%q<rubyvis>, [">= 0.5.0"])
158
+ s.add_dependency(%q<daemons>, [">= 1.1.0"])
159
+ s.add_dependency(%q<ruby-ensembl-api>, [">= 1.0.1"])
160
+ s.add_dependency(%q<activerecord>, [">= 3.0.5"])
161
+ s.add_dependency(%q<sqlite3>, [">= 1.3.3"])
162
+ s.add_dependency(%q<bio-blastxmlparser>, [">= 0"])
163
+ s.add_dependency(%q<progressbar>, [">= 0.9.0"])
164
+ s.add_dependency(%q<shoulda>, [">= 0"])
165
+ s.add_dependency(%q<bundler>, ["~> 1.0.0"])
166
+ s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
167
+ s.add_dependency(%q<rcov>, [">= 0"])
168
+ s.add_dependency(%q<bio>, [">= 1.4.2"])
169
+ s.add_dependency(%q<thor>, [">= 0.14.6"])
170
+ s.add_dependency(%q<ffi>, [">= 1.0.6"])
171
+ s.add_dependency(%q<rubyvis>, [">= 0.5.0"])
172
+ s.add_dependency(%q<rspec>, [">= 2.5.0"])
173
+ s.add_dependency(%q<daemons>, [">= 1.1.0"])
174
+ s.add_dependency(%q<bio-samtools>, [">= 0.0.0"])
175
+ s.add_dependency(%q<ruby-ensembl-api>, [">= 1.0.1"])
176
+ s.add_dependency(%q<bio-bwa>, [">= 0.2.2"])
177
+ s.add_dependency(%q<activerecord>, [">= 3.0.5"])
178
+ s.add_dependency(%q<sqlite3>, [">= 1.3.3"])
179
+ s.add_dependency(%q<bio-blastxmlparser>, [">= 0"])
180
+ s.add_dependency(%q<progressbar>, [">= 0.9.0"])
181
+ s.add_dependency(%q<json>, [">= 0"])
182
+ end
183
+ else
184
+ s.add_dependency(%q<bio>, [">= 1.4.2"])
185
+ s.add_dependency(%q<bio-bwa>, [">= 0.2.2"])
186
+ s.add_dependency(%q<bio-samtools>, [">= 0.0.0"])
187
+ s.add_dependency(%q<thor>, [">= 0.14.6"])
188
+ s.add_dependency(%q<rubyvis>, [">= 0.5.0"])
189
+ s.add_dependency(%q<daemons>, [">= 1.1.0"])
190
+ s.add_dependency(%q<ruby-ensembl-api>, [">= 1.0.1"])
191
+ s.add_dependency(%q<activerecord>, [">= 3.0.5"])
192
+ s.add_dependency(%q<sqlite3>, [">= 1.3.3"])
193
+ s.add_dependency(%q<bio-blastxmlparser>, [">= 0"])
194
+ s.add_dependency(%q<progressbar>, [">= 0.9.0"])
195
+ s.add_dependency(%q<shoulda>, [">= 0"])
196
+ s.add_dependency(%q<bundler>, ["~> 1.0.0"])
197
+ s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
198
+ s.add_dependency(%q<rcov>, [">= 0"])
199
+ s.add_dependency(%q<bio>, [">= 1.4.2"])
200
+ s.add_dependency(%q<thor>, [">= 0.14.6"])
201
+ s.add_dependency(%q<ffi>, [">= 1.0.6"])
202
+ s.add_dependency(%q<rubyvis>, [">= 0.5.0"])
203
+ s.add_dependency(%q<rspec>, [">= 2.5.0"])
204
+ s.add_dependency(%q<daemons>, [">= 1.1.0"])
205
+ s.add_dependency(%q<bio-samtools>, [">= 0.0.0"])
206
+ s.add_dependency(%q<ruby-ensembl-api>, [">= 1.0.1"])
207
+ s.add_dependency(%q<bio-bwa>, [">= 0.2.2"])
208
+ s.add_dependency(%q<activerecord>, [">= 3.0.5"])
209
+ s.add_dependency(%q<sqlite3>, [">= 1.3.3"])
210
+ s.add_dependency(%q<bio-blastxmlparser>, [">= 0"])
211
+ s.add_dependency(%q<progressbar>, [">= 0.9.0"])
212
+ s.add_dependency(%q<json>, [">= 0"])
213
+ end
214
+ end
215
+
data/ext/mkrf_conf.rb ADDED
@@ -0,0 +1,87 @@
1
+ #(c) Copyright 2011 Raoul Bonnal. All Rights Reserved.
2
+
3
+ # create Rakefile for shared library compilation
4
+
5
+
6
+ path = File.expand_path(File.dirname(__FILE__))
7
+
8
+ path_external = File.join(path, "../lib/bio/ngs/ext")
9
+ path_lib = File.join(path,"../lib")
10
+ path_binary = File.join(path_external,"bin","common")
11
+
12
+
13
+ File.open(File.join(path,"Rakefile"),"w") do |rakefile|
14
+ if (ARGV.include?("--biolinux") | ARGV.include?("--no-third-party"))
15
+ rakefile.write <<-RAKE
16
+ task :default do
17
+ puts "Nothing to do, third party software must be, already, installed on the host system. Bye Bye!"
18
+ end #default
19
+ RAKE
20
+ else
21
+ rakefile.write <<-RAKE
22
+
23
+ require 'rbconfig'
24
+ require 'open-uri'
25
+ require 'fileutils'
26
+ include FileUtils::Verbose
27
+ require 'rake/clean'
28
+ require 'yaml'
29
+ require File.join("#{path_lib}","/bio/ngs/utils") #ToDo: I dnk if it is better to require everything or just the utils Bio::Ngs::Utils
30
+
31
+ module Gem
32
+ module Install
33
+ class << self
34
+ def foreign_files(path=".")
35
+ install_files = %w(Rakefile gem_make.out mkrf_conf.rb).map{|fn| File.join(path,fn)}
36
+ Dir.glob(path+"/*") - install_files
37
+ end
38
+ end
39
+ end
40
+ end
41
+
42
+ versions = YAML.load_file(File.join("#{path_external}","versions.yaml"))
43
+
44
+
45
+ task :download do
46
+
47
+ ["common", Bio::Ngs::Utils.os_type].each do |kind_software|
48
+ #download common libraries or tools
49
+ #download specific OS binaries or libraries
50
+ versions[kind_software].each do |tool, info|
51
+ filename = "\#{info["basename"]}.\#{info["suffix"]}"
52
+ Bio::Ngs::Utils.download_with_progress(:url => info["url"], :filename => filename)
53
+ end
54
+ end
55
+ end
56
+
57
+ task :compile do
58
+ ["common", Bio::Ngs::Utils.os_type].each do |kind_software|
59
+ path_binary = File.join("#{path_external}", 'bin', kind_software)
60
+ #download common libraries or tools
61
+ #download specific OS binaries or libraries
62
+ versions[kind_software].each do |tool, info|
63
+ Bio::Ngs::Utils.compile_source(tool, info, "#{path_external}", path_binary) if info["type"]=="source"
64
+ end #versions
65
+ end
66
+ end #compile
67
+
68
+ task :binary do
69
+ ["common", Bio::Ngs::Utils.os_type].each do |kind_software|
70
+ path_binary = File.join("#{path_external}", 'bin', kind_software)
71
+ versions[kind_software].each do |tool, info|
72
+ Bio::Ngs::Utils.install_binary(tool, info, "#{path_external}", path_binary) if info["type"]=="binary"
73
+ end #versions
74
+ end
75
+ end #binary
76
+
77
+ task :clean do
78
+ Gem::Install.foreign_files("#{path}").each do |file_to_remove|
79
+ Dir.exists?(file_to_remove) ? FileUtils.remove_dir(file_to_remove) : FileUtils.rm(file_to_remove)
80
+ end
81
+ end #clean
82
+
83
+ task :default => [:download,:compile,:binary,:clean]
84
+
85
+ RAKE
86
+ end #unless
87
+ end #file
data/lib/bio-ngs.rb ADDED
@@ -0,0 +1,54 @@
1
+ #
2
+ # bio-ngs.rb - Main bio-ngs class
3
+ #
4
+ # Copyright:: Copyright (C) 2011
5
+ # Raoul Bonnal <r@bioruby.org>,
6
+ # Francesco Strozzi <francesco.strozzi@gmail.com>
7
+ # License:: The Ruby License
8
+ #
9
+ #
10
+
11
+
12
+
13
+ # External gems
14
+ require 'yaml'
15
+ require 'json'
16
+ require 'daemons'
17
+ require 'bio-samtools'
18
+ require 'thor'
19
+ require 'thor/group'
20
+ require 'thor/runner'
21
+ require 'bio-blastxmlparser'
22
+ require 'bio'
23
+ require 'bio-bwa'
24
+ require 'active_record'
25
+ require 'sqlite3'
26
+
27
+ # NGS classes
28
+ require 'enumerable'
29
+ require 'wrapper'
30
+ require 'bio/ngs/utils'
31
+ require 'bio/ngs/record'
32
+ require 'bio/ngs/quality'
33
+ require 'bio/ngs/graphics'
34
+ require 'bio/ngs/task'
35
+ require 'bio/ngs/core_ext'
36
+ require 'bio/ngs/converter'
37
+ require 'bio/ngs/db'
38
+ require 'bio/ngs/homology'
39
+ require 'bio/ngs/ontology'
40
+
41
+ #tools
42
+ require 'bio/appl/ngs/tophat'
43
+ require 'bio/appl/ngs/bowtie-inspect'
44
+ require 'bio/appl/ngs/sff_extract'
45
+ require 'bio/appl/ngs/bcl2qseq' #TODO: FIX THIS BUGGY CODE in THOR TASK
46
+
47
+ require 'bio/appl/ngs/cufflinks'
48
+ require 'bio/appl/ngs/samtools'
49
+ require 'bio/appl/ngs/fastx'
50
+ require 'bio/appl/ngs/blast'
51
+
52
+ # history
53
+ Bio::Ngs::HISTORY_FILE = Dir.pwd+"/.task-history.yml"
54
+ Bio::Ngs::Utils.extend_system_path
@@ -0,0 +1,93 @@
1
+ #
2
+ # bcl2qseq.rb - description
3
+ #
4
+ # Copyright:: Copyright (C) 2011
5
+ # Raoul Bonnal <@bioruby.org>
6
+ # License:: The Ruby License
7
+ #
8
+ #
9
+
10
+
11
+ #require 'bio/command'
12
+ #require 'shellwords'
13
+ #require 'thor'
14
+ #require 'bio/ngs/utils'
15
+
16
+ # usage:
17
+ # setupBclToQseq.py -b /path/to/BaseCalls [--in-place|-o /path/to/Output] [options]
18
+ #
19
+ # Script to setup the output directory for the conversion of BCLfiles produced by
20
+ # RTA into a standard QSEQ-based base calls folder.
21
+ #
22
+ # options:
23
+ # -h, --help show this help message and exit
24
+ # -b BASE_CALLS_DIRECTORY, --base-calls-directory=BASE_CALLS_DIRECTORY
25
+ # Full path to the Base Calls directory generated by the
26
+ # instrument
27
+ # --in-place Allow in-place conversion (in the Base Calls
28
+ # directory)
29
+ # -o OUTPUT_DIRECTORY, --output-directory=OUTPUT_DIRECTORY
30
+ # Full path to the output directory, if not in --in-
31
+ # place mode
32
+ # -i INTENSITIES_DIRECTORY, --intensities-directory=INTENSITIES_DIRECTORY
33
+ # Full path to the directory containing the intensities,
34
+ # if different from the parent of the Base Calls
35
+ # directory
36
+ # -f FILTER_DIRECTORY, --filter-directory=FILTER_DIRECTORY
37
+ # Full path to the filter directory, if different from
38
+ # the Base Calls directory
39
+ # -p POSITIONS_DIRECTORY, --positions-directory=POSITIONS_DIRECTORY
40
+ # Full path to the positions directory, if different
41
+ # from the Intensities directory
42
+ # -P POSITIONS_FORMAT, --positions-format=POSITIONS_FORMAT
43
+ # Positions file format (supported formats are:
44
+ # {'_pos.txt','.locs','.clocs'})
45
+ # --no-eamss Do not apply the EAMSS quality masking
46
+ # --overwrite Overwrite the content of the output directory if it
47
+ # already exists
48
+ # --GERALD=GERALD Path to the GERALD config file
49
+ # -S, --silent Do not produce any information or warnings
50
+ # -Q, --quiet Produce only warnings. Skips general information
51
+ # -V, --verbose Produce additional debug information
52
+ # -v, --version Print the version information and exits
53
+ # -L LOG_FILE, --log-file=LOG_FILE
54
+ # Full path to the log file
55
+ # -c, --include-controls
56
+ # Include controls information in Passing Filter column
57
+ # --ignore-missing-bcl Assume missing *.bcl files correspond to a missed base
58
+ # call (i.e., '.')
59
+ # --ignore-missing-stats
60
+ # Fill in with zeros when *.stats files are missing
61
+
62
+
63
+ module Bio
64
+ module Ngs
65
+ class Bclqseq
66
+
67
+ include Bio::Command::Wrapper
68
+
69
+ set_program Bio::Ngs::Utils.binary("setupBclToQseq.py")
70
+
71
+ add_option "base-calls-directory", :type => :string, :aliases =>'-b', :desc => 'Full path to the Base Calls directory generated by the instrument'
72
+ add_option "in-place",:type => :boolean, :desc => 'Allow in-place conversion (in the Base Calls directory)'
73
+ add_option "output-directory", :type => :string, :aliases => '-o', :desc => 'Full path to the output directory, if not in --in-place mode'
74
+ add_option "intensities-directory", :type => :string, :aliases => '-i', :desc => 'Full path to the directory containing the intensities, if different from the parent of the Base Calls directory'
75
+ add_option "filter-directory", :type => :string , :aliases => '-f', :desc => 'Full path to the filter directory, if different from the Base Calls directory'
76
+ add_option "positions-directory", :type => :string, :aliases => '-p', :desc => 'Full path to the positions directory, if different from the Intensities directory'
77
+ add_option "positions-format", :type => :string, :aliases => '-P', :desc => 'Positions file format (supported formats are: {\'_pos.txt\',\'.locs\',\'.clocs\'})'
78
+ add_option "no-eamss", :type => :boolean, :desc => 'Do not apply the EAMSS quality masking'
79
+ add_option "overwrite", :type => :boolean, :desc => 'Overwrite the content of the output directory if it already exists'
80
+ add_option "GERALD", :type => :string, :desc => 'Path to the GERALD config file'
81
+ add_option "silent", :type => :boolean, :aliases => '-S', :desc => 'Do not produce any information or warnings'
82
+ add_option "quiet", :type => :boolean, :aliases => '-Q', :desc => 'Produce only warnings. Skips general information'
83
+ add_option "verbose", :type => :boolean, :aliases => '-V', :desc => 'Produce additional debug information'
84
+ add_option "log-file", :type => :string, :aliases => '-L', :desc => 'Full path to the log file'
85
+ add_option "include-controls", :type => :boolean, :aliases => '-c', :desc => 'Include controls information in Passing Filter column'
86
+ add_option "ignore-missing-bcl", :type => :boolean, :desc => 'Assume missing *.bcl files correspond to a missed base call (i.e., \'.\')'
87
+ add_option "ignore-missin-stats", :type => :boolean, :desc => 'Fill in with zeros when *.stats files are missing'
88
+
89
+ end #Bcl2seq
90
+ end #Ngs
91
+ end #Bio
92
+
93
+