/** ** Copyright (c) 2007-2010 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. ** **/ #include "common/ExportFileReader.h" #include #include #include // *** member functions definitions for ExportFileReader *** // These just call their counterparts in ExportFileReaderImp // Returns pointer to ASCII sequence of next oligo, or null if at end bool ExportFileReader::getNextEntry( void ) { return p_->getNextEntry(); } // Rewind - next oligo read will be first in list void ExportFileReader::rewind ( void ) { return p_->rewind(); } const char* ExportFileReader::getMachine( void ) const { return p_->getMachine(); } int ExportFileReader::getRunNumber( void ) const { return p_->getRunNumber(); } int ExportFileReader::getLane( void ) const { return p_->getLane(); } int ExportFileReader::getTile( void ) const { return p_->getTile(); } int ExportFileReader::getXCoordinate( void ) const { return p_->getXCoordinate(); } int ExportFileReader::getYCoordinate( void ) const { return p_->getYCoordinate(); } const char* ExportFileReader::getIndexString( void ) const { return p_->getIndexString(); } int ExportFileReader::getReadNumber( void ) const { return p_->getReadNumber(); } const char* ExportFileReader::getRead ( void ) const { return p_->getRead(); } const char* ExportFileReader::getQualityString( void ) const { return p_->getQualityString(); } const char* ExportFileReader::getMatchChromosome( void ) const { return p_->getMatchChromosome(); } const char* ExportFileReader::getMatchContig( void ) const { return p_->getMatchContig(); } int ExportFileReader::getMatchPosition( void ) const { return p_->getMatchPosition(); } char ExportFileReader::getMatchStrand( void ) const { return p_->getMatchStrand(); } const char* ExportFileReader::getMatchDescriptor( void ) const { return p_->getMatchDescriptor(); } int ExportFileReader::getSingleReadAlignmentScore( void ) const { return p_->getSingleReadAlignmentScore(); } int ExportFileReader::getPairedReadAlignmentScore( void ) const { return p_->getPairedReadAlignmentScore(); } const char* ExportFileReader::getPartnerChromosome( void ) const { return p_->getPartnerChromosome(); } const char* ExportFileReader::getPartnerContig( void ) const { return p_->getPartnerContig(); } int ExportFileReader::getPartnerOffset( void ) const { return p_->getPartnerOffset(); } char ExportFileReader::getPartnerStrand( void ) const { return p_->getPartnerStrand(); } char ExportFileReader::getFiltering( void ) const { return p_->getFiltering(); } ExportFileReaderActual::ExportFileReaderActual( const char* exportFileName ) : entry_(NumberOfEntries), pFile_(fopen(exportFileName, "r")) { if (pFile_==NULL) { cerr << "Error in ExportFileReaderActual: could not open file " << exportFileName << endl; exit (1); } // ~if } // ~ctor ExportFileReaderActual::~ExportFileReaderActual() { fclose(pFile_); } // ~dtor bool ExportFileReaderActual::getNextEntry( void ) { const char separator('\t'); if (fgets(buf_,120000, pFile_)==NULL) return false; char* p(buf_); p--; for (unsigned int i(0); i