bio-bwa 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (91) hide show
  1. data/.document +5 -0
  2. data/Gemfile +15 -0
  3. data/Gemfile.lock +28 -0
  4. data/LICENSE.txt +35 -0
  5. data/README.rdoc +33 -0
  6. data/Rakefile +56 -0
  7. data/VERSION +1 -0
  8. data/bio-bwa.gemspec +152 -0
  9. data/doc/Bio.html +93 -0
  10. data/doc/Bio/BWA.html +2884 -0
  11. data/doc/Bio/BWA/Library.html +229 -0
  12. data/doc/_index.html +119 -0
  13. data/doc/class_list.html +36 -0
  14. data/doc/css/common.css +1 -0
  15. data/doc/css/full_list.css +53 -0
  16. data/doc/css/style.css +310 -0
  17. data/doc/file.LICENSE.html +88 -0
  18. data/doc/file.README.html +119 -0
  19. data/doc/file_list.html +41 -0
  20. data/doc/frames.html +13 -0
  21. data/doc/index.html +119 -0
  22. data/doc/js/app.js +203 -0
  23. data/doc/js/full_list.js +149 -0
  24. data/doc/js/jquery.js +154 -0
  25. data/doc/method_list.html +171 -0
  26. data/doc/top-level-namespace.html +88 -0
  27. data/ext/COPYING +674 -0
  28. data/ext/ChangeLog +3864 -0
  29. data/ext/NEWS +555 -0
  30. data/ext/README +29 -0
  31. data/ext/bamlite.c +155 -0
  32. data/ext/bamlite.h +94 -0
  33. data/ext/bntseq.c +303 -0
  34. data/ext/bntseq.h +80 -0
  35. data/ext/bwa.1 +562 -0
  36. data/ext/bwape.c +807 -0
  37. data/ext/bwase.c +686 -0
  38. data/ext/bwase.h +27 -0
  39. data/ext/bwaseqio.c +222 -0
  40. data/ext/bwt.c +250 -0
  41. data/ext/bwt.h +105 -0
  42. data/ext/bwt_gen/Makefile +23 -0
  43. data/ext/bwt_gen/QSufSort.c +496 -0
  44. data/ext/bwt_gen/QSufSort.h +40 -0
  45. data/ext/bwt_gen/bwt_gen.c +1547 -0
  46. data/ext/bwt_gen/bwt_gen.h +105 -0
  47. data/ext/bwt_lite.c +94 -0
  48. data/ext/bwt_lite.h +29 -0
  49. data/ext/bwtaln.c +345 -0
  50. data/ext/bwtaln.h +150 -0
  51. data/ext/bwtgap.c +264 -0
  52. data/ext/bwtgap.h +38 -0
  53. data/ext/bwtindex.c +186 -0
  54. data/ext/bwtio.c +77 -0
  55. data/ext/bwtmisc.c +269 -0
  56. data/ext/bwtsw2.h +51 -0
  57. data/ext/bwtsw2_aux.c +650 -0
  58. data/ext/bwtsw2_chain.c +107 -0
  59. data/ext/bwtsw2_core.c +594 -0
  60. data/ext/bwtsw2_main.c +100 -0
  61. data/ext/cs2nt.c +191 -0
  62. data/ext/is.c +218 -0
  63. data/ext/khash.h +506 -0
  64. data/ext/kseq.h +208 -0
  65. data/ext/ksort.h +269 -0
  66. data/ext/kstring.c +35 -0
  67. data/ext/kstring.h +46 -0
  68. data/ext/kvec.h +90 -0
  69. data/ext/main.c +63 -0
  70. data/ext/main.h +29 -0
  71. data/ext/mkrf_conf.rb +49 -0
  72. data/ext/qualfa2fq.pl +27 -0
  73. data/ext/simple_dp.c +162 -0
  74. data/ext/simpletest.c +23 -0
  75. data/ext/solid2fastq.pl +111 -0
  76. data/ext/stdaln.c +1072 -0
  77. data/ext/stdaln.h +162 -0
  78. data/ext/utils.c +82 -0
  79. data/ext/utils.h +54 -0
  80. data/lib/bio-bwa.rb +7 -0
  81. data/lib/bio/bwa.rb +312 -0
  82. data/lib/bio/bwa/library.rb +42 -0
  83. data/test/data/testdata.fa +602 -0
  84. data/test/data/testdata.long.fa +175 -0
  85. data/test/data/testdata.short.fa +2 -0
  86. data/test/helper.rb +18 -0
  87. data/test/test_bio-bwa_basic.rb +62 -0
  88. data/test/test_bio-bwa_make_index.rb +42 -0
  89. data/test/test_bio-bwa_run_aln.rb +49 -0
  90. data/test/test_bio-bwa_sam_conversion.rb +49 -0
  91. metadata +218 -0
data/.document ADDED
@@ -0,0 +1,5 @@
1
+ lib/**/*.rb
2
+ bin/*
3
+ -
4
+ features/**/*.feature
5
+ LICENSE.txt
data/Gemfile ADDED
@@ -0,0 +1,15 @@
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 "shoulda", ">= 0"
10
+ gem "bundler", "~> 1.0.0"
11
+ gem "jeweler", "~> 1.5.2"
12
+ gem "rcov", ">= 0"
13
+ gem "bio", ">= 1.4.1"
14
+ gem "ffi", ">= 1.0.5"
15
+ end
data/Gemfile.lock ADDED
@@ -0,0 +1,28 @@
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ bio (1.4.1)
5
+ ffi (1.0.5)
6
+ rake (>= 0.8.7)
7
+ ffi (1.0.5-java)
8
+ git (1.2.5)
9
+ jeweler (1.5.2)
10
+ bundler (~> 1.0.0)
11
+ git (>= 1.2.5)
12
+ rake
13
+ rake (0.8.7)
14
+ rcov (0.9.9)
15
+ rcov (0.9.9-java)
16
+ shoulda (2.11.3)
17
+
18
+ PLATFORMS
19
+ java
20
+ ruby
21
+
22
+ DEPENDENCIES
23
+ bio (>= 1.4.1)
24
+ bundler (~> 1.0.0)
25
+ ffi (>= 1.0.5)
26
+ jeweler (~> 1.5.2)
27
+ rcov
28
+ shoulda
data/LICENSE.txt ADDED
@@ -0,0 +1,35 @@
1
+ Copyright (c) 2011 Francesco Strozzi - for Ruby Code and binding
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.
21
+
22
+
23
+
24
+ IMPORTANT NOTE:
25
+ This package includes the BWA source code and pre-compiled shared libraries.
26
+ The full BWA package is distributed under GPLv3 as it uses source codes from BWT-SW which is covered by GPL.
27
+ Sorting, hash table, BWT and IS libraries are distributed under the MIT license.
28
+ Please check http://bio-bwa.sourceforge.net/ for further details.
29
+
30
+ Burrows-Wheeler Aligner REFERENCES:
31
+
32
+ Li H. and Durbin R. (2009) Fast and accurate short read alignment with Burrows-Wheeler Transform. Bioinformatics, 25:1754-60. [PMID: 19451168]
33
+ Li H. and Durbin R. (2010) Fast and accurate long-read alignment with Burrows-Wheeler Transform. Bioinformatics, Epub. [PMID: 20080505]
34
+
35
+
data/README.rdoc ADDED
@@ -0,0 +1,33 @@
1
+ = bio-bwa
2
+
3
+ Ruby binding to BWA fast mapping software. Built using Ruby FFI library.
4
+
5
+ == Contributing to bio-bwa
6
+
7
+ * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
8
+ * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
9
+ * Fork the project
10
+ * Start a feature/bugfix branch
11
+ * Commit and push until you are happy with your contribution
12
+ * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
13
+ * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
14
+
15
+ == Copyright
16
+
17
+ Copyright (c) 2011 Francesco Strozzi. See LICENSE.txt for
18
+ further details.
19
+
20
+ == Citations
21
+
22
+ If you use this package please cite the following references:
23
+
24
+ For short read alignment:
25
+
26
+ Li H. and Durbin R. (2009) Fast and accurate short read alignment with Burrows-Wheeler Transform. Bioinformatics, 25:1754-60. [PMID: 19451168]
27
+
28
+ For long read alignment:
29
+
30
+ Li H. and Durbin R. (2010) Fast and accurate long-read alignment with Burrows-Wheeler Transform. Bioinformatics, Epub. [PMID: 20080505]
31
+
32
+
33
+
data/Rakefile ADDED
@@ -0,0 +1,56 @@
1
+ require 'rubygems'
2
+ require 'bundler'
3
+ begin
4
+ Bundler.setup(:default, :development)
5
+ rescue Bundler::BundlerError => e
6
+ $stderr.puts e.message
7
+ $stderr.puts "Run `bundle install` to install missing gems"
8
+ exit e.status_code
9
+ end
10
+ require 'rake'
11
+
12
+ require 'jeweler'
13
+ Jeweler::Tasks.new do |gem|
14
+ # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
15
+ gem.name = "bio-bwa"
16
+ gem.homepage = "http://github.com/fstrozzi/bioruby-bwa"
17
+ gem.license = "MIT/GPLv3"
18
+ gem.summary = %Q{Ruby binding for BWA mapping software}
19
+ gem.description = %Q{Ruby binding for BWA mapping software, built using Ruby-FFI library}
20
+ gem.email = "francesco.strozzi@gmail.com"
21
+ gem.authors = ["Francesco Strozzi"]
22
+ gem.extensions = "ext/mkrf_conf.rb"
23
+ gem.files += Dir['lib/**/*'] + Dir['ext/**/*']
24
+
25
+ # Include your dependencies below. Runtime dependencies are required when using your gem,
26
+ # and development dependencies are only needed for development (ie running rake tasks, tests, etc)
27
+ # gem.add_runtime_dependency 'jabber4r', '> 0.1'
28
+ # gem.add_development_dependency 'rspec', '> 1.2.3'
29
+ end
30
+ Jeweler::RubygemsDotOrgTasks.new
31
+
32
+ task :test do
33
+ Dir.glob("test/**/test_*.rb").sort.each do |test|
34
+ system("ruby "+test)
35
+ end
36
+ end
37
+
38
+
39
+ require 'rcov/rcovtask'
40
+ Rcov::RcovTask.new do |test|
41
+ test.libs << 'test'
42
+ test.pattern = 'test/**/test_*.rb'
43
+ test.verbose = true
44
+ end
45
+
46
+ task :default => :test
47
+
48
+ require 'rake/rdoctask'
49
+ Rake::RDocTask.new do |rdoc|
50
+ version = File.exist?('VERSION') ? File.read('VERSION') : ""
51
+
52
+ rdoc.rdoc_dir = 'rdoc'
53
+ rdoc.title = "bio-bwa #{version}"
54
+ rdoc.rdoc_files.include('README*')
55
+ rdoc.rdoc_files.include('lib/**/*.rb')
56
+ end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.2.0
data/bio-bwa.gemspec ADDED
@@ -0,0 +1,152 @@
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-bwa}
8
+ s.version = "0.2.0"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Francesco Strozzi"]
12
+ s.date = %q{2011-03-22}
13
+ s.description = %q{Ruby binding for BWA mapping software, built using Ruby-FFI library}
14
+ s.email = %q{francesco.strozzi@gmail.com}
15
+ s.extensions = ["ext/mkrf_conf.rb"]
16
+ s.extra_rdoc_files = [
17
+ "LICENSE.txt",
18
+ "README.rdoc"
19
+ ]
20
+ s.files = [
21
+ ".document",
22
+ "Gemfile",
23
+ "Gemfile.lock",
24
+ "LICENSE.txt",
25
+ "README.rdoc",
26
+ "Rakefile",
27
+ "VERSION",
28
+ "bio-bwa.gemspec",
29
+ "doc/Bio.html",
30
+ "doc/Bio/BWA.html",
31
+ "doc/Bio/BWA/Library.html",
32
+ "doc/_index.html",
33
+ "doc/class_list.html",
34
+ "doc/css/common.css",
35
+ "doc/css/full_list.css",
36
+ "doc/css/style.css",
37
+ "doc/file.LICENSE.html",
38
+ "doc/file.README.html",
39
+ "doc/file_list.html",
40
+ "doc/frames.html",
41
+ "doc/index.html",
42
+ "doc/js/app.js",
43
+ "doc/js/full_list.js",
44
+ "doc/js/jquery.js",
45
+ "doc/method_list.html",
46
+ "doc/top-level-namespace.html",
47
+ "ext/COPYING",
48
+ "ext/ChangeLog",
49
+ "ext/NEWS",
50
+ "ext/README",
51
+ "ext/bamlite.c",
52
+ "ext/bamlite.h",
53
+ "ext/bntseq.c",
54
+ "ext/bntseq.h",
55
+ "ext/bwa.1",
56
+ "ext/bwape.c",
57
+ "ext/bwase.c",
58
+ "ext/bwase.h",
59
+ "ext/bwaseqio.c",
60
+ "ext/bwt.c",
61
+ "ext/bwt.h",
62
+ "ext/bwt_gen/Makefile",
63
+ "ext/bwt_gen/QSufSort.c",
64
+ "ext/bwt_gen/QSufSort.h",
65
+ "ext/bwt_gen/bwt_gen.c",
66
+ "ext/bwt_gen/bwt_gen.h",
67
+ "ext/bwt_lite.c",
68
+ "ext/bwt_lite.h",
69
+ "ext/bwtaln.c",
70
+ "ext/bwtaln.h",
71
+ "ext/bwtgap.c",
72
+ "ext/bwtgap.h",
73
+ "ext/bwtindex.c",
74
+ "ext/bwtio.c",
75
+ "ext/bwtmisc.c",
76
+ "ext/bwtsw2.h",
77
+ "ext/bwtsw2_aux.c",
78
+ "ext/bwtsw2_chain.c",
79
+ "ext/bwtsw2_core.c",
80
+ "ext/bwtsw2_main.c",
81
+ "ext/cs2nt.c",
82
+ "ext/is.c",
83
+ "ext/khash.h",
84
+ "ext/kseq.h",
85
+ "ext/ksort.h",
86
+ "ext/kstring.c",
87
+ "ext/kstring.h",
88
+ "ext/kvec.h",
89
+ "ext/main.c",
90
+ "ext/main.h",
91
+ "ext/mkrf_conf.rb",
92
+ "ext/qualfa2fq.pl",
93
+ "ext/simple_dp.c",
94
+ "ext/simpletest.c",
95
+ "ext/solid2fastq.pl",
96
+ "ext/stdaln.c",
97
+ "ext/stdaln.h",
98
+ "ext/utils.c",
99
+ "ext/utils.h",
100
+ "lib/bio-bwa.rb",
101
+ "lib/bio/bwa.rb",
102
+ "lib/bio/bwa/library.rb",
103
+ "test/data/testdata.fa",
104
+ "test/data/testdata.long.fa",
105
+ "test/data/testdata.short.fa",
106
+ "test/helper.rb",
107
+ "test/test_bio-bwa_basic.rb",
108
+ "test/test_bio-bwa_make_index.rb",
109
+ "test/test_bio-bwa_run_aln.rb",
110
+ "test/test_bio-bwa_sam_conversion.rb"
111
+ ]
112
+ s.homepage = %q{http://github.com/fstrozzi/bioruby-bwa}
113
+ s.licenses = ["MIT/GPLv3"]
114
+ s.require_paths = ["lib"]
115
+ s.rubygems_version = %q{1.6.2}
116
+ s.summary = %q{Ruby binding for BWA mapping software}
117
+ s.test_files = [
118
+ "test/helper.rb",
119
+ "test/test_bio-bwa_basic.rb",
120
+ "test/test_bio-bwa_make_index.rb",
121
+ "test/test_bio-bwa_run_aln.rb",
122
+ "test/test_bio-bwa_sam_conversion.rb"
123
+ ]
124
+
125
+ if s.respond_to? :specification_version then
126
+ s.specification_version = 3
127
+
128
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
129
+ s.add_development_dependency(%q<shoulda>, [">= 0"])
130
+ s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
131
+ s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
132
+ s.add_development_dependency(%q<rcov>, [">= 0"])
133
+ s.add_development_dependency(%q<bio>, [">= 1.4.1"])
134
+ s.add_development_dependency(%q<ffi>, [">= 1.0.5"])
135
+ else
136
+ s.add_dependency(%q<shoulda>, [">= 0"])
137
+ s.add_dependency(%q<bundler>, ["~> 1.0.0"])
138
+ s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
139
+ s.add_dependency(%q<rcov>, [">= 0"])
140
+ s.add_dependency(%q<bio>, [">= 1.4.1"])
141
+ s.add_dependency(%q<ffi>, [">= 1.0.5"])
142
+ end
143
+ else
144
+ s.add_dependency(%q<shoulda>, [">= 0"])
145
+ s.add_dependency(%q<bundler>, ["~> 1.0.0"])
146
+ s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
147
+ s.add_dependency(%q<rcov>, [">= 0"])
148
+ s.add_dependency(%q<bio>, [">= 1.4.1"])
149
+ s.add_dependency(%q<ffi>, [">= 1.0.5"])
150
+ end
151
+ end
152
+
data/doc/Bio.html ADDED
@@ -0,0 +1,93 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta name="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>Module: Bio</title>
7
+ <link rel="stylesheet" href="css/style.css" type="text/css" media="screen" charset="utf-8" />
8
+ <link rel="stylesheet" href="css/common.css" type="text/css" media="screen" charset="utf-8" />
9
+
10
+ <script type="text/javascript" charset="utf-8">
11
+ relpath = '';
12
+ if (relpath != '') relpath += '/';
13
+ </script>
14
+ <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
15
+ <script type="text/javascript" charset="utf-8" src="js/app.js"></script>
16
+
17
+ </head>
18
+ <body>
19
+ <script type="text/javascript" charset="utf-8">
20
+ if (window.top.frames.main) document.body.className = 'frames';
21
+ </script>
22
+
23
+ <div id="header">
24
+ <div id="menu">
25
+
26
+ <a href="_index.html">Index (B)</a> &raquo;
27
+
28
+
29
+ <span class="title">Bio</span>
30
+
31
+
32
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
33
+ </div>
34
+
35
+ <div id="search">
36
+ <a id="class_list_link" href="#">Class List</a>
37
+ <a id="method_list_link" href="#">Method List</a>
38
+ <a id ="file_list_link" href="#">File List</a>
39
+ </div>
40
+
41
+ <div class="clear"></div>
42
+ </div>
43
+
44
+ <iframe id="search_frame"></iframe>
45
+
46
+ <div id="content"><h1>Module: Bio
47
+
48
+
49
+
50
+ </h1>
51
+
52
+ <dl class="box">
53
+
54
+
55
+
56
+
57
+
58
+
59
+
60
+
61
+ <dt class="r1 last">Defined in:</dt>
62
+ <dd class="r1 last">lib/bio/bwa.rb<span class="defines">,<br />
63
+ lib/bio/bwa/library.rb</span>
64
+ </dd>
65
+
66
+ </dl>
67
+ <div class="clear"></div>
68
+
69
+ <h2>Defined Under Namespace</h2>
70
+ <p class="children">
71
+
72
+
73
+
74
+
75
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="Bio/BWA.html" title="Bio::BWA (class)">BWA</a></span>
76
+
77
+
78
+ </p>
79
+
80
+
81
+
82
+
83
+
84
+ </div>
85
+
86
+ <div id="footer">
87
+ Generated on Thu Feb 10 16:31:17 2011 by
88
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
89
+ 0.6.4 (ruby-1.9.2).
90
+ </div>
91
+
92
+ </body>
93
+ </html>
data/doc/Bio/BWA.html ADDED
@@ -0,0 +1,2884 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta name="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>Class: Bio::BWA</title>
7
+ <link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
8
+ <link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" />
9
+
10
+ <script type="text/javascript" charset="utf-8">
11
+ relpath = '..';
12
+ if (relpath != '') relpath += '/';
13
+ </script>
14
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
15
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
16
+
17
+ </head>
18
+ <body>
19
+ <script type="text/javascript" charset="utf-8">
20
+ if (window.top.frames.main) document.body.className = 'frames';
21
+ </script>
22
+
23
+ <div id="header">
24
+ <div id="menu">
25
+
26
+ <a href="../_index.html">Index (B)</a> &raquo;
27
+ <span class='title'><span class='object_link'><a href="../Bio.html" title="Bio (module)">Bio</a></span></span>
28
+ &raquo;
29
+ <span class="title">BWA</span>
30
+
31
+
32
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
33
+ </div>
34
+
35
+ <div id="search">
36
+ <a id="class_list_link" href="#">Class List</a>
37
+ <a id="method_list_link" href="#">Method List</a>
38
+ <a id ="file_list_link" href="#">File List</a>
39
+ </div>
40
+
41
+ <div class="clear"></div>
42
+ </div>
43
+
44
+ <iframe id="search_frame"></iframe>
45
+
46
+ <div id="content"><h1>Class: Bio::BWA
47
+
48
+
49
+
50
+ </h1>
51
+
52
+ <dl class="box">
53
+
54
+ <dt class="r1">Inherits:</dt>
55
+ <dd class="r1">
56
+ <span class="inheritName">Object</span>
57
+
58
+ <ul class="fullTree">
59
+ <li>Object</li>
60
+
61
+ <li class="next">Bio::BWA</li>
62
+
63
+ </ul>
64
+ <a href="#" class="inheritanceTree">show all</a>
65
+
66
+ </dd>
67
+
68
+
69
+
70
+
71
+ <dt class="r2">Extended by:</dt>
72
+ <dd class="r2">FFI::Library</dd>
73
+
74
+
75
+
76
+
77
+
78
+
79
+
80
+ <dt class="r1 last">Defined in:</dt>
81
+ <dd class="r1 last">lib/bio/bwa.rb<span class="defines">,<br />
82
+ lib/bio/bwa/library.rb</span>
83
+ </dd>
84
+
85
+ </dl>
86
+ <div class="clear"></div>
87
+
88
+ <h2>Overview</h2><div class="docstring">
89
+ <div class="discussion">
90
+
91
+
92
+ </div>
93
+ </div>
94
+ <div class="tags">
95
+ <h3>Author:</h3>
96
+ <ul class="author">
97
+
98
+ <li>
99
+
100
+
101
+
102
+
103
+
104
+ <div class='inline'><p>
105
+ Francesco Strozzi <a
106
+ href="https://github.com/fstrozzi">github.com/fstrozzi</a>
107
+ </p>
108
+ </div>
109
+
110
+ </li>
111
+
112
+ </ul>
113
+
114
+ </div><h2>Defined Under Namespace</h2>
115
+ <p class="children">
116
+
117
+
118
+
119
+
120
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="BWA/Library.html" title="Bio::BWA::Library (class)">Library</a></span>
121
+
122
+
123
+ </p>
124
+
125
+
126
+
127
+
128
+
129
+ <h2>
130
+ Class Method Summary
131
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
132
+ </h2>
133
+
134
+ <ul class="summary">
135
+
136
+ <li class="public ">
137
+ <span class="summary_signature">
138
+
139
+ <a href="#build_args_for_BWA-class_method" title="build_args_for_BWA (class method)">+ (Object) <strong>build_args_for_BWA</strong>(args) </a>
140
+
141
+
142
+
143
+ </span>
144
+
145
+
146
+
147
+
148
+
149
+
150
+
151
+
152
+ <span class="summary_desc"><div class='inline'><p>
153
+ Internal method to build argument list for BWA C functions.
154
+ </p>
155
+ </div></span>
156
+
157
+ </li>
158
+
159
+
160
+ <li class="public ">
161
+ <span class="summary_signature">
162
+
163
+ <a href="#build_parameters-class_method" title="build_parameters (class method)">+ (Object) <strong>build_parameters</strong>(function_name, valid_params, params, last_params) </a>
164
+
165
+
166
+
167
+ </span>
168
+
169
+
170
+
171
+
172
+
173
+
174
+
175
+
176
+ <span class="summary_desc"><div class='inline'><p>
177
+ Internal method to produce a correct parameter list for BWA functions.
178
+ </p>
179
+ </div></span>
180
+
181
+ </li>
182
+
183
+
184
+ <li class="public ">
185
+ <span class="summary_signature">
186
+
187
+ <a href="#bwt2sa-class_method" title="bwt2sa (class method)">+ (Object) <strong>bwt2sa</strong>(params = {}) </a>
188
+
189
+
190
+
191
+ </span>
192
+
193
+
194
+
195
+
196
+
197
+
198
+
199
+
200
+ <span class="summary_desc"><div class='inline'><p>
201
+ Generate SA file from BWT and Occ files.
202
+ </p>
203
+ </div></span>
204
+
205
+ </li>
206
+
207
+
208
+ <li class="public ">
209
+ <span class="summary_signature">
210
+
211
+ <a href="#bwtupdate-class_method" title="bwtupdate (class method)">+ (Object) <strong>bwtupdate</strong>(params = {}) </a>
212
+
213
+
214
+
215
+ </span>
216
+
217
+
218
+
219
+
220
+
221
+
222
+
223
+
224
+ <span class="summary_desc"><div class='inline'><p>
225
+ Convert a BWT file to the new BWT format.
226
+ </p>
227
+ </div></span>
228
+
229
+ </li>
230
+
231
+
232
+ <li class="public ">
233
+ <span class="summary_signature">
234
+
235
+ <a href="#call_BWA_function-class_method" title="call_BWA_function (class method)">+ (Object) <strong>call_BWA_function</strong>(args) </a>
236
+
237
+
238
+
239
+ </span>
240
+
241
+
242
+
243
+
244
+
245
+
246
+
247
+
248
+ <span class="summary_desc"><div class='inline'><p>
249
+ Internal method to call the BWA C functions.
250
+ </p>
251
+ </div></span>
252
+
253
+ </li>
254
+
255
+
256
+ <li class="public ">
257
+ <span class="summary_signature">
258
+
259
+ <a href="#change_arg_name-class_method" title="change_arg_name (class method)">+ (Object) <strong>change_arg_name</strong>(hash, key, new_key) </a>
260
+
261
+
262
+
263
+ </span>
264
+
265
+
266
+
267
+
268
+
269
+
270
+
271
+
272
+ <span class="summary_desc"><div class='inline'><p>
273
+ Internal method used to change parameters name from Ruby to BWA functions.
274
+ </p>
275
+ </div></span>
276
+
277
+ </li>
278
+
279
+
280
+ <li class="public ">
281
+ <span class="summary_signature">
282
+
283
+ <a href="#check_mandatory-class_method" title="check_mandatory (class method)">+ (Object) <strong>check_mandatory</strong>(mandatory_params, params) </a>
284
+
285
+
286
+
287
+ </span>
288
+
289
+
290
+
291
+
292
+
293
+
294
+
295
+
296
+ <span class="summary_desc"><div class='inline'><p>
297
+ Internal method to check if mandatory params have been set.
298
+ </p>
299
+ </div></span>
300
+
301
+ </li>
302
+
303
+
304
+ <li class="public ">
305
+ <span class="summary_signature">
306
+
307
+ <a href="#fa2pac-class_method" title="fa2pac (class method)">+ (Object) <strong>fa2pac</strong>(params = {}) </a>
308
+
309
+
310
+
311
+ </span>
312
+
313
+
314
+
315
+
316
+
317
+
318
+
319
+
320
+ <span class="summary_desc"><div class='inline'><p>
321
+ Convert a Fasta to Packed format.
322
+ </p>
323
+ </div></span>
324
+
325
+ </li>
326
+
327
+
328
+ <li class="public ">
329
+ <span class="summary_signature">
330
+
331
+ <a href="#long_read_alignment-class_method" title="long_read_alignment (class method)">+ (Object) <strong>long_read_alignment</strong>(params = {}) </a>
332
+
333
+
334
+
335
+ </span>
336
+
337
+
338
+
339
+
340
+
341
+
342
+
343
+
344
+ <span class="summary_desc"><div class='inline'><p>
345
+ Run the alignment for long query sequences.
346
+ </p>
347
+ </div></span>
348
+
349
+ </li>
350
+
351
+
352
+ <li class="public ">
353
+ <span class="summary_signature">
354
+
355
+ <a href="#make_index-class_method" title="make_index (class method)">+ (Object) <strong>make_index</strong>(params = {}) </a>
356
+
357
+
358
+
359
+ </span>
360
+
361
+
362
+
363
+
364
+
365
+
366
+
367
+
368
+ <span class="summary_desc"><div class='inline'><p>
369
+ Generate the BWT index for a Fasta database.
370
+ </p>
371
+ </div></span>
372
+
373
+ </li>
374
+
375
+
376
+ <li class="public ">
377
+ <span class="summary_signature">
378
+
379
+ <a href="#pac2bwt-class_method" title="pac2bwt (class method)">+ (Object) <strong>pac2bwt</strong>(params = {}) </a>
380
+
381
+
382
+
383
+ </span>
384
+
385
+
386
+
387
+
388
+
389
+
390
+
391
+
392
+ <span class="summary_desc"><div class='inline'><p>
393
+ Convert a Packed file format to Burrows-Wheeler Transform format.
394
+ </p>
395
+ </div></span>
396
+
397
+ </li>
398
+
399
+
400
+ <li class="public ">
401
+ <span class="summary_signature">
402
+
403
+ <a href="#pac_rev-class_method" title="pac_rev (class method)">+ (Object) <strong>pac_rev</strong>(params = {}) </a>
404
+
405
+
406
+
407
+ </span>
408
+
409
+
410
+
411
+
412
+
413
+
414
+
415
+
416
+ <span class="summary_desc"><div class='inline'><p>
417
+ Generate reverse Packed format.
418
+ </p>
419
+ </div></span>
420
+
421
+ </li>
422
+
423
+
424
+ <li class="public ">
425
+ <span class="summary_signature">
426
+
427
+ <a href="#sai_to_sam_paired-class_method" title="sai_to_sam_paired (class method)">+ (Object) <strong>sai_to_sam_paired</strong>(params = {}) </a>
428
+
429
+
430
+
431
+ </span>
432
+
433
+
434
+
435
+
436
+
437
+
438
+
439
+
440
+ <span class="summary_desc"><div class='inline'><p>
441
+ Convert the SAI alignment output into SAM format (paired ends).
442
+ </p>
443
+ </div></span>
444
+
445
+ </li>
446
+
447
+
448
+ <li class="public ">
449
+ <span class="summary_signature">
450
+
451
+ <a href="#sai_to_sam_single-class_method" title="sai_to_sam_single (class method)">+ (Object) <strong>sai_to_sam_single</strong>(params = {}) </a>
452
+
453
+
454
+
455
+ </span>
456
+
457
+
458
+
459
+
460
+
461
+
462
+
463
+
464
+ <span class="summary_desc"><div class='inline'><p>
465
+ Convert the SAI alignment output into SAM format (single end).
466
+ </p>
467
+ </div></span>
468
+
469
+ </li>
470
+
471
+
472
+ <li class="public ">
473
+ <span class="summary_signature">
474
+
475
+ <a href="#short_read_alignment-class_method" title="short_read_alignment (class method)">+ (Object) <strong>short_read_alignment</strong>(params = {}) </a>
476
+
477
+
478
+
479
+ </span>
480
+
481
+
482
+
483
+
484
+
485
+
486
+
487
+
488
+ <span class="summary_desc"><div class='inline'><p>
489
+ Run the alignment for short query sequences.
490
+ </p>
491
+ </div></span>
492
+
493
+ </li>
494
+
495
+
496
+ <li class="public ">
497
+ <span class="summary_signature">
498
+
499
+ <a href="#simple_SW-class_method" title="simple_SW (class method)">+ (Object) <strong>simple_SW</strong>(params = {}) </a>
500
+
501
+
502
+
503
+ </span>
504
+
505
+
506
+
507
+
508
+
509
+
510
+
511
+
512
+ <span class="summary_desc"><div class='inline'><p>
513
+ Run the alignment between multiple short sequences and ONE long sequence.
514
+ </p>
515
+ </div></span>
516
+
517
+ </li>
518
+
519
+
520
+ </ul>
521
+
522
+
523
+
524
+
525
+
526
+ <div id="class_method_details" class="method_details_list">
527
+ <h2>Class Method Details</h2>
528
+
529
+
530
+ <div class="method_details first">
531
+ <p class="signature first" id="build_args_for_BWA-class_method">
532
+
533
+ + (<tt>Object</tt>) <strong>build_args_for_BWA</strong>(args)
534
+
535
+
536
+
537
+ </p><div class="docstring">
538
+ <div class="discussion">
539
+
540
+ <div class="note notetag">
541
+ <strong>Note:</strong>
542
+ <div class='inline'><p>
543
+ this method should not be called directly
544
+ </p>
545
+ </div>
546
+ </div>
547
+
548
+ <p>
549
+ Internal method to build argument list for BWA C functions
550
+ </p>
551
+
552
+
553
+ </div>
554
+ </div>
555
+ <div class="tags">
556
+
557
+ </div><table class="source_code">
558
+ <tr>
559
+ <td>
560
+ <pre class="lines">
561
+
562
+
563
+ 263
564
+ 264
565
+ 265
566
+ 266
567
+ 267
568
+ 268
569
+ 269
570
+ 270
571
+ 271
572
+ 272</pre>
573
+ </td>
574
+ <td>
575
+ <pre class="code"><span class="info file"># File 'lib/bio/bwa.rb', line 263</span>
576
+
577
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id build_args_for_BWA'>build_args_for_BWA</span><span class='lparen'>(</span><span class='id args'>args</span><span class='rparen'>)</span>
578
+ <span class='id cmd_args'>cmd_args</span> <span class='op'>=</span> <span class='id args'>args</span><span class='period'>.</span><span class='id map'>map</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id arg'>arg</span><span class='op'>|</span>
579
+ <span class='const'>FFI</span><span class='op'>::</span><span class='const'>MemoryPointer</span><span class='period'>.</span><span class='id from_string'>from_string</span><span class='lparen'>(</span><span class='id arg'>arg</span><span class='period'>.</span><span class='id to_s'>to_s</span><span class='rparen'>)</span> <span class='comment'># convert every parameters into a string and then into a memory pointer
580
+ </span> <span class='kw'>end</span>
581
+ <span class='id exec_args'>exec_args</span> <span class='op'>=</span> <span class='const'>FFI</span><span class='op'>::</span><span class='const'>MemoryPointer</span><span class='period'>.</span><span class='id new'>new</span><span class='lparen'>(</span><span class='symbol'>:pointer</span><span class='comma'>,</span> <span class='id cmd_args'>cmd_args</span><span class='period'>.</span><span class='id length'>length</span><span class='rparen'>)</span> <span class='comment'># creating a pointer to an array of pointers
582
+ </span> <span class='id cmd_args'>cmd_args</span><span class='period'>.</span><span class='id each_with_index'>each_with_index</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id arg'>arg</span><span class='comma'>,</span> <span class='id i'>i</span><span class='op'>|</span>
583
+ <span class='id exec_args'>exec_args</span><span class='lbracket'>[</span><span class='id i'>i</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id put_pointer'>put_pointer</span><span class='lparen'>(</span><span class='int'>0</span><span class='comma'>,</span> <span class='id arg'>arg</span><span class='rparen'>)</span> <span class='comment'># filling in the array of pointers
584
+ </span> <span class='kw'>end</span>
585
+ <span class='kw'>return</span> <span class='id exec_args'>exec_args</span>
586
+ <span class='kw'>end</span></pre>
587
+ </td>
588
+ </tr>
589
+ </table>
590
+ </div>
591
+
592
+ <div class="method_details ">
593
+ <p class="signature " id="build_parameters-class_method">
594
+
595
+ + (<tt>Object</tt>) <strong>build_parameters</strong>(function_name, valid_params, params, last_params)
596
+
597
+
598
+
599
+ </p><div class="docstring">
600
+ <div class="discussion">
601
+
602
+ <div class="note notetag">
603
+ <strong>Note:</strong>
604
+ <div class='inline'><p>
605
+ this method should not be called directly
606
+ </p>
607
+ </div>
608
+ </div>
609
+
610
+ <p>
611
+ Internal method to produce a correct parameter list for BWA functions
612
+ </p>
613
+
614
+
615
+ </div>
616
+ </div>
617
+ <div class="tags">
618
+
619
+ </div><table class="source_code">
620
+ <tr>
621
+ <td>
622
+ <pre class="lines">
623
+
624
+
625
+ 276
626
+ 277
627
+ 278
628
+ 279
629
+ 280
630
+ 281
631
+ 282
632
+ 283
633
+ 284
634
+ 285
635
+ 286
636
+ 287</pre>
637
+ </td>
638
+ <td>
639
+ <pre class="code"><span class="info file"># File 'lib/bio/bwa.rb', line 276</span>
640
+
641
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id build_parameters'>build_parameters</span><span class='lparen'>(</span><span class='id function_name'>function_name</span><span class='comma'>,</span><span class='id valid_params'>valid_params</span><span class='comma'>,</span><span class='id params'>params</span><span class='comma'>,</span><span class='id last_params'>last_params</span><span class='rparen'>)</span>
642
+ <span class='id args'>args</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='id function_name'>function_name</span><span class='rbracket'>]</span>
643
+ <span class='id params'>params</span><span class='period'>.</span><span class='id each_key'>each_key</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id k'>k</span><span class='op'>|</span>
644
+ <span class='id raise'>raise</span> <span class='const'>ArgumentError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Unknown parameter '</span><span class='embexpr_beg'>#{</span><span class='id k'>k</span><span class='rbrace'>}</span><span class='tstring_content'>'</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>unless</span> <span class='id valid_params'>valid_params</span><span class='period'>.</span><span class='id include?'>include?</span><span class='lparen'>(</span><span class='id k'>k</span><span class='period'>.</span><span class='id to_s'>to_s</span><span class='rparen'>)</span>
645
+ <span class='kw'>unless</span> <span class='id last_params'>last_params</span><span class='period'>.</span><span class='id include?'>include?</span><span class='lparen'>(</span><span class='id k'>k</span><span class='rparen'>)</span> <span class='kw'>then</span> <span class='comment'># the last_params are required after the options for BWA functions
646
+ </span> <span class='id args'>args</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>-</span><span class='embexpr_beg'>#{</span><span class='id k'>k</span><span class='rbrace'>}</span><span class='tstring_end'>&quot;</span></span>
647
+ <span class='id args'>args</span> <span class='op'>&lt;&lt;</span> <span class='id params'>params</span><span class='lbracket'>[</span><span class='id k'>k</span><span class='rbracket'>]</span> <span class='kw'>unless</span> <span class='id params'>params</span><span class='lbracket'>[</span><span class='id k'>k</span><span class='rbracket'>]</span> <span class='op'>==</span> <span class='kw'>true</span> <span class='comment'># skipping boolean values. just include the param name
648
+ </span> <span class='kw'>end</span>
649
+ <span class='kw'>end</span>
650
+ <span class='id last_params'>last_params</span><span class='period'>.</span><span class='id each'>each</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id p'>p</span><span class='op'>|</span> <span class='id args'>args</span> <span class='op'>&lt;&lt;</span> <span class='id params'>params</span><span class='lbracket'>[</span><span class='id p'>p</span><span class='rbracket'>]</span><span class='rbrace'>}</span> <span class='comment'># now adding the last_params so the parameter list is in the correct order
651
+ </span> <span class='kw'>return</span> <span class='id args'>args</span>
652
+ <span class='kw'>end</span></pre>
653
+ </td>
654
+ </tr>
655
+ </table>
656
+ </div>
657
+
658
+ <div class="method_details ">
659
+ <p class="signature " id="bwt2sa-class_method">
660
+
661
+ + (<tt>Object</tt>) <strong>bwt2sa</strong>(params = {})
662
+
663
+
664
+
665
+ </p><div class="docstring">
666
+ <div class="discussion">
667
+ <p>
668
+ Generate SA file from BWT and Occ files
669
+ </p>
670
+
671
+
672
+ </div>
673
+ </div>
674
+ <div class="tags">
675
+ <h3>Parameters:</h3>
676
+ <ul class="param">
677
+
678
+ <li>
679
+
680
+ <span class='type'>(<tt>Hash</tt>)</span>
681
+
682
+
683
+ <span class='name'>.</span>
684
+
685
+
686
+
687
+ &mdash;
688
+ <div class='inline'><p>
689
+ params Options.
690
+ </p>
691
+ </div>
692
+
693
+ </li>
694
+
695
+ <li>
696
+
697
+ <span class='type'>(<tt>Hash</tt>)</span>
698
+
699
+
700
+ <span class='name'>params</span>
701
+
702
+
703
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
704
+
705
+
706
+ &mdash;
707
+ <div class='inline'><p>
708
+ a customizable set of options
709
+ </p>
710
+ </div>
711
+
712
+ </li>
713
+
714
+ </ul>
715
+
716
+
717
+
718
+
719
+ <h3>Options Hash (<tt>params</tt>):</h3>
720
+ <ul class="option">
721
+
722
+ <li>
723
+ <span class="type">(<tt>String</tt>)</span>
724
+ <span class="name">:file_in</span>
725
+ <span class="default">
726
+
727
+ </span>
728
+ &mdash; <div class='inline'><p>
729
+ the PAC file (REQUIRED)
730
+ </p>
731
+ </div>
732
+ </tr>
733
+
734
+ <li>
735
+ <span class="type">(<tt>String</tt>)</span>
736
+ <span class="name">:file_out</span>
737
+ <span class="default">
738
+
739
+ </span>
740
+ &mdash; <div class='inline'><p>
741
+ the name of the REV PAC (REQUIRED)
742
+ </p>
743
+ </div>
744
+ </tr>
745
+
746
+ </ul>
747
+
748
+
749
+ </div><table class="source_code">
750
+ <tr>
751
+ <td>
752
+ <pre class="lines">
753
+
754
+
755
+ 60
756
+ 61
757
+ 62
758
+ 63
759
+ 64
760
+ 65
761
+ 66</pre>
762
+ </td>
763
+ <td>
764
+ <pre class="code"><span class="info file"># File 'lib/bio/bwa.rb', line 60</span>
765
+
766
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id bwt2sa'>bwt2sa</span><span class='lparen'>(</span><span class='id params'>params</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
767
+ <span class='id valid_params'>valid_params</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>%q(</span><span class='tstring_content'>file_in file_out i</span><span class='tstring_end'>)</span></span>
768
+ <span class='id last_params'>last_params</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='symbol'>:file_in</span><span class='comma'>,</span><span class='symbol'>:file_out</span><span class='rbracket'>]</span>
769
+ <span class='id check_mandatory'>check_mandatory</span><span class='lparen'>(</span><span class='id last_params'>last_params</span><span class='comma'>,</span> <span class='id params'>params</span><span class='rparen'>)</span>
770
+ <span class='id args'>args</span> <span class='op'>=</span> <span class='id build_parameters'>build_parameters</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>bwt2sa</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span><span class='id valid_params'>valid_params</span><span class='comma'>,</span><span class='id params'>params</span><span class='comma'>,</span><span class='id last_params'>last_params</span><span class='rparen'>)</span>
771
+ <span class='id call_BWA_function'>call_BWA_function</span><span class='lparen'>(</span><span class='id args'>args</span><span class='rparen'>)</span>
772
+ <span class='kw'>end</span></pre>
773
+ </td>
774
+ </tr>
775
+ </table>
776
+ </div>
777
+
778
+ <div class="method_details ">
779
+ <p class="signature " id="bwtupdate-class_method">
780
+
781
+ + (<tt>Object</tt>) <strong>bwtupdate</strong>(params = {})
782
+
783
+
784
+
785
+ </p><div class="docstring">
786
+ <div class="discussion">
787
+
788
+ <div class="note notetag">
789
+ <strong>Note:</strong>
790
+ <div class='inline'><p>
791
+ this method overwrite existing BWT file
792
+ </p>
793
+ </div>
794
+ </div>
795
+
796
+ <p>
797
+ Convert a BWT file to the new BWT format
798
+ </p>
799
+
800
+
801
+ </div>
802
+ </div>
803
+ <div class="tags">
804
+ <h3>Parameters:</h3>
805
+ <ul class="param">
806
+
807
+ <li>
808
+
809
+ <span class='type'>(<tt>Hash</tt>)</span>
810
+
811
+
812
+ <span class='name'>.</span>
813
+
814
+
815
+
816
+ &mdash;
817
+ <div class='inline'><p>
818
+ params Options.
819
+ </p>
820
+ </div>
821
+
822
+ </li>
823
+
824
+ <li>
825
+
826
+ <span class='type'>(<tt>Hash</tt>)</span>
827
+
828
+
829
+ <span class='name'>params</span>
830
+
831
+
832
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
833
+
834
+
835
+ &mdash;
836
+ <div class='inline'><p>
837
+ a customizable set of options
838
+ </p>
839
+ </div>
840
+
841
+ </li>
842
+
843
+ </ul>
844
+
845
+
846
+
847
+
848
+ <h3>Options Hash (<tt>params</tt>):</h3>
849
+ <ul class="option">
850
+
851
+ <li>
852
+ <span class="type">(<tt>String</tt>)</span>
853
+ <span class="name">:file_in</span>
854
+ <span class="default">
855
+
856
+ </span>
857
+ &mdash; <div class='inline'><p>
858
+ the BWT file (REQUIRED)
859
+ </p>
860
+ </div>
861
+ </tr>
862
+
863
+ </ul>
864
+
865
+
866
+ </div><table class="source_code">
867
+ <tr>
868
+ <td>
869
+ <pre class="lines">
870
+
871
+
872
+ 36
873
+ 37
874
+ 38
875
+ 39
876
+ 40
877
+ 41
878
+ 42</pre>
879
+ </td>
880
+ <td>
881
+ <pre class="code"><span class="info file"># File 'lib/bio/bwa.rb', line 36</span>
882
+
883
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id bwtupdate'>bwtupdate</span><span class='lparen'>(</span><span class='id params'>params</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
884
+ <span class='id valid_params'>valid_params</span> <span class='op'>=</span> <span class='qwords_beg'>%w(</span><span class='tstring_content'>file_in</span><span class='words_sep'>)</span>
885
+ <span class='id last_params'>last_params</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='symbol'>:file_in</span><span class='rbracket'>]</span>
886
+ <span class='id check_mandatory'>check_mandatory</span><span class='lparen'>(</span><span class='id last_params'>last_params</span><span class='comma'>,</span> <span class='id params'>params</span><span class='rparen'>)</span>
887
+ <span class='id args'>args</span> <span class='op'>=</span> <span class='id build_parameters'>build_parameters</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>bwtupdate</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span><span class='id valid_params'>valid_params</span><span class='comma'>,</span><span class='id params'>params</span><span class='comma'>,</span><span class='id last_params'>last_params</span><span class='rparen'>)</span>
888
+ <span class='id call_BWA_function'>call_BWA_function</span><span class='lparen'>(</span><span class='id args'>args</span><span class='rparen'>)</span>
889
+ <span class='kw'>end</span></pre>
890
+ </td>
891
+ </tr>
892
+ </table>
893
+ </div>
894
+
895
+ <div class="method_details ">
896
+ <p class="signature " id="call_BWA_function-class_method">
897
+
898
+ + (<tt>Object</tt>) <strong>call_BWA_function</strong>(args)
899
+
900
+
901
+
902
+ </p><div class="docstring">
903
+ <div class="discussion">
904
+
905
+ <div class="note notetag">
906
+ <strong>Note:</strong>
907
+ <div class='inline'><p>
908
+ this method should not be called directly
909
+ </p>
910
+ </div>
911
+ </div>
912
+
913
+ <p>
914
+ Internal method to call the BWA C functions
915
+ </p>
916
+
917
+
918
+ </div>
919
+ </div>
920
+ <div class="tags">
921
+
922
+ </div><table class="source_code">
923
+ <tr>
924
+ <td>
925
+ <pre class="lines">
926
+
927
+
928
+ 256
929
+ 257
930
+ 258
931
+ 259</pre>
932
+ </td>
933
+ <td>
934
+ <pre class="code"><span class="info file"># File 'lib/bio/bwa.rb', line 256</span>
935
+
936
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id call_BWA_function'>call_BWA_function</span><span class='lparen'>(</span><span class='id args'>args</span><span class='rparen'>)</span>
937
+ <span class='id c_args'>c_args</span> <span class='op'>=</span> <span class='id build_args_for_BWA'>build_args_for_BWA</span><span class='lparen'>(</span><span class='id args'>args</span><span class='rparen'>)</span>
938
+ <span class='kw'>self</span><span class='period'>.</span><span class='id send'>send</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>bwa_</span><span class='embexpr_beg'>#{</span><span class='id args'>args</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='rbrace'>}</span><span class='tstring_end'>&quot;</span></span><span class='period'>.</span><span class='id to_sym'>to_sym</span><span class='comma'>,</span><span class='id args'>args</span><span class='period'>.</span><span class='id size'>size</span><span class='comma'>,</span><span class='id c_args'>c_args</span><span class='rparen'>)</span> <span class='comment'># call the C function and pass the arguments size and parameters list (same as int argc, char *argv[])
939
+ </span><span class='kw'>end</span></pre>
940
+ </td>
941
+ </tr>
942
+ </table>
943
+ </div>
944
+
945
+ <div class="method_details ">
946
+ <p class="signature " id="change_arg_name-class_method">
947
+
948
+ + (<tt>Object</tt>) <strong>change_arg_name</strong>(hash, key, new_key)
949
+
950
+
951
+
952
+ </p><div class="docstring">
953
+ <div class="discussion">
954
+
955
+ <div class="note notetag">
956
+ <strong>Note:</strong>
957
+ <div class='inline'><p>
958
+ this method should not be called directly
959
+ </p>
960
+ </div>
961
+ </div>
962
+
963
+ <p>
964
+ Internal method used to change parameters name from Ruby to BWA functions
965
+ </p>
966
+
967
+
968
+ </div>
969
+ </div>
970
+ <div class="tags">
971
+
972
+ </div><table class="source_code">
973
+ <tr>
974
+ <td>
975
+ <pre class="lines">
976
+
977
+
978
+ 297
979
+ 298
980
+ 299
981
+ 300
982
+ 301</pre>
983
+ </td>
984
+ <td>
985
+ <pre class="code"><span class="info file"># File 'lib/bio/bwa.rb', line 297</span>
986
+
987
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id change_arg_name'>change_arg_name</span><span class='lparen'>(</span><span class='id hash'>hash</span><span class='comma'>,</span><span class='id key'>key</span><span class='comma'>,</span><span class='id new_key'>new_key</span><span class='rparen'>)</span>
988
+ <span class='id hash'>hash</span><span class='lbracket'>[</span><span class='id new_key'>new_key</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id hash'>hash</span><span class='lbracket'>[</span><span class='id key'>key</span><span class='rbracket'>]</span>
989
+ <span class='id hash'>hash</span><span class='period'>.</span><span class='id delete'>delete</span><span class='lparen'>(</span><span class='id key'>key</span><span class='rparen'>)</span>
990
+ <span class='kw'>return</span> <span class='id hash'>hash</span>
991
+ <span class='kw'>end</span></pre>
992
+ </td>
993
+ </tr>
994
+ </table>
995
+ </div>
996
+
997
+ <div class="method_details ">
998
+ <p class="signature " id="check_mandatory-class_method">
999
+
1000
+ + (<tt>Object</tt>) <strong>check_mandatory</strong>(mandatory_params, params)
1001
+
1002
+
1003
+
1004
+ </p><div class="docstring">
1005
+ <div class="discussion">
1006
+
1007
+ <div class="note notetag">
1008
+ <strong>Note:</strong>
1009
+ <div class='inline'><p>
1010
+ this method should not be called directly
1011
+ </p>
1012
+ </div>
1013
+ </div>
1014
+
1015
+ <p>
1016
+ Internal method to check if mandatory params have been set
1017
+ </p>
1018
+
1019
+
1020
+ </div>
1021
+ </div>
1022
+ <div class="tags">
1023
+
1024
+ </div><table class="source_code">
1025
+ <tr>
1026
+ <td>
1027
+ <pre class="lines">
1028
+
1029
+
1030
+ 291
1031
+ 292
1032
+ 293</pre>
1033
+ </td>
1034
+ <td>
1035
+ <pre class="code"><span class="info file"># File 'lib/bio/bwa.rb', line 291</span>
1036
+
1037
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id check_mandatory'>check_mandatory</span><span class='lparen'>(</span><span class='id mandatory_params'>mandatory_params</span><span class='comma'>,</span> <span class='id params'>params</span><span class='rparen'>)</span>
1038
+ <span class='id mandatory_params'>mandatory_params</span><span class='period'>.</span><span class='id each'>each</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id mp'>mp</span><span class='op'>|</span> <span class='id raise'>raise</span> <span class='const'>ArgumentError</span><span class='comma'>,</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>You must provide parameter '</span><span class='embexpr_beg'>#{</span><span class='id mp'>mp</span><span class='rbrace'>}</span><span class='tstring_content'>'</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>unless</span> <span class='id params'>params</span><span class='period'>.</span><span class='id include?'>include?</span><span class='lparen'>(</span><span class='id mp'>mp</span><span class='rparen'>)</span><span class='rbrace'>}</span>
1039
+ <span class='kw'>end</span></pre>
1040
+ </td>
1041
+ </tr>
1042
+ </table>
1043
+ </div>
1044
+
1045
+ <div class="method_details ">
1046
+ <p class="signature " id="fa2pac-class_method">
1047
+
1048
+ + (<tt>Object</tt>) <strong>fa2pac</strong>(params = {})
1049
+
1050
+
1051
+
1052
+ </p><div class="docstring">
1053
+ <div class="discussion">
1054
+ <p>
1055
+ Convert a Fasta to Packed format
1056
+ </p>
1057
+
1058
+
1059
+ </div>
1060
+ </div>
1061
+ <div class="tags">
1062
+ <h3>Parameters:</h3>
1063
+ <ul class="param">
1064
+
1065
+ <li>
1066
+
1067
+ <span class='type'>(<tt>Hash</tt>)</span>
1068
+
1069
+
1070
+ <span class='name'>.</span>
1071
+
1072
+
1073
+
1074
+ &mdash;
1075
+ <div class='inline'><p>
1076
+ params Options.
1077
+ </p>
1078
+ </div>
1079
+
1080
+ </li>
1081
+
1082
+ <li>
1083
+
1084
+ <span class='type'>(<tt>Hash</tt>)</span>
1085
+
1086
+
1087
+ <span class='name'>params</span>
1088
+
1089
+
1090
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
1091
+
1092
+
1093
+ &mdash;
1094
+ <div class='inline'><p>
1095
+ a customizable set of options
1096
+ </p>
1097
+ </div>
1098
+
1099
+ </li>
1100
+
1101
+ </ul>
1102
+
1103
+
1104
+
1105
+
1106
+ <h3>Options Hash (<tt>params</tt>):</h3>
1107
+ <ul class="option">
1108
+
1109
+ <li>
1110
+ <span class="type">(<tt>String</tt>)</span>
1111
+ <span class="name">:file_in</span>
1112
+ <span class="default">
1113
+
1114
+ </span>
1115
+ &mdash; <div class='inline'><p>
1116
+ the Fasta or FastQ file (REQUIRED)
1117
+ </p>
1118
+ </div>
1119
+ </tr>
1120
+
1121
+ <li>
1122
+ <span class="type">(<tt>String</tt>)</span>
1123
+ <span class="name">:prefix</span>
1124
+ <span class="default">
1125
+
1126
+ </span>
1127
+ &mdash; <div class='inline'><p>
1128
+ the prefix name for the PAC file
1129
+ </p>
1130
+ </div>
1131
+ </tr>
1132
+
1133
+ </ul>
1134
+
1135
+
1136
+ </div><table class="source_code">
1137
+ <tr>
1138
+ <td>
1139
+ <pre class="lines">
1140
+
1141
+
1142
+ 11
1143
+ 12
1144
+ 13
1145
+ 14
1146
+ 15
1147
+ 16
1148
+ 17
1149
+ 18</pre>
1150
+ </td>
1151
+ <td>
1152
+ <pre class="code"><span class="info file"># File 'lib/bio/bwa.rb', line 11</span>
1153
+
1154
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id fa2pac'>fa2pac</span><span class='lparen'>(</span><span class='id params'>params</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
1155
+ <span class='id valid_params'>valid_params</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>%q(</span><span class='tstring_content'>file_in prefix</span><span class='tstring_end'>)</span></span>
1156
+ <span class='id last_params'>last_params</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='symbol'>:file_in</span><span class='comma'>,</span> <span class='symbol'>:prefix</span><span class='rbracket'>]</span>
1157
+ <span class='id mandatory_params'>mandatory_params</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='symbol'>:file_in</span><span class='rbracket'>]</span>
1158
+ <span class='id check_mandatory'>check_mandatory</span><span class='lparen'>(</span><span class='id mandatory_params'>mandatory_params</span><span class='comma'>,</span> <span class='id params'>params</span><span class='rparen'>)</span>
1159
+ <span class='id args'>args</span> <span class='op'>=</span> <span class='id build_parameters'>build_parameters</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>fa2pac</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span><span class='id valid_params'>valid_params</span><span class='comma'>,</span><span class='id params'>params</span><span class='comma'>,</span><span class='id last_params'>last_params</span><span class='rparen'>)</span>
1160
+ <span class='id call_BWA_function'>call_BWA_function</span><span class='lparen'>(</span><span class='id args'>args</span><span class='rparen'>)</span>
1161
+ <span class='kw'>end</span></pre>
1162
+ </td>
1163
+ </tr>
1164
+ </table>
1165
+ </div>
1166
+
1167
+ <div class="method_details ">
1168
+ <p class="signature " id="long_read_alignment-class_method">
1169
+
1170
+ + (<tt>Object</tt>) <strong>long_read_alignment</strong>(params = {})
1171
+
1172
+
1173
+
1174
+ </p><div class="docstring">
1175
+ <div class="discussion">
1176
+
1177
+ <div class="note notetag">
1178
+ <strong>Note:</strong>
1179
+ <div class='inline'><p>
1180
+ Boolean arguments must be set to &#8216;true&#8217;
1181
+ </p>
1182
+ </div>
1183
+ </div>
1184
+
1185
+ <p>
1186
+ Run the alignment for long query sequences
1187
+ </p>
1188
+
1189
+
1190
+ </div>
1191
+ </div>
1192
+ <div class="tags">
1193
+ <h3>Parameters:</h3>
1194
+ <ul class="param">
1195
+
1196
+ <li>
1197
+
1198
+ <span class='type'>(<tt>Hash</tt>)</span>
1199
+
1200
+
1201
+ <span class='name'>params</span>
1202
+
1203
+
1204
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
1205
+
1206
+
1207
+ &mdash;
1208
+ <div class='inline'><p>
1209
+ Options
1210
+ </p>
1211
+ </div>
1212
+
1213
+ </li>
1214
+
1215
+ </ul>
1216
+
1217
+
1218
+
1219
+
1220
+ <h3>Options Hash (<tt>params</tt>):</h3>
1221
+ <ul class="option">
1222
+
1223
+ <li>
1224
+ <span class="type">(<tt>String</tt>)</span>
1225
+ <span class="name">:file_in</span>
1226
+ <span class="default">
1227
+
1228
+ </span>
1229
+ &mdash; <div class='inline'><p>
1230
+ the FastQ file (REQUIRED)
1231
+ </p>
1232
+ </div>
1233
+ </tr>
1234
+
1235
+ <li>
1236
+ <span class="type">(<tt>String</tt>)</span>
1237
+ <span class="name">:prefix</span>
1238
+ <span class="default">
1239
+
1240
+ </span>
1241
+ &mdash; <div class='inline'><p>
1242
+ the prefix of the database index files (REQUIRED)
1243
+ </p>
1244
+ </div>
1245
+ </tr>
1246
+
1247
+ <li>
1248
+ <span class="type">(<tt>String</tt>)</span>
1249
+ <span class="name">:file_out</span>
1250
+ <span class="default">
1251
+
1252
+ </span>
1253
+ &mdash; <div class='inline'><p>
1254
+ the output of the alignment in SAM format (REQUIRED)
1255
+ </p>
1256
+ </div>
1257
+ </tr>
1258
+
1259
+ <li>
1260
+ <span class="type">(<tt>Integer</tt>)</span>
1261
+ <span class="name">:a</span>
1262
+ <span class="default">
1263
+
1264
+ </span>
1265
+ &mdash; <div class='inline'><p>
1266
+ score for a match [1]
1267
+ </p>
1268
+ </div>
1269
+ </tr>
1270
+
1271
+ <li>
1272
+ <span class="type">(<tt>Integer</tt>)</span>
1273
+ <span class="name">:b</span>
1274
+ <span class="default">
1275
+
1276
+ </span>
1277
+ &mdash; <div class='inline'><p>
1278
+ mismatch penalty [3]
1279
+ </p>
1280
+ </div>
1281
+ </tr>
1282
+
1283
+ <li>
1284
+ <span class="type">(<tt>Integer</tt>)</span>
1285
+ <span class="name">:q</span>
1286
+ <span class="default">
1287
+
1288
+ </span>
1289
+ &mdash; <div class='inline'><p>
1290
+ gap open penalty [5]
1291
+ </p>
1292
+ </div>
1293
+ </tr>
1294
+
1295
+ <li>
1296
+ <span class="type">(<tt>Integer</tt>)</span>
1297
+ <span class="name">:r</span>
1298
+ <span class="default">
1299
+
1300
+ </span>
1301
+ &mdash; <div class='inline'><p>
1302
+ gap extension penalty [2]
1303
+ </p>
1304
+ </div>
1305
+ </tr>
1306
+
1307
+ <li>
1308
+ <span class="type">(<tt>Integer</tt>)</span>
1309
+ <span class="name">:t</span>
1310
+ <span class="default">
1311
+
1312
+ </span>
1313
+ &mdash; <div class='inline'><p>
1314
+ number of threads [1]
1315
+ </p>
1316
+ </div>
1317
+ </tr>
1318
+
1319
+ <li>
1320
+ <span class="type">(<tt>Integer</tt>)</span>
1321
+ <span class="name">:w</span>
1322
+ <span class="default">
1323
+
1324
+ </span>
1325
+ &mdash; <div class='inline'><p>
1326
+ band width [50]
1327
+ </p>
1328
+ </div>
1329
+ </tr>
1330
+
1331
+ <li>
1332
+ <span class="type">(<tt>Float</tt>)</span>
1333
+ <span class="name">:m</span>
1334
+ <span class="default">
1335
+
1336
+ </span>
1337
+ &mdash; <div class='inline'><p>
1338
+ mask level [0.50]
1339
+ </p>
1340
+ </div>
1341
+ </tr>
1342
+
1343
+ <li>
1344
+ <span class="type">(<tt>Integer</tt>)</span>
1345
+ <span class="name">:T</span>
1346
+ <span class="default">
1347
+
1348
+ </span>
1349
+ &mdash; <div class='inline'><p>
1350
+ score threshold divided by a [30]
1351
+ </p>
1352
+ </div>
1353
+ </tr>
1354
+
1355
+ <li>
1356
+ <span class="type">(<tt>Integer</tt>)</span>
1357
+ <span class="name">:s</span>
1358
+ <span class="default">
1359
+
1360
+ </span>
1361
+ &mdash; <div class='inline'><p>
1362
+ maximum seeding interval size [3]
1363
+ </p>
1364
+ </div>
1365
+ </tr>
1366
+
1367
+ <li>
1368
+ <span class="type">(<tt>Integer</tt>)</span>
1369
+ <span class="name">:z</span>
1370
+ <span class="default">
1371
+
1372
+ </span>
1373
+ &mdash; <div class='inline'><p>
1374
+ Z-best [1]
1375
+ </p>
1376
+ </div>
1377
+ </tr>
1378
+
1379
+ <li>
1380
+ <span class="type">(<tt>Integer</tt>)</span>
1381
+ <span class="name">:N</span>
1382
+ <span class="default">
1383
+
1384
+ </span>
1385
+ &mdash; <div class='inline'><p>
1386
+ number of seeds to trigger reverse alignment [5]
1387
+ </p>
1388
+ </div>
1389
+ </tr>
1390
+
1391
+ <li>
1392
+ <span class="type">(<tt>Float</tt>)</span>
1393
+ <span class="name">:c</span>
1394
+ <span class="default">
1395
+
1396
+ </span>
1397
+ &mdash; <div class='inline'><p>
1398
+ coefficient of length-threshold adjustment [5.5]
1399
+ </p>
1400
+ </div>
1401
+ </tr>
1402
+
1403
+ <li>
1404
+ <span class="type">(<tt>Boolean</tt>)</span>
1405
+ <span class="name">:H</span>
1406
+ <span class="default">
1407
+
1408
+ </span>
1409
+ &mdash; <div class='inline'><p>
1410
+ in SAM output, use hard clipping rather than soft
1411
+ </p>
1412
+ </div>
1413
+ </tr>
1414
+
1415
+ </ul>
1416
+
1417
+
1418
+ </div><table class="source_code">
1419
+ <tr>
1420
+ <td>
1421
+ <pre class="lines">
1422
+
1423
+
1424
+ 203
1425
+ 204
1426
+ 205
1427
+ 206
1428
+ 207
1429
+ 208
1430
+ 209
1431
+ 210
1432
+ 211</pre>
1433
+ </td>
1434
+ <td>
1435
+ <pre class="code"><span class="info file"># File 'lib/bio/bwa.rb', line 203</span>
1436
+
1437
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id long_read_alignment'>long_read_alignment</span><span class='lparen'>(</span><span class='id params'>params</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
1438
+ <span class='id valid_params'>valid_params</span> <span class='op'>=</span> <span class='qwords_beg'>%w(</span><span class='tstring_content'>q</span><span class='words_sep'> </span><span class='tstring_content'>r</span><span class='words_sep'> </span><span class='tstring_content'>a</span><span class='words_sep'> </span><span class='tstring_content'>b</span><span class='words_sep'> </span><span class='tstring_content'>t</span><span class='words_sep'> </span><span class='tstring_content'>T</span><span class='words_sep'> </span><span class='tstring_content'>w</span><span class='words_sep'> </span><span class='tstring_content'>d</span><span class='words_sep'> </span><span class='tstring_content'>z</span><span class='words_sep'> </span><span class='tstring_content'>m</span><span class='words_sep'> </span><span class='tstring_content'>y</span><span class='words_sep'> </span><span class='tstring_content'>s</span><span class='words_sep'> </span><span class='tstring_content'>c</span><span class='words_sep'> </span><span class='tstring_content'>N</span><span class='words_sep'> </span><span class='tstring_content'>H</span><span class='words_sep'> </span><span class='tstring_content'>f</span><span class='words_sep'> </span><span class='tstring_content'>prefix</span><span class='words_sep'> </span><span class='tstring_content'>file_in</span><span class='words_sep'>)</span>
1439
+ <span class='id mandatory_params'>mandatory_params</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='symbol'>:prefix</span><span class='comma'>,</span> <span class='symbol'>:file_in</span><span class='comma'>,</span> <span class='symbol'>:file_out</span><span class='rbracket'>]</span>
1440
+ <span class='id last_params'>last_params</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='symbol'>:prefix</span><span class='comma'>,</span><span class='symbol'>:file_in</span><span class='rbracket'>]</span>
1441
+ <span class='id check_mandatory'>check_mandatory</span><span class='lparen'>(</span><span class='id mandatory_params'>mandatory_params</span><span class='comma'>,</span> <span class='id params'>params</span><span class='rparen'>)</span>
1442
+ <span class='id params'>params</span> <span class='op'>=</span> <span class='id change_arg_name'>change_arg_name</span><span class='lparen'>(</span><span class='id params'>params</span><span class='comma'>,</span><span class='symbol'>:file_out</span><span class='comma'>,</span><span class='symbol'>:f</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id params'>params</span><span class='lbracket'>[</span><span class='symbol'>:file_out</span><span class='rbracket'>]</span>
1443
+ <span class='id args'>args</span> <span class='op'>=</span> <span class='id build_parameters'>build_parameters</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>bwtsw2</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span><span class='id valid_params'>valid_params</span><span class='comma'>,</span><span class='id params'>params</span><span class='comma'>,</span><span class='id last_params'>last_params</span><span class='rparen'>)</span>
1444
+ <span class='id call_BWA_function'>call_BWA_function</span><span class='lparen'>(</span><span class='id args'>args</span><span class='rparen'>)</span>
1445
+ <span class='kw'>end</span></pre>
1446
+ </td>
1447
+ </tr>
1448
+ </table>
1449
+ </div>
1450
+
1451
+ <div class="method_details ">
1452
+ <p class="signature " id="make_index-class_method">
1453
+
1454
+ + (<tt>Object</tt>) <strong>make_index</strong>(params = {})
1455
+
1456
+
1457
+
1458
+ </p><div class="docstring">
1459
+ <div class="discussion">
1460
+
1461
+ <div class="note notetag">
1462
+ <strong>Note:</strong>
1463
+ <div class='inline'><p>
1464
+ Boolean values must be set to &#8216;true&#8217;
1465
+ </p>
1466
+ </div>
1467
+ </div>
1468
+
1469
+ <p>
1470
+ Generate the BWT index for a Fasta database
1471
+ </p>
1472
+
1473
+
1474
+ </div>
1475
+ </div>
1476
+ <div class="tags">
1477
+ <h3>Parameters:</h3>
1478
+ <ul class="param">
1479
+
1480
+ <li>
1481
+
1482
+ <span class='type'>(<tt>Hash</tt>)</span>
1483
+
1484
+
1485
+ <span class='name'>.</span>
1486
+
1487
+
1488
+
1489
+ &mdash;
1490
+ <div class='inline'><p>
1491
+ params Options.
1492
+ </p>
1493
+ </div>
1494
+
1495
+ </li>
1496
+
1497
+ <li>
1498
+
1499
+ <span class='type'>(<tt>Hash</tt>)</span>
1500
+
1501
+
1502
+ <span class='name'>params</span>
1503
+
1504
+
1505
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
1506
+
1507
+
1508
+ &mdash;
1509
+ <div class='inline'><p>
1510
+ a customizable set of options
1511
+ </p>
1512
+ </div>
1513
+
1514
+ </li>
1515
+
1516
+ </ul>
1517
+
1518
+
1519
+
1520
+
1521
+ <h3>Options Hash (<tt>params</tt>):</h3>
1522
+ <ul class="option">
1523
+
1524
+ <li>
1525
+ <span class="type">(<tt>String</tt>)</span>
1526
+ <span class="name">:file_in</span>
1527
+ <span class="default">
1528
+
1529
+ </span>
1530
+ &mdash; <div class='inline'><p>
1531
+ the Fasta file (REQUIRED)
1532
+ </p>
1533
+ </div>
1534
+ </tr>
1535
+
1536
+ <li>
1537
+ <span class="type">(<tt>String</tt>)</span>
1538
+ <span class="name">:p</span>
1539
+ <span class="default">
1540
+
1541
+ </span>
1542
+ &mdash; <div class='inline'><p>
1543
+ the prefix for the database files that will be generated [default is Fasta
1544
+ name]
1545
+ </p>
1546
+ </div>
1547
+ </tr>
1548
+
1549
+ <li>
1550
+ <span class="type">(<tt>String</tt>)</span>
1551
+ <span class="name">:a</span>
1552
+ <span class="default">
1553
+
1554
+ </span>
1555
+ &mdash; <div class='inline'><p>
1556
+ the algorithm to be used for indexing: &#8216;is&#8217; (short
1557
+ database)[default] or &#8216;bwtsw&#8217; (long database)
1558
+ </p>
1559
+ </div>
1560
+ </tr>
1561
+
1562
+ <li>
1563
+ <span class="type">(<tt>Boolean</tt>)</span>
1564
+ <span class="name">:c</span>
1565
+ <span class="default">
1566
+
1567
+ </span>
1568
+ &mdash; <div class='inline'><p>
1569
+ colorspace database index
1570
+ </p>
1571
+ </div>
1572
+ </tr>
1573
+
1574
+ </ul>
1575
+
1576
+
1577
+ </div><table class="source_code">
1578
+ <tr>
1579
+ <td>
1580
+ <pre class="lines">
1581
+
1582
+
1583
+ 75
1584
+ 76
1585
+ 77
1586
+ 78
1587
+ 79
1588
+ 80
1589
+ 81
1590
+ 82
1591
+ 83</pre>
1592
+ </td>
1593
+ <td>
1594
+ <pre class="code"><span class="info file"># File 'lib/bio/bwa.rb', line 75</span>
1595
+
1596
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id make_index'>make_index</span><span class='lparen'>(</span><span class='id params'>params</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
1597
+ <span class='id valid_params'>valid_params</span> <span class='op'>=</span> <span class='qwords_beg'>%w(</span><span class='tstring_content'>file_in</span><span class='words_sep'> </span><span class='tstring_content'>p</span><span class='words_sep'> </span><span class='tstring_content'>a</span><span class='words_sep'> </span><span class='tstring_content'>c</span><span class='words_sep'>)</span>
1598
+ <span class='id mandatory_params'>mandatory_params</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='symbol'>:file_in</span><span class='rbracket'>]</span>
1599
+ <span class='id last_params'>last_params</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='symbol'>:file_in</span><span class='rbracket'>]</span>
1600
+ <span class='id check_mandatory'>check_mandatory</span><span class='lparen'>(</span><span class='id mandatory_params'>mandatory_params</span><span class='comma'>,</span> <span class='id params'>params</span><span class='rparen'>)</span>
1601
+ <span class='id params'>params</span> <span class='op'>=</span> <span class='id change_arg_name'>change_arg_name</span><span class='lparen'>(</span><span class='id params'>params</span><span class='comma'>,</span><span class='symbol'>:prefix</span><span class='comma'>,</span><span class='symbol'>:p</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id params'>params</span><span class='lbracket'>[</span><span class='symbol'>:prefix</span><span class='rbracket'>]</span>
1602
+ <span class='id args'>args</span> <span class='op'>=</span> <span class='id build_parameters'>build_parameters</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>index</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span><span class='id valid_params'>valid_params</span><span class='comma'>,</span><span class='id params'>params</span><span class='comma'>,</span><span class='id last_params'>last_params</span><span class='rparen'>)</span>
1603
+ <span class='id call_BWA_function'>call_BWA_function</span><span class='lparen'>(</span><span class='id args'>args</span><span class='rparen'>)</span>
1604
+ <span class='kw'>end</span></pre>
1605
+ </td>
1606
+ </tr>
1607
+ </table>
1608
+ </div>
1609
+
1610
+ <div class="method_details ">
1611
+ <p class="signature " id="pac2bwt-class_method">
1612
+
1613
+ + (<tt>Object</tt>) <strong>pac2bwt</strong>(params = {})
1614
+
1615
+
1616
+
1617
+ </p><div class="docstring">
1618
+ <div class="discussion">
1619
+ <p>
1620
+ Convert a Packed file format to Burrows-Wheeler Transform format
1621
+ </p>
1622
+
1623
+
1624
+ </div>
1625
+ </div>
1626
+ <div class="tags">
1627
+ <h3>Parameters:</h3>
1628
+ <ul class="param">
1629
+
1630
+ <li>
1631
+
1632
+ <span class='type'>(<tt>Hash</tt>)</span>
1633
+
1634
+
1635
+ <span class='name'>.</span>
1636
+
1637
+
1638
+
1639
+ &mdash;
1640
+ <div class='inline'><p>
1641
+ params Options.
1642
+ </p>
1643
+ </div>
1644
+
1645
+ </li>
1646
+
1647
+ <li>
1648
+
1649
+ <span class='type'>(<tt>Hash</tt>)</span>
1650
+
1651
+
1652
+ <span class='name'>params</span>
1653
+
1654
+
1655
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
1656
+
1657
+
1658
+ &mdash;
1659
+ <div class='inline'><p>
1660
+ a customizable set of options
1661
+ </p>
1662
+ </div>
1663
+
1664
+ </li>
1665
+
1666
+ </ul>
1667
+
1668
+
1669
+
1670
+
1671
+ <h3>Options Hash (<tt>params</tt>):</h3>
1672
+ <ul class="option">
1673
+
1674
+ <li>
1675
+ <span class="type">(<tt>String</tt>)</span>
1676
+ <span class="name">:file_in</span>
1677
+ <span class="default">
1678
+
1679
+ </span>
1680
+ &mdash; <div class='inline'><p>
1681
+ the PAC file (REQUIRED)
1682
+ </p>
1683
+ </div>
1684
+ </tr>
1685
+
1686
+ <li>
1687
+ <span class="type">(<tt>String</tt>)</span>
1688
+ <span class="name">:file_out</span>
1689
+ <span class="default">
1690
+
1691
+ </span>
1692
+ &mdash; <div class='inline'><p>
1693
+ the name of the BWT file (REQUIRED)
1694
+ </p>
1695
+ </div>
1696
+ </tr>
1697
+
1698
+ </ul>
1699
+
1700
+
1701
+ </div><table class="source_code">
1702
+ <tr>
1703
+ <td>
1704
+ <pre class="lines">
1705
+
1706
+
1707
+ 24
1708
+ 25
1709
+ 26
1710
+ 27
1711
+ 28
1712
+ 29
1713
+ 30</pre>
1714
+ </td>
1715
+ <td>
1716
+ <pre class="code"><span class="info file"># File 'lib/bio/bwa.rb', line 24</span>
1717
+
1718
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id pac2bwt'>pac2bwt</span><span class='lparen'>(</span><span class='id params'>params</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
1719
+ <span class='id valid_params'>valid_params</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>%q(</span><span class='tstring_content'>file_in file_out</span><span class='tstring_end'>)</span></span>
1720
+ <span class='id last_params'>last_params</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='symbol'>:file_in</span><span class='comma'>,</span><span class='symbol'>:file_out</span><span class='rbracket'>]</span>
1721
+ <span class='id check_mandatory'>check_mandatory</span><span class='lparen'>(</span><span class='id last_params'>last_params</span><span class='comma'>,</span> <span class='id params'>params</span><span class='rparen'>)</span>
1722
+ <span class='id args'>args</span> <span class='op'>=</span> <span class='id build_parameters'>build_parameters</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>pac2bwt</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span><span class='id valid_params'>valid_params</span><span class='comma'>,</span><span class='id params'>params</span><span class='comma'>,</span><span class='id last_params'>last_params</span><span class='rparen'>)</span>
1723
+ <span class='id call_BWA_function'>call_BWA_function</span><span class='lparen'>(</span><span class='id args'>args</span><span class='rparen'>)</span>
1724
+ <span class='kw'>end</span></pre>
1725
+ </td>
1726
+ </tr>
1727
+ </table>
1728
+ </div>
1729
+
1730
+ <div class="method_details ">
1731
+ <p class="signature " id="pac_rev-class_method">
1732
+
1733
+ + (<tt>Object</tt>) <strong>pac_rev</strong>(params = {})
1734
+
1735
+
1736
+
1737
+ </p><div class="docstring">
1738
+ <div class="discussion">
1739
+ <p>
1740
+ Generate reverse Packed format
1741
+ </p>
1742
+
1743
+
1744
+ </div>
1745
+ </div>
1746
+ <div class="tags">
1747
+ <h3>Parameters:</h3>
1748
+ <ul class="param">
1749
+
1750
+ <li>
1751
+
1752
+ <span class='type'>(<tt>Hash</tt>)</span>
1753
+
1754
+
1755
+ <span class='name'>.</span>
1756
+
1757
+
1758
+
1759
+ &mdash;
1760
+ <div class='inline'><p>
1761
+ params Options.
1762
+ </p>
1763
+ </div>
1764
+
1765
+ </li>
1766
+
1767
+ <li>
1768
+
1769
+ <span class='type'>(<tt>Hash</tt>)</span>
1770
+
1771
+
1772
+ <span class='name'>params</span>
1773
+
1774
+
1775
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
1776
+
1777
+
1778
+ &mdash;
1779
+ <div class='inline'><p>
1780
+ a customizable set of options
1781
+ </p>
1782
+ </div>
1783
+
1784
+ </li>
1785
+
1786
+ </ul>
1787
+
1788
+
1789
+
1790
+
1791
+ <h3>Options Hash (<tt>params</tt>):</h3>
1792
+ <ul class="option">
1793
+
1794
+ <li>
1795
+ <span class="type">(<tt>String</tt>)</span>
1796
+ <span class="name">:file_in</span>
1797
+ <span class="default">
1798
+
1799
+ </span>
1800
+ &mdash; <div class='inline'><p>
1801
+ the PAC file (REQUIRED)
1802
+ </p>
1803
+ </div>
1804
+ </tr>
1805
+
1806
+ <li>
1807
+ <span class="type">(<tt>String</tt>)</span>
1808
+ <span class="name">:file_out</span>
1809
+ <span class="default">
1810
+
1811
+ </span>
1812
+ &mdash; <div class='inline'><p>
1813
+ the name of the REV PAC (REQUIRED)
1814
+ </p>
1815
+ </div>
1816
+ </tr>
1817
+
1818
+ </ul>
1819
+
1820
+
1821
+ </div><table class="source_code">
1822
+ <tr>
1823
+ <td>
1824
+ <pre class="lines">
1825
+
1826
+
1827
+ 48
1828
+ 49
1829
+ 50
1830
+ 51
1831
+ 52
1832
+ 53
1833
+ 54</pre>
1834
+ </td>
1835
+ <td>
1836
+ <pre class="code"><span class="info file"># File 'lib/bio/bwa.rb', line 48</span>
1837
+
1838
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id pac_rev'>pac_rev</span><span class='lparen'>(</span><span class='id params'>params</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
1839
+ <span class='id valid_params'>valid_params</span> <span class='op'>=</span> <span class='qwords_beg'>%w(</span><span class='tstring_content'>file_in</span><span class='words_sep'> </span><span class='tstring_content'>file_out</span><span class='words_sep'>)</span>
1840
+ <span class='id last_params'>last_params</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='symbol'>:file_in</span><span class='comma'>,</span><span class='symbol'>:file_out</span><span class='rbracket'>]</span>
1841
+ <span class='id check_mandatory'>check_mandatory</span><span class='lparen'>(</span><span class='id last_params'>last_params</span><span class='comma'>,</span> <span class='id params'>params</span><span class='rparen'>)</span>
1842
+ <span class='id args'>args</span> <span class='op'>=</span> <span class='id build_parameters'>build_parameters</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>pac_rev</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span><span class='id valid_params'>valid_params</span><span class='comma'>,</span><span class='id params'>params</span><span class='comma'>,</span><span class='id last_params'>last_params</span><span class='rparen'>)</span>
1843
+ <span class='id call_BWA_function'>call_BWA_function</span><span class='lparen'>(</span><span class='id args'>args</span><span class='rparen'>)</span>
1844
+ <span class='kw'>end</span></pre>
1845
+ </td>
1846
+ </tr>
1847
+ </table>
1848
+ </div>
1849
+
1850
+ <div class="method_details ">
1851
+ <p class="signature " id="sai_to_sam_paired-class_method">
1852
+
1853
+ + (<tt>Object</tt>) <strong>sai_to_sam_paired</strong>(params = {})
1854
+
1855
+
1856
+
1857
+ </p><div class="docstring">
1858
+ <div class="discussion">
1859
+
1860
+ <div class="note notetag">
1861
+ <strong>Note:</strong>
1862
+ <div class='inline'><p>
1863
+ Boolean values must be set to &#8216;true&#8217;
1864
+ </p>
1865
+ </div>
1866
+ </div>
1867
+
1868
+ <p>
1869
+ Convert the SAI alignment output into SAM format (paired ends)
1870
+ </p>
1871
+
1872
+
1873
+ </div>
1874
+ </div>
1875
+ <div class="tags">
1876
+ <h3>Parameters:</h3>
1877
+ <ul class="param">
1878
+
1879
+ <li>
1880
+
1881
+ <span class='type'>(<tt>Hash</tt>)</span>
1882
+
1883
+
1884
+ <span class='name'>params</span>
1885
+
1886
+
1887
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
1888
+
1889
+
1890
+ &mdash;
1891
+ <div class='inline'><p>
1892
+ Options
1893
+ </p>
1894
+ </div>
1895
+
1896
+ </li>
1897
+
1898
+ </ul>
1899
+
1900
+
1901
+
1902
+
1903
+ <h3>Options Hash (<tt>params</tt>):</h3>
1904
+ <ul class="option">
1905
+
1906
+ <li>
1907
+ <span class="type">(<tt>String</tt>)</span>
1908
+ <span class="name">:prefix</span>
1909
+ <span class="default">
1910
+
1911
+ </span>
1912
+ &mdash; <div class='inline'><p>
1913
+ the prefix of the database index files (REQUIRED)
1914
+ </p>
1915
+ </div>
1916
+ </tr>
1917
+
1918
+ <li>
1919
+ <span class="type">(<tt>Array</tt>)</span>
1920
+ <span class="name">:sai</span>
1921
+ <span class="default">
1922
+
1923
+ </span>
1924
+ &mdash; <div class='inline'><p>
1925
+ the two alignment files in SAI format (REQUIRED)
1926
+ </p>
1927
+ </div>
1928
+ </tr>
1929
+
1930
+ <li>
1931
+ <span class="type">(<tt>Array</tt>)</span>
1932
+ <span class="name">:fastq</span>
1933
+ <span class="default">
1934
+
1935
+ </span>
1936
+ &mdash; <div class='inline'><p>
1937
+ the two fastq files (REQUIRED)
1938
+ </p>
1939
+ </div>
1940
+ </tr>
1941
+
1942
+ <li>
1943
+ <span class="type">(<tt>Integer</tt>)</span>
1944
+ <span class="name">:a</span>
1945
+ <span class="default">
1946
+
1947
+ </span>
1948
+ &mdash; <div class='inline'><p>
1949
+ maximum insert size [500]
1950
+ </p>
1951
+ </div>
1952
+ </tr>
1953
+
1954
+ <li>
1955
+ <span class="type">(<tt>Integer</tt>)</span>
1956
+ <span class="name">:o</span>
1957
+ <span class="default">
1958
+
1959
+ </span>
1960
+ &mdash; <div class='inline'><p>
1961
+ maximum occurrences for one end [100000]
1962
+ </p>
1963
+ </div>
1964
+ </tr>
1965
+
1966
+ <li>
1967
+ <span class="type">(<tt>Integer</tt>)</span>
1968
+ <span class="name">:n</span>
1969
+ <span class="default">
1970
+
1971
+ </span>
1972
+ &mdash; <div class='inline'><p>
1973
+ maximum hits to output for paired reads [3]
1974
+ </p>
1975
+ </div>
1976
+ </tr>
1977
+
1978
+ <li>
1979
+ <span class="type">(<tt>Integer</tt>)</span>
1980
+ <span class="name">:N</span>
1981
+ <span class="default">
1982
+
1983
+ </span>
1984
+ &mdash; <div class='inline'><p>
1985
+ maximum hits to output for discordant pairs [10]
1986
+ </p>
1987
+ </div>
1988
+ </tr>
1989
+
1990
+ <li>
1991
+ <span class="type">(<tt>Float</tt>)</span>
1992
+ <span class="name">:c</span>
1993
+ <span class="default">
1994
+
1995
+ </span>
1996
+ &mdash; <div class='inline'><p>
1997
+ prior of chimeric rate (lower bound) [1.0e-05]
1998
+ </p>
1999
+ </div>
2000
+ </tr>
2001
+
2002
+ <li>
2003
+ <span class="type">(<tt>String</tt>)</span>
2004
+ <span class="name">:r</span>
2005
+ <span class="default">
2006
+
2007
+ </span>
2008
+ &mdash; <div class='inline'><p>
2009
+ read group header line such as &#8217;@RG\tID:foo\tSM:bar&#8217;
2010
+ </p>
2011
+ </div>
2012
+ </tr>
2013
+
2014
+ <li>
2015
+ <span class="type">(<tt>Boolean</tt>)</span>
2016
+ <span class="name">:P</span>
2017
+ <span class="default">
2018
+
2019
+ </span>
2020
+ &mdash; <div class='inline'><p>
2021
+ preload index into memory (for base-space reads only)
2022
+ </p>
2023
+ </div>
2024
+ </tr>
2025
+
2026
+ <li>
2027
+ <span class="type">(<tt>Boolean</tt>)</span>
2028
+ <span class="name">:s</span>
2029
+ <span class="default">
2030
+
2031
+ </span>
2032
+ &mdash; <div class='inline'><p>
2033
+ disable Smith-Waterman for the unmapped mate
2034
+ </p>
2035
+ </div>
2036
+ </tr>
2037
+
2038
+ <li>
2039
+ <span class="type">(<tt>Boolean</tt>)</span>
2040
+ <span class="name">:A</span>
2041
+ <span class="default">
2042
+
2043
+ </span>
2044
+ &mdash; <div class='inline'><p>
2045
+ disable insert size estimate (force :s)
2046
+ </p>
2047
+ </div>
2048
+ </tr>
2049
+
2050
+ </ul>
2051
+
2052
+
2053
+ </div><table class="source_code">
2054
+ <tr>
2055
+ <td>
2056
+ <pre class="lines">
2057
+
2058
+
2059
+ 162
2060
+ 163
2061
+ 164
2062
+ 165
2063
+ 166
2064
+ 167
2065
+ 168
2066
+ 169
2067
+ 170
2068
+ 171
2069
+ 172
2070
+ 173
2071
+ 174
2072
+ 175
2073
+ 176
2074
+ 177
2075
+ 178
2076
+ 179
2077
+ 180
2078
+ 181
2079
+ 182</pre>
2080
+ </td>
2081
+ <td>
2082
+ <pre class="code"><span class="info file"># File 'lib/bio/bwa.rb', line 162</span>
2083
+
2084
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id sai_to_sam_paired'>sai_to_sam_paired</span><span class='lparen'>(</span><span class='id params'>params</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
2085
+ <span class='id valid_params'>valid_params</span> <span class='op'>=</span> <span class='qwords_beg'>%w(</span><span class='tstring_content'>a</span><span class='words_sep'> </span><span class='tstring_content'>o</span><span class='words_sep'> </span><span class='tstring_content'>s</span><span class='words_sep'> </span><span class='tstring_content'>P</span><span class='words_sep'> </span><span class='tstring_content'>n</span><span class='words_sep'> </span><span class='tstring_content'>N</span><span class='words_sep'> </span><span class='tstring_content'>c</span><span class='words_sep'> </span><span class='tstring_content'>f</span><span class='words_sep'> </span><span class='tstring_content'>A</span><span class='words_sep'> </span><span class='tstring_content'>r</span><span class='words_sep'> </span><span class='tstring_content'>prefix</span><span class='words_sep'> </span><span class='tstring_content'>first_sai</span><span class='words_sep'> </span><span class='tstring_content'>second_sai</span><span class='words_sep'> </span><span class='tstring_content'>first_fastq</span><span class='words_sep'> </span><span class='tstring_content'>second_fastq</span><span class='words_sep'>)</span>
2086
+ <span class='id mandatory_params'>mandatory_params</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='symbol'>:prefix</span><span class='comma'>,</span> <span class='symbol'>:sai</span><span class='comma'>,</span> <span class='symbol'>:fastq</span><span class='rbracket'>]</span>
2087
+ <span class='id last_params'>last_params</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='symbol'>:prefix</span><span class='comma'>,</span> <span class='symbol'>:first_sai</span><span class='comma'>,</span> <span class='symbol'>:second_sai</span><span class='comma'>,</span> <span class='symbol'>:first_fastq</span><span class='comma'>,</span> <span class='symbol'>:second_fastq</span><span class='rbracket'>]</span>
2088
+ <span class='id check_mandatory'>check_mandatory</span><span class='lparen'>(</span><span class='id mandatory_params'>mandatory_params</span><span class='comma'>,</span> <span class='id params'>params</span><span class='rparen'>)</span>
2089
+ <span class='id params'>params</span> <span class='op'>=</span> <span class='id change_arg_name'>change_arg_name</span><span class='lparen'>(</span><span class='id params'>params</span><span class='comma'>,</span><span class='symbol'>:file_out</span><span class='comma'>,</span><span class='symbol'>:f</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id params'>params</span><span class='lbracket'>[</span><span class='symbol'>:file_out</span><span class='rbracket'>]</span>
2090
+ <span class='kw'>if</span> <span class='id params'>params</span><span class='lbracket'>[</span><span class='symbol'>:sai</span><span class='rbracket'>]</span>
2091
+ <span class='id raise'>raise</span> <span class='const'>ArgumentError</span><span class='comma'>,</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>you must provide an array with two SAI files!</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>unless</span> <span class='id params'>params</span><span class='lbracket'>[</span><span class='symbol'>:sai</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Array</span><span class='rparen'>)</span> <span class='kw'>and</span> <span class='id params'>params</span><span class='lbracket'>[</span><span class='symbol'>:sai</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id size'>size</span> <span class='op'>==</span> <span class='int'>2</span>
2092
+ <span class='id params'>params</span><span class='lbracket'>[</span><span class='symbol'>:first_sai</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id params'>params</span><span class='lbracket'>[</span><span class='symbol'>:sai</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span>
2093
+ <span class='id params'>params</span><span class='lbracket'>[</span><span class='symbol'>:second_sai</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id params'>params</span><span class='lbracket'>[</span><span class='symbol'>:sai</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span>
2094
+ <span class='id params'>params</span><span class='period'>.</span><span class='id delete'>delete</span><span class='lparen'>(</span><span class='symbol'>:sai</span><span class='rparen'>)</span>
2095
+ <span class='kw'>end</span>
2096
+ <span class='kw'>if</span> <span class='id params'>params</span><span class='lbracket'>[</span><span class='symbol'>:fastq</span><span class='rbracket'>]</span>
2097
+ <span class='id raise'>raise</span> <span class='const'>ArgumentError</span><span class='comma'>,</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>you must provide an array with two FastQ files!</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>unless</span> <span class='id params'>params</span><span class='lbracket'>[</span><span class='symbol'>:fastq</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Array</span><span class='rparen'>)</span> <span class='kw'>and</span> <span class='id params'>params</span><span class='lbracket'>[</span><span class='symbol'>:fastq</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id size'>size</span> <span class='op'>==</span> <span class='int'>2</span>
2098
+ <span class='id params'>params</span><span class='lbracket'>[</span><span class='symbol'>:first_fastq</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id params'>params</span><span class='lbracket'>[</span><span class='symbol'>:fastq</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span>
2099
+ <span class='id params'>params</span><span class='lbracket'>[</span><span class='symbol'>:second_fastq</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id params'>params</span><span class='lbracket'>[</span><span class='symbol'>:fastq</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span>
2100
+ <span class='id params'>params</span><span class='period'>.</span><span class='id delete'>delete</span><span class='lparen'>(</span><span class='symbol'>:fastq</span><span class='rparen'>)</span>
2101
+ <span class='kw'>end</span>
2102
+ <span class='id args'>args</span> <span class='op'>=</span> <span class='id build_parameters'>build_parameters</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>sai2sam_pe</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span><span class='id valid_params'>valid_params</span><span class='comma'>,</span><span class='id params'>params</span><span class='comma'>,</span><span class='id last_params'>last_params</span><span class='rparen'>)</span>
2103
+ <span class='id call_BWA_function'>call_BWA_function</span><span class='lparen'>(</span><span class='id args'>args</span><span class='rparen'>)</span>
2104
+ <span class='kw'>end</span></pre>
2105
+ </td>
2106
+ </tr>
2107
+ </table>
2108
+ </div>
2109
+
2110
+ <div class="method_details ">
2111
+ <p class="signature " id="sai_to_sam_single-class_method">
2112
+
2113
+ + (<tt>Object</tt>) <strong>sai_to_sam_single</strong>(params = {})
2114
+
2115
+
2116
+
2117
+ </p><div class="docstring">
2118
+ <div class="discussion">
2119
+ <p>
2120
+ Convert the SAI alignment output into SAM format (single end)
2121
+ </p>
2122
+
2123
+
2124
+ </div>
2125
+ </div>
2126
+ <div class="tags">
2127
+ <h3>Parameters:</h3>
2128
+ <ul class="param">
2129
+
2130
+ <li>
2131
+
2132
+ <span class='type'>(<tt>Hash</tt>)</span>
2133
+
2134
+
2135
+ <span class='name'>params</span>
2136
+
2137
+
2138
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
2139
+
2140
+
2141
+ &mdash;
2142
+ <div class='inline'><p>
2143
+ Options
2144
+ </p>
2145
+ </div>
2146
+
2147
+ </li>
2148
+
2149
+ </ul>
2150
+
2151
+
2152
+
2153
+
2154
+ <h3>Options Hash (<tt>params</tt>):</h3>
2155
+ <ul class="option">
2156
+
2157
+ <li>
2158
+ <span class="type">(<tt>String</tt>)</span>
2159
+ <span class="name">:fastq</span>
2160
+ <span class="default">
2161
+
2162
+ </span>
2163
+ &mdash; <div class='inline'><p>
2164
+ the FastQ file (REQUIRED)
2165
+ </p>
2166
+ </div>
2167
+ </tr>
2168
+
2169
+ <li>
2170
+ <span class="type">(<tt>String</tt>)</span>
2171
+ <span class="name">:prefix</span>
2172
+ <span class="default">
2173
+
2174
+ </span>
2175
+ &mdash; <div class='inline'><p>
2176
+ the prefix of the database index files (REQUIRED)
2177
+ </p>
2178
+ </div>
2179
+ </tr>
2180
+
2181
+ <li>
2182
+ <span class="type">(<tt>String</tt>)</span>
2183
+ <span class="name">:sai</span>
2184
+ <span class="default">
2185
+
2186
+ </span>
2187
+ &mdash; <div class='inline'><p>
2188
+ the alignment file in SAI format (REQUIRED)
2189
+ </p>
2190
+ </div>
2191
+ </tr>
2192
+
2193
+ <li>
2194
+ <span class="type">(<tt>String</tt>)</span>
2195
+ <span class="name">:file_out</span>
2196
+ <span class="default">
2197
+
2198
+ </span>
2199
+ &mdash; <div class='inline'><p>
2200
+ the file name of the SAM output
2201
+ </p>
2202
+ </div>
2203
+ </tr>
2204
+
2205
+ <li>
2206
+ <span class="type">(<tt>Integer</tt>)</span>
2207
+ <span class="name">:n</span>
2208
+ <span class="default">
2209
+
2210
+ </span>
2211
+ &mdash; <div class='inline'><p>
2212
+ max_occ
2213
+ </p>
2214
+ </div>
2215
+ </tr>
2216
+
2217
+ <li>
2218
+ <span class="type">(<tt>String</tt>)</span>
2219
+ <span class="name">:r</span>
2220
+ <span class="default">
2221
+
2222
+ </span>
2223
+ &mdash; <div class='inline'><p>
2224
+ RG_line
2225
+ </p>
2226
+ </div>
2227
+ </tr>
2228
+
2229
+ </ul>
2230
+
2231
+
2232
+ </div><table class="source_code">
2233
+ <tr>
2234
+ <td>
2235
+ <pre class="lines">
2236
+
2237
+
2238
+ 136
2239
+ 137
2240
+ 138
2241
+ 139
2242
+ 140
2243
+ 141
2244
+ 142
2245
+ 143
2246
+ 144</pre>
2247
+ </td>
2248
+ <td>
2249
+ <pre class="code"><span class="info file"># File 'lib/bio/bwa.rb', line 136</span>
2250
+
2251
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id sai_to_sam_single'>sai_to_sam_single</span><span class='lparen'>(</span><span class='id params'>params</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
2252
+ <span class='id valid_params'>valid_params</span> <span class='op'>=</span> <span class='qwords_beg'>%w(</span><span class='tstring_content'>n</span><span class='words_sep'> </span><span class='tstring_content'>r</span><span class='words_sep'> </span><span class='tstring_content'>fastq</span><span class='words_sep'> </span><span class='tstring_content'>sai</span><span class='words_sep'> </span><span class='tstring_content'>prefix</span><span class='words_sep'> </span><span class='tstring_content'>f</span><span class='words_sep'>)</span>
2253
+ <span class='id mandatory_params'>mandatory_params</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='symbol'>:prefix</span><span class='comma'>,</span><span class='symbol'>:sai</span><span class='comma'>,</span><span class='symbol'>:fastq</span><span class='rbracket'>]</span>
2254
+ <span class='id last_params'>last_params</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='symbol'>:prefix</span><span class='comma'>,</span><span class='symbol'>:sai</span><span class='comma'>,</span><span class='symbol'>:fastq</span><span class='rbracket'>]</span>
2255
+ <span class='id check_mandatory'>check_mandatory</span><span class='lparen'>(</span><span class='id mandatory_params'>mandatory_params</span><span class='comma'>,</span> <span class='id params'>params</span><span class='rparen'>)</span>
2256
+ <span class='id params'>params</span> <span class='op'>=</span> <span class='id change_arg_name'>change_arg_name</span><span class='lparen'>(</span><span class='id params'>params</span><span class='comma'>,</span><span class='symbol'>:file_out</span><span class='comma'>,</span><span class='symbol'>:f</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id params'>params</span><span class='lbracket'>[</span><span class='symbol'>:file_out</span><span class='rbracket'>]</span>
2257
+ <span class='id args'>args</span> <span class='op'>=</span> <span class='id build_parameters'>build_parameters</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>sai2sam_se</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span><span class='id valid_params'>valid_params</span><span class='comma'>,</span><span class='id params'>params</span><span class='comma'>,</span><span class='id last_params'>last_params</span><span class='rparen'>)</span>
2258
+ <span class='id call_BWA_function'>call_BWA_function</span><span class='lparen'>(</span><span class='id args'>args</span><span class='rparen'>)</span>
2259
+ <span class='kw'>end</span></pre>
2260
+ </td>
2261
+ </tr>
2262
+ </table>
2263
+ </div>
2264
+
2265
+ <div class="method_details ">
2266
+ <p class="signature " id="short_read_alignment-class_method">
2267
+
2268
+ + (<tt>Object</tt>) <strong>short_read_alignment</strong>(params = {})
2269
+
2270
+
2271
+
2272
+ </p><div class="docstring">
2273
+ <div class="discussion">
2274
+
2275
+ <div class="note notetag">
2276
+ <strong>Note:</strong>
2277
+ <div class='inline'><p>
2278
+ Boolean values must be set to &#8216;true&#8217;
2279
+ </p>
2280
+ </div>
2281
+ </div>
2282
+
2283
+ <p>
2284
+ Run the alignment for short query sequences
2285
+ </p>
2286
+
2287
+
2288
+ </div>
2289
+ </div>
2290
+ <div class="tags">
2291
+ <h3>Parameters:</h3>
2292
+ <ul class="param">
2293
+
2294
+ <li>
2295
+
2296
+ <span class='type'>(<tt>Hash</tt>)</span>
2297
+
2298
+
2299
+ <span class='name'>params</span>
2300
+
2301
+
2302
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
2303
+
2304
+
2305
+ &mdash;
2306
+ <div class='inline'><p>
2307
+ Options
2308
+ </p>
2309
+ </div>
2310
+
2311
+ </li>
2312
+
2313
+ </ul>
2314
+
2315
+
2316
+
2317
+
2318
+ <h3>Options Hash (<tt>params</tt>):</h3>
2319
+ <ul class="option">
2320
+
2321
+ <li>
2322
+ <span class="type">(<tt>String</tt>)</span>
2323
+ <span class="name">:file_in</span>
2324
+ <span class="default">
2325
+
2326
+ </span>
2327
+ &mdash; <div class='inline'><p>
2328
+ the FastQ file (REQUIRED)
2329
+ </p>
2330
+ </div>
2331
+ </tr>
2332
+
2333
+ <li>
2334
+ <span class="type">(<tt>String</tt>)</span>
2335
+ <span class="name">:prefix</span>
2336
+ <span class="default">
2337
+
2338
+ </span>
2339
+ &mdash; <div class='inline'><p>
2340
+ the prefix of the database index files (REQUIRED)
2341
+ </p>
2342
+ </div>
2343
+ </tr>
2344
+
2345
+ <li>
2346
+ <span class="type">(<tt>String</tt>)</span>
2347
+ <span class="name">:file_out</span>
2348
+ <span class="default">
2349
+
2350
+ </span>
2351
+ &mdash; <div class='inline'><p>
2352
+ the output of the alignment in SAI format (REQUIRED)
2353
+ </p>
2354
+ </div>
2355
+ </tr>
2356
+
2357
+ <li>
2358
+ <span class="type">(<tt>Integer</tt>)</span>
2359
+ <span class="name">:n</span>
2360
+ <span class="default">
2361
+
2362
+ </span>
2363
+ &mdash; <div class='inline'><p>
2364
+ max #diff (int) or missing prob under 0.02 err rate (float) [0.04]
2365
+ </p>
2366
+ </div>
2367
+ </tr>
2368
+
2369
+ <li>
2370
+ <span class="type">(<tt>Integer</tt>)</span>
2371
+ <span class="name">:o</span>
2372
+ <span class="default">
2373
+
2374
+ </span>
2375
+ &mdash; <div class='inline'><p>
2376
+ maximum number or fraction of gap opens [1]
2377
+ </p>
2378
+ </div>
2379
+ </tr>
2380
+
2381
+ <li>
2382
+ <span class="type">(<tt>Integer</tt>)</span>
2383
+ <span class="name">:e</span>
2384
+ <span class="default">
2385
+
2386
+ </span>
2387
+ &mdash; <div class='inline'><p>
2388
+ maximum number of gap extensions, -1 for disabling long gaps [-1]
2389
+ </p>
2390
+ </div>
2391
+ </tr>
2392
+
2393
+ <li>
2394
+ <span class="type">(<tt>Integer</tt>)</span>
2395
+ <span class="name">:m</span>
2396
+ <span class="default">
2397
+
2398
+ </span>
2399
+ &mdash; <div class='inline'><p>
2400
+ maximum entries in the queue [2000000]
2401
+ </p>
2402
+ </div>
2403
+ </tr>
2404
+
2405
+ <li>
2406
+ <span class="type">(<tt>Integer</tt>)</span>
2407
+ <span class="name">:t</span>
2408
+ <span class="default">
2409
+
2410
+ </span>
2411
+ &mdash; <div class='inline'><p>
2412
+ number of threads [1]
2413
+ </p>
2414
+ </div>
2415
+ </tr>
2416
+
2417
+ <li>
2418
+ <span class="type">(<tt>Integer</tt>)</span>
2419
+ <span class="name">:M</span>
2420
+ <span class="default">
2421
+
2422
+ </span>
2423
+ &mdash; <div class='inline'><p>
2424
+ mismatch penalty [3]
2425
+ </p>
2426
+ </div>
2427
+ </tr>
2428
+
2429
+ <li>
2430
+ <span class="type">(<tt>Integer</tt>)</span>
2431
+ <span class="name">:O</span>
2432
+ <span class="default">
2433
+
2434
+ </span>
2435
+ &mdash; <div class='inline'><p>
2436
+ gap open penalty [11]
2437
+ </p>
2438
+ </div>
2439
+ </tr>
2440
+
2441
+ <li>
2442
+ <span class="type">(<tt>Integer</tt>)</span>
2443
+ <span class="name">:R</span>
2444
+ <span class="default">
2445
+
2446
+ </span>
2447
+ &mdash; <div class='inline'><p>
2448
+ stop searching when there are >INT equally best hits [30]
2449
+ </p>
2450
+ </div>
2451
+ </tr>
2452
+
2453
+ <li>
2454
+ <span class="type">(<tt>Integer</tt>)</span>
2455
+ <span class="name">:q</span>
2456
+ <span class="default">
2457
+
2458
+ </span>
2459
+ &mdash; <div class='inline'><p>
2460
+ quality threshold for read trimming down to 35bp [0]
2461
+ </p>
2462
+ </div>
2463
+ </tr>
2464
+
2465
+ <li>
2466
+ <span class="type">(<tt>Integer</tt>)</span>
2467
+ <span class="name">:B</span>
2468
+ <span class="default">
2469
+
2470
+ </span>
2471
+ &mdash; <div class='inline'><p>
2472
+ length of barcode
2473
+ </p>
2474
+ </div>
2475
+ </tr>
2476
+
2477
+ <li>
2478
+ <span class="type">(<tt>Boolean</tt>)</span>
2479
+ <span class="name">:c</span>
2480
+ <span class="default">
2481
+
2482
+ </span>
2483
+ &mdash; <div class='inline'><p>
2484
+ input sequences are in the color space
2485
+ </p>
2486
+ </div>
2487
+ </tr>
2488
+
2489
+ <li>
2490
+ <span class="type">(<tt>Boolean</tt>)</span>
2491
+ <span class="name">:L</span>
2492
+ <span class="default">
2493
+
2494
+ </span>
2495
+ &mdash; <div class='inline'><p>
2496
+ log-scaled gap penalty for long deletions
2497
+ </p>
2498
+ </div>
2499
+ </tr>
2500
+
2501
+ <li>
2502
+ <span class="type">(<tt>Boolean</tt>)</span>
2503
+ <span class="name">:N</span>
2504
+ <span class="default">
2505
+
2506
+ </span>
2507
+ &mdash; <div class='inline'><p>
2508
+ non-iterative mode: search for all n-difference hits (slow)
2509
+ </p>
2510
+ </div>
2511
+ </tr>
2512
+
2513
+ <li>
2514
+ <span class="type">(<tt>Boolean</tt>)</span>
2515
+ <span class="name">:I</span>
2516
+ <span class="default">
2517
+
2518
+ </span>
2519
+ &mdash; <div class='inline'><p>
2520
+ the input is in the Illumina 1.3+ FASTQ-like format
2521
+ </p>
2522
+ </div>
2523
+ </tr>
2524
+
2525
+ <li>
2526
+ <span class="type">(<tt>Boolean</tt>)</span>
2527
+ <span class="name">:b</span>
2528
+ <span class="default">
2529
+
2530
+ </span>
2531
+ &mdash; <div class='inline'><p>
2532
+ the input read file is in the BAM format
2533
+ </p>
2534
+ </div>
2535
+ </tr>
2536
+
2537
+ <li>
2538
+ <span class="type">(<tt>Boolean</tt>)</span>
2539
+ <span class="name">:single</span>
2540
+ <span class="default">
2541
+
2542
+ </span>
2543
+ &mdash; <div class='inline'><p>
2544
+ use single-end reads only (effective with -b)
2545
+ </p>
2546
+ </div>
2547
+ </tr>
2548
+
2549
+ <li>
2550
+ <span class="type">(<tt>Boolean</tt>)</span>
2551
+ <span class="name">:first</span>
2552
+ <span class="default">
2553
+
2554
+ </span>
2555
+ &mdash; <div class='inline'><p>
2556
+ use the 1st read in a pair (effective with -b)
2557
+ </p>
2558
+ </div>
2559
+ </tr>
2560
+
2561
+ <li>
2562
+ <span class="type">(<tt>Boolean</tt>)</span>
2563
+ <span class="name">:second</span>
2564
+ <span class="default">
2565
+
2566
+ </span>
2567
+ &mdash; <div class='inline'><p>
2568
+ use the 2nd read in a pair (effective with -b)
2569
+ </p>
2570
+ </div>
2571
+ </tr>
2572
+
2573
+ <li>
2574
+ <span class="type">(<tt>Integer</tt>)</span>
2575
+ <span class="name">:i</span>
2576
+ <span class="default">
2577
+
2578
+ </span>
2579
+ &mdash; <div class='inline'><p>
2580
+ do not put an indel within INT bp towards the ends [5]
2581
+ </p>
2582
+ </div>
2583
+ </tr>
2584
+
2585
+ <li>
2586
+ <span class="type">(<tt>Integer</tt>)</span>
2587
+ <span class="name">:d</span>
2588
+ <span class="default">
2589
+
2590
+ </span>
2591
+ &mdash; <div class='inline'><p>
2592
+ maximum occurrences for extending a long deletion [10]
2593
+ </p>
2594
+ </div>
2595
+ </tr>
2596
+
2597
+ <li>
2598
+ <span class="type">(<tt>Integer</tt>)</span>
2599
+ <span class="name">:l</span>
2600
+ <span class="default">
2601
+
2602
+ </span>
2603
+ &mdash; <div class='inline'><p>
2604
+ seed length [32]
2605
+ </p>
2606
+ </div>
2607
+ </tr>
2608
+
2609
+ <li>
2610
+ <span class="type">(<tt>Integer</tt>)</span>
2611
+ <span class="name">:k</span>
2612
+ <span class="default">
2613
+
2614
+ </span>
2615
+ &mdash; <div class='inline'><p>
2616
+ maximum differences in the seed [2]
2617
+ </p>
2618
+ </div>
2619
+ </tr>
2620
+
2621
+ <li>
2622
+ <span class="type">(<tt>Integer</tt>)</span>
2623
+ <span class="name">:E</span>
2624
+ <span class="default">
2625
+
2626
+ </span>
2627
+ &mdash; <div class='inline'><p>
2628
+ gap extension penalty [4]
2629
+ </p>
2630
+ </div>
2631
+ </tr>
2632
+
2633
+ </ul>
2634
+
2635
+
2636
+ </div><table class="source_code">
2637
+ <tr>
2638
+ <td>
2639
+ <pre class="lines">
2640
+
2641
+
2642
+ 114
2643
+ 115
2644
+ 116
2645
+ 117
2646
+ 118
2647
+ 119
2648
+ 120
2649
+ 121
2650
+ 122
2651
+ 123
2652
+ 124
2653
+ 125
2654
+ 126</pre>
2655
+ </td>
2656
+ <td>
2657
+ <pre class="code"><span class="info file"># File 'lib/bio/bwa.rb', line 114</span>
2658
+
2659
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id short_read_alignment'>short_read_alignment</span><span class='lparen'>(</span><span class='id params'>params</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
2660
+ <span class='id args'>args</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>aln</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span>
2661
+ <span class='id valid_params'>valid_params</span> <span class='op'>=</span> <span class='qwords_beg'>%w(</span><span class='tstring_content'>n</span><span class='words_sep'> </span><span class='tstring_content'>o</span><span class='words_sep'> </span><span class='tstring_content'>e</span><span class='words_sep'> </span><span class='tstring_content'>i</span><span class='words_sep'> </span><span class='tstring_content'>d</span><span class='words_sep'> </span><span class='tstring_content'>l</span><span class='words_sep'> </span><span class='tstring_content'>k</span><span class='words_sep'> </span><span class='tstring_content'>c</span><span class='words_sep'> </span><span class='tstring_content'>L</span><span class='words_sep'> </span><span class='tstring_content'>R</span><span class='words_sep'> </span><span class='tstring_content'>m</span><span class='words_sep'> </span><span class='tstring_content'>t</span><span class='words_sep'> </span><span class='tstring_content'>N</span><span class='words_sep'> </span><span class='tstring_content'>M</span><span class='words_sep'> </span><span class='tstring_content'>O</span><span class='words_sep'> </span><span class='tstring_content'>E</span><span class='words_sep'> </span><span class='tstring_content'>q</span><span class='words_sep'> </span><span class='tstring_content'>f</span><span class='words_sep'> </span><span class='tstring_content'>b</span><span class='words_sep'> </span><span class='tstring_content'>single</span><span class='words_sep'> </span><span class='tstring_content'>first</span><span class='words_sep'> </span><span class='tstring_content'>second</span><span class='words_sep'> </span><span class='tstring_content'>I</span><span class='words_sep'> </span><span class='tstring_content'>B</span><span class='words_sep'> </span><span class='tstring_content'>prefix</span><span class='words_sep'> </span><span class='tstring_content'>file_in</span><span class='words_sep'>)</span>
2662
+ <span class='id mandatory_params'>mandatory_params</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='symbol'>:prefix</span><span class='comma'>,</span><span class='symbol'>:file_in</span><span class='comma'>,</span><span class='symbol'>:file_out</span><span class='rbracket'>]</span>
2663
+ <span class='id last_params'>last_params</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='symbol'>:prefix</span><span class='comma'>,</span><span class='symbol'>:file_in</span><span class='rbracket'>]</span>
2664
+ <span class='id check_mandatory'>check_mandatory</span><span class='lparen'>(</span><span class='id mandatory_params'>mandatory_params</span><span class='comma'>,</span> <span class='id params'>params</span><span class='rparen'>)</span>
2665
+ <span class='id params'>params</span> <span class='op'>=</span> <span class='id change_arg_name'>change_arg_name</span><span class='lparen'>(</span><span class='id params'>params</span><span class='comma'>,</span><span class='symbol'>:file_out</span><span class='comma'>,</span><span class='symbol'>:f</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id params'>params</span><span class='lbracket'>[</span><span class='symbol'>:file_out</span><span class='rbracket'>]</span>
2666
+ <span class='id params'>params</span> <span class='op'>=</span> <span class='id change_arg_name'>change_arg_name</span><span class='lparen'>(</span><span class='id params'>params</span><span class='comma'>,</span><span class='symbol'>:single</span><span class='comma'>,</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>0</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id params'>params</span><span class='lbracket'>[</span><span class='symbol'>:single</span><span class='rbracket'>]</span>
2667
+ <span class='id params'>params</span> <span class='op'>=</span> <span class='id change_arg_name'>change_arg_name</span><span class='lparen'>(</span><span class='id params'>params</span><span class='comma'>,</span><span class='symbol'>:first</span><span class='comma'>,</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>1</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id params'>params</span><span class='lbracket'>[</span><span class='symbol'>:first</span><span class='rbracket'>]</span>
2668
+ <span class='id params'>params</span> <span class='op'>=</span> <span class='id change_arg_name'>change_arg_name</span><span class='lparen'>(</span><span class='id params'>params</span><span class='comma'>,</span><span class='symbol'>:second</span><span class='comma'>,</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>2</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id params'>params</span><span class='lbracket'>[</span><span class='symbol'>:second</span><span class='rbracket'>]</span>
2669
+ <span class='id args'>args</span> <span class='op'>=</span> <span class='id build_parameters'>build_parameters</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>aln</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span><span class='id valid_params'>valid_params</span><span class='comma'>,</span><span class='id params'>params</span><span class='comma'>,</span><span class='id last_params'>last_params</span><span class='rparen'>)</span>
2670
+ <span class='id call_BWA_function'>call_BWA_function</span><span class='lparen'>(</span><span class='id args'>args</span><span class='rparen'>)</span>
2671
+ <span class='kw'>end</span></pre>
2672
+ </td>
2673
+ </tr>
2674
+ </table>
2675
+ </div>
2676
+
2677
+ <div class="method_details ">
2678
+ <p class="signature " id="simple_SW-class_method">
2679
+
2680
+ + (<tt>Object</tt>) <strong>simple_SW</strong>(params = {})
2681
+
2682
+
2683
+
2684
+ </p><div class="docstring">
2685
+ <div class="discussion">
2686
+
2687
+ <div class="note notetag">
2688
+ <strong>Note:</strong>
2689
+ <div class='inline'><p>
2690
+ Boolean values must be set to &#8216;true&#8217;
2691
+ </p>
2692
+ </div>
2693
+ </div>
2694
+
2695
+ <p>
2696
+ Run the alignment between multiple short sequences and ONE long sequence
2697
+ </p>
2698
+
2699
+
2700
+ </div>
2701
+ </div>
2702
+ <div class="tags">
2703
+ <h3>Parameters:</h3>
2704
+ <ul class="param">
2705
+
2706
+ <li>
2707
+
2708
+ <span class='type'>(<tt>Hash</tt>)</span>
2709
+
2710
+
2711
+ <span class='name'>params</span>
2712
+
2713
+
2714
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
2715
+
2716
+
2717
+ &mdash;
2718
+ <div class='inline'><p>
2719
+ Options
2720
+ </p>
2721
+ </div>
2722
+
2723
+ </li>
2724
+
2725
+ </ul>
2726
+
2727
+
2728
+
2729
+
2730
+ <h3>Options Hash (<tt>params</tt>):</h3>
2731
+ <ul class="option">
2732
+
2733
+ <li>
2734
+ <span class="type">(<tt>String</tt>)</span>
2735
+ <span class="name">:short_seq</span>
2736
+ <span class="default">
2737
+
2738
+ </span>
2739
+ &mdash; <div class='inline'><p>
2740
+ the short query sequence (REQUIRED)
2741
+ </p>
2742
+ </div>
2743
+ </tr>
2744
+
2745
+ <li>
2746
+ <span class="type">(<tt>String</tt>)</span>
2747
+ <span class="name">:long_seq</span>
2748
+ <span class="default">
2749
+
2750
+ </span>
2751
+ &mdash; <div class='inline'><p>
2752
+ the long database sequence (REQUIRED)
2753
+ </p>
2754
+ </div>
2755
+ </tr>
2756
+
2757
+ <li>
2758
+ <span class="type">(<tt>String</tt>)</span>
2759
+ <span class="name">:file_out</span>
2760
+ <span class="default">
2761
+
2762
+ </span>
2763
+ &mdash; <div class='inline'><p>
2764
+ the alignment output
2765
+ </p>
2766
+ </div>
2767
+ </tr>
2768
+
2769
+ <li>
2770
+ <span class="type">(<tt>Integer</tt>)</span>
2771
+ <span class="name">:T</span>
2772
+ <span class="default">
2773
+
2774
+ </span>
2775
+ &mdash; <div class='inline'><p>
2776
+ minimum score [1]
2777
+ </p>
2778
+ </div>
2779
+ </tr>
2780
+
2781
+ <li>
2782
+ <span class="type">(<tt>Boolean</tt>)</span>
2783
+ <span class="name">:p</span>
2784
+ <span class="default">
2785
+
2786
+ </span>
2787
+ &mdash; <div class='inline'><p>
2788
+ protein alignment (suppressing :r)
2789
+ </p>
2790
+ </div>
2791
+ </tr>
2792
+
2793
+ <li>
2794
+ <span class="type">(<tt>Boolean</tt>)</span>
2795
+ <span class="name">:f</span>
2796
+ <span class="default">
2797
+
2798
+ </span>
2799
+ &mdash; <div class='inline'><p>
2800
+ forward strand only
2801
+ </p>
2802
+ </div>
2803
+ </tr>
2804
+
2805
+ <li>
2806
+ <span class="type">(<tt>Boolean</tt>)</span>
2807
+ <span class="name">:r</span>
2808
+ <span class="default">
2809
+
2810
+ </span>
2811
+ &mdash; <div class='inline'><p>
2812
+ reverse strand only
2813
+ </p>
2814
+ </div>
2815
+ </tr>
2816
+
2817
+ <li>
2818
+ <span class="type">(<tt>Boolean</tt>)</span>
2819
+ <span class="name">:g</span>
2820
+ <span class="default">
2821
+
2822
+ </span>
2823
+ &mdash; <div class='inline'><p>
2824
+ global alignment
2825
+ </p>
2826
+ </div>
2827
+ </tr>
2828
+
2829
+ </ul>
2830
+
2831
+
2832
+ </div><table class="source_code">
2833
+ <tr>
2834
+ <td>
2835
+ <pre class="lines">
2836
+
2837
+
2838
+ 224
2839
+ 225
2840
+ 226
2841
+ 227
2842
+ 228
2843
+ 229
2844
+ 230
2845
+ 231
2846
+ 232
2847
+ 233
2848
+ 234
2849
+ 235
2850
+ 236</pre>
2851
+ </td>
2852
+ <td>
2853
+ <pre class="code"><span class="info file"># File 'lib/bio/bwa.rb', line 224</span>
2854
+
2855
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id simple_SW'>simple_SW</span><span class='lparen'>(</span><span class='id params'>params</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
2856
+ <span class='id args'>args</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>stdsw</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span>
2857
+ <span class='id valid_params'>valid_params</span> <span class='op'>=</span> <span class='qwords_beg'>%w(</span><span class='tstring_content'>g</span><span class='words_sep'> </span><span class='tstring_content'>T</span><span class='words_sep'> </span><span class='tstring_content'>f</span><span class='words_sep'> </span><span class='tstring_content'>r</span><span class='words_sep'> </span><span class='tstring_content'>p</span><span class='words_sep'> </span><span class='tstring_content'>file_out</span><span class='words_sep'> </span><span class='tstring_content'>long_seq</span><span class='words_sep'> </span><span class='tstring_content'>short_seq</span><span class='words_sep'>)</span>
2858
+ <span class='id mandatory_params'>mandatory_params</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='symbol'>:long_seq</span><span class='comma'>,</span><span class='symbol'>:short_seq</span><span class='rbracket'>]</span>
2859
+ <span class='id last_params'>last_params</span> <span class='op'>=</span> <span class='id mandatory_params'>mandatory_params</span>
2860
+ <span class='id check_mandatory'>check_mandatory</span><span class='lparen'>(</span><span class='id mandatory_params'>mandatory_params</span><span class='comma'>,</span> <span class='id params'>params</span><span class='rparen'>)</span>
2861
+ <span class='id file_out'>file_out</span> <span class='op'>=</span> <span class='id params'>params</span><span class='lbracket'>[</span><span class='symbol'>:file_out</span><span class='rbracket'>]</span>
2862
+ <span class='id params'>params</span><span class='period'>.</span><span class='id delete'>delete</span><span class='lparen'>(</span><span class='symbol'>:file_out</span><span class='rparen'>)</span>
2863
+ <span class='id args'>args</span> <span class='op'>=</span> <span class='id build_parameters'>build_parameters</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>stdsw</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span><span class='id valid_params'>valid_params</span><span class='comma'>,</span><span class='id params'>params</span><span class='comma'>,</span><span class='id last_params'>last_params</span><span class='rparen'>)</span>
2864
+ <span class='gvar'>$stdout</span><span class='period'>.</span><span class='id reopen'>reopen</span><span class='lparen'>(</span><span class='id file_out'>file_out</span><span class='comma'>,</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>w</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id file_out'>file_out</span>
2865
+ <span class='id call_BWA_function'>call_BWA_function</span><span class='lparen'>(</span><span class='id args'>args</span><span class='rparen'>)</span>
2866
+ <span class='gvar'>$stdout</span><span class='period'>.</span><span class='id reopen'>reopen</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>/dev/tty</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>w</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id file_out'>file_out</span>
2867
+ <span class='kw'>end</span></pre>
2868
+ </td>
2869
+ </tr>
2870
+ </table>
2871
+ </div>
2872
+
2873
+ </div>
2874
+
2875
+ </div>
2876
+
2877
+ <div id="footer">
2878
+ Generated on Thu Feb 10 16:31:17 2011 by
2879
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
2880
+ 0.6.4 (ruby-1.9.2).
2881
+ </div>
2882
+
2883
+ </body>
2884
+ </html>