ngs_server 0.1
Sign up to get free protection for your applications and to get access to all the features.
- 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,292 @@
|
|
1
|
+
// ***************************************************************************
|
2
|
+
// SamSequenceDictionary.cpp (c) 2010 Derek Barnett
|
3
|
+
// Marth Lab, Department of Biology, Boston College
|
4
|
+
// ---------------------------------------------------------------------------
|
5
|
+
// Last modified: 18 April 2011 (DB)
|
6
|
+
// ---------------------------------------------------------------------------
|
7
|
+
// Provides methods for operating on a collection of SamSequence entries.
|
8
|
+
// *************************************************************************
|
9
|
+
|
10
|
+
#include <api/SamSequenceDictionary.h>
|
11
|
+
using namespace BamTools;
|
12
|
+
|
13
|
+
#include <iostream>
|
14
|
+
using namespace std;
|
15
|
+
|
16
|
+
/*! \class BamTools::SamSequenceDictionary
|
17
|
+
\brief Container of SamSequence entries.
|
18
|
+
|
19
|
+
Provides methods for operating on a collection of SamSequence entries.
|
20
|
+
*/
|
21
|
+
|
22
|
+
/*! \fn SamSequenceDictionary::SamSequenceDictionary(void)
|
23
|
+
\brief constructor
|
24
|
+
*/
|
25
|
+
SamSequenceDictionary::SamSequenceDictionary(void) { }
|
26
|
+
|
27
|
+
/*! \fn SamSequenceDictionary::SamSequenceDictionary(const SamSequenceDictionary& other)
|
28
|
+
\brief copy constructor
|
29
|
+
*/
|
30
|
+
SamSequenceDictionary::SamSequenceDictionary(const SamSequenceDictionary& other)
|
31
|
+
: m_data(other.m_data)
|
32
|
+
{ }
|
33
|
+
|
34
|
+
/*! \fn SamSequenceDictionary::~SamSequenceDictionary(void)
|
35
|
+
\brief destructor
|
36
|
+
*/
|
37
|
+
SamSequenceDictionary::~SamSequenceDictionary(void) { }
|
38
|
+
|
39
|
+
/*! \fn void SamSequenceDictionary::Add(const SamSequence& sequence)
|
40
|
+
\brief Adds a sequence to the dictionary.
|
41
|
+
|
42
|
+
Duplicate entries are silently discarded.
|
43
|
+
|
44
|
+
\param sequence entry to be added
|
45
|
+
*/
|
46
|
+
void SamSequenceDictionary::Add(const SamSequence& sequence) {
|
47
|
+
|
48
|
+
// TODO: report error on attempted duplicate?
|
49
|
+
|
50
|
+
if ( IsEmpty() || !Contains(sequence) )
|
51
|
+
m_data.push_back(sequence);
|
52
|
+
}
|
53
|
+
|
54
|
+
/*! \fn void SamSequenceDictionary::Add(const std::string& name, const int& length)
|
55
|
+
\brief Adds a sequence to the dictionary.
|
56
|
+
|
57
|
+
This is an overloaded function.
|
58
|
+
|
59
|
+
\param name name of sequence entry to be added
|
60
|
+
\param length length of sequence entry to be added
|
61
|
+
\sa Add()
|
62
|
+
*/
|
63
|
+
void SamSequenceDictionary::Add(const std::string& name, const int& length) {
|
64
|
+
Add( SamSequence(name, length) );
|
65
|
+
}
|
66
|
+
|
67
|
+
/*! \fn void SamSequenceDictionary::Add(const std::vector<SamSequence>& sequences)
|
68
|
+
\brief Adds multiple sequences to the dictionary.
|
69
|
+
|
70
|
+
This is an overloaded function.
|
71
|
+
|
72
|
+
\param sequences entries to be added
|
73
|
+
\sa Add()
|
74
|
+
*/
|
75
|
+
void SamSequenceDictionary::Add(const std::vector<SamSequence>& sequences) {
|
76
|
+
vector<SamSequence>::const_iterator seqIter = sequences.begin();
|
77
|
+
vector<SamSequence>::const_iterator seqEnd = sequences.end();
|
78
|
+
for ( ; seqIter!= seqEnd; ++seqIter )
|
79
|
+
Add(*seqIter);
|
80
|
+
}
|
81
|
+
|
82
|
+
/*! \fn void SamSequenceDictionary::Add(const std::map<std::string, int>& sequenceMap)
|
83
|
+
\brief Adds multiple sequences to the dictionary.
|
84
|
+
|
85
|
+
This is an overloaded function.
|
86
|
+
|
87
|
+
\param sequenceMap map of sequence entries (name => length) to be added
|
88
|
+
\sa Add()
|
89
|
+
*/
|
90
|
+
void SamSequenceDictionary::Add(const std::map<std::string, int>& sequenceMap) {
|
91
|
+
map<string, int>::const_iterator seqIter = sequenceMap.begin();
|
92
|
+
map<string, int>::const_iterator seqEnd = sequenceMap.end();
|
93
|
+
for ( ; seqIter != seqEnd; ++seqIter ) {
|
94
|
+
const string& name = (*seqIter).first;
|
95
|
+
const int& length = (*seqIter).second;
|
96
|
+
Add( SamSequence(name, length) );
|
97
|
+
}
|
98
|
+
}
|
99
|
+
|
100
|
+
/*! \fn SamSequenceIterator SamSequenceDictionary::Begin(void)
|
101
|
+
\return an STL iterator pointing to the first sequence
|
102
|
+
\sa ConstBegin(), End()
|
103
|
+
*/
|
104
|
+
SamSequenceIterator SamSequenceDictionary::Begin(void) {
|
105
|
+
return m_data.begin();
|
106
|
+
}
|
107
|
+
|
108
|
+
/*! \fn SamSequenceConstIterator SamSequenceDictionary::Begin(void) const
|
109
|
+
\return an STL const_iterator pointing to the first sequence
|
110
|
+
|
111
|
+
This is an overloaded function.
|
112
|
+
|
113
|
+
\sa ConstBegin(), End()
|
114
|
+
*/
|
115
|
+
SamSequenceConstIterator SamSequenceDictionary::Begin(void) const {
|
116
|
+
return m_data.begin();
|
117
|
+
}
|
118
|
+
|
119
|
+
/*! \fn void SamSequenceDictionary::Clear(void)
|
120
|
+
\brief Clears all sequence entries.
|
121
|
+
*/
|
122
|
+
void SamSequenceDictionary::Clear(void) {
|
123
|
+
m_data.clear();
|
124
|
+
}
|
125
|
+
|
126
|
+
/*! \fn SamSequenceConstIterator SamSequenceDictionary::ConstBegin(void) const
|
127
|
+
\return an STL const_iterator pointing to the first sequence
|
128
|
+
\sa Begin(), ConstEnd()
|
129
|
+
*/
|
130
|
+
SamSequenceConstIterator SamSequenceDictionary::ConstBegin(void) const {
|
131
|
+
return m_data.begin();
|
132
|
+
}
|
133
|
+
|
134
|
+
/*! \fn SamSequenceConstIterator SamSequenceDictionary::ConstEnd(void) const
|
135
|
+
\return an STL const_iterator pointing to the imaginary entry after the last sequence
|
136
|
+
\sa End(), ConstBegin()
|
137
|
+
*/
|
138
|
+
SamSequenceConstIterator SamSequenceDictionary::ConstEnd(void) const {
|
139
|
+
return m_data.end();
|
140
|
+
}
|
141
|
+
|
142
|
+
/*! \fn bool SamSequenceDictionary::Contains(const std::string& sequenceName) const
|
143
|
+
\brief Returns true if dictionary contains sequence.
|
144
|
+
\param sequenceName search for sequence matching this name
|
145
|
+
\return \c true if dictionary contains a sequence with this name
|
146
|
+
*/
|
147
|
+
bool SamSequenceDictionary::Contains(const std::string& sequenceName) const {
|
148
|
+
return ( IndexOf(sequenceName) != (int)m_data.size() );
|
149
|
+
}
|
150
|
+
|
151
|
+
/*! \fn bool SamSequenceDictionary::Contains(const SamSequence& sequence) const
|
152
|
+
\brief Returns true if dictionary contains sequence (matches on name).
|
153
|
+
|
154
|
+
This is an overloaded function.
|
155
|
+
|
156
|
+
\param sequence search for this sequence
|
157
|
+
\return \c true if dictionary contains sequence (matching on name)
|
158
|
+
*/
|
159
|
+
bool SamSequenceDictionary::Contains(const SamSequence& sequence) const {
|
160
|
+
return ( IndexOf(sequence.Name) != (int)m_data.size() );
|
161
|
+
}
|
162
|
+
|
163
|
+
/*! \fn SamSequenceIterator SamSequenceDictionary::End(void)
|
164
|
+
\return an STL iterator pointing to the imaginary entry after the last sequence
|
165
|
+
\sa Begin(), ConstEnd()
|
166
|
+
*/
|
167
|
+
SamSequenceIterator SamSequenceDictionary::End(void) {
|
168
|
+
return m_data.end();
|
169
|
+
}
|
170
|
+
|
171
|
+
/*! \fn SamSequenceConstIterator SamSequenceDictionary::End(void) const
|
172
|
+
\return an STL const_iterator pointing to the imaginary entry after the last sequence
|
173
|
+
|
174
|
+
This is an overloaded function.
|
175
|
+
|
176
|
+
\sa Begin(), ConstEnd()
|
177
|
+
*/
|
178
|
+
SamSequenceConstIterator SamSequenceDictionary::End(void) const {
|
179
|
+
return m_data.end();
|
180
|
+
}
|
181
|
+
|
182
|
+
/*! \fn int SamSequenceDictionary::IndexOf(const std::string& name) const
|
183
|
+
\internal
|
184
|
+
\return index of sequence if found (matching on name). Otherwise, returns vector::size() (invalid index).
|
185
|
+
*/
|
186
|
+
int SamSequenceDictionary::IndexOf(const std::string& name) const {
|
187
|
+
SamSequenceConstIterator begin = ConstBegin();
|
188
|
+
SamSequenceConstIterator iter = begin;
|
189
|
+
SamSequenceConstIterator end = ConstEnd();
|
190
|
+
for ( ; iter != end; ++iter ) {
|
191
|
+
const SamSequence& currentSeq = (*iter);
|
192
|
+
if ( currentSeq.Name == name )
|
193
|
+
break;
|
194
|
+
}
|
195
|
+
return distance( begin, iter );
|
196
|
+
}
|
197
|
+
|
198
|
+
/*! \fn bool SamSequenceDictionary::IsEmpty(void) const
|
199
|
+
\brief Returns \c true if dictionary contains no sequences
|
200
|
+
\sa Size()
|
201
|
+
*/
|
202
|
+
bool SamSequenceDictionary::IsEmpty(void) const {
|
203
|
+
return m_data.empty();
|
204
|
+
}
|
205
|
+
|
206
|
+
/*! \fn void SamSequenceDictionary::Remove(const SamSequence& sequence)
|
207
|
+
\brief Removes sequence from dictionary, if found (matches on name).
|
208
|
+
|
209
|
+
This is an overloaded function.
|
210
|
+
|
211
|
+
\param sequence SamSequence to remove (matching on name)
|
212
|
+
*/
|
213
|
+
void SamSequenceDictionary::Remove(const SamSequence& sequence) {
|
214
|
+
Remove( sequence.Name );
|
215
|
+
}
|
216
|
+
|
217
|
+
/*! \fn void SamSequenceDictionary::Remove(const std::string& sequenceName)
|
218
|
+
\brief Removes sequence from dictionary, if found.
|
219
|
+
|
220
|
+
\param sequenceName name of sequence to remove
|
221
|
+
\sa Remove()
|
222
|
+
*/
|
223
|
+
void SamSequenceDictionary::Remove(const std::string& sequenceName) {
|
224
|
+
if ( Contains(sequenceName) )
|
225
|
+
m_data.erase( m_data.begin() + IndexOf(sequenceName) );
|
226
|
+
}
|
227
|
+
|
228
|
+
/*! \fn void SamSequenceDictionary::Remove(const std::vector<SamSequence>& sequences)
|
229
|
+
\brief Removes multiple sequences from dictionary.
|
230
|
+
|
231
|
+
This is an overloaded function.
|
232
|
+
|
233
|
+
\param sequences sequences to remove
|
234
|
+
\sa Remove()
|
235
|
+
*/
|
236
|
+
void SamSequenceDictionary::Remove(const std::vector<SamSequence>& sequences) {
|
237
|
+
vector<SamSequence>::const_iterator rgIter = sequences.begin();
|
238
|
+
vector<SamSequence>::const_iterator rgEnd = sequences.end();
|
239
|
+
for ( ; rgIter!= rgEnd; ++rgIter )
|
240
|
+
Remove(*rgIter);
|
241
|
+
}
|
242
|
+
|
243
|
+
/*! \fn void SamSequenceDictionary::Remove(const std::vector<std::string>& sequenceNames)
|
244
|
+
\brief Removes multiple sequences from dictionary.
|
245
|
+
|
246
|
+
This is an overloaded function.
|
247
|
+
|
248
|
+
\param sequenceNames names of the sequences to remove
|
249
|
+
\sa Remove()
|
250
|
+
*/
|
251
|
+
void SamSequenceDictionary::Remove(const std::vector<std::string>& sequenceNames) {
|
252
|
+
vector<string>::const_iterator rgIter = sequenceNames.begin();
|
253
|
+
vector<string>::const_iterator rgEnd = sequenceNames.end();
|
254
|
+
for ( ; rgIter!= rgEnd; ++rgIter )
|
255
|
+
Remove(*rgIter);
|
256
|
+
}
|
257
|
+
|
258
|
+
/*! \fn int SamSequenceDictionary::Size(void) const
|
259
|
+
\brief Returns number of sequences in dictionary.
|
260
|
+
\sa IsEmpty()
|
261
|
+
*/
|
262
|
+
int SamSequenceDictionary::Size(void) const {
|
263
|
+
return m_data.size();
|
264
|
+
}
|
265
|
+
|
266
|
+
/*! \fn SamSequence& SamSequenceDictionary::operator[](const std::string& sequenceName)
|
267
|
+
\brief Retrieves the modifiable SamSequence that matches \a sequenceName.
|
268
|
+
|
269
|
+
NOTE - If the dictionary contains no sequence matching this name, this function inserts
|
270
|
+
a new one with this name (length:0), and returns a reference to it.
|
271
|
+
|
272
|
+
If you want to avoid this insertion behavior, check the result of Contains() before
|
273
|
+
using this operator.
|
274
|
+
|
275
|
+
\param sequenceName name of sequence to retrieve
|
276
|
+
\return a modifiable reference to the SamSequence associated with the name
|
277
|
+
*/
|
278
|
+
SamSequence& SamSequenceDictionary::operator[](const std::string& sequenceName) {
|
279
|
+
|
280
|
+
// look up sequence ID
|
281
|
+
int index = IndexOf(sequenceName);
|
282
|
+
|
283
|
+
// if found, return sequence at index
|
284
|
+
if ( index != (int)m_data.size() )
|
285
|
+
return m_data[index];
|
286
|
+
|
287
|
+
// otherwise, append new sequence and return reference
|
288
|
+
else {
|
289
|
+
m_data.push_back( SamSequence(sequenceName, 0) );
|
290
|
+
return m_data.back();
|
291
|
+
}
|
292
|
+
}
|
@@ -0,0 +1,88 @@
|
|
1
|
+
// ***************************************************************************
|
2
|
+
// SamSequenceDictionary.h (c) 2010 Derek Barnett
|
3
|
+
// Marth Lab, Department of Biology, Boston College
|
4
|
+
// ---------------------------------------------------------------------------
|
5
|
+
// Last modified: 18 April 2011
|
6
|
+
// ---------------------------------------------------------------------------
|
7
|
+
// Provides methods for operating on a collection of SamSequence entries.
|
8
|
+
// ***************************************************************************
|
9
|
+
|
10
|
+
#ifndef SAM_SEQUENCE_DICTIONARY_H
|
11
|
+
#define SAM_SEQUENCE_DICTIONARY_H
|
12
|
+
|
13
|
+
#include <api/api_global.h>
|
14
|
+
#include <api/SamSequence.h>
|
15
|
+
#include <string>
|
16
|
+
#include <map>
|
17
|
+
#include <vector>
|
18
|
+
|
19
|
+
namespace BamTools {
|
20
|
+
|
21
|
+
typedef std::vector<SamSequence> SamSequenceContainer;
|
22
|
+
typedef SamSequenceContainer::iterator SamSequenceIterator;
|
23
|
+
typedef SamSequenceContainer::const_iterator SamSequenceConstIterator;
|
24
|
+
|
25
|
+
class API_EXPORT SamSequenceDictionary {
|
26
|
+
|
27
|
+
// ctor & dtor
|
28
|
+
public:
|
29
|
+
SamSequenceDictionary(void);
|
30
|
+
SamSequenceDictionary(const SamSequenceDictionary& other);
|
31
|
+
~SamSequenceDictionary(void);
|
32
|
+
|
33
|
+
// query/modify sequence data
|
34
|
+
public:
|
35
|
+
// adds a sequence
|
36
|
+
void Add(const SamSequence& sequence);
|
37
|
+
void Add(const std::string& name, const int& length);
|
38
|
+
|
39
|
+
// adds multiple sequences
|
40
|
+
void Add(const std::vector<SamSequence>& sequences);
|
41
|
+
void Add(const std::map<std::string, int>& sequenceMap);
|
42
|
+
|
43
|
+
// clears all sequence entries
|
44
|
+
void Clear(void);
|
45
|
+
|
46
|
+
// returns true if dictionary contains this sequence
|
47
|
+
bool Contains(const SamSequence& sequence) const;
|
48
|
+
bool Contains(const std::string& sequenceName) const;
|
49
|
+
|
50
|
+
// returns true if dictionary is empty
|
51
|
+
bool IsEmpty(void) const;
|
52
|
+
|
53
|
+
// removes sequence, if found
|
54
|
+
void Remove(const SamSequence& sequence);
|
55
|
+
void Remove(const std::string& sequenceName);
|
56
|
+
|
57
|
+
// removes multiple sequences
|
58
|
+
void Remove(const std::vector<SamSequence>& sequences);
|
59
|
+
void Remove(const std::vector<std::string>& sequenceNames);
|
60
|
+
|
61
|
+
// returns number of sequences in dictionary
|
62
|
+
int Size(void) const;
|
63
|
+
|
64
|
+
// retrieves a modifiable reference to the SamSequence object associated with this name
|
65
|
+
SamSequence& operator[](const std::string& sequenceName);
|
66
|
+
|
67
|
+
// retrieve STL-compatible iterators
|
68
|
+
public:
|
69
|
+
SamSequenceIterator Begin(void); // returns iterator to begin()
|
70
|
+
SamSequenceConstIterator Begin(void) const; // returns const_iterator to begin()
|
71
|
+
SamSequenceConstIterator ConstBegin(void) const; // returns const_iterator to begin()
|
72
|
+
SamSequenceIterator End(void); // returns iterator to end()
|
73
|
+
SamSequenceConstIterator End(void) const; // returns const_iterator to end()
|
74
|
+
SamSequenceConstIterator ConstEnd(void) const; // returns const_iterator to end()
|
75
|
+
|
76
|
+
// internal methods
|
77
|
+
private:
|
78
|
+
int IndexOf(const std::string& name) const;
|
79
|
+
|
80
|
+
// data members
|
81
|
+
private:
|
82
|
+
SamSequenceContainer m_data;
|
83
|
+
};
|
84
|
+
|
85
|
+
} // namespace BamTools
|
86
|
+
|
87
|
+
#endif // SAM_SEQUENCE_DICTIONARY_H
|
88
|
+
|
@@ -0,0 +1,21 @@
|
|
1
|
+
// ***************************************************************************
|
2
|
+
// api_global.h (c) 2010 Derek Barnett
|
3
|
+
// Marth Lab, Department of Biology, Boston College
|
4
|
+
// ---------------------------------------------------------------------------
|
5
|
+
// Last modified: 19 November 2010 (DB)
|
6
|
+
// ---------------------------------------------------------------------------
|
7
|
+
// Provides macros for exporting & importing BamTools API library symbols
|
8
|
+
// ***************************************************************************
|
9
|
+
|
10
|
+
#ifndef API_GLOBAL_H
|
11
|
+
#define API_GLOBAL_H
|
12
|
+
|
13
|
+
#include "shared/bamtools_global.h"
|
14
|
+
|
15
|
+
#ifdef BAMTOOLS_API_LIBRARY
|
16
|
+
# define API_EXPORT BAMTOOLS_LIBRARY_EXPORT
|
17
|
+
#else
|
18
|
+
# define API_EXPORT BAMTOOLS_LIBRARY_IMPORT
|
19
|
+
#endif
|
20
|
+
|
21
|
+
#endif // API_GLOBAL_H
|
@@ -0,0 +1,122 @@
|
|
1
|
+
# Install script for directory: /Users/chase/Desktop/tmp_workspace/ngs_server/ext/bamtools/src/api
|
2
|
+
|
3
|
+
# Set the install prefix
|
4
|
+
IF(NOT DEFINED CMAKE_INSTALL_PREFIX)
|
5
|
+
SET(CMAKE_INSTALL_PREFIX "/usr/local")
|
6
|
+
ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX)
|
7
|
+
STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
|
8
|
+
|
9
|
+
# Set the install configuration name.
|
10
|
+
IF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
|
11
|
+
IF(BUILD_TYPE)
|
12
|
+
STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
|
13
|
+
CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
|
14
|
+
ELSE(BUILD_TYPE)
|
15
|
+
SET(CMAKE_INSTALL_CONFIG_NAME "Release")
|
16
|
+
ENDIF(BUILD_TYPE)
|
17
|
+
MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
|
18
|
+
ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
|
19
|
+
|
20
|
+
# Set the component getting installed.
|
21
|
+
IF(NOT CMAKE_INSTALL_COMPONENT)
|
22
|
+
IF(COMPONENT)
|
23
|
+
MESSAGE(STATUS "Install component: \"${COMPONENT}\"")
|
24
|
+
SET(CMAKE_INSTALL_COMPONENT "${COMPONENT}")
|
25
|
+
ELSE(COMPONENT)
|
26
|
+
SET(CMAKE_INSTALL_COMPONENT)
|
27
|
+
ENDIF(COMPONENT)
|
28
|
+
ENDIF(NOT CMAKE_INSTALL_COMPONENT)
|
29
|
+
|
30
|
+
IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
|
31
|
+
FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/bamtools" TYPE SHARED_LIBRARY FILES
|
32
|
+
"/Users/chase/Desktop/tmp_workspace/ngs_server/ext/bamtools/lib/libbamtools.1.0.2.dylib"
|
33
|
+
"/Users/chase/Desktop/tmp_workspace/ngs_server/ext/bamtools/lib/libbamtools.dylib"
|
34
|
+
)
|
35
|
+
FOREACH(file
|
36
|
+
"$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/bamtools/libbamtools.1.0.2.dylib"
|
37
|
+
"$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/bamtools/libbamtools.dylib"
|
38
|
+
)
|
39
|
+
IF(EXISTS "${file}" AND
|
40
|
+
NOT IS_SYMLINK "${file}")
|
41
|
+
EXECUTE_PROCESS(COMMAND "/usr/bin/install_name_tool"
|
42
|
+
-id "libbamtools.1.0.2.dylib"
|
43
|
+
"${file}")
|
44
|
+
IF(CMAKE_INSTALL_DO_STRIP)
|
45
|
+
EXECUTE_PROCESS(COMMAND "/usr/bin/strip" "${file}")
|
46
|
+
ENDIF(CMAKE_INSTALL_DO_STRIP)
|
47
|
+
ENDIF()
|
48
|
+
ENDFOREACH()
|
49
|
+
ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
|
50
|
+
|
51
|
+
IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
|
52
|
+
FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/bamtools" TYPE STATIC_LIBRARY FILES "/Users/chase/Desktop/tmp_workspace/ngs_server/ext/bamtools/lib/libbamtools.a")
|
53
|
+
IF(EXISTS "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/bamtools/libbamtools.a" AND
|
54
|
+
NOT IS_SYMLINK "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/bamtools/libbamtools.a")
|
55
|
+
EXECUTE_PROCESS(COMMAND "/usr/bin/ranlib" "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/bamtools/libbamtools.a")
|
56
|
+
ENDIF()
|
57
|
+
ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
|
58
|
+
|
59
|
+
IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
|
60
|
+
FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/include/bamtools/api" TYPE FILE FILES "/Users/chase/Desktop/tmp_workspace/ngs_server/ext/bamtools/src/api/api_global.h")
|
61
|
+
ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
|
62
|
+
|
63
|
+
IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
|
64
|
+
FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/include/bamtools/api" TYPE FILE FILES "/Users/chase/Desktop/tmp_workspace/ngs_server/ext/bamtools/src/api/BamAlignment.h")
|
65
|
+
ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
|
66
|
+
|
67
|
+
IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
|
68
|
+
FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/include/bamtools/api" TYPE FILE FILES "/Users/chase/Desktop/tmp_workspace/ngs_server/ext/bamtools/src/api/BamAux.h")
|
69
|
+
ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
|
70
|
+
|
71
|
+
IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
|
72
|
+
FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/include/bamtools/api" TYPE FILE FILES "/Users/chase/Desktop/tmp_workspace/ngs_server/ext/bamtools/src/api/BamConstants.h")
|
73
|
+
ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
|
74
|
+
|
75
|
+
IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
|
76
|
+
FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/include/bamtools/api" TYPE FILE FILES "/Users/chase/Desktop/tmp_workspace/ngs_server/ext/bamtools/src/api/BamIndex.h")
|
77
|
+
ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
|
78
|
+
|
79
|
+
IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
|
80
|
+
FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/include/bamtools/api" TYPE FILE FILES "/Users/chase/Desktop/tmp_workspace/ngs_server/ext/bamtools/src/api/BamMultiReader.h")
|
81
|
+
ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
|
82
|
+
|
83
|
+
IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
|
84
|
+
FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/include/bamtools/api" TYPE FILE FILES "/Users/chase/Desktop/tmp_workspace/ngs_server/ext/bamtools/src/api/BamReader.h")
|
85
|
+
ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
|
86
|
+
|
87
|
+
IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
|
88
|
+
FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/include/bamtools/api" TYPE FILE FILES "/Users/chase/Desktop/tmp_workspace/ngs_server/ext/bamtools/src/api/BamWriter.h")
|
89
|
+
ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
|
90
|
+
|
91
|
+
IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
|
92
|
+
FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/include/bamtools/api" TYPE FILE FILES "/Users/chase/Desktop/tmp_workspace/ngs_server/ext/bamtools/src/api/SamConstants.h")
|
93
|
+
ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
|
94
|
+
|
95
|
+
IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
|
96
|
+
FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/include/bamtools/api" TYPE FILE FILES "/Users/chase/Desktop/tmp_workspace/ngs_server/ext/bamtools/src/api/SamHeader.h")
|
97
|
+
ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
|
98
|
+
|
99
|
+
IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
|
100
|
+
FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/include/bamtools/api" TYPE FILE FILES "/Users/chase/Desktop/tmp_workspace/ngs_server/ext/bamtools/src/api/SamProgram.h")
|
101
|
+
ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
|
102
|
+
|
103
|
+
IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
|
104
|
+
FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/include/bamtools/api" TYPE FILE FILES "/Users/chase/Desktop/tmp_workspace/ngs_server/ext/bamtools/src/api/SamProgramChain.h")
|
105
|
+
ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
|
106
|
+
|
107
|
+
IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
|
108
|
+
FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/include/bamtools/api" TYPE FILE FILES "/Users/chase/Desktop/tmp_workspace/ngs_server/ext/bamtools/src/api/SamReadGroup.h")
|
109
|
+
ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
|
110
|
+
|
111
|
+
IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
|
112
|
+
FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/include/bamtools/api" TYPE FILE FILES "/Users/chase/Desktop/tmp_workspace/ngs_server/ext/bamtools/src/api/SamReadGroupDictionary.h")
|
113
|
+
ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
|
114
|
+
|
115
|
+
IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
|
116
|
+
FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/include/bamtools/api" TYPE FILE FILES "/Users/chase/Desktop/tmp_workspace/ngs_server/ext/bamtools/src/api/SamSequence.h")
|
117
|
+
ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
|
118
|
+
|
119
|
+
IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
|
120
|
+
FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/include/bamtools/api" TYPE FILE FILES "/Users/chase/Desktop/tmp_workspace/ngs_server/ext/bamtools/src/api/SamSequenceDictionary.h")
|
121
|
+
ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
|
122
|
+
|
@@ -0,0 +1,132 @@
|
|
1
|
+
// ***************************************************************************
|
2
|
+
// BamHeader_p.cpp (c) 2010 Derek Barnett
|
3
|
+
// Marth Lab, Department of Biology, Boston College
|
4
|
+
// ---------------------------------------------------------------------------
|
5
|
+
// Last modified: 21 March 2011 (DB)
|
6
|
+
// ---------------------------------------------------------------------------
|
7
|
+
// Provides the basic functionality for handling BAM headers.
|
8
|
+
// ***************************************************************************
|
9
|
+
|
10
|
+
#include <api/BamAux.h>
|
11
|
+
#include <api/BamConstants.h>
|
12
|
+
#include <api/internal/BamHeader_p.h>
|
13
|
+
#include <api/internal/BgzfStream_p.h>
|
14
|
+
using namespace BamTools;
|
15
|
+
using namespace BamTools::Internal;
|
16
|
+
|
17
|
+
#include <cstdio>
|
18
|
+
#include <cstdlib>
|
19
|
+
#include <cstring>
|
20
|
+
#include <iostream>
|
21
|
+
using namespace std;
|
22
|
+
|
23
|
+
// ctor
|
24
|
+
BamHeader::BamHeader(void) { }
|
25
|
+
|
26
|
+
// dtor
|
27
|
+
BamHeader::~BamHeader(void) { }
|
28
|
+
|
29
|
+
// reads magic number from BGZF stream, returns true if valid
|
30
|
+
bool BamHeader::CheckMagicNumber(BgzfStream* stream) {
|
31
|
+
|
32
|
+
// try to read magic number
|
33
|
+
char buffer[Constants::BAM_HEADER_MAGIC_LENGTH];
|
34
|
+
if ( stream->Read(buffer, Constants::BAM_HEADER_MAGIC_LENGTH) != (int)Constants::BAM_HEADER_MAGIC_LENGTH ) {
|
35
|
+
fprintf(stderr, "BamHeader ERROR: could not read magic number\n");
|
36
|
+
return false;
|
37
|
+
}
|
38
|
+
|
39
|
+
// validate magic number
|
40
|
+
if ( strncmp(buffer, Constants::BAM_HEADER_MAGIC, Constants::BAM_HEADER_MAGIC_LENGTH) != 0 ) {
|
41
|
+
fprintf(stderr, "BamHeader ERROR: invalid magic number\n");
|
42
|
+
return false;
|
43
|
+
}
|
44
|
+
|
45
|
+
// all checks out
|
46
|
+
return true;
|
47
|
+
}
|
48
|
+
|
49
|
+
// clear SamHeader data
|
50
|
+
void BamHeader::Clear(void) {
|
51
|
+
m_header.Clear();
|
52
|
+
}
|
53
|
+
|
54
|
+
// return true if SamHeader data is valid
|
55
|
+
bool BamHeader::IsValid(void) const {
|
56
|
+
return m_header.IsValid();
|
57
|
+
}
|
58
|
+
|
59
|
+
// load BAM header ('magic number' and SAM header text) from BGZF stream
|
60
|
+
// returns true if all OK
|
61
|
+
bool BamHeader::Load(BgzfStream* stream) {
|
62
|
+
|
63
|
+
// cannot load if invalid stream
|
64
|
+
if ( stream == 0 )
|
65
|
+
return false;
|
66
|
+
|
67
|
+
// cannot load if magic number is invalid
|
68
|
+
if ( !CheckMagicNumber(stream) )
|
69
|
+
return false;
|
70
|
+
|
71
|
+
// cannot load header if cannot read header length
|
72
|
+
uint32_t length(0);
|
73
|
+
if ( !ReadHeaderLength(stream, length) )
|
74
|
+
return false;
|
75
|
+
|
76
|
+
// cannot load header if cannot read header text
|
77
|
+
if ( !ReadHeaderText(stream, length) )
|
78
|
+
return false;
|
79
|
+
|
80
|
+
// otherwise, everything OK
|
81
|
+
return true;
|
82
|
+
}
|
83
|
+
|
84
|
+
// reads SAM header text length from BGZF stream, stores it in @length
|
85
|
+
// returns read success/fail status
|
86
|
+
bool BamHeader::ReadHeaderLength(BgzfStream* stream, uint32_t& length) {
|
87
|
+
|
88
|
+
// attempt to read BAM header text length
|
89
|
+
char buffer[sizeof(uint32_t)];
|
90
|
+
if ( stream->Read(buffer, sizeof(uint32_t)) != sizeof(uint32_t) ) {
|
91
|
+
fprintf(stderr, "BamHeader ERROR: could not read header length\n");
|
92
|
+
return false;
|
93
|
+
}
|
94
|
+
|
95
|
+
// convert char buffer to length, return success
|
96
|
+
length = BamTools::UnpackUnsignedInt(buffer);
|
97
|
+
if ( BamTools::SystemIsBigEndian() )
|
98
|
+
BamTools::SwapEndian_32(length);
|
99
|
+
return true;
|
100
|
+
}
|
101
|
+
|
102
|
+
// reads SAM header text from BGZF stream, stores in SamHeader object
|
103
|
+
// returns read success/fail status
|
104
|
+
bool BamHeader::ReadHeaderText(BgzfStream* stream, const uint32_t& length) {
|
105
|
+
|
106
|
+
// set up destination buffer
|
107
|
+
char* headerText = (char*)calloc(length + 1, 1);
|
108
|
+
|
109
|
+
// attempt to read header text
|
110
|
+
const unsigned bytesRead = stream->Read(headerText, length);
|
111
|
+
const bool readOk = ( bytesRead == length );
|
112
|
+
if ( readOk )
|
113
|
+
m_header.SetHeaderText( (string)((const char*)headerText) );
|
114
|
+
else
|
115
|
+
fprintf(stderr, "BamHeader ERROR: could not read header text\n");
|
116
|
+
|
117
|
+
// clean up calloc-ed temp variable (on success or fail)
|
118
|
+
free(headerText);
|
119
|
+
|
120
|
+
// return read success
|
121
|
+
return readOk;
|
122
|
+
}
|
123
|
+
|
124
|
+
// returns *copy* of SamHeader data object
|
125
|
+
SamHeader BamHeader::ToSamHeader(void) const {
|
126
|
+
return m_header;
|
127
|
+
}
|
128
|
+
|
129
|
+
// returns SAM-formatted string of header data
|
130
|
+
string BamHeader::ToString(void) const {
|
131
|
+
return m_header.ToString();
|
132
|
+
}
|