bpp-seq-omics
2.4.1
|
A simple reader for features in the BedGraph format. More...
#include <Bpp/Seq/Feature/Bed/BedGraphFeatureReader.h>
Public Member Functions | |
BedGraphFeatureReader (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 | BED_VALUE = "BedValue" |
Private Member Functions | |
void | getNextLine_ () |
Private Attributes | |
std::istream & | input_ |
std::string | nextLine_ |
unsigned int | id_ |
A simple reader for features in the BedGraph format.
Format desciption at UCSC: https://genome.ucsc.edu/goldenpath/help/bedgraph.html
Note: The value associated to each feature is stored as a string attribute, using tag BegGraphFeatureReader::BED_VALUE. No check is performed regarding its value. An automatic id is generated, and the source tag is set to "beg_graph".
Definition at line 66 of file BedGraphFeatureReader.h.
|
inline |
Definition at line 78 of file BedGraphFeatureReader.h.
References getNextLine_(), input_, and nextLine_.
|
inlinevirtual |
Implements bpp::FeatureReader.
Definition at line 97 of file BedGraphFeatureReader.h.
References bpp::SequenceFeatureSet::addFeature(), hasMoreFeature(), and nextFeature().
|
inlinevirtual |
Implements bpp::FeatureReader.
Definition at line 109 of file BedGraphFeatureReader.h.
References bpp::SequenceFeatureSet::addFeature(), bpp::BasicSequenceFeature::getSequenceId(), hasMoreFeature(), and nextFeature().
|
inlinevirtual |
Implements bpp::FeatureReader.
Definition at line 102 of file BedGraphFeatureReader.h.
References bpp::SequenceFeatureSet::addFeature(), bpp::BasicSequenceFeature::getType(), hasMoreFeature(), and nextFeature().
|
private |
Definition at line 58 of file BedGraphFeatureReader.cpp.
References bpp::TextTools::isEmpty().
Referenced by BedGraphFeatureReader().
|
inlinevirtual |
Implements bpp::FeatureReader.
Definition at line 94 of file BedGraphFeatureReader.h.
References nextLine_.
Referenced by getAllFeatures(), getFeaturesOfSequence(), and getFeaturesOfType().
|
virtual |
Implements bpp::FeatureReader.
Definition at line 69 of file BedGraphFeatureReader.cpp.
References bpp::StringTokenizer::nextToken(), bpp::StringTokenizer::numberOfRemainingTokens(), bpp::BasicSequenceFeature::setAttribute(), and bpp::TextTools::toString().
Referenced by getAllFeatures(), getFeaturesOfSequence(), and getFeaturesOfType().
|
static |
f | A sequence feature. |
Definition at line 96 of file BedGraphFeatureReader.cpp.
References bpp::SequenceFeature::getAttribute(), bpp::SequenceFeature::getEnd(), bpp::SequenceFeature::getSequenceId(), bpp::SequenceFeature::getStart(), bpp::VectorTools::paste(), and bpp::TextTools::toString().
Referenced by toString().
|
inlinestatic |
Out put a string description of a feature to a stream.
A end of line character will be appended after the description.
f | A sequence feature. |
out | An output stream. |
Definition at line 131 of file BedGraphFeatureReader.h.
References toString().
|
inlinestatic |
Definition at line 135 of file BedGraphFeatureReader.h.
References bpp::SequenceFeatureSet::getNumberOfFeatures(), and toString().
|
static |
Definition at line 70 of file BedGraphFeatureReader.h.
|
private |
Definition at line 75 of file BedGraphFeatureReader.h.
|
private |
Definition at line 73 of file BedGraphFeatureReader.h.
Referenced by BedGraphFeatureReader().
|
private |
Definition at line 74 of file BedGraphFeatureReader.h.
Referenced by BedGraphFeatureReader(), and hasMoreFeature().