#include "applications/CheckOrder.hh" /** * Project : CASAVA * Module : $RCSfile: CheckOrder.cpp,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 #include "common/Alignment.hh" namespace ca { namespace applications { using namespace std; using namespace casava::common; int CheckOrder::run() { cout << "[" << "Start" << "]\n"; const casava::common::Compression &noCompression = casava::common::CompressionFactory::none(); casava::common::AlignmentReader alignmentReader(_options.inputReadsFilePath(), noCompression); if (alignmentReader && alignmentReader.good()) { } else { cout << "ERROR: failed to open. " << _options.inputReadsFilePath() << "\n"; exit(1); } casava::common::Alignment newAlignment; int lastPosition = -1; int index = 0; while (alignmentReader >> newAlignment) { if (!alignmentReader.good()){ break; } if (newAlignment.getMatch().getPosition() < lastPosition) { cout << "ERROR: in file " << _options.inputReadsFilePath() << ":" << index <<" position " <