ngs_server 0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +4 -0
- data/Gemfile +4 -0
- data/Rakefile +2 -0
- data/bin/ngs_server +58 -0
- data/data/holder.txt +0 -0
- data/ext/bamtools/CMakeLists.txt +49 -0
- data/ext/bamtools/LICENSE +22 -0
- data/ext/bamtools/README +60 -0
- data/ext/bamtools/Tutorial_Toolkit_BamTools-1.0.pdf +0 -0
- data/ext/bamtools/docs/Doxyfile +1601 -0
- data/ext/bamtools/extconf.rb +9 -0
- data/ext/bamtools/src/CMakeFiles/CMakeDirectoryInformation.cmake +22 -0
- data/ext/bamtools/src/CMakeFiles/SharedHeaders.dir/DependInfo.cmake +13 -0
- data/ext/bamtools/src/CMakeFiles/SharedHeaders.dir/build.make +65 -0
- data/ext/bamtools/src/CMakeFiles/SharedHeaders.dir/cmake_clean.cmake +8 -0
- data/ext/bamtools/src/CMakeFiles/SharedHeaders.dir/depend.internal +3 -0
- data/ext/bamtools/src/CMakeFiles/SharedHeaders.dir/depend.make +3 -0
- data/ext/bamtools/src/CMakeFiles/SharedHeaders.dir/progress.make +2 -0
- data/ext/bamtools/src/CMakeFiles/progress.marks +1 -0
- data/ext/bamtools/src/CMakeLists.txt +18 -0
- data/ext/bamtools/src/ExportHeader.cmake +31 -0
- data/ext/bamtools/src/Makefile +182 -0
- data/ext/bamtools/src/api/BamAlignment.cpp +2432 -0
- data/ext/bamtools/src/api/BamAlignment.h +206 -0
- data/ext/bamtools/src/api/BamAux.h +456 -0
- data/ext/bamtools/src/api/BamConstants.h +127 -0
- data/ext/bamtools/src/api/BamIndex.h +79 -0
- data/ext/bamtools/src/api/BamMultiReader.cpp +395 -0
- data/ext/bamtools/src/api/BamMultiReader.h +126 -0
- data/ext/bamtools/src/api/BamReader.cpp +369 -0
- data/ext/bamtools/src/api/BamReader.h +117 -0
- data/ext/bamtools/src/api/BamWriter.cpp +142 -0
- data/ext/bamtools/src/api/BamWriter.h +63 -0
- data/ext/bamtools/src/api/CMakeFiles/APIHeaders.dir/DependInfo.cmake +14 -0
- data/ext/bamtools/src/api/CMakeFiles/APIHeaders.dir/build.make +80 -0
- data/ext/bamtools/src/api/CMakeFiles/APIHeaders.dir/cmake_clean.cmake +8 -0
- data/ext/bamtools/src/api/CMakeFiles/APIHeaders.dir/depend.internal +3 -0
- data/ext/bamtools/src/api/CMakeFiles/APIHeaders.dir/depend.make +3 -0
- data/ext/bamtools/src/api/CMakeFiles/APIHeaders.dir/progress.make +2 -0
- data/ext/bamtools/src/api/CMakeFiles/BamTools-static.dir/BamAlignment.cpp.o +0 -0
- data/ext/bamtools/src/api/CMakeFiles/BamTools-static.dir/BamMultiReader.cpp.o +0 -0
- data/ext/bamtools/src/api/CMakeFiles/BamTools-static.dir/BamReader.cpp.o +0 -0
- data/ext/bamtools/src/api/CMakeFiles/BamTools-static.dir/BamWriter.cpp.o +0 -0
- data/ext/bamtools/src/api/CMakeFiles/BamTools-static.dir/CXX.includecache +596 -0
- data/ext/bamtools/src/api/CMakeFiles/BamTools-static.dir/DependInfo.cmake +41 -0
- data/ext/bamtools/src/api/CMakeFiles/BamTools-static.dir/SamHeader.cpp.o +0 -0
- data/ext/bamtools/src/api/CMakeFiles/BamTools-static.dir/SamProgram.cpp.o +0 -0
- data/ext/bamtools/src/api/CMakeFiles/BamTools-static.dir/SamProgramChain.cpp.o +0 -0
- data/ext/bamtools/src/api/CMakeFiles/BamTools-static.dir/SamReadGroup.cpp.o +0 -0
- data/ext/bamtools/src/api/CMakeFiles/BamTools-static.dir/SamReadGroupDictionary.cpp.o +0 -0
- data/ext/bamtools/src/api/CMakeFiles/BamTools-static.dir/SamSequence.cpp.o +0 -0
- data/ext/bamtools/src/api/CMakeFiles/BamTools-static.dir/SamSequenceDictionary.cpp.o +0 -0
- data/ext/bamtools/src/api/CMakeFiles/BamTools-static.dir/build.make +675 -0
- data/ext/bamtools/src/api/CMakeFiles/BamTools-static.dir/cmake_clean.cmake +32 -0
- data/ext/bamtools/src/api/CMakeFiles/BamTools-static.dir/cmake_clean_target.cmake +3 -0
- data/ext/bamtools/src/api/CMakeFiles/BamTools-static.dir/depend.internal +295 -0
- data/ext/bamtools/src/api/CMakeFiles/BamTools-static.dir/depend.make +295 -0
- data/ext/bamtools/src/api/CMakeFiles/BamTools-static.dir/flags.make +8 -0
- data/ext/bamtools/src/api/CMakeFiles/BamTools-static.dir/internal/BamHeader_p.cpp.o +0 -0
- data/ext/bamtools/src/api/CMakeFiles/BamTools-static.dir/internal/BamIndexFactory_p.cpp.o +0 -0
- data/ext/bamtools/src/api/CMakeFiles/BamTools-static.dir/internal/BamMultiReader_p.cpp.o +0 -0
- data/ext/bamtools/src/api/CMakeFiles/BamTools-static.dir/internal/BamRandomAccessController_p.cpp.o +0 -0
- data/ext/bamtools/src/api/CMakeFiles/BamTools-static.dir/internal/BamReader_p.cpp.o +0 -0
- data/ext/bamtools/src/api/CMakeFiles/BamTools-static.dir/internal/BamStandardIndex_p.cpp.o +0 -0
- data/ext/bamtools/src/api/CMakeFiles/BamTools-static.dir/internal/BamToolsIndex_p.cpp.o +0 -0
- data/ext/bamtools/src/api/CMakeFiles/BamTools-static.dir/internal/BamWriter_p.cpp.o +0 -0
- data/ext/bamtools/src/api/CMakeFiles/BamTools-static.dir/internal/BgzfStream_p.cpp.o +0 -0
- data/ext/bamtools/src/api/CMakeFiles/BamTools-static.dir/internal/SamFormatParser_p.cpp.o +0 -0
- data/ext/bamtools/src/api/CMakeFiles/BamTools-static.dir/internal/SamFormatPrinter_p.cpp.o +0 -0
- data/ext/bamtools/src/api/CMakeFiles/BamTools-static.dir/internal/SamHeaderValidator_p.cpp.o +0 -0
- data/ext/bamtools/src/api/CMakeFiles/BamTools-static.dir/link.txt +2 -0
- data/ext/bamtools/src/api/CMakeFiles/BamTools-static.dir/progress.make +24 -0
- data/ext/bamtools/src/api/CMakeFiles/BamTools.dir/BamAlignment.cpp.o +0 -0
- data/ext/bamtools/src/api/CMakeFiles/BamTools.dir/BamMultiReader.cpp.o +0 -0
- data/ext/bamtools/src/api/CMakeFiles/BamTools.dir/BamReader.cpp.o +0 -0
- data/ext/bamtools/src/api/CMakeFiles/BamTools.dir/BamWriter.cpp.o +0 -0
- data/ext/bamtools/src/api/CMakeFiles/BamTools.dir/CXX.includecache +596 -0
- data/ext/bamtools/src/api/CMakeFiles/BamTools.dir/DependInfo.cmake +47 -0
- data/ext/bamtools/src/api/CMakeFiles/BamTools.dir/SamHeader.cpp.o +0 -0
- data/ext/bamtools/src/api/CMakeFiles/BamTools.dir/SamProgram.cpp.o +0 -0
- data/ext/bamtools/src/api/CMakeFiles/BamTools.dir/SamProgramChain.cpp.o +0 -0
- data/ext/bamtools/src/api/CMakeFiles/BamTools.dir/SamReadGroup.cpp.o +0 -0
- data/ext/bamtools/src/api/CMakeFiles/BamTools.dir/SamReadGroupDictionary.cpp.o +0 -0
- data/ext/bamtools/src/api/CMakeFiles/BamTools.dir/SamSequence.cpp.o +0 -0
- data/ext/bamtools/src/api/CMakeFiles/BamTools.dir/SamSequenceDictionary.cpp.o +0 -0
- data/ext/bamtools/src/api/CMakeFiles/BamTools.dir/build.make +677 -0
- data/ext/bamtools/src/api/CMakeFiles/BamTools.dir/cmake_clean.cmake +33 -0
- data/ext/bamtools/src/api/CMakeFiles/BamTools.dir/depend.internal +295 -0
- data/ext/bamtools/src/api/CMakeFiles/BamTools.dir/depend.make +295 -0
- data/ext/bamtools/src/api/CMakeFiles/BamTools.dir/flags.make +8 -0
- data/ext/bamtools/src/api/CMakeFiles/BamTools.dir/internal/BamHeader_p.cpp.o +0 -0
- data/ext/bamtools/src/api/CMakeFiles/BamTools.dir/internal/BamIndexFactory_p.cpp.o +0 -0
- data/ext/bamtools/src/api/CMakeFiles/BamTools.dir/internal/BamMultiReader_p.cpp.o +0 -0
- data/ext/bamtools/src/api/CMakeFiles/BamTools.dir/internal/BamRandomAccessController_p.cpp.o +0 -0
- data/ext/bamtools/src/api/CMakeFiles/BamTools.dir/internal/BamReader_p.cpp.o +0 -0
- data/ext/bamtools/src/api/CMakeFiles/BamTools.dir/internal/BamStandardIndex_p.cpp.o +0 -0
- data/ext/bamtools/src/api/CMakeFiles/BamTools.dir/internal/BamToolsIndex_p.cpp.o +0 -0
- data/ext/bamtools/src/api/CMakeFiles/BamTools.dir/internal/BamWriter_p.cpp.o +0 -0
- data/ext/bamtools/src/api/CMakeFiles/BamTools.dir/internal/BgzfStream_p.cpp.o +0 -0
- data/ext/bamtools/src/api/CMakeFiles/BamTools.dir/internal/SamFormatParser_p.cpp.o +0 -0
- data/ext/bamtools/src/api/CMakeFiles/BamTools.dir/internal/SamFormatPrinter_p.cpp.o +0 -0
- data/ext/bamtools/src/api/CMakeFiles/BamTools.dir/internal/SamHeaderValidator_p.cpp.o +0 -0
- data/ext/bamtools/src/api/CMakeFiles/BamTools.dir/link.txt +1 -0
- data/ext/bamtools/src/api/CMakeFiles/BamTools.dir/progress.make +24 -0
- data/ext/bamtools/src/api/CMakeFiles/CMakeDirectoryInformation.cmake +22 -0
- data/ext/bamtools/src/api/CMakeFiles/progress.marks +1 -0
- data/ext/bamtools/src/api/CMakeLists.txt +78 -0
- data/ext/bamtools/src/api/Makefile +902 -0
- data/ext/bamtools/src/api/SamConstants.h +95 -0
- data/ext/bamtools/src/api/SamHeader.cpp +184 -0
- data/ext/bamtools/src/api/SamHeader.h +68 -0
- data/ext/bamtools/src/api/SamProgram.cpp +139 -0
- data/ext/bamtools/src/api/SamProgram.h +61 -0
- data/ext/bamtools/src/api/SamProgramChain.cpp +351 -0
- data/ext/bamtools/src/api/SamProgramChain.h +85 -0
- data/ext/bamtools/src/api/SamReadGroup.cpp +221 -0
- data/ext/bamtools/src/api/SamReadGroup.h +68 -0
- data/ext/bamtools/src/api/SamReadGroupDictionary.cpp +289 -0
- data/ext/bamtools/src/api/SamReadGroupDictionary.h +86 -0
- data/ext/bamtools/src/api/SamSequence.cpp +161 -0
- data/ext/bamtools/src/api/SamSequence.h +60 -0
- data/ext/bamtools/src/api/SamSequenceDictionary.cpp +292 -0
- data/ext/bamtools/src/api/SamSequenceDictionary.h +88 -0
- data/ext/bamtools/src/api/api_global.h +21 -0
- data/ext/bamtools/src/api/cmake_install.cmake +122 -0
- data/ext/bamtools/src/api/internal/BamHeader_p.cpp +132 -0
- data/ext/bamtools/src/api/internal/BamHeader_p.h +71 -0
- data/ext/bamtools/src/api/internal/BamIndexFactory_p.cpp +112 -0
- data/ext/bamtools/src/api/internal/BamIndexFactory_p.h +49 -0
- data/ext/bamtools/src/api/internal/BamMultiMerger_p.h +297 -0
- data/ext/bamtools/src/api/internal/BamMultiReader_p.cpp +805 -0
- data/ext/bamtools/src/api/internal/BamMultiReader_p.h +103 -0
- data/ext/bamtools/src/api/internal/BamRandomAccessController_p.cpp +272 -0
- data/ext/bamtools/src/api/internal/BamRandomAccessController_p.h +93 -0
- data/ext/bamtools/src/api/internal/BamReader_p.cpp +380 -0
- data/ext/bamtools/src/api/internal/BamReader_p.h +112 -0
- data/ext/bamtools/src/api/internal/BamStandardIndex_p.cpp +986 -0
- data/ext/bamtools/src/api/internal/BamStandardIndex_p.h +236 -0
- data/ext/bamtools/src/api/internal/BamToolsIndex_p.cpp +641 -0
- data/ext/bamtools/src/api/internal/BamToolsIndex_p.h +187 -0
- data/ext/bamtools/src/api/internal/BamWriter_p.cpp +424 -0
- data/ext/bamtools/src/api/internal/BamWriter_p.h +66 -0
- data/ext/bamtools/src/api/internal/BgzfStream_p.cpp +438 -0
- data/ext/bamtools/src/api/internal/BgzfStream_p.h +108 -0
- data/ext/bamtools/src/api/internal/SamFormatParser_p.cpp +230 -0
- data/ext/bamtools/src/api/internal/SamFormatParser_p.h +61 -0
- data/ext/bamtools/src/api/internal/SamFormatPrinter_p.cpp +210 -0
- data/ext/bamtools/src/api/internal/SamFormatPrinter_p.h +60 -0
- data/ext/bamtools/src/api/internal/SamHeaderValidator_p.cpp +510 -0
- data/ext/bamtools/src/api/internal/SamHeaderValidator_p.h +101 -0
- data/ext/bamtools/src/api/internal/SamHeaderVersion_p.h +134 -0
- data/ext/bamtools/src/cmake_install.cmake +42 -0
- data/ext/bamtools/src/shared/bamtools_global.h +78 -0
- data/ext/bamtools/src/third_party/CMakeFiles/CMakeDirectoryInformation.cmake +22 -0
- data/ext/bamtools/src/third_party/CMakeFiles/progress.marks +1 -0
- data/ext/bamtools/src/third_party/CMakeLists.txt +10 -0
- data/ext/bamtools/src/third_party/Makefile +167 -0
- data/ext/bamtools/src/third_party/cmake_install.cmake +35 -0
- data/ext/bamtools/src/third_party/jsoncpp/CMakeFiles/CMakeDirectoryInformation.cmake +22 -0
- data/ext/bamtools/src/third_party/jsoncpp/CMakeFiles/jsoncpp.dir/CXX.includecache +144 -0
- data/ext/bamtools/src/third_party/jsoncpp/CMakeFiles/jsoncpp.dir/DependInfo.cmake +27 -0
- data/ext/bamtools/src/third_party/jsoncpp/CMakeFiles/jsoncpp.dir/build.make +157 -0
- data/ext/bamtools/src/third_party/jsoncpp/CMakeFiles/jsoncpp.dir/cmake_clean.cmake +13 -0
- data/ext/bamtools/src/third_party/jsoncpp/CMakeFiles/jsoncpp.dir/depend.internal +31 -0
- data/ext/bamtools/src/third_party/jsoncpp/CMakeFiles/jsoncpp.dir/depend.make +31 -0
- data/ext/bamtools/src/third_party/jsoncpp/CMakeFiles/jsoncpp.dir/flags.make +8 -0
- data/ext/bamtools/src/third_party/jsoncpp/CMakeFiles/jsoncpp.dir/json_reader.cpp.o +0 -0
- data/ext/bamtools/src/third_party/jsoncpp/CMakeFiles/jsoncpp.dir/json_value.cpp.o +0 -0
- data/ext/bamtools/src/third_party/jsoncpp/CMakeFiles/jsoncpp.dir/json_writer.cpp.o +0 -0
- data/ext/bamtools/src/third_party/jsoncpp/CMakeFiles/jsoncpp.dir/link.txt +1 -0
- data/ext/bamtools/src/third_party/jsoncpp/CMakeFiles/jsoncpp.dir/progress.make +4 -0
- data/ext/bamtools/src/third_party/jsoncpp/CMakeFiles/progress.marks +1 -0
- data/ext/bamtools/src/third_party/jsoncpp/CMakeLists.txt +23 -0
- data/ext/bamtools/src/third_party/jsoncpp/LICENSE +55 -0
- data/ext/bamtools/src/third_party/jsoncpp/Makefile +263 -0
- data/ext/bamtools/src/third_party/jsoncpp/cmake_install.cmake +29 -0
- data/ext/bamtools/src/third_party/jsoncpp/json.h +15 -0
- data/ext/bamtools/src/third_party/jsoncpp/json_batchallocator.h +130 -0
- data/ext/bamtools/src/third_party/jsoncpp/json_config.h +42 -0
- data/ext/bamtools/src/third_party/jsoncpp/json_features.h +47 -0
- data/ext/bamtools/src/third_party/jsoncpp/json_forwards.h +42 -0
- data/ext/bamtools/src/third_party/jsoncpp/json_internalarray.inl +453 -0
- data/ext/bamtools/src/third_party/jsoncpp/json_internalmap.inl +612 -0
- data/ext/bamtools/src/third_party/jsoncpp/json_reader.cpp +870 -0
- data/ext/bamtools/src/third_party/jsoncpp/json_reader.h +201 -0
- data/ext/bamtools/src/third_party/jsoncpp/json_tool.h +93 -0
- data/ext/bamtools/src/third_party/jsoncpp/json_value.cpp +1701 -0
- data/ext/bamtools/src/third_party/jsoncpp/json_value.h +1059 -0
- data/ext/bamtools/src/third_party/jsoncpp/json_valueiterator.inl +297 -0
- data/ext/bamtools/src/third_party/jsoncpp/json_writer.cpp +819 -0
- data/ext/bamtools/src/third_party/jsoncpp/json_writer.h +179 -0
- data/ext/bamtools/src/toolkit/CMakeFiles/CMakeDirectoryInformation.cmake +25 -0
- data/ext/bamtools/src/toolkit/CMakeFiles/bamtools_cmd.dir/CXX.includecache +698 -0
- data/ext/bamtools/src/toolkit/CMakeFiles/bamtools_cmd.dir/DependInfo.cmake +34 -0
- data/ext/bamtools/src/toolkit/CMakeFiles/bamtools_cmd.dir/bamtools.cpp.o +0 -0
- data/ext/bamtools/src/toolkit/CMakeFiles/bamtools_cmd.dir/bamtools_convert.cpp.o +0 -0
- data/ext/bamtools/src/toolkit/CMakeFiles/bamtools_cmd.dir/bamtools_count.cpp.o +0 -0
- data/ext/bamtools/src/toolkit/CMakeFiles/bamtools_cmd.dir/bamtools_coverage.cpp.o +0 -0
- data/ext/bamtools/src/toolkit/CMakeFiles/bamtools_cmd.dir/bamtools_filter.cpp.o +0 -0
- data/ext/bamtools/src/toolkit/CMakeFiles/bamtools_cmd.dir/bamtools_header.cpp.o +0 -0
- data/ext/bamtools/src/toolkit/CMakeFiles/bamtools_cmd.dir/bamtools_index.cpp.o +0 -0
- data/ext/bamtools/src/toolkit/CMakeFiles/bamtools_cmd.dir/bamtools_merge.cpp.o +0 -0
- data/ext/bamtools/src/toolkit/CMakeFiles/bamtools_cmd.dir/bamtools_random.cpp.o +0 -0
- data/ext/bamtools/src/toolkit/CMakeFiles/bamtools_cmd.dir/bamtools_resolve.cpp.o +0 -0
- data/ext/bamtools/src/toolkit/CMakeFiles/bamtools_cmd.dir/bamtools_revert.cpp.o +0 -0
- data/ext/bamtools/src/toolkit/CMakeFiles/bamtools_cmd.dir/bamtools_sort.cpp.o +0 -0
- data/ext/bamtools/src/toolkit/CMakeFiles/bamtools_cmd.dir/bamtools_split.cpp.o +0 -0
- data/ext/bamtools/src/toolkit/CMakeFiles/bamtools_cmd.dir/bamtools_stats.cpp.o +0 -0
- data/ext/bamtools/src/toolkit/CMakeFiles/bamtools_cmd.dir/build.make +447 -0
- data/ext/bamtools/src/toolkit/CMakeFiles/bamtools_cmd.dir/cmake_clean.cmake +24 -0
- data/ext/bamtools/src/toolkit/CMakeFiles/bamtools_cmd.dir/depend.internal +319 -0
- data/ext/bamtools/src/toolkit/CMakeFiles/bamtools_cmd.dir/depend.make +319 -0
- data/ext/bamtools/src/toolkit/CMakeFiles/bamtools_cmd.dir/flags.make +8 -0
- data/ext/bamtools/src/toolkit/CMakeFiles/bamtools_cmd.dir/link.txt +1 -0
- data/ext/bamtools/src/toolkit/CMakeFiles/bamtools_cmd.dir/progress.make +15 -0
- data/ext/bamtools/src/toolkit/CMakeFiles/progress.marks +1 -0
- data/ext/bamtools/src/toolkit/CMakeLists.txt +44 -0
- data/ext/bamtools/src/toolkit/Makefile +560 -0
- data/ext/bamtools/src/toolkit/bamtools.cpp +163 -0
- data/ext/bamtools/src/toolkit/bamtools_convert.cpp +888 -0
- data/ext/bamtools/src/toolkit/bamtools_convert.h +37 -0
- data/ext/bamtools/src/toolkit/bamtools_count.cpp +187 -0
- data/ext/bamtools/src/toolkit/bamtools_count.h +37 -0
- data/ext/bamtools/src/toolkit/bamtools_coverage.cpp +196 -0
- data/ext/bamtools/src/toolkit/bamtools_coverage.h +37 -0
- data/ext/bamtools/src/toolkit/bamtools_filter.cpp +911 -0
- data/ext/bamtools/src/toolkit/bamtools_filter.h +37 -0
- data/ext/bamtools/src/toolkit/bamtools_header.cpp +122 -0
- data/ext/bamtools/src/toolkit/bamtools_header.h +38 -0
- data/ext/bamtools/src/toolkit/bamtools_index.cpp +126 -0
- data/ext/bamtools/src/toolkit/bamtools_index.h +37 -0
- data/ext/bamtools/src/toolkit/bamtools_merge.cpp +221 -0
- data/ext/bamtools/src/toolkit/bamtools_merge.h +37 -0
- data/ext/bamtools/src/toolkit/bamtools_random.cpp +255 -0
- data/ext/bamtools/src/toolkit/bamtools_random.h +37 -0
- data/ext/bamtools/src/toolkit/bamtools_resolve.cpp +1396 -0
- data/ext/bamtools/src/toolkit/bamtools_resolve.h +42 -0
- data/ext/bamtools/src/toolkit/bamtools_revert.cpp +194 -0
- data/ext/bamtools/src/toolkit/bamtools_revert.h +37 -0
- data/ext/bamtools/src/toolkit/bamtools_sort.cpp +410 -0
- data/ext/bamtools/src/toolkit/bamtools_sort.h +37 -0
- data/ext/bamtools/src/toolkit/bamtools_split.cpp +551 -0
- data/ext/bamtools/src/toolkit/bamtools_split.h +38 -0
- data/ext/bamtools/src/toolkit/bamtools_stats.cpp +286 -0
- data/ext/bamtools/src/toolkit/bamtools_stats.h +37 -0
- data/ext/bamtools/src/toolkit/bamtools_tool.h +35 -0
- data/ext/bamtools/src/toolkit/bamtools_version.h +20 -0
- data/ext/bamtools/src/toolkit/bamtools_version.h.in +20 -0
- data/ext/bamtools/src/toolkit/cmake_install.cmake +52 -0
- data/ext/bamtools/src/utils/CMakeFiles/BamTools-utils.dir/CXX.includecache +250 -0
- data/ext/bamtools/src/utils/CMakeFiles/BamTools-utils.dir/DependInfo.cmake +29 -0
- data/ext/bamtools/src/utils/CMakeFiles/BamTools-utils.dir/bamtools_fasta.cpp.o +0 -0
- data/ext/bamtools/src/utils/CMakeFiles/BamTools-utils.dir/bamtools_options.cpp.o +0 -0
- data/ext/bamtools/src/utils/CMakeFiles/BamTools-utils.dir/bamtools_pileup_engine.cpp.o +0 -0
- data/ext/bamtools/src/utils/CMakeFiles/BamTools-utils.dir/bamtools_utilities.cpp.o +0 -0
- data/ext/bamtools/src/utils/CMakeFiles/BamTools-utils.dir/build.make +184 -0
- data/ext/bamtools/src/utils/CMakeFiles/BamTools-utils.dir/cmake_clean.cmake +14 -0
- data/ext/bamtools/src/utils/CMakeFiles/BamTools-utils.dir/depend.internal +40 -0
- data/ext/bamtools/src/utils/CMakeFiles/BamTools-utils.dir/depend.make +40 -0
- data/ext/bamtools/src/utils/CMakeFiles/BamTools-utils.dir/flags.make +8 -0
- data/ext/bamtools/src/utils/CMakeFiles/BamTools-utils.dir/link.txt +1 -0
- data/ext/bamtools/src/utils/CMakeFiles/BamTools-utils.dir/progress.make +5 -0
- data/ext/bamtools/src/utils/CMakeFiles/CMakeDirectoryInformation.cmake +23 -0
- data/ext/bamtools/src/utils/CMakeFiles/progress.marks +1 -0
- data/ext/bamtools/src/utils/CMakeLists.txt +30 -0
- data/ext/bamtools/src/utils/Makefile +290 -0
- data/ext/bamtools/src/utils/bamtools_fasta.cpp +632 -0
- data/ext/bamtools/src/utils/bamtools_fasta.h +47 -0
- data/ext/bamtools/src/utils/bamtools_filter_engine.h +552 -0
- data/ext/bamtools/src/utils/bamtools_filter_properties.h +195 -0
- data/ext/bamtools/src/utils/bamtools_filter_ruleparser.h +319 -0
- data/ext/bamtools/src/utils/bamtools_options.cpp +287 -0
- data/ext/bamtools/src/utils/bamtools_options.h +213 -0
- data/ext/bamtools/src/utils/bamtools_pileup_engine.cpp +327 -0
- data/ext/bamtools/src/utils/bamtools_pileup_engine.h +94 -0
- data/ext/bamtools/src/utils/bamtools_utilities.cpp +333 -0
- data/ext/bamtools/src/utils/bamtools_utilities.h +67 -0
- data/ext/bamtools/src/utils/bamtools_variant.h +128 -0
- data/ext/bamtools/src/utils/cmake_install.cmake +29 -0
- data/ext/bamtools/src/utils/utils_global.h +21 -0
- data/lib/ngs_server/version.rb +3 -0
- data/lib/ngs_server.rb +3 -0
- data/ngs_server.gemspec +23 -0
- metadata +339 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
// ***************************************************************************
|
|
2
|
+
// BamHeader_p.h (c) 2010 Derek Barnett
|
|
3
|
+
// Marth Lab, Department of Biology, Boston College
|
|
4
|
+
// ---------------------------------------------------------------------------
|
|
5
|
+
// Last modified: 26 January 2011 (DB)
|
|
6
|
+
// ---------------------------------------------------------------------------
|
|
7
|
+
// Provides the basic functionality for handling BAM headers.
|
|
8
|
+
// ***************************************************************************
|
|
9
|
+
|
|
10
|
+
#ifndef BAMHEADER_P_H
|
|
11
|
+
#define BAMHEADER_P_H
|
|
12
|
+
|
|
13
|
+
// -------------
|
|
14
|
+
// W A R N I N G
|
|
15
|
+
// -------------
|
|
16
|
+
//
|
|
17
|
+
// This file is not part of the BamTools API. It exists purely as an
|
|
18
|
+
// implementation detail. This header file may change from version to version
|
|
19
|
+
// without notice, or even be removed.
|
|
20
|
+
//
|
|
21
|
+
// We mean it.
|
|
22
|
+
|
|
23
|
+
#include <api/SamHeader.h>
|
|
24
|
+
#include <string>
|
|
25
|
+
|
|
26
|
+
namespace BamTools {
|
|
27
|
+
namespace Internal {
|
|
28
|
+
|
|
29
|
+
class BgzfStream;
|
|
30
|
+
|
|
31
|
+
class BamHeader {
|
|
32
|
+
|
|
33
|
+
// ctor & dtor
|
|
34
|
+
public:
|
|
35
|
+
BamHeader(void);
|
|
36
|
+
~BamHeader(void);
|
|
37
|
+
|
|
38
|
+
// BamHeader interface
|
|
39
|
+
public:
|
|
40
|
+
// clear SamHeader data
|
|
41
|
+
void Clear(void);
|
|
42
|
+
// return true if SamHeader data is valid
|
|
43
|
+
bool IsValid(void) const;
|
|
44
|
+
// load BAM header ('magic number' and SAM header text) from BGZF stream
|
|
45
|
+
// returns true if all OK
|
|
46
|
+
bool Load(BgzfStream* stream);
|
|
47
|
+
// returns (editable) copy of SamHeader data object
|
|
48
|
+
SamHeader ToSamHeader(void) const;
|
|
49
|
+
// returns SAM-formatted string of header data
|
|
50
|
+
std::string ToString(void) const;
|
|
51
|
+
|
|
52
|
+
// internal methods
|
|
53
|
+
private:
|
|
54
|
+
// reads magic number from BGZF stream, returns true if valid
|
|
55
|
+
bool CheckMagicNumber(BgzfStream* stream);
|
|
56
|
+
// reads SAM header length from BGZF stream, stores it in @length
|
|
57
|
+
// returns read success/fail status
|
|
58
|
+
bool ReadHeaderLength(BgzfStream* stream, uint32_t& length);
|
|
59
|
+
// reads SAM header text from BGZF stream, stores in SamHeader object
|
|
60
|
+
// returns read success/fail status
|
|
61
|
+
bool ReadHeaderText(BgzfStream* stream, const uint32_t& length);
|
|
62
|
+
|
|
63
|
+
// data members
|
|
64
|
+
private:
|
|
65
|
+
SamHeader m_header;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
} // namespace Internal
|
|
69
|
+
} // namespace BamTools
|
|
70
|
+
|
|
71
|
+
#endif // BAMHEADER_P_H
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
// ***************************************************************************
|
|
2
|
+
// BamIndexFactory_p.cpp (c) 2011 Derek Barnett
|
|
3
|
+
// Marth Lab, Department of Biology, Boston College
|
|
4
|
+
// ---------------------------------------------------------------------------
|
|
5
|
+
// Last modified: 5 April 2011 (DB)
|
|
6
|
+
// ---------------------------------------------------------------------------
|
|
7
|
+
// Provides interface for generating BamIndex implementations
|
|
8
|
+
// ***************************************************************************
|
|
9
|
+
|
|
10
|
+
#include <api/BamAux.h>
|
|
11
|
+
#include <api/internal/BamIndexFactory_p.h>
|
|
12
|
+
#include <api/internal/BamStandardIndex_p.h>
|
|
13
|
+
#include <api/internal/BamToolsIndex_p.h>
|
|
14
|
+
using namespace BamTools;
|
|
15
|
+
using namespace BamTools::Internal;
|
|
16
|
+
|
|
17
|
+
#include <cstdio>
|
|
18
|
+
using namespace std;
|
|
19
|
+
|
|
20
|
+
// generates index filename from BAM filename (depending on requested type)
|
|
21
|
+
// if type is unknown, returns empty string
|
|
22
|
+
const string BamIndexFactory::CreateIndexFilename(const string& bamFilename,
|
|
23
|
+
const BamIndex::IndexType& type)
|
|
24
|
+
{
|
|
25
|
+
switch ( type ) {
|
|
26
|
+
case ( BamIndex::STANDARD ) : return ( bamFilename + BamStandardIndex::Extension() );
|
|
27
|
+
case ( BamIndex::BAMTOOLS ) : return ( bamFilename + BamToolsIndex::Extension() );
|
|
28
|
+
default :
|
|
29
|
+
cerr << "BamIndexFactory ERROR: unknown index type" << type << endl;
|
|
30
|
+
return string();
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// creates a new BamIndex object, depending on extension of @indexFilename
|
|
35
|
+
BamIndex* BamIndexFactory::CreateIndexFromFilename(const string& indexFilename, BamReaderPrivate* reader) {
|
|
36
|
+
|
|
37
|
+
// if file doesn't exist, return null index
|
|
38
|
+
if ( !BamTools::FileExists(indexFilename) )
|
|
39
|
+
return 0;
|
|
40
|
+
|
|
41
|
+
// get file extension from index filename, including dot (".EXT")
|
|
42
|
+
// if can't get file extension, return null index
|
|
43
|
+
const string extension = FileExtension(indexFilename);
|
|
44
|
+
if ( extension.empty() )
|
|
45
|
+
return 0;
|
|
46
|
+
|
|
47
|
+
// create index based on extension
|
|
48
|
+
if ( extension == BamStandardIndex::Extension() ) return new BamStandardIndex(reader);
|
|
49
|
+
else if ( extension == BamToolsIndex::Extension() ) return new BamToolsIndex(reader);
|
|
50
|
+
else
|
|
51
|
+
return 0;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// creates a new BamIndex, object of requested @type
|
|
55
|
+
BamIndex* BamIndexFactory::CreateIndexOfType(const BamIndex::IndexType& type,
|
|
56
|
+
BamReaderPrivate* reader)
|
|
57
|
+
{
|
|
58
|
+
switch ( type ) {
|
|
59
|
+
case ( BamIndex::STANDARD ) : return new BamStandardIndex(reader);
|
|
60
|
+
case ( BamIndex::BAMTOOLS ) : return new BamToolsIndex(reader);
|
|
61
|
+
default :
|
|
62
|
+
cerr << "BamIndexFactory ERROR: unknown index type " << type << endl;
|
|
63
|
+
return 0;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// retrieves file extension (including '.')
|
|
68
|
+
const string BamIndexFactory::FileExtension(const string& filename) {
|
|
69
|
+
|
|
70
|
+
// if filename cannot contain valid path + extension, return empty string
|
|
71
|
+
if ( filename.empty() || filename.length() <= 4 )
|
|
72
|
+
return string();
|
|
73
|
+
|
|
74
|
+
// look for last dot in filename
|
|
75
|
+
size_t lastDotPosition = filename.find_last_of('.');
|
|
76
|
+
|
|
77
|
+
// if none found, return empty string
|
|
78
|
+
if ( lastDotPosition == string::npos )
|
|
79
|
+
return string();
|
|
80
|
+
|
|
81
|
+
// return substring from last dot position
|
|
82
|
+
return filename.substr(lastDotPosition);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// returns name of existing index file that corresponds to @bamFilename
|
|
86
|
+
// will defer to @preferredType if possible, if not will attempt to load any supported type
|
|
87
|
+
// returns empty string if not found
|
|
88
|
+
const string BamIndexFactory::FindIndexFilename(const string& bamFilename,
|
|
89
|
+
const BamIndex::IndexType& preferredType)
|
|
90
|
+
{
|
|
91
|
+
// try to find index of preferred type first
|
|
92
|
+
// return index filename if found
|
|
93
|
+
string indexFilename = CreateIndexFilename(bamFilename, preferredType);
|
|
94
|
+
if ( !indexFilename.empty() && BamTools::FileExists(indexFilename) )
|
|
95
|
+
return indexFilename;
|
|
96
|
+
|
|
97
|
+
// couldn't find preferred type, try the other supported types
|
|
98
|
+
// return index filename if found
|
|
99
|
+
if ( preferredType != BamIndex::STANDARD ) {
|
|
100
|
+
indexFilename = CreateIndexFilename(bamFilename, BamIndex::STANDARD);
|
|
101
|
+
if ( !indexFilename.empty() && BamTools::FileExists(indexFilename) )
|
|
102
|
+
return indexFilename;
|
|
103
|
+
}
|
|
104
|
+
if ( preferredType != BamIndex::BAMTOOLS ) {
|
|
105
|
+
indexFilename = CreateIndexFilename(bamFilename, BamIndex::BAMTOOLS);
|
|
106
|
+
if ( !indexFilename.empty() && BamTools::FileExists(indexFilename) )
|
|
107
|
+
return indexFilename;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// otherwise couldn't find any index matching this filename
|
|
111
|
+
return string();
|
|
112
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
// ***************************************************************************
|
|
2
|
+
// BamIndexFactory_p.h (c) 2011 Derek Barnett
|
|
3
|
+
// Marth Lab, Department of Biology, Boston College
|
|
4
|
+
// ---------------------------------------------------------------------------
|
|
5
|
+
// Last modified: 5 April 2011 (DB)
|
|
6
|
+
// ---------------------------------------------------------------------------
|
|
7
|
+
// Provides interface for generating BamIndex implementations
|
|
8
|
+
// ***************************************************************************
|
|
9
|
+
|
|
10
|
+
#ifndef BAMINDEX_FACTORY_P_H
|
|
11
|
+
#define BAMINDEX_FACTORY_P_H
|
|
12
|
+
|
|
13
|
+
#include <api/BamIndex.h>
|
|
14
|
+
#include <string>
|
|
15
|
+
|
|
16
|
+
namespace BamTools {
|
|
17
|
+
namespace Internal {
|
|
18
|
+
|
|
19
|
+
class BamIndexFactory {
|
|
20
|
+
|
|
21
|
+
// static interface methods
|
|
22
|
+
public:
|
|
23
|
+
// creates a new BamIndex object, depending on extension of @indexFilename
|
|
24
|
+
static BamIndex* CreateIndexFromFilename(const std::string& indexFilename,
|
|
25
|
+
BamReaderPrivate* reader);
|
|
26
|
+
// creates a new BamIndex object, of requested @type
|
|
27
|
+
static BamIndex* CreateIndexOfType(const BamIndex::IndexType& type,
|
|
28
|
+
BamReaderPrivate* reader);
|
|
29
|
+
// returns name of existing index file that corresponds to @bamFilename
|
|
30
|
+
// will defer to @preferredType if possible
|
|
31
|
+
// if @preferredType not found, will attempt to load any supported index type
|
|
32
|
+
// returns empty string if no index file (of any type) is found
|
|
33
|
+
static const std::string FindIndexFilename(const std::string& bamFilename,
|
|
34
|
+
const BamIndex::IndexType& preferredType);
|
|
35
|
+
|
|
36
|
+
// internal methods
|
|
37
|
+
public:
|
|
38
|
+
// generates index filename from BAM filename (depending on requested type)
|
|
39
|
+
// if type is unknown, returns empty string
|
|
40
|
+
static const std::string CreateIndexFilename(const std::string& bamFilename,
|
|
41
|
+
const BamIndex::IndexType& type);
|
|
42
|
+
// retrieves file extension (including '.')
|
|
43
|
+
static const std::string FileExtension(const std::string& filename);
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
} // namespace Internal
|
|
47
|
+
} // namespace BamTools
|
|
48
|
+
|
|
49
|
+
#endif // BAMINDEX_FACTORY_P_H
|
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
// ***************************************************************************
|
|
2
|
+
// BamMultiMerger_p.h (c) 2010 Derek Barnett
|
|
3
|
+
// Marth Lab, Department of Biology, Boston College
|
|
4
|
+
// ---------------------------------------------------------------------------
|
|
5
|
+
// Last modified: 9 September 2011 (DB)
|
|
6
|
+
// ---------------------------------------------------------------------------
|
|
7
|
+
// Provides merging functionality for BamMultiReader. At this point, supports
|
|
8
|
+
// sorting results by (refId, position) or by read name.
|
|
9
|
+
// ***************************************************************************
|
|
10
|
+
|
|
11
|
+
#ifndef BAMMULTIMERGER_P_H
|
|
12
|
+
#define BAMMULTIMERGER_P_H
|
|
13
|
+
|
|
14
|
+
// -------------
|
|
15
|
+
// W A R N I N G
|
|
16
|
+
// -------------
|
|
17
|
+
//
|
|
18
|
+
// This file is not part of the BamTools API. It exists purely as an
|
|
19
|
+
// implementation detail. This header file may change from version to version
|
|
20
|
+
// without notice, or even be removed.
|
|
21
|
+
//
|
|
22
|
+
// We mean it.
|
|
23
|
+
|
|
24
|
+
#include <api/BamAlignment.h>
|
|
25
|
+
#include <api/BamReader.h>
|
|
26
|
+
#include <map>
|
|
27
|
+
#include <queue>
|
|
28
|
+
#include <string>
|
|
29
|
+
#include <utility>
|
|
30
|
+
|
|
31
|
+
namespace BamTools {
|
|
32
|
+
namespace Internal {
|
|
33
|
+
|
|
34
|
+
typedef std::pair<BamReader*, BamAlignment*> ReaderAlignment;
|
|
35
|
+
|
|
36
|
+
// generic MultiMerger interface
|
|
37
|
+
class IBamMultiMerger {
|
|
38
|
+
|
|
39
|
+
public:
|
|
40
|
+
IBamMultiMerger(void) { }
|
|
41
|
+
virtual ~IBamMultiMerger(void) { }
|
|
42
|
+
|
|
43
|
+
public:
|
|
44
|
+
virtual void Add(ReaderAlignment value) =0;
|
|
45
|
+
virtual void Clear(void) =0;
|
|
46
|
+
virtual const ReaderAlignment& First(void) const =0;
|
|
47
|
+
virtual bool IsEmpty(void) const =0;
|
|
48
|
+
virtual void Remove(BamReader* reader) =0;
|
|
49
|
+
virtual int Size(void) const =0;
|
|
50
|
+
virtual ReaderAlignment TakeFirst(void) =0;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
// IBamMultiMerger implementation - sorted on BamAlignment: (RefId, Position)
|
|
54
|
+
class PositionMultiMerger : public IBamMultiMerger {
|
|
55
|
+
|
|
56
|
+
public:
|
|
57
|
+
PositionMultiMerger(void) : IBamMultiMerger() { }
|
|
58
|
+
~PositionMultiMerger(void) { }
|
|
59
|
+
|
|
60
|
+
public:
|
|
61
|
+
void Add(ReaderAlignment value);
|
|
62
|
+
void Clear(void);
|
|
63
|
+
const ReaderAlignment& First(void) const;
|
|
64
|
+
bool IsEmpty(void) const;
|
|
65
|
+
void Remove(BamReader* reader);
|
|
66
|
+
int Size(void) const;
|
|
67
|
+
ReaderAlignment TakeFirst(void);
|
|
68
|
+
|
|
69
|
+
private:
|
|
70
|
+
typedef std::pair<int, int> KeyType;
|
|
71
|
+
typedef ReaderAlignment ValueType;
|
|
72
|
+
typedef std::pair<KeyType, ValueType> ElementType;
|
|
73
|
+
|
|
74
|
+
typedef std::multimap<KeyType, ValueType> ContainerType;
|
|
75
|
+
typedef ContainerType::iterator DataIterator;
|
|
76
|
+
typedef ContainerType::const_iterator DataConstIterator;
|
|
77
|
+
|
|
78
|
+
ContainerType m_data;
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
// IBamMultiMerger implementation - sorted on BamAlignment: Name
|
|
82
|
+
class ReadNameMultiMerger : public IBamMultiMerger {
|
|
83
|
+
|
|
84
|
+
public:
|
|
85
|
+
ReadNameMultiMerger(void) : IBamMultiMerger() { }
|
|
86
|
+
~ReadNameMultiMerger(void) { }
|
|
87
|
+
|
|
88
|
+
public:
|
|
89
|
+
void Add(ReaderAlignment value);
|
|
90
|
+
void Clear(void);
|
|
91
|
+
const ReaderAlignment& First(void) const;
|
|
92
|
+
bool IsEmpty(void) const;
|
|
93
|
+
void Remove(BamReader* reader);
|
|
94
|
+
int Size(void) const;
|
|
95
|
+
ReaderAlignment TakeFirst(void);
|
|
96
|
+
|
|
97
|
+
private:
|
|
98
|
+
typedef std::string KeyType;
|
|
99
|
+
typedef ReaderAlignment ValueType;
|
|
100
|
+
typedef std::pair<KeyType, ValueType> ElementType;
|
|
101
|
+
|
|
102
|
+
typedef std::multimap<KeyType, ValueType> ContainerType;
|
|
103
|
+
typedef ContainerType::iterator DataIterator;
|
|
104
|
+
typedef ContainerType::const_iterator DataConstIterator;
|
|
105
|
+
|
|
106
|
+
ContainerType m_data;
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
// IBamMultiMerger implementation - unsorted BAM file(s)
|
|
110
|
+
class UnsortedMultiMerger : public IBamMultiMerger {
|
|
111
|
+
|
|
112
|
+
public:
|
|
113
|
+
UnsortedMultiMerger(void) : IBamMultiMerger() { }
|
|
114
|
+
~UnsortedMultiMerger(void) { }
|
|
115
|
+
|
|
116
|
+
public:
|
|
117
|
+
void Add(ReaderAlignment value);
|
|
118
|
+
void Clear(void);
|
|
119
|
+
const ReaderAlignment& First(void) const;
|
|
120
|
+
bool IsEmpty(void) const;
|
|
121
|
+
void Remove(BamReader* reader);
|
|
122
|
+
int Size(void) const;
|
|
123
|
+
ReaderAlignment TakeFirst(void);
|
|
124
|
+
|
|
125
|
+
private:
|
|
126
|
+
typedef ReaderAlignment ElementType;
|
|
127
|
+
typedef std::vector<ReaderAlignment> ContainerType;
|
|
128
|
+
typedef ContainerType::iterator DataIterator;
|
|
129
|
+
typedef ContainerType::const_iterator DataConstIterator;
|
|
130
|
+
|
|
131
|
+
ContainerType m_data;
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
// ------------------------------------------
|
|
135
|
+
// PositionMultiMerger implementation
|
|
136
|
+
|
|
137
|
+
inline void PositionMultiMerger::Add(ReaderAlignment value) {
|
|
138
|
+
const KeyType key( value.second->RefID, value.second->Position );
|
|
139
|
+
m_data.insert( ElementType(key, value) );
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
inline void PositionMultiMerger::Clear(void) {
|
|
143
|
+
m_data.clear();
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
inline const ReaderAlignment& PositionMultiMerger::First(void) const {
|
|
147
|
+
const ElementType& entry = (*m_data.begin());
|
|
148
|
+
return entry.second;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
inline bool PositionMultiMerger::IsEmpty(void) const {
|
|
152
|
+
return m_data.empty();
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
inline void PositionMultiMerger::Remove(BamReader* reader) {
|
|
156
|
+
|
|
157
|
+
if ( reader == 0 ) return;
|
|
158
|
+
const std::string filenameToRemove = reader->GetFilename();
|
|
159
|
+
|
|
160
|
+
// iterate over readers in cache
|
|
161
|
+
DataIterator dataIter = m_data.begin();
|
|
162
|
+
DataIterator dataEnd = m_data.end();
|
|
163
|
+
for ( ; dataIter != dataEnd; ++dataIter ) {
|
|
164
|
+
const ValueType& entry = (*dataIter).second;
|
|
165
|
+
const BamReader* entryReader = entry.first;
|
|
166
|
+
if ( entryReader == 0 ) continue;
|
|
167
|
+
|
|
168
|
+
// remove iterator on match
|
|
169
|
+
if ( entryReader->GetFilename() == filenameToRemove ) {
|
|
170
|
+
m_data.erase(dataIter);
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
inline int PositionMultiMerger::Size(void) const {
|
|
177
|
+
return m_data.size();
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
inline ReaderAlignment PositionMultiMerger::TakeFirst(void) {
|
|
181
|
+
DataIterator first = m_data.begin();
|
|
182
|
+
ReaderAlignment next = (*first).second;
|
|
183
|
+
m_data.erase(first);
|
|
184
|
+
return next;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
// ------------------------------------------
|
|
188
|
+
// ReadNameMultiMerger implementation
|
|
189
|
+
|
|
190
|
+
inline void ReadNameMultiMerger::Add(ReaderAlignment value) {
|
|
191
|
+
BamAlignment* al = value.second;
|
|
192
|
+
if ( al->BuildCharData() ) {
|
|
193
|
+
const KeyType key(al->Name);
|
|
194
|
+
m_data.insert( ElementType(key, value) );
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
inline void ReadNameMultiMerger::Clear(void) {
|
|
199
|
+
m_data.clear();
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
inline const ReaderAlignment& ReadNameMultiMerger::First(void) const {
|
|
203
|
+
const ElementType& entry = (*m_data.begin());
|
|
204
|
+
return entry.second;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
inline bool ReadNameMultiMerger::IsEmpty(void) const {
|
|
208
|
+
return m_data.empty();
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
inline void ReadNameMultiMerger::Remove(BamReader* reader) {
|
|
212
|
+
|
|
213
|
+
if ( reader == 0 ) return;
|
|
214
|
+
const std::string filenameToRemove = reader->GetFilename();
|
|
215
|
+
|
|
216
|
+
// iterate over readers in cache
|
|
217
|
+
DataIterator dataIter = m_data.begin();
|
|
218
|
+
DataIterator dataEnd = m_data.end();
|
|
219
|
+
for ( ; dataIter != dataEnd; ++dataIter ) {
|
|
220
|
+
const ValueType& entry = (*dataIter).second;
|
|
221
|
+
const BamReader* entryReader = entry.first;
|
|
222
|
+
if ( entryReader == 0 ) continue;
|
|
223
|
+
|
|
224
|
+
// remove iterator on match
|
|
225
|
+
if ( entryReader->GetFilename() == filenameToRemove ) {
|
|
226
|
+
m_data.erase(dataIter);
|
|
227
|
+
return;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
inline int ReadNameMultiMerger::Size(void) const {
|
|
234
|
+
return m_data.size();
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
inline ReaderAlignment ReadNameMultiMerger::TakeFirst(void) {
|
|
238
|
+
DataIterator first = m_data.begin();
|
|
239
|
+
ReaderAlignment next = (*first).second;
|
|
240
|
+
m_data.erase(first);
|
|
241
|
+
return next;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
// ------------------------------------------
|
|
245
|
+
// UnsortedMultiMerger implementation
|
|
246
|
+
|
|
247
|
+
inline void UnsortedMultiMerger::Add(ReaderAlignment value) {
|
|
248
|
+
m_data.push_back(value);
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
inline void UnsortedMultiMerger::Clear(void) {
|
|
252
|
+
for (size_t i = 0; i < m_data.size(); ++i )
|
|
253
|
+
m_data.pop_back();
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
inline const ReaderAlignment& UnsortedMultiMerger::First(void) const {
|
|
257
|
+
return m_data.front();
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
inline bool UnsortedMultiMerger::IsEmpty(void) const {
|
|
261
|
+
return m_data.empty();
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
inline void UnsortedMultiMerger::Remove(BamReader* reader) {
|
|
265
|
+
|
|
266
|
+
if ( reader == 0 ) return;
|
|
267
|
+
const std::string filenameToRemove = reader->GetFilename();
|
|
268
|
+
|
|
269
|
+
// iterate over readers in cache
|
|
270
|
+
DataIterator dataIter = m_data.begin();
|
|
271
|
+
DataIterator dataEnd = m_data.end();
|
|
272
|
+
for ( ; dataIter != dataEnd; ++dataIter ) {
|
|
273
|
+
const BamReader* entryReader = (*dataIter).first;
|
|
274
|
+
if ( entryReader == 0 ) continue;
|
|
275
|
+
|
|
276
|
+
// remove iterator on match
|
|
277
|
+
if ( entryReader->GetFilename() == filenameToRemove ) {
|
|
278
|
+
m_data.erase(dataIter);
|
|
279
|
+
return;
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
inline int UnsortedMultiMerger::Size(void) const {
|
|
285
|
+
return m_data.size();
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
inline ReaderAlignment UnsortedMultiMerger::TakeFirst(void) {
|
|
289
|
+
ReaderAlignment first = m_data.front();
|
|
290
|
+
m_data.erase( m_data.begin() );
|
|
291
|
+
return first;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
} // namespace Internal
|
|
295
|
+
} // namespace BamTools
|
|
296
|
+
|
|
297
|
+
#endif // BAMMULTIMERGER_P_H
|