bpp-seq-omics  2.4.1
bpp::GtfFeatureReader Class Reference

A simple reader implementing the Gene Transfer Format. More...

#include <Bpp/Seq/Feature/Gtf/GtfFeatureReader.h>

+ Inheritance diagram for bpp::GtfFeatureReader:
+ Collaboration diagram for bpp::GtfFeatureReader:

Public Member Functions

 GtfFeatureReader (std::istream &input)
 
bool hasMoreFeature () const
 
const BasicSequenceFeature nextFeature ()
 
void getAllFeatures (SequenceFeatureSet &features)
 
void getFeaturesOfType (const std::string &type, SequenceFeatureSet &features)
 
void getFeaturesOfSequence (const std::string &seqId, SequenceFeatureSet &features)
 

Static Public Attributes

static const std::string GTF_PHASE = "GTF_PHASE"
 
static const std::string GTF_GENE_ID = "gene_id"
 
static const std::string GTF_TRANSCRIPT_ID = "transcript_id"
 

Private Member Functions

void getNextLine_ ()
 

Private Attributes

std::istream & input_
 
std::string nextLine_
 

Detailed Description

A simple reader implementing the Gene Transfer Format.

The reference norm in use is the one of GTF2.2 http://mblab.wustl.edu/GTF22.html . This class is a "beta" class, and may undeavour interface changes in the future.

Note that in GTF, coordinates are [a, b] 1-based. They will therefore be converted to [a, b[ 0-based, as specified for the SequenceFeature object.

Author
Sylvain Gaillard

Definition at line 66 of file GtfFeatureReader.h.

Constructor & Destructor Documentation

◆ GtfFeatureReader()

bpp::GtfFeatureReader::GtfFeatureReader ( std::istream &  input)
inline

Definition at line 79 of file GtfFeatureReader.h.

References getNextLine_().

Member Function Documentation

◆ getAllFeatures()

void bpp::GtfFeatureReader::getAllFeatures ( SequenceFeatureSet features)
inlinevirtual

◆ getFeaturesOfSequence()

void bpp::GtfFeatureReader::getFeaturesOfSequence ( const std::string &  seqId,
SequenceFeatureSet features 
)
inlinevirtual

◆ getFeaturesOfType()

void bpp::GtfFeatureReader::getFeaturesOfType ( const std::string &  type,
SequenceFeatureSet features 
)
inlinevirtual

◆ getNextLine_()

void GtfFeatureReader::getNextLine_ ( )
private

Definition at line 58 of file GtfFeatureReader.cpp.

References bpp::TextTools::isEmpty().

Referenced by GtfFeatureReader().

◆ hasMoreFeature()

bool bpp::GtfFeatureReader::hasMoreFeature ( ) const
inlinevirtual

Implements bpp::FeatureReader.

Definition at line 86 of file GtfFeatureReader.h.

References nextLine_.

Referenced by getAllFeatures(), getFeaturesOfSequence(), and getFeaturesOfType().

◆ nextFeature()

Member Data Documentation

◆ GTF_GENE_ID

const string GtfFeatureReader::GTF_GENE_ID = "gene_id"
static

Definition at line 71 of file GtfFeatureReader.h.

◆ GTF_PHASE

const string GtfFeatureReader::GTF_PHASE = "GTF_PHASE"
static

Definition at line 70 of file GtfFeatureReader.h.

◆ GTF_TRANSCRIPT_ID

const string GtfFeatureReader::GTF_TRANSCRIPT_ID = "transcript_id"
static

Definition at line 72 of file GtfFeatureReader.h.

◆ input_

std::istream& bpp::GtfFeatureReader::input_
private

Definition at line 75 of file GtfFeatureReader.h.

◆ nextLine_

std::string bpp::GtfFeatureReader::nextLine_
private

Definition at line 76 of file GtfFeatureReader.h.

Referenced by hasMoreFeature().


The documentation for this class was generated from the following files: