#ifndef CASAVAOPTIONS_HH_ #define CASAVAOPTIONS_HH_ /** * Project : CASAVA * Module : $RCSfile: CasavaOptions.hh,v $ * @author : Lukasz Szajkowski * Copyright : Copyright (c) Illumina 2008, 2009. All rights reserved. * ** This software is covered by the "Illumina Genome Analyzer Software ** License Agreement" and the "Illumina Source Code License Agreement", ** and certain third party copyright/licenses, and any user of this ** source file is bound by the terms therein (see accompanying files ** Illumina_Genome_Analyzer_Software_License_Agreement.pdf and ** Illumina_Source_Code_License_Agreement.pdf and third party ** copyright/license notices). * */ #include #include #include "common/CommandLine.hh" #include "common/SharedDataTypes.hh" #include "applications/SmallAssemblerOptions.hh" namespace ca { namespace applications { using namespace casava::common; /** * @class CasavaOptions * * @brief Stores default params for CASAVA C++ modules. * * $Header $ */ class CasavaOptions : public Options { private: /* Generic parameters */ std::string _version; std::string _applicationType; std::string _inputReadsFilePath; std::string _outputReadsFilePath; std::string _refSequencePath; std::string _bamRegion; std::string _rawClustersFilePath; std::string _contigFilePath; std::string _summaryFilePath; std::string _outputFilePath; std::string _output2FilePath; std::string _indexPath; int _verbose; public: bool isQphred; bool isFilterUnanchored; private: /* IndelFinder parameters */ // single read alignment score threshold int _srasThreshold; // paired read alignment score threshold int _prasThreshold; /* IndelFinder and ClusterFinder parameter: */ // spanning read threshold double _spReadThreshold; /* IndelFinder and ClusterFinder and ClusterMerger parameters */ // Num SDs below the median at which insert size is considered anomalous float _numLowInsertSizeSds; // Num SDs above the median at which insert size is considered anomalous float _numHighInsertSizeSds; /* ClusterFinder parameters */ // minimum size for shadow read cluster unsigned int _minGroupSize; // max distance between shadows for them to be in same cluster double _maxDistance; // max distance between anom read pair midpoints for same cluster long _clusterMaxInterBreakPtDist; /* ClusterMerger parameters */ // whether to do compatible adjacency merging bool _doAdjMerge; // max distance between cluster breakpts for adjacency merge int _clusterMaxAdjMergeInterBreakPtDist; public: /* Align Candidate Indel Reads parameters */ double alignScoreThresh; bool is_set_alignScoreThresh; unsigned sdFlankWeight; bool is_set_sdFlankWeight; std::string sampleStatsPath; SmallAssemblerOptions asmOptions; /* AlignContig parameters */ std::string alignedContigsPath; private: bool _reportMode; bool _variantOnlyMode; bool _indelOnlyMode; bool _snpOnlyMode; bool _purityFilter; ScoreType _alignCandIndelReadsMatchScore; ScoreType _alignCandIndelReadsMismatchScore; ScoreType _alignCandIndelReadsOpenScore; ScoreType _alignCandIndelReadsExtendScore; ScoreType _alignContigMatchScore; ScoreType _alignContigMismatchScore; ScoreType _alignContigOpenScore; ScoreType _alignContigExtendScore; ScoreType _minScore; int _minContext; public: CasavaOptions(); virtual ~CasavaOptions() {} /** * data fields getters */ std::string refSequencePath(){ return _refSequencePath; } std::string rawClustersFilePath() { return _rawClustersFilePath; } std::string contigFilePath() { return _contigFilePath; } int verbose() { return _verbose; } bool reportMode(){ return _reportMode; } bool variantOnlyMode(){ return _variantOnlyMode; } bool indelOnlyMode(){ return _indelOnlyMode; } bool snpOnlyMode(){ return _snpOnlyMode; } ScoreType alignCandIndelReadsMatchScore() { return _alignCandIndelReadsMatchScore; } ScoreType alignCandIndelReadsMismatchScore() { return _alignCandIndelReadsMismatchScore; } ScoreType alignCandIndelReadsOpenScore() { return _alignCandIndelReadsOpenScore; } ScoreType alignCandIndelReadsExtendScore() { return _alignCandIndelReadsExtendScore; } ScoreType alignContigMatchScore() { return _alignContigMatchScore; } ScoreType alignContigMismatchScore() { return _alignContigMismatchScore; } ScoreType alignContigOpenScore() { return _alignContigOpenScore; } ScoreType alignContigExtendScore() { return _alignContigExtendScore; } ScoreType minScore(){ return _minScore; } int minContext(){ return _minContext; } bool purityFilter() { return _purityFilter; } /** * Indelfinder getters */ int srasThreshold() { return _srasThreshold; } int prasThreshold() { return _prasThreshold; } double spReadThreshold() { return _spReadThreshold; } const char* bamRegion() { return (_bamRegion.empty() ? NULL : _bamRegion.c_str()); } float numLowInsertSizeSds() { return _numLowInsertSizeSds; } float numHighInsertSizeSds() { return _numHighInsertSizeSds; } /** * ClusterFinder getters */ unsigned int minGroupSize(){ return _minGroupSize; } double maxDistance() { return _maxDistance; } long clusterMaxInterBreakPtDist() { return _clusterMaxInterBreakPtDist; } /** * ClusterMerger getters */ bool doAdjMerge() { return _doAdjMerge; } int clusterMaxAdjMergeInterBreakPtDist() { return _clusterMaxAdjMergeInterBreakPtDist; } /** * version getter - Provides application's version based on CVS Id tag * @return version */ std::string version(); /** * applicationType getter * @return applicationType */ std::string applicationType(); /** * inputReadsFilePath getter * @return inputReadsFilePath */ std::string inputReadsFilePath(); /** * outputReadsFilePath getter * @return inputReadsFilePath */ std::string outputReadsFilePath(); /** * summaryFilePath getter * @return summaryFilePath */ std::string summaryFilePath(); /** * outputFilePath getter * @return outputFilePath */ std::string outputFilePath(); /** * output2FilePath getter * @return output2FilePath */ std::string output2FilePath(); /** * indexPath getter * @return indexPath */ std::string indexPath(); /** * The method prints version */ void print_version(); private: virtual int getOptions(int argc, char * const argv[]) throw (UnknownOptionException, MissingOptionException, InvalidArgumentException); virtual void processOptions() throw (InvalidArgumentException); virtual void getParameters(int argc, char * const argv[]) throw (InvalidArgumentException); virtual int usage(int argc, char * const argv[], const std::string &message = ""); }; } } // end namespace casava{ namespace { applications #endif /*CASAVAOPTIONS_HH_*/