/** ** Copyright (c) 2007-2009 Illumina, Inc. ** ** 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). ** ** This file is part of the Consensus Assessment of Sequence And VAriation ** (CASAVA) software package. ** ** \file SafInput.cpp ** ** \brief Implementation of the SafInput and AnomalyInput classes. ** ** \author Mohamed Zerara **/ #include #include #include #include "SafInput.hh" namespace cc = casava::common; namespace casava { namespace common { SafInput::SafInput() : readID_(std::string()), chromosome_(std::string()), nhood_(std::string()), position_(0), strand1_(std::string()), strand2_(std::string()), type_(std::string()), bestInsert_(0), scoreSingle_(0), scorePair_(0), strandOfPair_(), offsetOfPair_(0) { } SafInput::~SafInput() { } void SafInput::setReadID(const std::string& readID) { readID_ = readID; } void SafInput::setChromosome(const std::string& chromosome) { chromosome_ = chromosome; } void SafInput::setPosition(const unsigned int position) { position_ = position; } void SafInput::setStrand1(const std::string& strand1) { strand1_ = strand1; } void SafInput::setStrand2(const std::string& strand2) { strand2_ = strand2; } void SafInput::setType(const std::string& type) { type_ = type; } void SafInput::setBestInsert(const int bestInsert) { bestInsert_ = bestInsert; } void SafInput::setScoreSingle(const double scoreSingle) { scoreSingle_ = scoreSingle; } void SafInput::setScorePair(const double scorePair) { scorePair_ = scorePair; } void SafInput::setStrandOfPair(const char strandOfPair) { strandOfPair_ = strandOfPair; } void SafInput::setOffsetOfPear(const int offsetOfPair) { offsetOfPair_ = offsetOfPair; } void SafInput::setNhood(const std::string& nhood) { nhood_ = nhood; } std::ostream & operator<<(std::ostream& os, const SafInput& saf) { os << saf.readID_; if (saf.chromosome_ != std::string()) os << "\t" << saf.chromosome_; os << "\t" << saf.nhood_; if (saf.chromosome_ != std::string()) os << "\t" << saf.position_ << "\t" << saf.strand1_ << "\t" << saf.type_ << "\t" << saf.scoreSingle_ << "\t" << saf.strand2_ << "\t" << saf.scorePair_ << "\t" << saf.strandOfPair_ << "\t" << saf.offsetOfPair_; os << std::endl; return os; } } }