ngs_server 0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (284) hide show
  1. data/.gitignore +4 -0
  2. data/Gemfile +4 -0
  3. data/Rakefile +2 -0
  4. data/bin/ngs_server +58 -0
  5. data/data/holder.txt +0 -0
  6. data/ext/bamtools/CMakeLists.txt +49 -0
  7. data/ext/bamtools/LICENSE +22 -0
  8. data/ext/bamtools/README +60 -0
  9. data/ext/bamtools/Tutorial_Toolkit_BamTools-1.0.pdf +0 -0
  10. data/ext/bamtools/docs/Doxyfile +1601 -0
  11. data/ext/bamtools/extconf.rb +9 -0
  12. data/ext/bamtools/src/CMakeFiles/CMakeDirectoryInformation.cmake +22 -0
  13. data/ext/bamtools/src/CMakeFiles/SharedHeaders.dir/DependInfo.cmake +13 -0
  14. data/ext/bamtools/src/CMakeFiles/SharedHeaders.dir/build.make +65 -0
  15. data/ext/bamtools/src/CMakeFiles/SharedHeaders.dir/cmake_clean.cmake +8 -0
  16. data/ext/bamtools/src/CMakeFiles/SharedHeaders.dir/depend.internal +3 -0
  17. data/ext/bamtools/src/CMakeFiles/SharedHeaders.dir/depend.make +3 -0
  18. data/ext/bamtools/src/CMakeFiles/SharedHeaders.dir/progress.make +2 -0
  19. data/ext/bamtools/src/CMakeFiles/progress.marks +1 -0
  20. data/ext/bamtools/src/CMakeLists.txt +18 -0
  21. data/ext/bamtools/src/ExportHeader.cmake +31 -0
  22. data/ext/bamtools/src/Makefile +182 -0
  23. data/ext/bamtools/src/api/BamAlignment.cpp +2432 -0
  24. data/ext/bamtools/src/api/BamAlignment.h +206 -0
  25. data/ext/bamtools/src/api/BamAux.h +456 -0
  26. data/ext/bamtools/src/api/BamConstants.h +127 -0
  27. data/ext/bamtools/src/api/BamIndex.h +79 -0
  28. data/ext/bamtools/src/api/BamMultiReader.cpp +395 -0
  29. data/ext/bamtools/src/api/BamMultiReader.h +126 -0
  30. data/ext/bamtools/src/api/BamReader.cpp +369 -0
  31. data/ext/bamtools/src/api/BamReader.h +117 -0
  32. data/ext/bamtools/src/api/BamWriter.cpp +142 -0
  33. data/ext/bamtools/src/api/BamWriter.h +63 -0
  34. data/ext/bamtools/src/api/CMakeFiles/APIHeaders.dir/DependInfo.cmake +14 -0
  35. data/ext/bamtools/src/api/CMakeFiles/APIHeaders.dir/build.make +80 -0
  36. data/ext/bamtools/src/api/CMakeFiles/APIHeaders.dir/cmake_clean.cmake +8 -0
  37. data/ext/bamtools/src/api/CMakeFiles/APIHeaders.dir/depend.internal +3 -0
  38. data/ext/bamtools/src/api/CMakeFiles/APIHeaders.dir/depend.make +3 -0
  39. data/ext/bamtools/src/api/CMakeFiles/APIHeaders.dir/progress.make +2 -0
  40. data/ext/bamtools/src/api/CMakeFiles/BamTools-static.dir/BamAlignment.cpp.o +0 -0
  41. data/ext/bamtools/src/api/CMakeFiles/BamTools-static.dir/BamMultiReader.cpp.o +0 -0
  42. data/ext/bamtools/src/api/CMakeFiles/BamTools-static.dir/BamReader.cpp.o +0 -0
  43. data/ext/bamtools/src/api/CMakeFiles/BamTools-static.dir/BamWriter.cpp.o +0 -0
  44. data/ext/bamtools/src/api/CMakeFiles/BamTools-static.dir/CXX.includecache +596 -0
  45. data/ext/bamtools/src/api/CMakeFiles/BamTools-static.dir/DependInfo.cmake +41 -0
  46. data/ext/bamtools/src/api/CMakeFiles/BamTools-static.dir/SamHeader.cpp.o +0 -0
  47. data/ext/bamtools/src/api/CMakeFiles/BamTools-static.dir/SamProgram.cpp.o +0 -0
  48. data/ext/bamtools/src/api/CMakeFiles/BamTools-static.dir/SamProgramChain.cpp.o +0 -0
  49. data/ext/bamtools/src/api/CMakeFiles/BamTools-static.dir/SamReadGroup.cpp.o +0 -0
  50. data/ext/bamtools/src/api/CMakeFiles/BamTools-static.dir/SamReadGroupDictionary.cpp.o +0 -0
  51. data/ext/bamtools/src/api/CMakeFiles/BamTools-static.dir/SamSequence.cpp.o +0 -0
  52. data/ext/bamtools/src/api/CMakeFiles/BamTools-static.dir/SamSequenceDictionary.cpp.o +0 -0
  53. data/ext/bamtools/src/api/CMakeFiles/BamTools-static.dir/build.make +675 -0
  54. data/ext/bamtools/src/api/CMakeFiles/BamTools-static.dir/cmake_clean.cmake +32 -0
  55. data/ext/bamtools/src/api/CMakeFiles/BamTools-static.dir/cmake_clean_target.cmake +3 -0
  56. data/ext/bamtools/src/api/CMakeFiles/BamTools-static.dir/depend.internal +295 -0
  57. data/ext/bamtools/src/api/CMakeFiles/BamTools-static.dir/depend.make +295 -0
  58. data/ext/bamtools/src/api/CMakeFiles/BamTools-static.dir/flags.make +8 -0
  59. data/ext/bamtools/src/api/CMakeFiles/BamTools-static.dir/internal/BamHeader_p.cpp.o +0 -0
  60. data/ext/bamtools/src/api/CMakeFiles/BamTools-static.dir/internal/BamIndexFactory_p.cpp.o +0 -0
  61. data/ext/bamtools/src/api/CMakeFiles/BamTools-static.dir/internal/BamMultiReader_p.cpp.o +0 -0
  62. data/ext/bamtools/src/api/CMakeFiles/BamTools-static.dir/internal/BamRandomAccessController_p.cpp.o +0 -0
  63. data/ext/bamtools/src/api/CMakeFiles/BamTools-static.dir/internal/BamReader_p.cpp.o +0 -0
  64. data/ext/bamtools/src/api/CMakeFiles/BamTools-static.dir/internal/BamStandardIndex_p.cpp.o +0 -0
  65. data/ext/bamtools/src/api/CMakeFiles/BamTools-static.dir/internal/BamToolsIndex_p.cpp.o +0 -0
  66. data/ext/bamtools/src/api/CMakeFiles/BamTools-static.dir/internal/BamWriter_p.cpp.o +0 -0
  67. data/ext/bamtools/src/api/CMakeFiles/BamTools-static.dir/internal/BgzfStream_p.cpp.o +0 -0
  68. data/ext/bamtools/src/api/CMakeFiles/BamTools-static.dir/internal/SamFormatParser_p.cpp.o +0 -0
  69. data/ext/bamtools/src/api/CMakeFiles/BamTools-static.dir/internal/SamFormatPrinter_p.cpp.o +0 -0
  70. data/ext/bamtools/src/api/CMakeFiles/BamTools-static.dir/internal/SamHeaderValidator_p.cpp.o +0 -0
  71. data/ext/bamtools/src/api/CMakeFiles/BamTools-static.dir/link.txt +2 -0
  72. data/ext/bamtools/src/api/CMakeFiles/BamTools-static.dir/progress.make +24 -0
  73. data/ext/bamtools/src/api/CMakeFiles/BamTools.dir/BamAlignment.cpp.o +0 -0
  74. data/ext/bamtools/src/api/CMakeFiles/BamTools.dir/BamMultiReader.cpp.o +0 -0
  75. data/ext/bamtools/src/api/CMakeFiles/BamTools.dir/BamReader.cpp.o +0 -0
  76. data/ext/bamtools/src/api/CMakeFiles/BamTools.dir/BamWriter.cpp.o +0 -0
  77. data/ext/bamtools/src/api/CMakeFiles/BamTools.dir/CXX.includecache +596 -0
  78. data/ext/bamtools/src/api/CMakeFiles/BamTools.dir/DependInfo.cmake +47 -0
  79. data/ext/bamtools/src/api/CMakeFiles/BamTools.dir/SamHeader.cpp.o +0 -0
  80. data/ext/bamtools/src/api/CMakeFiles/BamTools.dir/SamProgram.cpp.o +0 -0
  81. data/ext/bamtools/src/api/CMakeFiles/BamTools.dir/SamProgramChain.cpp.o +0 -0
  82. data/ext/bamtools/src/api/CMakeFiles/BamTools.dir/SamReadGroup.cpp.o +0 -0
  83. data/ext/bamtools/src/api/CMakeFiles/BamTools.dir/SamReadGroupDictionary.cpp.o +0 -0
  84. data/ext/bamtools/src/api/CMakeFiles/BamTools.dir/SamSequence.cpp.o +0 -0
  85. data/ext/bamtools/src/api/CMakeFiles/BamTools.dir/SamSequenceDictionary.cpp.o +0 -0
  86. data/ext/bamtools/src/api/CMakeFiles/BamTools.dir/build.make +677 -0
  87. data/ext/bamtools/src/api/CMakeFiles/BamTools.dir/cmake_clean.cmake +33 -0
  88. data/ext/bamtools/src/api/CMakeFiles/BamTools.dir/depend.internal +295 -0
  89. data/ext/bamtools/src/api/CMakeFiles/BamTools.dir/depend.make +295 -0
  90. data/ext/bamtools/src/api/CMakeFiles/BamTools.dir/flags.make +8 -0
  91. data/ext/bamtools/src/api/CMakeFiles/BamTools.dir/internal/BamHeader_p.cpp.o +0 -0
  92. data/ext/bamtools/src/api/CMakeFiles/BamTools.dir/internal/BamIndexFactory_p.cpp.o +0 -0
  93. data/ext/bamtools/src/api/CMakeFiles/BamTools.dir/internal/BamMultiReader_p.cpp.o +0 -0
  94. data/ext/bamtools/src/api/CMakeFiles/BamTools.dir/internal/BamRandomAccessController_p.cpp.o +0 -0
  95. data/ext/bamtools/src/api/CMakeFiles/BamTools.dir/internal/BamReader_p.cpp.o +0 -0
  96. data/ext/bamtools/src/api/CMakeFiles/BamTools.dir/internal/BamStandardIndex_p.cpp.o +0 -0
  97. data/ext/bamtools/src/api/CMakeFiles/BamTools.dir/internal/BamToolsIndex_p.cpp.o +0 -0
  98. data/ext/bamtools/src/api/CMakeFiles/BamTools.dir/internal/BamWriter_p.cpp.o +0 -0
  99. data/ext/bamtools/src/api/CMakeFiles/BamTools.dir/internal/BgzfStream_p.cpp.o +0 -0
  100. data/ext/bamtools/src/api/CMakeFiles/BamTools.dir/internal/SamFormatParser_p.cpp.o +0 -0
  101. data/ext/bamtools/src/api/CMakeFiles/BamTools.dir/internal/SamFormatPrinter_p.cpp.o +0 -0
  102. data/ext/bamtools/src/api/CMakeFiles/BamTools.dir/internal/SamHeaderValidator_p.cpp.o +0 -0
  103. data/ext/bamtools/src/api/CMakeFiles/BamTools.dir/link.txt +1 -0
  104. data/ext/bamtools/src/api/CMakeFiles/BamTools.dir/progress.make +24 -0
  105. data/ext/bamtools/src/api/CMakeFiles/CMakeDirectoryInformation.cmake +22 -0
  106. data/ext/bamtools/src/api/CMakeFiles/progress.marks +1 -0
  107. data/ext/bamtools/src/api/CMakeLists.txt +78 -0
  108. data/ext/bamtools/src/api/Makefile +902 -0
  109. data/ext/bamtools/src/api/SamConstants.h +95 -0
  110. data/ext/bamtools/src/api/SamHeader.cpp +184 -0
  111. data/ext/bamtools/src/api/SamHeader.h +68 -0
  112. data/ext/bamtools/src/api/SamProgram.cpp +139 -0
  113. data/ext/bamtools/src/api/SamProgram.h +61 -0
  114. data/ext/bamtools/src/api/SamProgramChain.cpp +351 -0
  115. data/ext/bamtools/src/api/SamProgramChain.h +85 -0
  116. data/ext/bamtools/src/api/SamReadGroup.cpp +221 -0
  117. data/ext/bamtools/src/api/SamReadGroup.h +68 -0
  118. data/ext/bamtools/src/api/SamReadGroupDictionary.cpp +289 -0
  119. data/ext/bamtools/src/api/SamReadGroupDictionary.h +86 -0
  120. data/ext/bamtools/src/api/SamSequence.cpp +161 -0
  121. data/ext/bamtools/src/api/SamSequence.h +60 -0
  122. data/ext/bamtools/src/api/SamSequenceDictionary.cpp +292 -0
  123. data/ext/bamtools/src/api/SamSequenceDictionary.h +88 -0
  124. data/ext/bamtools/src/api/api_global.h +21 -0
  125. data/ext/bamtools/src/api/cmake_install.cmake +122 -0
  126. data/ext/bamtools/src/api/internal/BamHeader_p.cpp +132 -0
  127. data/ext/bamtools/src/api/internal/BamHeader_p.h +71 -0
  128. data/ext/bamtools/src/api/internal/BamIndexFactory_p.cpp +112 -0
  129. data/ext/bamtools/src/api/internal/BamIndexFactory_p.h +49 -0
  130. data/ext/bamtools/src/api/internal/BamMultiMerger_p.h +297 -0
  131. data/ext/bamtools/src/api/internal/BamMultiReader_p.cpp +805 -0
  132. data/ext/bamtools/src/api/internal/BamMultiReader_p.h +103 -0
  133. data/ext/bamtools/src/api/internal/BamRandomAccessController_p.cpp +272 -0
  134. data/ext/bamtools/src/api/internal/BamRandomAccessController_p.h +93 -0
  135. data/ext/bamtools/src/api/internal/BamReader_p.cpp +380 -0
  136. data/ext/bamtools/src/api/internal/BamReader_p.h +112 -0
  137. data/ext/bamtools/src/api/internal/BamStandardIndex_p.cpp +986 -0
  138. data/ext/bamtools/src/api/internal/BamStandardIndex_p.h +236 -0
  139. data/ext/bamtools/src/api/internal/BamToolsIndex_p.cpp +641 -0
  140. data/ext/bamtools/src/api/internal/BamToolsIndex_p.h +187 -0
  141. data/ext/bamtools/src/api/internal/BamWriter_p.cpp +424 -0
  142. data/ext/bamtools/src/api/internal/BamWriter_p.h +66 -0
  143. data/ext/bamtools/src/api/internal/BgzfStream_p.cpp +438 -0
  144. data/ext/bamtools/src/api/internal/BgzfStream_p.h +108 -0
  145. data/ext/bamtools/src/api/internal/SamFormatParser_p.cpp +230 -0
  146. data/ext/bamtools/src/api/internal/SamFormatParser_p.h +61 -0
  147. data/ext/bamtools/src/api/internal/SamFormatPrinter_p.cpp +210 -0
  148. data/ext/bamtools/src/api/internal/SamFormatPrinter_p.h +60 -0
  149. data/ext/bamtools/src/api/internal/SamHeaderValidator_p.cpp +510 -0
  150. data/ext/bamtools/src/api/internal/SamHeaderValidator_p.h +101 -0
  151. data/ext/bamtools/src/api/internal/SamHeaderVersion_p.h +134 -0
  152. data/ext/bamtools/src/cmake_install.cmake +42 -0
  153. data/ext/bamtools/src/shared/bamtools_global.h +78 -0
  154. data/ext/bamtools/src/third_party/CMakeFiles/CMakeDirectoryInformation.cmake +22 -0
  155. data/ext/bamtools/src/third_party/CMakeFiles/progress.marks +1 -0
  156. data/ext/bamtools/src/third_party/CMakeLists.txt +10 -0
  157. data/ext/bamtools/src/third_party/Makefile +167 -0
  158. data/ext/bamtools/src/third_party/cmake_install.cmake +35 -0
  159. data/ext/bamtools/src/third_party/jsoncpp/CMakeFiles/CMakeDirectoryInformation.cmake +22 -0
  160. data/ext/bamtools/src/third_party/jsoncpp/CMakeFiles/jsoncpp.dir/CXX.includecache +144 -0
  161. data/ext/bamtools/src/third_party/jsoncpp/CMakeFiles/jsoncpp.dir/DependInfo.cmake +27 -0
  162. data/ext/bamtools/src/third_party/jsoncpp/CMakeFiles/jsoncpp.dir/build.make +157 -0
  163. data/ext/bamtools/src/third_party/jsoncpp/CMakeFiles/jsoncpp.dir/cmake_clean.cmake +13 -0
  164. data/ext/bamtools/src/third_party/jsoncpp/CMakeFiles/jsoncpp.dir/depend.internal +31 -0
  165. data/ext/bamtools/src/third_party/jsoncpp/CMakeFiles/jsoncpp.dir/depend.make +31 -0
  166. data/ext/bamtools/src/third_party/jsoncpp/CMakeFiles/jsoncpp.dir/flags.make +8 -0
  167. data/ext/bamtools/src/third_party/jsoncpp/CMakeFiles/jsoncpp.dir/json_reader.cpp.o +0 -0
  168. data/ext/bamtools/src/third_party/jsoncpp/CMakeFiles/jsoncpp.dir/json_value.cpp.o +0 -0
  169. data/ext/bamtools/src/third_party/jsoncpp/CMakeFiles/jsoncpp.dir/json_writer.cpp.o +0 -0
  170. data/ext/bamtools/src/third_party/jsoncpp/CMakeFiles/jsoncpp.dir/link.txt +1 -0
  171. data/ext/bamtools/src/third_party/jsoncpp/CMakeFiles/jsoncpp.dir/progress.make +4 -0
  172. data/ext/bamtools/src/third_party/jsoncpp/CMakeFiles/progress.marks +1 -0
  173. data/ext/bamtools/src/third_party/jsoncpp/CMakeLists.txt +23 -0
  174. data/ext/bamtools/src/third_party/jsoncpp/LICENSE +55 -0
  175. data/ext/bamtools/src/third_party/jsoncpp/Makefile +263 -0
  176. data/ext/bamtools/src/third_party/jsoncpp/cmake_install.cmake +29 -0
  177. data/ext/bamtools/src/third_party/jsoncpp/json.h +15 -0
  178. data/ext/bamtools/src/third_party/jsoncpp/json_batchallocator.h +130 -0
  179. data/ext/bamtools/src/third_party/jsoncpp/json_config.h +42 -0
  180. data/ext/bamtools/src/third_party/jsoncpp/json_features.h +47 -0
  181. data/ext/bamtools/src/third_party/jsoncpp/json_forwards.h +42 -0
  182. data/ext/bamtools/src/third_party/jsoncpp/json_internalarray.inl +453 -0
  183. data/ext/bamtools/src/third_party/jsoncpp/json_internalmap.inl +612 -0
  184. data/ext/bamtools/src/third_party/jsoncpp/json_reader.cpp +870 -0
  185. data/ext/bamtools/src/third_party/jsoncpp/json_reader.h +201 -0
  186. data/ext/bamtools/src/third_party/jsoncpp/json_tool.h +93 -0
  187. data/ext/bamtools/src/third_party/jsoncpp/json_value.cpp +1701 -0
  188. data/ext/bamtools/src/third_party/jsoncpp/json_value.h +1059 -0
  189. data/ext/bamtools/src/third_party/jsoncpp/json_valueiterator.inl +297 -0
  190. data/ext/bamtools/src/third_party/jsoncpp/json_writer.cpp +819 -0
  191. data/ext/bamtools/src/third_party/jsoncpp/json_writer.h +179 -0
  192. data/ext/bamtools/src/toolkit/CMakeFiles/CMakeDirectoryInformation.cmake +25 -0
  193. data/ext/bamtools/src/toolkit/CMakeFiles/bamtools_cmd.dir/CXX.includecache +698 -0
  194. data/ext/bamtools/src/toolkit/CMakeFiles/bamtools_cmd.dir/DependInfo.cmake +34 -0
  195. data/ext/bamtools/src/toolkit/CMakeFiles/bamtools_cmd.dir/bamtools.cpp.o +0 -0
  196. data/ext/bamtools/src/toolkit/CMakeFiles/bamtools_cmd.dir/bamtools_convert.cpp.o +0 -0
  197. data/ext/bamtools/src/toolkit/CMakeFiles/bamtools_cmd.dir/bamtools_count.cpp.o +0 -0
  198. data/ext/bamtools/src/toolkit/CMakeFiles/bamtools_cmd.dir/bamtools_coverage.cpp.o +0 -0
  199. data/ext/bamtools/src/toolkit/CMakeFiles/bamtools_cmd.dir/bamtools_filter.cpp.o +0 -0
  200. data/ext/bamtools/src/toolkit/CMakeFiles/bamtools_cmd.dir/bamtools_header.cpp.o +0 -0
  201. data/ext/bamtools/src/toolkit/CMakeFiles/bamtools_cmd.dir/bamtools_index.cpp.o +0 -0
  202. data/ext/bamtools/src/toolkit/CMakeFiles/bamtools_cmd.dir/bamtools_merge.cpp.o +0 -0
  203. data/ext/bamtools/src/toolkit/CMakeFiles/bamtools_cmd.dir/bamtools_random.cpp.o +0 -0
  204. data/ext/bamtools/src/toolkit/CMakeFiles/bamtools_cmd.dir/bamtools_resolve.cpp.o +0 -0
  205. data/ext/bamtools/src/toolkit/CMakeFiles/bamtools_cmd.dir/bamtools_revert.cpp.o +0 -0
  206. data/ext/bamtools/src/toolkit/CMakeFiles/bamtools_cmd.dir/bamtools_sort.cpp.o +0 -0
  207. data/ext/bamtools/src/toolkit/CMakeFiles/bamtools_cmd.dir/bamtools_split.cpp.o +0 -0
  208. data/ext/bamtools/src/toolkit/CMakeFiles/bamtools_cmd.dir/bamtools_stats.cpp.o +0 -0
  209. data/ext/bamtools/src/toolkit/CMakeFiles/bamtools_cmd.dir/build.make +447 -0
  210. data/ext/bamtools/src/toolkit/CMakeFiles/bamtools_cmd.dir/cmake_clean.cmake +24 -0
  211. data/ext/bamtools/src/toolkit/CMakeFiles/bamtools_cmd.dir/depend.internal +319 -0
  212. data/ext/bamtools/src/toolkit/CMakeFiles/bamtools_cmd.dir/depend.make +319 -0
  213. data/ext/bamtools/src/toolkit/CMakeFiles/bamtools_cmd.dir/flags.make +8 -0
  214. data/ext/bamtools/src/toolkit/CMakeFiles/bamtools_cmd.dir/link.txt +1 -0
  215. data/ext/bamtools/src/toolkit/CMakeFiles/bamtools_cmd.dir/progress.make +15 -0
  216. data/ext/bamtools/src/toolkit/CMakeFiles/progress.marks +1 -0
  217. data/ext/bamtools/src/toolkit/CMakeLists.txt +44 -0
  218. data/ext/bamtools/src/toolkit/Makefile +560 -0
  219. data/ext/bamtools/src/toolkit/bamtools.cpp +163 -0
  220. data/ext/bamtools/src/toolkit/bamtools_convert.cpp +888 -0
  221. data/ext/bamtools/src/toolkit/bamtools_convert.h +37 -0
  222. data/ext/bamtools/src/toolkit/bamtools_count.cpp +187 -0
  223. data/ext/bamtools/src/toolkit/bamtools_count.h +37 -0
  224. data/ext/bamtools/src/toolkit/bamtools_coverage.cpp +196 -0
  225. data/ext/bamtools/src/toolkit/bamtools_coverage.h +37 -0
  226. data/ext/bamtools/src/toolkit/bamtools_filter.cpp +911 -0
  227. data/ext/bamtools/src/toolkit/bamtools_filter.h +37 -0
  228. data/ext/bamtools/src/toolkit/bamtools_header.cpp +122 -0
  229. data/ext/bamtools/src/toolkit/bamtools_header.h +38 -0
  230. data/ext/bamtools/src/toolkit/bamtools_index.cpp +126 -0
  231. data/ext/bamtools/src/toolkit/bamtools_index.h +37 -0
  232. data/ext/bamtools/src/toolkit/bamtools_merge.cpp +221 -0
  233. data/ext/bamtools/src/toolkit/bamtools_merge.h +37 -0
  234. data/ext/bamtools/src/toolkit/bamtools_random.cpp +255 -0
  235. data/ext/bamtools/src/toolkit/bamtools_random.h +37 -0
  236. data/ext/bamtools/src/toolkit/bamtools_resolve.cpp +1396 -0
  237. data/ext/bamtools/src/toolkit/bamtools_resolve.h +42 -0
  238. data/ext/bamtools/src/toolkit/bamtools_revert.cpp +194 -0
  239. data/ext/bamtools/src/toolkit/bamtools_revert.h +37 -0
  240. data/ext/bamtools/src/toolkit/bamtools_sort.cpp +410 -0
  241. data/ext/bamtools/src/toolkit/bamtools_sort.h +37 -0
  242. data/ext/bamtools/src/toolkit/bamtools_split.cpp +551 -0
  243. data/ext/bamtools/src/toolkit/bamtools_split.h +38 -0
  244. data/ext/bamtools/src/toolkit/bamtools_stats.cpp +286 -0
  245. data/ext/bamtools/src/toolkit/bamtools_stats.h +37 -0
  246. data/ext/bamtools/src/toolkit/bamtools_tool.h +35 -0
  247. data/ext/bamtools/src/toolkit/bamtools_version.h +20 -0
  248. data/ext/bamtools/src/toolkit/bamtools_version.h.in +20 -0
  249. data/ext/bamtools/src/toolkit/cmake_install.cmake +52 -0
  250. data/ext/bamtools/src/utils/CMakeFiles/BamTools-utils.dir/CXX.includecache +250 -0
  251. data/ext/bamtools/src/utils/CMakeFiles/BamTools-utils.dir/DependInfo.cmake +29 -0
  252. data/ext/bamtools/src/utils/CMakeFiles/BamTools-utils.dir/bamtools_fasta.cpp.o +0 -0
  253. data/ext/bamtools/src/utils/CMakeFiles/BamTools-utils.dir/bamtools_options.cpp.o +0 -0
  254. data/ext/bamtools/src/utils/CMakeFiles/BamTools-utils.dir/bamtools_pileup_engine.cpp.o +0 -0
  255. data/ext/bamtools/src/utils/CMakeFiles/BamTools-utils.dir/bamtools_utilities.cpp.o +0 -0
  256. data/ext/bamtools/src/utils/CMakeFiles/BamTools-utils.dir/build.make +184 -0
  257. data/ext/bamtools/src/utils/CMakeFiles/BamTools-utils.dir/cmake_clean.cmake +14 -0
  258. data/ext/bamtools/src/utils/CMakeFiles/BamTools-utils.dir/depend.internal +40 -0
  259. data/ext/bamtools/src/utils/CMakeFiles/BamTools-utils.dir/depend.make +40 -0
  260. data/ext/bamtools/src/utils/CMakeFiles/BamTools-utils.dir/flags.make +8 -0
  261. data/ext/bamtools/src/utils/CMakeFiles/BamTools-utils.dir/link.txt +1 -0
  262. data/ext/bamtools/src/utils/CMakeFiles/BamTools-utils.dir/progress.make +5 -0
  263. data/ext/bamtools/src/utils/CMakeFiles/CMakeDirectoryInformation.cmake +23 -0
  264. data/ext/bamtools/src/utils/CMakeFiles/progress.marks +1 -0
  265. data/ext/bamtools/src/utils/CMakeLists.txt +30 -0
  266. data/ext/bamtools/src/utils/Makefile +290 -0
  267. data/ext/bamtools/src/utils/bamtools_fasta.cpp +632 -0
  268. data/ext/bamtools/src/utils/bamtools_fasta.h +47 -0
  269. data/ext/bamtools/src/utils/bamtools_filter_engine.h +552 -0
  270. data/ext/bamtools/src/utils/bamtools_filter_properties.h +195 -0
  271. data/ext/bamtools/src/utils/bamtools_filter_ruleparser.h +319 -0
  272. data/ext/bamtools/src/utils/bamtools_options.cpp +287 -0
  273. data/ext/bamtools/src/utils/bamtools_options.h +213 -0
  274. data/ext/bamtools/src/utils/bamtools_pileup_engine.cpp +327 -0
  275. data/ext/bamtools/src/utils/bamtools_pileup_engine.h +94 -0
  276. data/ext/bamtools/src/utils/bamtools_utilities.cpp +333 -0
  277. data/ext/bamtools/src/utils/bamtools_utilities.h +67 -0
  278. data/ext/bamtools/src/utils/bamtools_variant.h +128 -0
  279. data/ext/bamtools/src/utils/cmake_install.cmake +29 -0
  280. data/ext/bamtools/src/utils/utils_global.h +21 -0
  281. data/lib/ngs_server/version.rb +3 -0
  282. data/lib/ngs_server.rb +3 -0
  283. data/ngs_server.gemspec +23 -0
  284. metadata +339 -0
@@ -0,0 +1,127 @@
1
+ // ***************************************************************************
2
+ // BamConstants.h (c) 2011 Derek Barnett
3
+ // Marth Lab, Department of Biology, Boston College
4
+ // ---------------------------------------------------------------------------
5
+ // Last modified: 19 April 2011 (DB)
6
+ // ---------------------------------------------------------------------------
7
+ // Provides basic constants for handling BAM files.
8
+ // ***************************************************************************
9
+
10
+ #ifndef BAM_CONSTANTS_H
11
+ #define BAM_CONSTANTS_H
12
+
13
+ #include <string>
14
+
15
+ /*! \namespace BamTools::Constants
16
+ \brief Provides basic constants for handling BAM files.
17
+ */
18
+
19
+ namespace BamTools {
20
+ namespace Constants {
21
+
22
+ const int BAM_SIZEOF_INT = 4;
23
+
24
+ // header magic number
25
+ const char* const BAM_HEADER_MAGIC = "BAM\1";
26
+ const unsigned int BAM_HEADER_MAGIC_LENGTH = 4;
27
+
28
+ // BAM alignment core size
29
+ const int BAM_CORE_SIZE = 32;
30
+ const int BAM_CORE_BUFFER_SIZE = 8;
31
+
32
+ // BAM alignment flags
33
+ const int BAM_ALIGNMENT_PAIRED = 0x0001;
34
+ const int BAM_ALIGNMENT_PROPER_PAIR = 0x0002;
35
+ const int BAM_ALIGNMENT_UNMAPPED = 0x0004;
36
+ const int BAM_ALIGNMENT_MATE_UNMAPPED = 0x0008;
37
+ const int BAM_ALIGNMENT_REVERSE_STRAND = 0x0010;
38
+ const int BAM_ALIGNMENT_MATE_REVERSE_STRAND = 0x0020;
39
+ const int BAM_ALIGNMENT_READ_1 = 0x0040;
40
+ const int BAM_ALIGNMENT_READ_2 = 0x0080;
41
+ const int BAM_ALIGNMENT_SECONDARY = 0x0100;
42
+ const int BAM_ALIGNMENT_QC_FAILED = 0x0200;
43
+ const int BAM_ALIGNMENT_DUPLICATE = 0x0400;
44
+
45
+ // CIGAR constants
46
+ const char* const BAM_CIGAR_LOOKUP = "MIDNSHP=X";
47
+ const int BAM_CIGAR_MATCH = 0;
48
+ const int BAM_CIGAR_INS = 1;
49
+ const int BAM_CIGAR_DEL = 2;
50
+ const int BAM_CIGAR_REFSKIP = 3;
51
+ const int BAM_CIGAR_SOFTCLIP = 4;
52
+ const int BAM_CIGAR_HARDCLIP = 5;
53
+ const int BAM_CIGAR_PAD = 6;
54
+ const int BAM_CIGAR_SEQMATCH = 7;
55
+ const int BAM_CIGAR_MISMATCH = 8;
56
+
57
+ const char BAM_CIGAR_MATCH_CHAR = 'M';
58
+ const char BAM_CIGAR_INS_CHAR = 'I';
59
+ const char BAM_CIGAR_DEL_CHAR = 'D';
60
+ const char BAM_CIGAR_REFSKIP_CHAR = 'N';
61
+ const char BAM_CIGAR_SOFTCLIP_CHAR = 'S';
62
+ const char BAM_CIGAR_HARDCLIP_CHAR = 'H';
63
+ const char BAM_CIGAR_PAD_CHAR = 'P';
64
+ const char BAM_CIGAR_SEQMATCH_CHAR = '=';
65
+ const char BAM_CIGAR_MISMATCH_CHAR = 'X';
66
+
67
+ const int BAM_CIGAR_SHIFT = 4;
68
+ const int BAM_CIGAR_MASK = ((1 << BAM_CIGAR_SHIFT) - 1);
69
+
70
+ // BAM tag types
71
+ const char BAM_TAG_TYPE_ASCII = 'A';
72
+ const char BAM_TAG_TYPE_UINT8 = 'c';
73
+ const char BAM_TAG_TYPE_INT8 = 'C';
74
+ const char BAM_TAG_TYPE_UINT16 = 's';
75
+ const char BAM_TAG_TYPE_INT16 = 'S';
76
+ const char BAM_TAG_TYPE_UINT32 = 'i';
77
+ const char BAM_TAG_TYPE_INT32 = 'I';
78
+ const char BAM_TAG_TYPE_FLOAT = 'f';
79
+ const char BAM_TAG_TYPE_STRING = 'Z';
80
+ const char BAM_TAG_TYPE_HEX = 'H';
81
+ const char BAM_TAG_TYPE_ARRAY = 'B';
82
+
83
+ const size_t BAM_TAG_TAGSIZE = 2;
84
+ const size_t BAM_TAG_TYPESIZE = 1;
85
+ const int BAM_TAG_ARRAYBASE_SIZE = 8;
86
+
87
+ // DNA bases
88
+ const char* const BAM_DNA_LOOKUP = "=ACMGRSVTWYHKDBN";
89
+ const unsigned char BAM_BASECODE_EQUAL = 0;
90
+ const unsigned char BAM_BASECODE_A = 1;
91
+ const unsigned char BAM_BASECODE_C = 2;
92
+ const unsigned char BAM_BASECODE_G = 4;
93
+ const unsigned char BAM_BASECODE_T = 8;
94
+ const unsigned char BAM_BASECODE_N = 15;
95
+
96
+ const char BAM_DNA_EQUAL = '=';
97
+ const char BAM_DNA_A = 'A';
98
+ const char BAM_DNA_C = 'C';
99
+ const char BAM_DNA_G = 'G';
100
+ const char BAM_DNA_T = 'T';
101
+ const char BAM_DNA_N = 'N';
102
+ const char BAM_DNA_DEL = '-';
103
+ const char BAM_DNA_PAD = '*';
104
+
105
+ // zlib constants
106
+ const int GZIP_ID1 = 31;
107
+ const int GZIP_ID2 = 139;
108
+ const int CM_DEFLATE = 8;
109
+ const int FLG_FEXTRA = 4;
110
+ const int OS_UNKNOWN = 255;
111
+ const int BGZF_XLEN = 6;
112
+ const int BGZF_ID1 = 66;
113
+ const int BGZF_ID2 = 67;
114
+ const int BGZF_LEN = 2;
115
+ const int GZIP_WINDOW_BITS = -15;
116
+ const int Z_DEFAULT_MEM_LEVEL = 8;
117
+
118
+ // BZGF constants
119
+ const int BGZF_BLOCK_HEADER_LENGTH = 18;
120
+ const int BGZF_BLOCK_FOOTER_LENGTH = 8;
121
+ const int BGZF_MAX_BLOCK_SIZE = 65536;
122
+ const int BGZF_DEFAULT_BLOCK_SIZE = 65536;
123
+
124
+ } // namespace Constants
125
+ } // namespace BamTools
126
+
127
+ #endif // BAM_CONSTANTS_H
@@ -0,0 +1,79 @@
1
+ // ***************************************************************************
2
+ // BamIndex.h (c) 2009 Derek Barnett
3
+ // Marth Lab, Department of Biology, Boston College
4
+ // ---------------------------------------------------------------------------
5
+ // Last modified: 5 April 2011 (DB)
6
+ // ---------------------------------------------------------------------------
7
+ // Provides basic BAM index interface
8
+ // ***************************************************************************
9
+
10
+ #ifndef BAM_INDEX_H
11
+ #define BAM_INDEX_H
12
+
13
+ #include <api/api_global.h>
14
+ #include <api/BamAux.h>
15
+ #include <string>
16
+
17
+ namespace BamTools {
18
+
19
+ namespace Internal {
20
+ class BamReaderPrivate;
21
+ } // namespace Internal
22
+
23
+ /*! \class BamTools::BamIndex
24
+ \brief Provides methods for generating & loading BAM index files.
25
+
26
+ This class straddles the line between public API and internal
27
+ implementation detail. Most client code should never have to use this
28
+ class directly.
29
+
30
+ It is exposed to the public API to allow advanced users to implement
31
+ their own custom indexing schemes.
32
+
33
+ More documentation on methods & enums coming soon.
34
+ */
35
+
36
+ class API_EXPORT BamIndex {
37
+
38
+ // enums
39
+ public:
40
+ // specify index-caching behavior
41
+ enum IndexCacheMode { FullIndexCaching = 0 // store entire index file contents in memory
42
+ , LimitedIndexCaching // store only index data for current reference
43
+ , NoIndexCaching // do not store any index data between jumps
44
+ };
45
+
46
+ // list of supported BamIndex types
47
+ enum IndexType { BAMTOOLS = 0
48
+ , STANDARD
49
+ };
50
+
51
+ // ctor & dtor
52
+ public:
53
+ BamIndex(Internal::BamReaderPrivate* reader) : m_reader(reader) { }
54
+ virtual ~BamIndex(void) { }
55
+
56
+ // index interface
57
+ public:
58
+ // builds index from associated BAM file & writes out to index file
59
+ virtual bool Create(void) =0; // creates index file from BAM file
60
+ // returns whether reference has alignments or no
61
+ virtual bool HasAlignments(const int& referenceID) const =0;
62
+ // attempts to use index data to jump to @region, returns success/fail
63
+ // a "successful" jump indicates no error, but not whether this region has data
64
+ // * thus, the method sets a flag to indicate whether there are alignments
65
+ // available after the jump position
66
+ virtual bool Jump(const BamTools::BamRegion& region, bool* hasAlignmentsInRegion) =0;
67
+ // loads existing data from file into memory
68
+ virtual bool Load(const std::string& filename) =0;
69
+ // change the index caching behavior
70
+ virtual void SetCacheMode(const BamIndex::IndexCacheMode& mode) =0;
71
+
72
+ // data members
73
+ protected:
74
+ Internal::BamReaderPrivate* m_reader; // copy, not ownedprivate:
75
+ };
76
+
77
+ } // namespace BamTools
78
+
79
+ #endif // BAM_INDEX_H
@@ -0,0 +1,395 @@
1
+ // ***************************************************************************
2
+ // BamMultiReader.cpp (c) 2010 Erik Garrison, Derek Barnett
3
+ // Marth Lab, Department of Biology, Boston College
4
+ // ---------------------------------------------------------------------------
5
+ // Last modified: 15 March 2011 (DB)
6
+ // ---------------------------------------------------------------------------
7
+ // Convenience class for reading multiple BAM files.
8
+ //
9
+ // This functionality allows applications to work on very large sets of files
10
+ // without requiring intermediate merge, sort, and index steps for each file
11
+ // subset. It also improves the performance of our merge system as it
12
+ // precludes the need to sort merged files.
13
+ // ***************************************************************************
14
+
15
+ #include <api/BamMultiReader.h>
16
+ #include <api/internal/BamMultiReader_p.h>
17
+ using namespace BamTools;
18
+
19
+ #include <string>
20
+ #include <vector>
21
+ using namespace std;
22
+
23
+ /*! \class BamTools::BamReader
24
+ \brief Convenience class for reading multiple BAM files.
25
+ */
26
+
27
+ /*! \fn BamMultiReader::BamMultiReader(void)
28
+ \brief constructor
29
+ */
30
+ BamMultiReader::BamMultiReader(void)
31
+ : d(new Internal::BamMultiReaderPrivate)
32
+ { }
33
+
34
+ /*! \fn BamMultiReader::~BamMultiReader(void)
35
+ \brief destructor
36
+ */
37
+ BamMultiReader::~BamMultiReader(void) {
38
+ delete d;
39
+ d = 0;
40
+ }
41
+
42
+ /*! \fn void BamMultiReader::Close(void)
43
+ \brief Closes all open BAM files.
44
+
45
+ Also clears out all header and reference data.
46
+
47
+ \sa CloseFile(), IsOpen(), Open(), BamReader::Close()
48
+ */
49
+ void BamMultiReader::Close(void) {
50
+ d->Close();
51
+ }
52
+
53
+ /*! \fn void BamMultiReader::CloseFile(const std::string& filename)
54
+ \brief Closes requested BAM file.
55
+
56
+ Leaves any other file(s) open, along with header and reference data.
57
+
58
+ \sa Close(), IsOpen(), Open(), BamReader::Close()
59
+ */
60
+ void BamMultiReader::CloseFile(const std::string& filename) {
61
+ d->CloseFile(filename);
62
+ }
63
+
64
+ /*! \fn bool BamMultiReader::CreateIndexes(const BamIndex::IndexType& type)
65
+ \brief Creates index files for the current BAM files.
66
+
67
+ \param type file format to create, see BamIndex::IndexType for available formats
68
+ \return \c true if index files created OK
69
+ \sa LocateIndexes(), OpenIndexes(), BamReader::CreateIndex()
70
+ */
71
+ bool BamMultiReader::CreateIndexes(const BamIndex::IndexType& type) {
72
+ return d->CreateIndexes(type);
73
+ }
74
+
75
+ /*! \fn const std::vector<std::string> BamMultiReader::Filenames(void) const
76
+ \brief Returns list of filenames for all open BAM files.
77
+
78
+ Retrieved filenames will contain whatever was passed via Open().
79
+ If you need full directory paths here, be sure to include them
80
+ when you open the BAM files.
81
+
82
+ \returns names of open BAM files. If no files are open, returns an empty vector.
83
+ \sa IsOpen(), BamReader::GetFilename()
84
+ */
85
+ const std::vector<std::string> BamMultiReader::Filenames(void) const {
86
+ return d->Filenames();
87
+ }
88
+
89
+ /*! \fn SamHeader BamMultiReader::GetHeader(void) const
90
+ \brief Returns unified SAM-format header for all files
91
+
92
+ N.B. - Modifying the retrieved text does NOT affect the current
93
+ BAM files. Thesse file have been opened in a read-only mode. However,
94
+ your modified header text can be used in conjunction with BamWriter
95
+ to generate a new BAM file with the appropriate header information.
96
+
97
+ \returns header data wrapped in SamHeader object
98
+ \sa GetHeaderText(), BamReader::GetHeader()
99
+ */
100
+ SamHeader BamMultiReader::GetHeader(void) const {
101
+ return d->GetHeader();
102
+ }
103
+
104
+ /*! \fn std::string BamMultiReader::GetHeaderText(void) const
105
+ \brief Returns unified SAM-format header text for all files
106
+
107
+ N.B. - Modifying the retrieved text does NOT affect the current
108
+ BAM files. Thesse file have been opened in a read-only mode. However,
109
+ your modified header text can be used in conjunction with BamWriter
110
+ to generate a new BAM file with the appropriate header information.
111
+
112
+ \returns SAM-formatted header text
113
+ \sa GetHeader(), BamReader::GetHeaderText()
114
+ */
115
+ std::string BamMultiReader::GetHeaderText(void) const {
116
+ return d->GetHeaderText();
117
+ }
118
+
119
+ /*! \fn bool BamMultiReader::GetNextAlignment(BamAlignment& alignment)
120
+ \brief Retrieves next available alignment.
121
+
122
+ Equivalent to BamReader::GetNextAlignment() with respect to what is a valid
123
+ overlapping alignment and what data gets populated.
124
+
125
+ This method takes care of determining which alignment actually is 'next'
126
+ across multiple files, depending on current SortOrder.
127
+
128
+ \param alignment destination for alignment record data
129
+ \returns \c true if a valid alignment was found
130
+ \sa GetNextAlignmentCore(), SetRegion(), SetSortOrder(), BamReader::GetNextAlignment()
131
+ */
132
+ bool BamMultiReader::GetNextAlignment(BamAlignment& nextAlignment) {
133
+ return d->GetNextAlignment(nextAlignment);
134
+ }
135
+
136
+ /*! \fn bool BamMultiReader::GetNextAlignmentCore(BamAlignment& alignment)
137
+ \brief Retrieves next available alignment.
138
+
139
+ Equivalent to BamReader::GetNextAlignmentCore() with respect to what is a valid
140
+ overlapping alignment and what data gets populated.
141
+
142
+ This method takes care of determining which alignment actually is 'next'
143
+ across multiple files, depending on current SortOrder.
144
+
145
+ \param alignment destination for alignment record data
146
+ \returns \c true if a valid alignment was found
147
+ \sa GetNextAlignment(), SetRegion(), SetSortOrder(), BamReader::GetNextAlignmentCore()
148
+ */
149
+ bool BamMultiReader::GetNextAlignmentCore(BamAlignment& nextAlignment) {
150
+ return d->GetNextAlignmentCore(nextAlignment);
151
+ }
152
+
153
+ /*! \fn int BamMultiReader::GetReferenceCount(void) const
154
+ \brief Returns number of reference sequences.
155
+ \sa BamReader::GetReferenceCount()
156
+ */
157
+ int BamMultiReader::GetReferenceCount(void) const {
158
+ return d->GetReferenceCount();
159
+ }
160
+
161
+ /*! \fn const RefVector& BamMultiReader::GetReferenceData(void) const
162
+ \brief Returns all reference sequence entries.
163
+ \sa RefData, BamReader::GetReferenceData()
164
+ */
165
+ const BamTools::RefVector BamMultiReader::GetReferenceData(void) const {
166
+ return d->GetReferenceData();
167
+ }
168
+
169
+ /*! \fn int BamMultiReader::GetReferenceID(const std::string& refName) const
170
+ \brief Returns the ID of the reference with this name.
171
+
172
+ If \a refName is not found, returns -1.
173
+
174
+ \sa BamReader::GetReferenceID()
175
+ */
176
+ int BamMultiReader::GetReferenceID(const std::string& refName) const {
177
+ return d->GetReferenceID(refName);
178
+ }
179
+
180
+ /*! \fn bool BamMultiReader::HasIndexes(void) const
181
+ \brief Returns \c true if all BAM files have index data available.
182
+ \sa BamReader::HasIndex()
183
+ */
184
+ bool BamMultiReader::HasIndexes(void) const {
185
+ return d->HasIndexes();
186
+ }
187
+
188
+ /*! \fn bool BamMultiReader::HasOpenReaders(void) const
189
+ \brief Returns \c true if there are any open BAM files.
190
+ */
191
+ bool BamMultiReader::HasOpenReaders(void) const {
192
+ return d->HasOpenReaders();
193
+ }
194
+
195
+ /*! \fn bool BamMultiReader::IsIndexLoaded(void) const
196
+ \brief Returns \c true if all BAM files have index data available.
197
+
198
+ \deprecated Instead use HasIndexes()
199
+ \cond
200
+ See explanation in BamReader.cpp for more details on the deprecation decision.
201
+ \endcond
202
+ */
203
+
204
+ bool BamMultiReader::IsIndexLoaded(void) const {
205
+ return d->HasIndexes();
206
+ }
207
+
208
+ /*! \fn bool BamMultiReader::Jump(int refID, int position)
209
+ \brief Performs a random-access jump within current BAM files.
210
+
211
+ This is a convenience method, equivalent to calling SetRegion()
212
+ with only a left boundary specified.
213
+
214
+ \returns \c true if jump was successful
215
+ \sa HasIndex(), BamReader::Jump()
216
+ */
217
+
218
+ bool BamMultiReader::Jump(int refID, int position) {
219
+ return d->Jump(refID, position);
220
+ }
221
+
222
+ /*! \fn bool BamMultiReader::LocateIndexes(const BamIndex::IndexType& preferredType)
223
+ \brief Looks for index files that match current BAM files.
224
+
225
+ Use this function when you need index files, and perhaps have a
226
+ preferred index format, but do not depend heavily on which indexes
227
+ actually get loaded at runtime.
228
+
229
+ For each BAM file, this function will defer to your \a preferredType
230
+ whenever possible. However, if an index file of \a preferredType can
231
+ not be found, then it will look for any other index file that matches
232
+ that BAM file.
233
+
234
+ An example case would look this:
235
+ \code
236
+
237
+ BamMultiReader reader;
238
+ // do setup
239
+
240
+ // ensure that all files have an index
241
+ if ( !reader.LocateIndexes() ) // opens any existing index files that match our BAM files
242
+ reader.CreateIndexes(); // creates index files for BAM files that still lack one
243
+
244
+ // do interesting stuff
245
+ // ...
246
+
247
+ \endcode
248
+
249
+ If you want precise control over which index files are loaded, use OpenIndexes()
250
+ with the desired index filenames. If that function returns false, you can use
251
+ CreateIndexes() to then build index files of the exact requested format.
252
+
253
+ \param preferredType desired index file format, see BamIndex::IndexType for available formats
254
+ \returns \c true if index files could be found for \b ALL open BAM files
255
+ \sa BamReader::LocateIndex()
256
+ */
257
+ bool BamMultiReader::LocateIndexes(const BamIndex::IndexType& preferredType) {
258
+ return d->LocateIndexes(preferredType);
259
+ }
260
+
261
+ /*! \fn bool BamMultiReader::Open(const std::vector<std::string>& filenames)
262
+ \brief Opens BAM files.
263
+
264
+ N.B. - Opening BAM files will invalidate any current region set on the multireader.
265
+ All file pointers will be returned to the beginning of the alignment data.
266
+ Follow this with Jump() or SetRegion() to establish a region of interest.
267
+
268
+ \param filenames list of BAM filenames to open
269
+ \returns \c true if BAM files were opened successfully
270
+ \sa Close(), HasOpenReaders(), OpenFile(), OpenIndexes(), BamReader::Open()
271
+ */
272
+ bool BamMultiReader::Open(const std::vector<std::string>& filenames) {
273
+ return d->Open(filenames);
274
+ }
275
+
276
+ /*! \fn bool BamMultiReader::OpenFile(const std::string& filename)
277
+ \brief Opens a single BAM file.
278
+
279
+ Adds another BAM file to multireader "on-the-fly".
280
+
281
+ N.B. - Opening a BAM file invalidates any current region set on the multireader.
282
+ All file pointers will be returned to the beginning of the alignment data.
283
+ Follow this with Jump() or SetRegion() to establish a region of interest.
284
+
285
+ \param filename BAM filename to open
286
+ \returns \c true if BAM file was opened successfully
287
+ \sa Close(), HasOpenReaders(), Open(), OpenIndexes(), BamReader::Open()
288
+ */
289
+ bool BamMultiReader::OpenFile(const std::string& filename) {
290
+ return d->OpenFile(filename);
291
+ }
292
+
293
+ /*! \fn bool BamMultiReader::OpenIndexes(const std::vector<std::string>& indexFilenames)
294
+ \brief Opens index files for current BAM files.
295
+
296
+ N.B. - Currently assumes that index filenames match the order (and number) of
297
+ BAM files passed to Open().
298
+
299
+ \param indexFilenames list of BAM index file names
300
+ \returns \c true if BAM index file was opened & data loaded successfully
301
+ \sa LocateIndex(), Open(), SetIndex(), BamReader::OpenIndex()
302
+ */
303
+ bool BamMultiReader::OpenIndexes(const std::vector<std::string>& indexFilenames) {
304
+ return d->OpenIndexes(indexFilenames);
305
+ }
306
+
307
+ /*! \fn void BamMultiReader::PrintFilenames(void) const
308
+ \brief Convenience method for printing filenames to stdout.
309
+ \deprecated Doesn't really belong as an API function. Clients should
310
+ determine how the data is reported.
311
+ \sa Filenames(), BamReader::GetFilename()
312
+ */
313
+ void BamMultiReader::PrintFilenames(void) const {
314
+ d->PrintFilenames();
315
+ }
316
+
317
+ /*! \fn bool BamMultiReader::Rewind(void)
318
+ \brief Returns the internal file pointers to the beginning of alignment records.
319
+
320
+ Useful for performing multiple sequential passes through BAM files.
321
+ Calling this function clears any prior region that may have been set.
322
+
323
+ \returns \c true if rewind operation was successful
324
+ \sa Jump(), SetRegion(), BamReader::Rewind()
325
+ */
326
+ bool BamMultiReader::Rewind(void) {
327
+ return d->Rewind();
328
+ }
329
+
330
+ /*! \fn void BamMultiReader::SetIndexCacheMode(const BamIndex::IndexCacheMode& mode)
331
+ \brief Changes the caching behavior of the index data.
332
+
333
+ Default mode is BamIndex::LimitedIndexCaching.
334
+
335
+ \param mode desired cache mode for index, see BamIndex::IndexCacheMode for
336
+ description of the available cache modes
337
+ \sa HasIndex(), BamReader::SetIndexCacheMode()
338
+ */
339
+ void BamMultiReader::SetIndexCacheMode(const BamIndex::IndexCacheMode& mode) {
340
+ d->SetIndexCacheMode(mode);
341
+ }
342
+
343
+ /*! \fn bool BamMultiReader::SetRegion(const BamRegion& region)
344
+ \brief Sets a target region of interest
345
+
346
+ Equivalent to calling BamReader::SetRegion() on all open BAM files.
347
+
348
+ \param region desired region-of-interest to activate
349
+ \returns \c true if ALL readers set the region successfully
350
+ \sa HasIndexes(), Jump(), BamReader::SetRegion()
351
+ */
352
+ bool BamMultiReader::SetRegion(const BamRegion& region) {
353
+ return d->SetRegion(region);
354
+ }
355
+
356
+ /*! \fn bool BamMultiReader::SetRegion(const int& leftRefID,
357
+ const int& leftPosition,
358
+ const int& rightRefID,
359
+ const int& rightPosition)
360
+ \brief Sets a target region of interest
361
+
362
+ This is an overloaded function.
363
+
364
+ Equivalent to calling BamReader::SetRegion() on all open BAM files.
365
+
366
+ \param leftRefID referenceID of region's left boundary
367
+ \param leftPosition position of region's left boundary
368
+ \param rightRefID reference ID of region's right boundary
369
+ \param rightPosition position of region's right boundary
370
+
371
+ \returns \c true if ALL readers set the region successfully
372
+ \sa HasIndexes(), Jump(), BamReader::SetRegion()
373
+ */
374
+ bool BamMultiReader::SetRegion(const int& leftRefID,
375
+ const int& leftPosition,
376
+ const int& rightRefID,
377
+ const int& rightPosition)
378
+ {
379
+ BamRegion region(leftRefID, leftPosition, rightRefID, rightPosition);
380
+ return d->SetRegion(region);
381
+ }
382
+
383
+ /*! \fn void BamMultiReader::SetSortOrder(const SortOrder& order)
384
+ \brief Sets the expected sorting order for reading across multiple BAM files.
385
+
386
+ Default is BamMultiReader::SortedByPosition.
387
+
388
+ The SortOrder determines how the reader determines which alignment is "next"
389
+ from among its open readers.
390
+
391
+ \param order expected sort order
392
+ */
393
+ void BamMultiReader::SetSortOrder(const SortOrder& order) {
394
+ d->SetSortOrder(order);
395
+ }