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,351 @@
|
|
1
|
+
// ***************************************************************************
|
2
|
+
// SamProgramChain.cpp (c) 2011 Derek Barnett
|
3
|
+
// Marth Lab, Department of Biology, Boston College
|
4
|
+
// ---------------------------------------------------------------------------
|
5
|
+
// Last modified: 19 April 2011 (DB)
|
6
|
+
// ---------------------------------------------------------------------------
|
7
|
+
// Provides methods for operating on a SamProgram record "chain"
|
8
|
+
// ***************************************************************************
|
9
|
+
|
10
|
+
#include <api/SamProgramChain.h>
|
11
|
+
using namespace BamTools;
|
12
|
+
|
13
|
+
#include <algorithm>
|
14
|
+
#include <iostream>
|
15
|
+
#include <cstdlib>
|
16
|
+
using namespace std;
|
17
|
+
|
18
|
+
/*! \class BamTools::SamProgramChain
|
19
|
+
\brief Sorted container "chain" of SamProgram records.
|
20
|
+
|
21
|
+
Provides methods for operating on a collection of SamProgram records.
|
22
|
+
|
23
|
+
N.B. - Underlying container is *NOT* ordered by linkage, but by order of
|
24
|
+
appearance in SamHeader and subsequent Add() calls. Using the current
|
25
|
+
iterators will not allow you to step through the header's program history.
|
26
|
+
Instead use First()/Last() to access oldest/newest records, respectively.
|
27
|
+
*/
|
28
|
+
|
29
|
+
/*! \fn SamProgramChain::SamProgramChain(void)
|
30
|
+
\brief constructor
|
31
|
+
*/
|
32
|
+
SamProgramChain::SamProgramChain(void) { }
|
33
|
+
|
34
|
+
/*! \fn SamProgramChain::SamProgramChain(const SamProgramChain& other)
|
35
|
+
\brief copy constructor
|
36
|
+
*/
|
37
|
+
SamProgramChain::SamProgramChain(const SamProgramChain& other)
|
38
|
+
: m_data(other.m_data)
|
39
|
+
{ }
|
40
|
+
|
41
|
+
/*! \fn SamProgramChain::~SamProgramChain(void)
|
42
|
+
\brief destructor
|
43
|
+
*/
|
44
|
+
SamProgramChain::~SamProgramChain(void) { }
|
45
|
+
|
46
|
+
/*! \fn void SamProgramChain::Add(SamProgram& program)
|
47
|
+
\brief Appends a program to program chain.
|
48
|
+
|
49
|
+
Duplicate entries are silently discarded.
|
50
|
+
|
51
|
+
N.B. - Underlying container is *NOT* ordered by linkage, but by order of
|
52
|
+
appearance in SamHeader and subsequent Add() calls. Using the current
|
53
|
+
iterators will not allow you to step through the header's program history.
|
54
|
+
Instead use First()/Last() to access oldest/newest records, respectively.
|
55
|
+
|
56
|
+
\param program entry to be appended
|
57
|
+
*/
|
58
|
+
void SamProgramChain::Add(SamProgram& program) {
|
59
|
+
|
60
|
+
// ignore duplicated records
|
61
|
+
if ( Contains(program) )
|
62
|
+
return;
|
63
|
+
|
64
|
+
// if other programs already in chain, try to find the "next" record
|
65
|
+
// tries to match another record's PPID with @program's ID
|
66
|
+
if ( !IsEmpty() )
|
67
|
+
program.NextProgramID = NextIdFor(program.ID);
|
68
|
+
|
69
|
+
// store program record
|
70
|
+
m_data.push_back(program);
|
71
|
+
}
|
72
|
+
|
73
|
+
/*! \fn void SamProgramChain::Add(const std::vector<SamProgram>& programs)
|
74
|
+
\brief Appends a batch of programs to the end of the chain.
|
75
|
+
|
76
|
+
This is an overloaded function.
|
77
|
+
|
78
|
+
\param programs batch of program records to append
|
79
|
+
\sa Add()
|
80
|
+
*/
|
81
|
+
void SamProgramChain::Add(std::vector<SamProgram>& programs) {
|
82
|
+
vector<SamProgram>::iterator pgIter = programs.begin();
|
83
|
+
vector<SamProgram>::iterator pgEnd = programs.end();
|
84
|
+
for ( ; pgIter != pgEnd; ++pgIter )
|
85
|
+
Add(*pgIter);
|
86
|
+
}
|
87
|
+
|
88
|
+
/*! \fn SamProgramIterator SamProgramChain::Begin(void)
|
89
|
+
\return an STL iterator pointing to the first (oldest) program record
|
90
|
+
\sa ConstBegin(), End(), First()
|
91
|
+
*/
|
92
|
+
SamProgramIterator SamProgramChain::Begin(void) {
|
93
|
+
return m_data.begin();
|
94
|
+
}
|
95
|
+
|
96
|
+
/*! \fn SamProgramConstIterator SamProgramChain::Begin(void) const
|
97
|
+
\return an STL const_iterator pointing to the first (oldest) program record
|
98
|
+
|
99
|
+
This is an overloaded function.
|
100
|
+
|
101
|
+
\sa ConstBegin(), End(), First()
|
102
|
+
*/
|
103
|
+
SamProgramConstIterator SamProgramChain::Begin(void) const {
|
104
|
+
return m_data.begin();
|
105
|
+
}
|
106
|
+
|
107
|
+
/*! \fn void SamProgramChain::Clear(void)
|
108
|
+
\brief Clears all program records.
|
109
|
+
*/
|
110
|
+
void SamProgramChain::Clear(void) {
|
111
|
+
m_data.clear();
|
112
|
+
}
|
113
|
+
|
114
|
+
/*! \fn SamProgramConstIterator SamProgramChain::ConstBegin(void) const
|
115
|
+
\return an STL const_iterator pointing to the first (oldest) program record
|
116
|
+
\sa Begin(), ConstEnd(), First()
|
117
|
+
*/
|
118
|
+
SamProgramConstIterator SamProgramChain::ConstBegin(void) const {
|
119
|
+
return m_data.begin();
|
120
|
+
}
|
121
|
+
|
122
|
+
/*! \fn SamProgramConstIterator SamProgramChain::ConstEnd(void) const
|
123
|
+
\return an STL const_iterator pointing to the imaginary entry after the last (newest) program record
|
124
|
+
\sa ConstBegin(), End(), Last()
|
125
|
+
*/
|
126
|
+
SamProgramConstIterator SamProgramChain::ConstEnd(void) const {
|
127
|
+
return m_data.end();
|
128
|
+
}
|
129
|
+
|
130
|
+
/*! \fn bool SamProgramChain::Contains(const SamProgram& program) const
|
131
|
+
\brief Returns true if chains has this program record (matching on ID).
|
132
|
+
|
133
|
+
This is an overloaded function.
|
134
|
+
|
135
|
+
\param program SamProgram to search for
|
136
|
+
\return \c true if chain contains program (matching on ID)
|
137
|
+
*/
|
138
|
+
bool SamProgramChain::Contains(const SamProgram& program) const {
|
139
|
+
return Contains(program.ID);
|
140
|
+
}
|
141
|
+
|
142
|
+
/*! \fn bool SamProgramChain::Contains(const std::string& programId) const
|
143
|
+
\brief Returns true if chains has a program record with this ID
|
144
|
+
\param programId search for program matching this ID
|
145
|
+
\return \c true if chain contains a program record with this ID
|
146
|
+
*/
|
147
|
+
bool SamProgramChain::Contains(const std::string& programId) const {
|
148
|
+
return ( IndexOf(programId) != (int)m_data.size() );
|
149
|
+
}
|
150
|
+
|
151
|
+
/*! \fn SamProgramIterator SamProgramChain::End(void)
|
152
|
+
\return an STL iterator pointing to the imaginary entry after the last (newest) program record
|
153
|
+
\sa Begin(), ConstEnd(), Last()
|
154
|
+
*/
|
155
|
+
SamProgramIterator SamProgramChain::End(void) {
|
156
|
+
return m_data.end();
|
157
|
+
}
|
158
|
+
|
159
|
+
/*! \fn SamProgramConstIterator SamProgramChain::End(void) const
|
160
|
+
\return an STL const_iterator pointing to the imaginary entry after the last (newest) program record
|
161
|
+
|
162
|
+
This is an overloaded function.
|
163
|
+
|
164
|
+
\sa Begin(), ConstEnd(), Last()
|
165
|
+
*/
|
166
|
+
SamProgramConstIterator SamProgramChain::End(void) const {
|
167
|
+
return m_data.end();
|
168
|
+
}
|
169
|
+
|
170
|
+
/*! \fn SamProgram& SamProgramChain::First(void)
|
171
|
+
\brief Fetches first (oldest) record in the chain.
|
172
|
+
|
173
|
+
N.B. - This function will fail if the chain is empty. If this is possible,
|
174
|
+
check the result of IsEmpty() before calling this function.
|
175
|
+
|
176
|
+
\return a modifiable reference to the first (oldest) program entry
|
177
|
+
\sa Begin(), Last()
|
178
|
+
*/
|
179
|
+
SamProgram& SamProgramChain::First(void) {
|
180
|
+
|
181
|
+
// find first record in container that has no PreviousProgramID entry
|
182
|
+
SamProgramIterator iter = Begin();
|
183
|
+
SamProgramIterator end = End();
|
184
|
+
for ( ; iter != end; ++iter ) {
|
185
|
+
SamProgram& current = (*iter);
|
186
|
+
if ( !current.HasPreviousProgramID() )
|
187
|
+
return current;
|
188
|
+
}
|
189
|
+
|
190
|
+
// otherwise error
|
191
|
+
cerr << "SamProgramChain ERROR - could not find any record without a PP tag" << endl;
|
192
|
+
exit(1);
|
193
|
+
}
|
194
|
+
|
195
|
+
/*! \fn const SamProgram& SamProgramChain::First(void) const
|
196
|
+
\brief Fetches first (oldest) record in the chain.
|
197
|
+
|
198
|
+
This is an overloaded function.
|
199
|
+
|
200
|
+
N.B. - This function will fail if the chain is empty. If this is possible,
|
201
|
+
check the result of IsEmpty() before calling this function.
|
202
|
+
|
203
|
+
\return a read-only reference to the first (oldest) program entry
|
204
|
+
\sa Begin(), ConstBegin(), Last()
|
205
|
+
*/
|
206
|
+
const SamProgram& SamProgramChain::First(void) const {
|
207
|
+
|
208
|
+
// find first record in container that has no PreviousProgramID entry
|
209
|
+
SamProgramConstIterator iter = ConstBegin();
|
210
|
+
SamProgramConstIterator end = ConstEnd();
|
211
|
+
for ( ; iter != end; ++iter ) {
|
212
|
+
const SamProgram& current = (*iter);
|
213
|
+
if ( !current.HasPreviousProgramID() )
|
214
|
+
return current;
|
215
|
+
}
|
216
|
+
|
217
|
+
// otherwise error
|
218
|
+
cerr << "SamProgramChain ERROR - could not find any record without a PP tag" << endl;
|
219
|
+
exit(1);
|
220
|
+
}
|
221
|
+
|
222
|
+
/*! \fn int SamProgramChain::IndexOf(const std::string& programId) const
|
223
|
+
\internal
|
224
|
+
\return index of program record if found.
|
225
|
+
Otherwise, returns vector::size() (invalid index).
|
226
|
+
*/
|
227
|
+
int SamProgramChain::IndexOf(const std::string& programId) const {
|
228
|
+
SamProgramConstIterator begin = ConstBegin();
|
229
|
+
SamProgramConstIterator iter = begin;
|
230
|
+
SamProgramConstIterator end = ConstEnd();
|
231
|
+
for ( ; iter != end; ++iter ) {
|
232
|
+
const SamProgram& current = (*iter);
|
233
|
+
if ( current.ID == programId )
|
234
|
+
break;
|
235
|
+
}
|
236
|
+
return distance( begin, iter );
|
237
|
+
}
|
238
|
+
|
239
|
+
/*! \fn bool SamProgramChain::IsEmpty(void) const
|
240
|
+
\brief Returns \c true if chain contains no records
|
241
|
+
\sa Size()
|
242
|
+
*/
|
243
|
+
bool SamProgramChain::IsEmpty(void) const {
|
244
|
+
return m_data.empty();
|
245
|
+
}
|
246
|
+
|
247
|
+
/*! \fn SamProgram& SamProgramChain::Last(void)
|
248
|
+
\brief Fetches last (newest) record in the chain.
|
249
|
+
|
250
|
+
N.B. - This function will fail if the chain is empty. If this is possible,
|
251
|
+
check the result of IsEmpty() before calling this function.
|
252
|
+
|
253
|
+
\return a modifiable reference to the last (newest) program entry
|
254
|
+
\sa End(), First()
|
255
|
+
*/
|
256
|
+
SamProgram& SamProgramChain::Last(void) {
|
257
|
+
// find first record in container that has no NextProgramID entry
|
258
|
+
SamProgramIterator iter = Begin();
|
259
|
+
SamProgramIterator end = End();
|
260
|
+
for ( ; iter != end; ++iter ) {
|
261
|
+
SamProgram& current = (*iter);
|
262
|
+
if ( !current.HasNextProgramID() )
|
263
|
+
return current;
|
264
|
+
}
|
265
|
+
|
266
|
+
// otherwise error
|
267
|
+
cerr << "SamProgramChain ERROR - could not determine last record" << endl;
|
268
|
+
exit(1);
|
269
|
+
}
|
270
|
+
|
271
|
+
/*! \fn const SamProgram& SamProgramChain::Last(void) const
|
272
|
+
\brief Fetches last (newest) record in the chain.
|
273
|
+
|
274
|
+
This is an overloaded function.
|
275
|
+
|
276
|
+
N.B. - This function will fail if the chain is empty. If this is possible,
|
277
|
+
check the result of IsEmpty() before calling this function.
|
278
|
+
|
279
|
+
\return a read-only reference to the last (newest) program entry
|
280
|
+
\sa End(), ConstEnd(), First()
|
281
|
+
*/
|
282
|
+
const SamProgram& SamProgramChain::Last(void) const {
|
283
|
+
// find first record in container that has no NextProgramID entry
|
284
|
+
SamProgramConstIterator iter = ConstBegin();
|
285
|
+
SamProgramConstIterator end = ConstEnd();
|
286
|
+
for ( ; iter != end; ++iter ) {
|
287
|
+
const SamProgram& current = (*iter);
|
288
|
+
if ( !current.HasNextProgramID() )
|
289
|
+
return current;
|
290
|
+
}
|
291
|
+
|
292
|
+
// otherwise error
|
293
|
+
cerr << "SamProgramChain ERROR - could not determine last record" << endl;
|
294
|
+
exit(1);
|
295
|
+
}
|
296
|
+
|
297
|
+
/*! \fn const std::string SamProgramChain::NextIdFor(const std::string& programId) const
|
298
|
+
\internal
|
299
|
+
\return ID of program record, whose PreviousProgramID matches \a programId.
|
300
|
+
Otherwise, returns empty string if none found.
|
301
|
+
*/
|
302
|
+
const std::string SamProgramChain::NextIdFor(const std::string& programId) const {
|
303
|
+
|
304
|
+
// find first record in container whose PreviousProgramID matches @programId
|
305
|
+
SamProgramConstIterator iter = ConstBegin();
|
306
|
+
SamProgramConstIterator end = ConstEnd();
|
307
|
+
for ( ; iter != end; ++iter ) {
|
308
|
+
const SamProgram& current = (*iter);
|
309
|
+
if ( !current.HasPreviousProgramID() &&
|
310
|
+
current.PreviousProgramID == programId
|
311
|
+
)
|
312
|
+
{
|
313
|
+
return current.ID;
|
314
|
+
}
|
315
|
+
}
|
316
|
+
|
317
|
+
// none found
|
318
|
+
return string();
|
319
|
+
}
|
320
|
+
|
321
|
+
/*! \fn int SamProgramChain::Size(void) const
|
322
|
+
\brief Returns number of program records in the chain.
|
323
|
+
\sa IsEmpty()
|
324
|
+
*/
|
325
|
+
int SamProgramChain::Size(void) const {
|
326
|
+
return m_data.size();
|
327
|
+
}
|
328
|
+
|
329
|
+
/*! \fn SamProgram& SamProgramChain::operator[](const std::string& programId)
|
330
|
+
\brief Retrieves the modifiable SamProgram record that matches \a programId.
|
331
|
+
|
332
|
+
NOTE - If the chain contains no read group matching this ID, this function will
|
333
|
+
print an error and terminate.
|
334
|
+
|
335
|
+
\param programId ID of program record to retrieve
|
336
|
+
\return a modifiable reference to the SamProgram associated with the ID
|
337
|
+
*/
|
338
|
+
SamProgram& SamProgramChain::operator[](const std::string& programId) {
|
339
|
+
|
340
|
+
// look up program record matching this ID
|
341
|
+
int index = IndexOf(programId);
|
342
|
+
|
343
|
+
// if record not found
|
344
|
+
if ( index == (int)m_data.size() ) {
|
345
|
+
cerr << "SamProgramChain ERROR - unknown programId: " << programId << endl;
|
346
|
+
exit(1);
|
347
|
+
}
|
348
|
+
|
349
|
+
// otherwise return program record at index
|
350
|
+
return m_data.at(index);
|
351
|
+
}
|
@@ -0,0 +1,85 @@
|
|
1
|
+
// ***************************************************************************
|
2
|
+
// SamProgramChain.h (c) 2011 Derek Barnett
|
3
|
+
// Marth Lab, Department of Biology, Boston College
|
4
|
+
// ---------------------------------------------------------------------------
|
5
|
+
// Last modified: 19 April 2011 (DB)
|
6
|
+
// ---------------------------------------------------------------------------
|
7
|
+
// Provides methods for operating on a SamProgram record "chain"
|
8
|
+
// ***************************************************************************
|
9
|
+
|
10
|
+
#ifndef SAM_PROGRAMCHAIN_H
|
11
|
+
#define SAM_PROGRAMCHAIN_H
|
12
|
+
|
13
|
+
#include <api/api_global.h>
|
14
|
+
#include <api/SamProgram.h>
|
15
|
+
#include <string>
|
16
|
+
#include <vector>
|
17
|
+
|
18
|
+
namespace BamTools {
|
19
|
+
|
20
|
+
// chain is *NOT* sorted in any order
|
21
|
+
// use First()/Last() to retrieve oldest/newest programs, respectively
|
22
|
+
typedef std::vector<SamProgram> SamProgramContainer;
|
23
|
+
typedef SamProgramContainer::iterator SamProgramIterator;
|
24
|
+
typedef SamProgramContainer::const_iterator SamProgramConstIterator;
|
25
|
+
|
26
|
+
class API_EXPORT SamProgramChain {
|
27
|
+
|
28
|
+
// ctor & dtor
|
29
|
+
public:
|
30
|
+
SamProgramChain(void);
|
31
|
+
SamProgramChain(const SamProgramChain& other);
|
32
|
+
~SamProgramChain(void);
|
33
|
+
|
34
|
+
// query/modify program data
|
35
|
+
public:
|
36
|
+
// appends a program record to the chain
|
37
|
+
void Add(SamProgram& program);
|
38
|
+
void Add(std::vector<SamProgram>& programs);
|
39
|
+
|
40
|
+
// clears all read group entries
|
41
|
+
void Clear(void);
|
42
|
+
|
43
|
+
// returns true if chain contains this program record (matches on ID)
|
44
|
+
bool Contains(const SamProgram& program) const;
|
45
|
+
bool Contains(const std::string& programId) const;
|
46
|
+
|
47
|
+
// returns the first (oldest) program in the chain
|
48
|
+
SamProgram& First(void);
|
49
|
+
const SamProgram& First(void) const;
|
50
|
+
|
51
|
+
// returns true if chain is empty
|
52
|
+
bool IsEmpty(void) const;
|
53
|
+
|
54
|
+
// returns last (most recent) program in the chain
|
55
|
+
SamProgram& Last(void);
|
56
|
+
const SamProgram& Last(void) const;
|
57
|
+
|
58
|
+
// returns number of program records in the chain
|
59
|
+
int Size(void) const;
|
60
|
+
|
61
|
+
// retrieves a modifiable reference to the SamProgram object associated with this ID
|
62
|
+
SamProgram& operator[](const std::string& programId);
|
63
|
+
|
64
|
+
// retrieve STL-compatible iterators
|
65
|
+
public:
|
66
|
+
SamProgramIterator Begin(void); // returns iterator to begin()
|
67
|
+
SamProgramConstIterator Begin(void) const; // returns const_iterator to begin()
|
68
|
+
SamProgramConstIterator ConstBegin(void) const; // returns const_iterator to begin()
|
69
|
+
SamProgramIterator End(void); // returns iterator to end()
|
70
|
+
SamProgramConstIterator End(void) const; // returns const_iterator to end()
|
71
|
+
SamProgramConstIterator ConstEnd(void) const; // returns const_iterator to end()
|
72
|
+
|
73
|
+
// internal methods
|
74
|
+
private:
|
75
|
+
int IndexOf(const std::string& programId) const;
|
76
|
+
const std::string NextIdFor(const std::string& programId) const;
|
77
|
+
|
78
|
+
// data members
|
79
|
+
private:
|
80
|
+
SamProgramContainer m_data;
|
81
|
+
};
|
82
|
+
|
83
|
+
} // namespace BamTools
|
84
|
+
|
85
|
+
#endif // SAM_PROGRAMCHAIN_H
|
@@ -0,0 +1,221 @@
|
|
1
|
+
// ***************************************************************************
|
2
|
+
// SamReadGroup.cpp (c) 2010 Derek Barnett
|
3
|
+
// Marth Lab, Department of Biology, Boston College
|
4
|
+
// ---------------------------------------------------------------------------
|
5
|
+
// Last modified: 18 April 2011 (DB)
|
6
|
+
// ---------------------------------------------------------------------------
|
7
|
+
// Provides direct read/write access to the SAM read group data fields.
|
8
|
+
// ***************************************************************************
|
9
|
+
|
10
|
+
#include <api/SamReadGroup.h>
|
11
|
+
using namespace BamTools;
|
12
|
+
using namespace std;
|
13
|
+
|
14
|
+
/*! \struct BamTools::SamReadGroup
|
15
|
+
\brief Represents a SAM read group entry.
|
16
|
+
|
17
|
+
Provides direct read/write access to the SAM read group data fields.
|
18
|
+
|
19
|
+
\sa \samSpecURL
|
20
|
+
*/
|
21
|
+
/*! \var SamReadGroup::Description
|
22
|
+
\brief corresponds to \@RG DS:\<Description\>
|
23
|
+
*/
|
24
|
+
/*! \var SamReadGroup::FlowOrder
|
25
|
+
\brief corresponds to \@RG FO:\<FlowOrder\>
|
26
|
+
*/
|
27
|
+
/*! \var SamReadGroup::ID
|
28
|
+
\brief corresponds to \@RG ID:\<ID\>
|
29
|
+
|
30
|
+
Required for valid SAM header.
|
31
|
+
*/
|
32
|
+
/*! \var SamReadGroup::KeySequence
|
33
|
+
\brief corresponds to \@RG KS:\<KeySequence\>
|
34
|
+
*/
|
35
|
+
/*! \var SamReadGroup::Library
|
36
|
+
\brief corresponds to \@RG LB:\<Library\>
|
37
|
+
*/
|
38
|
+
/*! \var SamReadGroup::PlatformUnit
|
39
|
+
\brief corresponds to \@RG PU:\<PlatformUnit\>
|
40
|
+
*/
|
41
|
+
/*! \var SamReadGroup::PredictedInsertSize
|
42
|
+
\brief corresponds to \@RG PI:\<PredictedInsertSize\>
|
43
|
+
*/
|
44
|
+
/*! \var SamReadGroup::ProductionDate
|
45
|
+
\brief corresponds to \@RG DT:\<ProductionDate\>
|
46
|
+
*/
|
47
|
+
/*! \var SamReadGroup::Program
|
48
|
+
\brief corresponds to \@RG PG:\<Program\>
|
49
|
+
*/
|
50
|
+
/*! \var SamReadGroup::Sample
|
51
|
+
\brief corresponds to \@RG SM:\<Sample\>
|
52
|
+
*/
|
53
|
+
/*! \var SamReadGroup::SequencingCenter
|
54
|
+
\brief corresponds to \@RG CN:\<SequencingCenter\>
|
55
|
+
*/
|
56
|
+
/*! \var SamReadGroup::SequencingTechnology
|
57
|
+
\brief corresponds to \@RG PL:\<SequencingTechnology\>
|
58
|
+
*/
|
59
|
+
|
60
|
+
/*! \fn SamReadGroup::SamReadGroup(void)
|
61
|
+
\brief default constructor
|
62
|
+
*/
|
63
|
+
SamReadGroup::SamReadGroup(void)
|
64
|
+
: Description("")
|
65
|
+
, FlowOrder("")
|
66
|
+
, ID("")
|
67
|
+
, KeySequence("")
|
68
|
+
, Library("")
|
69
|
+
, PlatformUnit("")
|
70
|
+
, PredictedInsertSize("")
|
71
|
+
, ProductionDate("")
|
72
|
+
, Program("")
|
73
|
+
, Sample("")
|
74
|
+
, SequencingCenter("")
|
75
|
+
, SequencingTechnology("")
|
76
|
+
{ }
|
77
|
+
|
78
|
+
/*! \fn SamReadGroup::SamReadGroup(const std::string& id)
|
79
|
+
\brief constructs read group with \a id
|
80
|
+
|
81
|
+
\param id desired read group ID
|
82
|
+
*/
|
83
|
+
SamReadGroup::SamReadGroup(const std::string& id)
|
84
|
+
: Description("")
|
85
|
+
, FlowOrder("")
|
86
|
+
, ID(id)
|
87
|
+
, KeySequence("")
|
88
|
+
, Library("")
|
89
|
+
, PlatformUnit("")
|
90
|
+
, PredictedInsertSize("")
|
91
|
+
, ProductionDate("")
|
92
|
+
, Program("")
|
93
|
+
, Sample("")
|
94
|
+
, SequencingCenter("")
|
95
|
+
, SequencingTechnology("")
|
96
|
+
{ }
|
97
|
+
|
98
|
+
/*! \fn SamReadGroup::SamReadGroup(const SamReadGroup& other)
|
99
|
+
\brief copy constructor
|
100
|
+
*/
|
101
|
+
SamReadGroup::SamReadGroup(const SamReadGroup& other)
|
102
|
+
: Description(other.Description)
|
103
|
+
, FlowOrder(other.FlowOrder)
|
104
|
+
, ID(other.ID)
|
105
|
+
, KeySequence(other.KeySequence)
|
106
|
+
, Library(other.Library)
|
107
|
+
, PlatformUnit(other.PlatformUnit)
|
108
|
+
, PredictedInsertSize(other.PredictedInsertSize)
|
109
|
+
, ProductionDate(other.ProductionDate)
|
110
|
+
, Program(other.Program)
|
111
|
+
, Sample(other.Sample)
|
112
|
+
, SequencingCenter(other.SequencingCenter)
|
113
|
+
, SequencingTechnology(other.SequencingTechnology)
|
114
|
+
{ }
|
115
|
+
|
116
|
+
/*! \fn SamReadGroup::~SamReadGroup(void)
|
117
|
+
\brief destructor
|
118
|
+
*/
|
119
|
+
SamReadGroup::~SamReadGroup(void) { }
|
120
|
+
|
121
|
+
/*! \fn void SamReadGroup::Clear(void)
|
122
|
+
\brief Clears all data fields.
|
123
|
+
*/
|
124
|
+
void SamReadGroup::Clear(void) {
|
125
|
+
Description.clear();
|
126
|
+
FlowOrder.clear();
|
127
|
+
ID.clear();
|
128
|
+
KeySequence.clear();
|
129
|
+
Library.clear();
|
130
|
+
PlatformUnit.clear();
|
131
|
+
PredictedInsertSize.clear();
|
132
|
+
ProductionDate.clear();
|
133
|
+
Program.clear();
|
134
|
+
Sample.clear();
|
135
|
+
SequencingCenter.clear();
|
136
|
+
SequencingTechnology.clear();
|
137
|
+
}
|
138
|
+
|
139
|
+
/*! \fn bool SamReadGroup::HasDescription(void) const
|
140
|
+
\brief Returns \c true if read group contains \@RG DS:\<Description\>
|
141
|
+
*/
|
142
|
+
bool SamReadGroup::HasDescription(void) const {
|
143
|
+
return (!Description.empty());
|
144
|
+
}
|
145
|
+
|
146
|
+
/*! \fn bool SamReadGroup::HasFlowOrder(void) const
|
147
|
+
\brief Returns \c true if read group contains \@RG FO:\<FlowOrder\>
|
148
|
+
*/
|
149
|
+
bool SamReadGroup::HasFlowOrder(void) const {
|
150
|
+
return (!FlowOrder.empty());
|
151
|
+
}
|
152
|
+
|
153
|
+
/*! \fn bool SamReadGroup::HasID(void) const
|
154
|
+
\brief Returns \c true if read group contains \@RG: ID:\<ID\>
|
155
|
+
*/
|
156
|
+
bool SamReadGroup::HasID(void) const {
|
157
|
+
return (!ID.empty());
|
158
|
+
}
|
159
|
+
|
160
|
+
/*! \fn bool SamReadGroup::HasKeySequence(void) const
|
161
|
+
\brief Returns \c true if read group contains \@RG KS:\<KeySequence\>
|
162
|
+
*/
|
163
|
+
bool SamReadGroup::HasKeySequence(void) const {
|
164
|
+
return (!KeySequence.empty());
|
165
|
+
}
|
166
|
+
|
167
|
+
/*! \fn bool SamReadGroup::HasLibrary(void) const
|
168
|
+
\brief Returns \c true if read group contains \@RG LB:\<Library\>
|
169
|
+
*/
|
170
|
+
bool SamReadGroup::HasLibrary(void) const {
|
171
|
+
return (!Library.empty());
|
172
|
+
}
|
173
|
+
|
174
|
+
/*! \fn bool SamReadGroup::HasPlatformUnit(void) const
|
175
|
+
\brief Returns \c true if read group contains \@RG PU:\<PlatformUnit\>
|
176
|
+
*/
|
177
|
+
bool SamReadGroup::HasPlatformUnit(void) const {
|
178
|
+
return (!PlatformUnit.empty());
|
179
|
+
}
|
180
|
+
|
181
|
+
/*! \fn bool SamReadGroup::HasPredictedInsertSize(void) const
|
182
|
+
\brief Returns \c true if read group contains \@RG PI:\<PredictedInsertSize\>
|
183
|
+
*/
|
184
|
+
bool SamReadGroup::HasPredictedInsertSize(void) const {
|
185
|
+
return (!PredictedInsertSize.empty());
|
186
|
+
}
|
187
|
+
|
188
|
+
/*! \fn bool SamReadGroup::HasProductionDate(void) const
|
189
|
+
\brief Returns \c true if read group contains \@RG DT:\<ProductionDate\>
|
190
|
+
*/
|
191
|
+
bool SamReadGroup::HasProductionDate(void) const {
|
192
|
+
return (!ProductionDate.empty());
|
193
|
+
}
|
194
|
+
|
195
|
+
/*! \fn bool SamReadGroup::HasProgram(void) const
|
196
|
+
\brief Returns \c true if read group contains \@RG PG:\<Program\>
|
197
|
+
*/
|
198
|
+
bool SamReadGroup::HasProgram(void) const {
|
199
|
+
return (!Program.empty());
|
200
|
+
}
|
201
|
+
|
202
|
+
/*! \fn bool SamReadGroup::HasSample(void) const
|
203
|
+
\brief Returns \c true if read group contains \@RG SM:\<Sample\>
|
204
|
+
*/
|
205
|
+
bool SamReadGroup::HasSample(void) const {
|
206
|
+
return (!Sample.empty());
|
207
|
+
}
|
208
|
+
|
209
|
+
/*! \fn bool SamReadGroup::HasSequencingCenter(void) const
|
210
|
+
\brief Returns \c true if read group contains \@RG CN:\<SequencingCenter\>
|
211
|
+
*/
|
212
|
+
bool SamReadGroup::HasSequencingCenter(void) const {
|
213
|
+
return (!SequencingCenter.empty());
|
214
|
+
}
|
215
|
+
|
216
|
+
/*! \fn bool SamReadGroup::HasSequencingTechnology(void) const
|
217
|
+
\brief Returns \c true if read group contains \@RG PL:\<SequencingTechnology\>
|
218
|
+
*/
|
219
|
+
bool SamReadGroup::HasSequencingTechnology(void) const {
|
220
|
+
return (!SequencingTechnology.empty());
|
221
|
+
}
|