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

A simple reader implementing the Gene Finding Feature format. More...

#include <Bpp/Seq/Feature/Gff/GffFeatureReader.h>

+ Inheritance diagram for bpp::GffFeatureReader:
+ Collaboration diagram for bpp::GffFeatureReader:

Public Member Functions

 GffFeatureReader (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 Member Functions

static std::string toString (const bpp::SequenceFeature &f)
 
static void toString (const bpp::SequenceFeature &f, std::ostream &out)
 Out put a string description of a feature to a stream. More...
 
static void toString (const bpp::SequenceFeatureSet &fs, std::ostream &out)
 

Static Public Attributes

static const std::string GFF_STRAND
 
static const std::string GFF_PHASE = "GFF_PHASE"
 
static const std::string GFF_NAME = "Name"
 
static const std::string GFF_ALIAS = "GFF_ALIAS"
 
static const std::string GFF_PARENT = "Parent"
 
static const std::string GFF_TARGET = "Target"
 
static const std::string GFF_GAP = "Gap"
 
static const std::string GFF_DERIVES_FROM = "GFF_DERIVES_FROM"
 
static const std::string GFF_NOTE = "Note"
 
static const std::string GFF_DBXREF = "Dbxref"
 
static const std::string GFF_ONTOLOGY_TERM = "Ontology_term"
 
static const std::string GFF_IS_CIRCULAR = "Is_circular"
 

Private Member Functions

void getNextLine_ ()
 

Private Attributes

std::istream & input_
 
std::string nextLine_
 

Detailed Description

A simple reader implementing the Gene Finding Feature format.

The reference norm in use is the one of GFF3 http://www.sequenceontology.org/gff3.shtml . This class is a "beta" class, and may undeavour interface changes in the future.

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

Author
Julien Dutheil, Sylvain Gaillard

Definition at line 66 of file GffFeatureReader.h.

Constructor & Destructor Documentation

◆ GffFeatureReader()

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

Definition at line 88 of file GffFeatureReader.h.

References getNextLine_().

Member Function Documentation

◆ getAllFeatures()

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

◆ getFeaturesOfSequence()

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

◆ getFeaturesOfType()

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

◆ getNextLine_()

void GffFeatureReader::getNextLine_ ( )
private

Definition at line 68 of file GffFeatureReader.cpp.

References bpp::TextTools::isEmpty().

Referenced by GffFeatureReader().

◆ hasMoreFeature()

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

Implements bpp::FeatureReader.

Definition at line 95 of file GffFeatureReader.h.

References nextLine_.

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

◆ nextFeature()

◆ toString() [1/3]

◆ toString() [2/3]

static void bpp::GffFeatureReader::toString ( const bpp::SequenceFeature f,
std::ostream &  out 
)
inlinestatic

Out put a string description of a feature to a stream.

A end of line character will be appended after the description.

Parameters
fA sequence feature.
outAn output stream.

Definition at line 132 of file GffFeatureReader.h.

References toString().

◆ toString() [3/3]

static void bpp::GffFeatureReader::toString ( const bpp::SequenceFeatureSet fs,
std::ostream &  out 
)
inlinestatic

Member Data Documentation

◆ GFF_ALIAS

const std::string GffFeatureReader::GFF_ALIAS = "GFF_ALIAS"
static

Definition at line 73 of file GffFeatureReader.h.

◆ GFF_DBXREF

const std::string GffFeatureReader::GFF_DBXREF = "Dbxref"
static

Definition at line 79 of file GffFeatureReader.h.

◆ GFF_DERIVES_FROM

const std::string GffFeatureReader::GFF_DERIVES_FROM = "GFF_DERIVES_FROM"
static

Definition at line 77 of file GffFeatureReader.h.

◆ GFF_GAP

const std::string GffFeatureReader::GFF_GAP = "Gap"
static

Definition at line 76 of file GffFeatureReader.h.

◆ GFF_IS_CIRCULAR

const std::string GffFeatureReader::GFF_IS_CIRCULAR = "Is_circular"
static

Definition at line 81 of file GffFeatureReader.h.

◆ GFF_NAME

const std::string GffFeatureReader::GFF_NAME = "Name"
static

Definition at line 72 of file GffFeatureReader.h.

◆ GFF_NOTE

const std::string GffFeatureReader::GFF_NOTE = "Note"
static

Definition at line 78 of file GffFeatureReader.h.

◆ GFF_ONTOLOGY_TERM

const std::string GffFeatureReader::GFF_ONTOLOGY_TERM = "Ontology_term"
static

Definition at line 80 of file GffFeatureReader.h.

◆ GFF_PARENT

const std::string GffFeatureReader::GFF_PARENT = "Parent"
static

Definition at line 74 of file GffFeatureReader.h.

◆ GFF_PHASE

const std::string GffFeatureReader::GFF_PHASE = "GFF_PHASE"
static

Definition at line 71 of file GffFeatureReader.h.

◆ GFF_STRAND

const std::string bpp::GffFeatureReader::GFF_STRAND
static

Definition at line 70 of file GffFeatureReader.h.

◆ GFF_TARGET

const std::string GffFeatureReader::GFF_TARGET = "Target"
static

Definition at line 75 of file GffFeatureReader.h.

◆ input_

std::istream& bpp::GffFeatureReader::input_
private

Definition at line 84 of file GffFeatureReader.h.

◆ nextLine_

std::string bpp::GffFeatureReader::nextLine_
private

Definition at line 85 of file GffFeatureReader.h.

Referenced by hasMoreFeature().


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