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,287 @@
1
+ // ***************************************************************************
2
+ // bamtools_options.cpp (c) 2010 Derek Barnett, Erik Garrison
3
+ // Marth Lab, Department of Biology, Boston College
4
+ // ---------------------------------------------------------------------------
5
+ // Last modified: 11 June 2011
6
+ // ---------------------------------------------------------------------------
7
+ // Parses command line arguments and creates a help menu
8
+ // ---------------------------------------------------------------------------
9
+ // Modified from:
10
+ // The Mosaik suite's command line parser class: COptions
11
+ // (c) 2006 - 2009 Michael Str�mberg
12
+ // Marth Lab, Department of Biology, Boston College
13
+ // Re-licensed under MIT License with author's permission.
14
+ //
15
+ // * Modified slightly to fit BamTools, otherwise code is same.
16
+ // * (BamTools namespace, added stdin/stdout) (DB)
17
+ // ***************************************************************************
18
+
19
+ #include <utils/bamtools_options.h>
20
+ using namespace BamTools;
21
+
22
+ #include <cstdio>
23
+ #include <cstdlib>
24
+ #include <cstring>
25
+ #include <iomanip>
26
+ #include <sstream>
27
+ using namespace std;
28
+
29
+ string Options::m_programName; // the program name
30
+ string Options::m_description; // the main description
31
+ string Options::m_exampleArguments; // the example arguments
32
+ vector<OptionGroup> Options::m_optionGroups; // stores the option groups
33
+ map<string, OptionValue> Options::m_optionsMap; // stores the options in a map
34
+ const string Options::m_stdin = "stdin"; // string representation of stdin
35
+ const string Options::m_stdout = "stdout"; // string representation of stdout
36
+
37
+ // adds a simple option to the parser
38
+ void Options::AddOption(const string& argument,
39
+ const string& optionDescription,
40
+ bool& foundArgument,
41
+ OptionGroup* group)
42
+ {
43
+ Option o;
44
+ o.Argument = argument;
45
+ o.Description = optionDescription;
46
+ o.StoreValue = false;
47
+ group->Options.push_back(o);
48
+
49
+ OptionValue ov;
50
+ ov.pFoundArgument = &foundArgument;
51
+ ov.StoreValue = false;
52
+
53
+ m_optionsMap[argument] = ov;
54
+ }
55
+
56
+ // creates an option group
57
+ OptionGroup* Options::CreateOptionGroup(const string& groupName) {
58
+ OptionGroup og;
59
+ og.Name = groupName;
60
+ m_optionGroups.push_back(og);
61
+ return &m_optionGroups[m_optionGroups.size() - 1];
62
+ }
63
+
64
+ // displays the help menu
65
+ void Options::DisplayHelp(void) {
66
+
67
+ // initialize
68
+ char argumentBuffer[ARGUMENT_LENGTH + 1];
69
+ ostringstream sb;
70
+
71
+ char indentBuffer[MAX_LINE_LENGTH - DESC_LENGTH + 1];
72
+ memset(indentBuffer, ' ', MAX_LINE_LENGTH - DESC_LENGTH);
73
+ indentBuffer[MAX_LINE_LENGTH - DESC_LENGTH] = 0;
74
+
75
+ // display the menu
76
+ printf("Description: %s.\n\n", m_description.c_str());
77
+ printf("Usage: ");
78
+ printf("%s", m_programName.c_str());
79
+ printf(" %s\n\n", m_exampleArguments.c_str());
80
+
81
+ vector<Option>::const_iterator optionIter;
82
+ vector<OptionGroup>::const_iterator groupIter;
83
+ for (groupIter = m_optionGroups.begin(); groupIter != m_optionGroups.end(); ++groupIter) {
84
+
85
+ printf("%s:\n", groupIter->Name.c_str());
86
+
87
+ for (optionIter = groupIter->Options.begin(); optionIter != groupIter->Options.end(); ++optionIter) {
88
+
89
+ if (optionIter->StoreValue)
90
+ snprintf(argumentBuffer, ARGUMENT_LENGTH + 1, " %s <%s>", optionIter->Argument.c_str(), optionIter->ValueDescription.c_str());
91
+ else
92
+ snprintf(argumentBuffer, ARGUMENT_LENGTH + 1, " %s", optionIter->Argument.c_str());
93
+ printf("%-35s ", argumentBuffer);
94
+
95
+ string description = optionIter->Description;
96
+
97
+ // handle default values
98
+ if (optionIter->HasDefaultValue) {
99
+
100
+ sb.str("");
101
+ sb << description << " [";
102
+
103
+ if (optionIter->DefaultValue.is_type<unsigned int>()) {
104
+ sb << (unsigned int)optionIter->DefaultValue;
105
+ } else if (optionIter->DefaultValue.is_type<unsigned char>()) {
106
+ sb << (unsigned short)(unsigned char)optionIter->DefaultValue;
107
+ } else if (optionIter->DefaultValue.is_type<float>()) {
108
+ sb << std::fixed << std::setprecision(2) << (float)optionIter->DefaultValue;
109
+ } else if (optionIter->DefaultValue.is_type<double>()) {
110
+ sb << std::fixed << std::setprecision(4) << (double)optionIter->DefaultValue;
111
+ } else if (optionIter->DefaultValue.is_type<std::string>()) {
112
+ const std::string stringValue = optionIter->DefaultValue;
113
+ sb << stringValue;
114
+ } else {
115
+ printf("ERROR: Found an unsupported data type for argument %s when casting the default value.\n",
116
+ optionIter->Argument.c_str());
117
+ exit(1);
118
+ }
119
+
120
+ sb << "]";
121
+ description = sb.str();
122
+ }
123
+
124
+ if ( description.size() <= DESC_LENGTH_FIRST_ROW ) {
125
+ printf("%s\n", description.c_str());
126
+ } else {
127
+
128
+ // handle the first row
129
+ const char* pDescription = description.data();
130
+ unsigned int cutIndex = DESC_LENGTH_FIRST_ROW;
131
+ while(pDescription[cutIndex] != ' ')
132
+ cutIndex--;
133
+ printf("%s\n", description.substr(0, cutIndex).c_str());
134
+ description = description.substr(cutIndex + 1);
135
+
136
+ // handle subsequent rows
137
+ while(description.size() > DESC_LENGTH) {
138
+ pDescription = description.data();
139
+ cutIndex = DESC_LENGTH;
140
+ while(pDescription[cutIndex] != ' ')
141
+ cutIndex--;
142
+ printf("%s%s\n", indentBuffer, description.substr(0, cutIndex).c_str());
143
+ description = description.substr(cutIndex + 1);
144
+ }
145
+
146
+ // handle last row
147
+ printf("%s%s\n", indentBuffer, description.c_str());
148
+ }
149
+ }
150
+
151
+ printf("\n");
152
+ }
153
+
154
+ printf("Help:\n");
155
+ printf(" --help, -h shows this help text\n");
156
+ exit(1);
157
+ }
158
+
159
+ // parses the command line
160
+ void Options::Parse(int argc, char* argv[], int offset) {
161
+
162
+ // initialize
163
+ map<string, OptionValue>::const_iterator ovMapIter;
164
+ map<string, OptionValue>::const_iterator checkMapIter;
165
+ const int LAST_INDEX = argc - 1;
166
+ ostringstream errorBuilder;
167
+ bool foundError = false;
168
+ char* end_ptr = NULL;
169
+ const string ERROR_SPACER(7, ' ');
170
+
171
+ // check if we should show the help menu
172
+ bool showHelpMenu = false;
173
+ if (argc > 1) {
174
+ for (int i = 1; i < argc; i++) {
175
+ const std::string argument = argv[i];
176
+ if ( (argument == "-h") || (argument == "--help") || (argument == "help") )
177
+ showHelpMenu = true;
178
+ }
179
+ } else showHelpMenu = true;
180
+
181
+ if (showHelpMenu)
182
+ DisplayHelp();
183
+
184
+ // check each argument
185
+ for (int i = offset+1; i < argc; i++) {
186
+
187
+ const string argument = argv[i];
188
+ ovMapIter = m_optionsMap.find(argument);
189
+
190
+ if (ovMapIter == m_optionsMap.end()) {
191
+ errorBuilder << ERROR_SPACER << "An unrecognized argument was found: " << argument << std::endl;
192
+ foundError = true;
193
+ } else {
194
+
195
+ *ovMapIter->second.pFoundArgument = true;
196
+
197
+ // grab the value
198
+ if (ovMapIter->second.StoreValue) {
199
+
200
+ if (i < LAST_INDEX) {
201
+
202
+ // check if the next argument is really a command line option
203
+ const string val = argv[i + 1];
204
+ checkMapIter = m_optionsMap.find(val);
205
+
206
+ if (checkMapIter == m_optionsMap.end()) {
207
+
208
+ ++i;
209
+
210
+ if (ovMapIter->second.VariantValue.is_type<unsigned int>()) {
211
+ const unsigned int uint32 = (unsigned int)strtoul(val.c_str(), &end_ptr, 10);
212
+ unsigned int* varValue = (unsigned int*)ovMapIter->second.pValue;
213
+ *varValue = uint32;
214
+ } else if (ovMapIter->second.VariantValue.is_type<unsigned char>()) {
215
+ const unsigned char uint8 = (unsigned char)strtoul(val.c_str(), &end_ptr, 10);
216
+ unsigned char* varValue = (unsigned char*)ovMapIter->second.pValue;
217
+ *varValue = uint8;
218
+ } else if (ovMapIter->second.VariantValue.is_type<uint64_t>()) {
219
+ const uint64_t uint64 = strtoui64(val.c_str(), &end_ptr, 10);
220
+ uint64_t* varValue = (uint64_t*)ovMapIter->second.pValue;
221
+ *varValue = uint64;
222
+ } else if (ovMapIter->second.VariantValue.is_type<double>()) {
223
+ const double d = strtod(val.c_str(), &end_ptr);
224
+ double* varValue = (double*)ovMapIter->second.pValue;
225
+ *varValue = d;
226
+ } else if (ovMapIter->second.VariantValue.is_type<float>()) {
227
+ const float f = (float)strtod(val.c_str(), &end_ptr);
228
+ float* varValue = (float*)ovMapIter->second.pValue;
229
+ *varValue = f;
230
+ } else if (ovMapIter->second.VariantValue.is_type<string>()) {
231
+ string* pStringValue = (string*)ovMapIter->second.pValue;
232
+ *pStringValue = val;
233
+ } else if (ovMapIter->second.VariantValue.is_type<vector<string> >()) {
234
+ vector<string>* pVectorValue = (vector<string>*)ovMapIter->second.pValue;
235
+ pVectorValue->push_back(val);
236
+ } else {
237
+ printf("ERROR: Found an unsupported data type for argument %s when parsing the arguments.\n",
238
+ argument.c_str());
239
+ exit(1);
240
+ }
241
+ } else {
242
+ errorBuilder << ERROR_SPACER << "The argument (" << argument
243
+ << ") expects a value, but none was found." << endl;
244
+ foundError = true;
245
+ }
246
+ } else {
247
+ errorBuilder << ERROR_SPACER << "The argument (" << argument
248
+ << ") expects a value, but none was found." << endl;
249
+ foundError = true;
250
+ }
251
+ }
252
+ }
253
+ }
254
+
255
+ // check if we missed any required parameters
256
+ for (ovMapIter = m_optionsMap.begin(); ovMapIter != m_optionsMap.end(); ++ovMapIter) {
257
+ if (ovMapIter->second.IsRequired && !*ovMapIter->second.pFoundArgument) {
258
+ errorBuilder << ERROR_SPACER << ovMapIter->second.ValueTypeDescription
259
+ << " was not specified. Please use the " << ovMapIter->first << " parameter." << endl;
260
+ foundError = true;
261
+ }
262
+ }
263
+
264
+ // print the errors if any were found
265
+ if (foundError) {
266
+ printf("ERROR: Some problems were encountered when parsing the command line options:\n");
267
+ printf("%s\n", errorBuilder.str().c_str());
268
+ printf("For a complete list of command line options, type \"%s help %s\"\n", argv[0], argv[1]);
269
+ exit(1);
270
+ }
271
+ }
272
+
273
+ // sets the program info
274
+ void Options::SetProgramInfo(const string& programName,
275
+ const string& description,
276
+ const string& arguments)
277
+ {
278
+ m_programName = programName;
279
+ m_description = description;
280
+ m_exampleArguments = arguments;
281
+ }
282
+
283
+ // return string representations of stdin
284
+ const string& Options::StandardIn(void) { return m_stdin; }
285
+
286
+ // return string representations of stdout
287
+ const string& Options::StandardOut(void) { return m_stdout; }
@@ -0,0 +1,213 @@
1
+ // ***************************************************************************
2
+ // bamtools_options.h (c) 2010 Derek Barnett, Erik Garrison
3
+ // Marth Lab, Department of Biology, Boston College
4
+ // ---------------------------------------------------------------------------
5
+ // Last modified: 11 June 2011
6
+ // ---------------------------------------------------------------------------
7
+ // Parses command line arguments and creates a help menu
8
+ // ---------------------------------------------------------------------------
9
+ // Modified from:
10
+ // The Mosaik suite's command line parser class: COptions
11
+ // (c) 2006 - 2009 Michael Str�mberg
12
+ // Marth Lab, Department of Biology, Boston College
13
+ // Re-licensed under MIT License with author's permission.
14
+ //
15
+ // * Modified slightly to fit BamTools, otherwise code is same.
16
+ // * (BamTools namespace, added stdin/stdout) (DB)
17
+ // ***************************************************************************
18
+
19
+ #ifndef BAMTOOLS_OPTIONS_H
20
+ #define BAMTOOLS_OPTIONS_H
21
+
22
+ #include <utils/bamtools_variant.h>
23
+ #include <utils/utils_global.h>
24
+
25
+ #include <map>
26
+ #include <string>
27
+ #include <vector>
28
+
29
+ #ifndef WIN32
30
+ #include <stdint.h>
31
+ #endif
32
+
33
+ namespace BamTools {
34
+
35
+ #define ARGUMENT_LENGTH 35
36
+ #define DESC_LENGTH_FIRST_ROW 30
37
+ #define DESC_LENGTH 42
38
+ #define MAX_LINE_LENGTH 78
39
+
40
+ #ifdef WIN32
41
+ #define snprintf _snprintf
42
+ typedef __int64 int64_t;
43
+ typedef unsigned __int64 uint64_t;
44
+ #define strtoui64 _strtoui64
45
+ #else
46
+ #define strtoui64 strtoull
47
+ #endif
48
+
49
+ struct UTILS_EXPORT Option {
50
+
51
+ // data members
52
+ std::string Argument;
53
+ std::string ValueDescription;
54
+ std::string Description;
55
+ bool StoreValue;
56
+ bool HasDefaultValue;
57
+ Variant DefaultValue;
58
+
59
+ // constructor
60
+ Option(void)
61
+ : StoreValue(true)
62
+ , HasDefaultValue(false)
63
+ { }
64
+ };
65
+
66
+ struct UTILS_EXPORT OptionValue {
67
+
68
+ // data members
69
+ bool* pFoundArgument;
70
+ void* pValue;
71
+ std::string ValueTypeDescription;
72
+ bool UseVector;
73
+ bool StoreValue;
74
+ bool IsRequired;
75
+ Variant VariantValue;
76
+
77
+ // constructor
78
+ OptionValue(void)
79
+ : pFoundArgument(NULL)
80
+ , pValue(NULL)
81
+ , UseVector(false)
82
+ , StoreValue(true)
83
+ , IsRequired(false)
84
+ { }
85
+ };
86
+
87
+ struct UTILS_EXPORT OptionGroup {
88
+ std::string Name;
89
+ std::vector<Option> Options;
90
+ };
91
+
92
+ class UTILS_EXPORT Options {
93
+
94
+ // add option/argument rules
95
+ public:
96
+ // adds a simple option to the parser
97
+ static void AddOption(const std::string& argument,
98
+ const std::string& optionDescription,
99
+ bool& foundArgument,
100
+ OptionGroup* group);
101
+
102
+ // adds a value option to the parser
103
+ template<typename T>
104
+ static void AddValueOption(const std::string& argument,
105
+ const std::string& valueDescription,
106
+ const std::string& optionDescription,
107
+ const std::string& valueTypeDescription,
108
+ bool& foundArgument,
109
+ T& val,
110
+ OptionGroup* group);
111
+
112
+ // adds a value option to the parser (with a default value)
113
+ template<typename T, typename D>
114
+ static void AddValueOption(const std::string& argument,
115
+ const std::string& valueDescription,
116
+ const std::string& optionDescription,
117
+ const std::string& valueTypeDescription,
118
+ bool& foundArgument,
119
+ T& val,
120
+ OptionGroup* group,
121
+ D& defaultValue);
122
+
123
+ // other API methods
124
+ public:
125
+ // creates an option group
126
+ static OptionGroup* CreateOptionGroup(const std::string& groupName);
127
+ // displays the help menu
128
+ static void DisplayHelp(void);
129
+ // parses the command line
130
+ static void Parse(int argc, char* argv[], int offset = 0);
131
+ // sets the program info
132
+ static void SetProgramInfo(const std::string& programName,
133
+ const std::string& description,
134
+ const std::string& arguments);
135
+ // returns string representation of stdin
136
+ static const std::string& StandardIn(void);
137
+ // returns string representation of stdout
138
+ static const std::string& StandardOut(void);
139
+
140
+ // static data members
141
+ private:
142
+ // the program name
143
+ static std::string m_programName;
144
+ // the main description
145
+ static std::string m_description;
146
+ // the example arguments
147
+ static std::string m_exampleArguments;
148
+ // stores the option groups
149
+ static std::vector<OptionGroup> m_optionGroups;
150
+ // stores the options in a map
151
+ static std::map<std::string, OptionValue> m_optionsMap;
152
+ // string representation of stdin
153
+ static const std::string m_stdin;
154
+ // string representation of stdout
155
+ static const std::string m_stdout;
156
+ };
157
+
158
+ // adds a value option to the parser
159
+ template<typename T>
160
+ void Options::AddValueOption(const std::string& argument,
161
+ const std::string& valueDescription,
162
+ const std::string& optionDescription,
163
+ const std::string& valueTypeDescription,
164
+ bool& foundArgument,
165
+ T& val,
166
+ OptionGroup* group)
167
+ {
168
+ Option o;
169
+ o.Argument = argument;
170
+ o.ValueDescription = valueDescription;
171
+ o.Description = optionDescription;
172
+ group->Options.push_back(o);
173
+
174
+ OptionValue ov;
175
+ ov.pFoundArgument = &foundArgument;
176
+ ov.pValue = (void*)&val;
177
+ ov.VariantValue = val;
178
+ ov.IsRequired = (valueTypeDescription.empty() ? false : true);
179
+ ov.ValueTypeDescription = valueTypeDescription;
180
+ m_optionsMap[argument] = ov;
181
+ }
182
+
183
+ // adds a value option to the parser (with a default value)
184
+ template<typename T, typename D>
185
+ void Options::AddValueOption(const std::string& argument,
186
+ const std::string& valueDescription,
187
+ const std::string& optionDescription,
188
+ const std::string& valueTypeDescription,
189
+ bool& foundArgument,
190
+ T& val,
191
+ OptionGroup* group,
192
+ D& defaultValue)
193
+ {
194
+ Option o;
195
+ o.Argument = argument;
196
+ o.ValueDescription = valueDescription;
197
+ o.Description = optionDescription;
198
+ o.DefaultValue = defaultValue;
199
+ o.HasDefaultValue = true;
200
+ group->Options.push_back(o);
201
+
202
+ OptionValue ov;
203
+ ov.pFoundArgument = &foundArgument;
204
+ ov.pValue = (void*)&val;
205
+ ov.VariantValue = val;
206
+ ov.IsRequired = (valueTypeDescription.empty() ? false : true);
207
+ ov.ValueTypeDescription = valueTypeDescription;
208
+ m_optionsMap[argument] = ov;
209
+ }
210
+
211
+ } // namespace BamTools
212
+
213
+ #endif // BAMTOOLS_OPTIONS_H