00001 // Copyright 2010 Complete Genomics, Inc. 00002 // 00003 // Licensed under the Apache License, Version 2.0 (the "License"); you 00004 // may not use this file except in compliance with the License. You 00005 // may obtain a copy of the License at 00006 // 00007 // http://www.apache.org/licenses/LICENSE-2.0 00008 // 00009 // Unless required by applicable law or agreed to in writing, software 00010 // distributed under the License is distributed on an "AS IS" BASIS, 00011 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 00012 // implied. See the License for the specific language governing 00013 // permissions and limitations under the License. 00014 00015 #ifndef CGA_TOOLS_COMMAND_VARFILECOMBINE_HPP_ 00016 #define CGA_TOOLS_COMMAND_VARFILECOMBINE_HPP_ 1 00017 00019 00020 #include "cgatools/core.hpp" 00021 00022 #include <boost/shared_ptr.hpp> 00023 00024 #include "cgatools/command/Command.hpp" 00025 #include "cgatools/reference/CrrFile.hpp" 00026 #include "cgatools/variants/Locus.hpp" 00027 #include "cgatools/variants/VariantFileIterator.hpp" 00028 #include "cgatools/cgdata/GenomeMetadata.hpp" 00029 #include "cgatools/util/DelimitedFile.hpp" 00030 00031 namespace cgatools { namespace command { 00032 00033 class AnnotationSource; 00034 00035 class VarFileCombine : public Command 00036 { 00037 public: 00038 VarFileCombine(const std::string& name); 00039 00040 protected: 00041 int run(po::variables_map& vm); 00042 00043 private: 00044 std::string referenceFileName_, variantFileName_, exportRoot_; 00045 std::string outputFileName_, annotations_; 00046 std::string repmaskFileName_, segdupFileName_; 00047 00048 reference::CrrFile crr_; 00049 boost::shared_ptr<cgdata::GenomeMetadata> exp_; 00050 std::vector< boost::shared_ptr<AnnotationSource> > annotators_; 00051 00052 void addAnnotators(const variants::VariantFileIterator& srcFile); 00053 void fillMetadata(util::DelimitedFileMetadata& meta, 00054 const util::DelimitedFileMetadata& vfMeta); 00055 void printLocus(std::ostream& out, const variants::Locus& loc); 00056 }; 00057 00058 } } // cgatools::command 00059 00060 #endif