GVecGFF Class Reference

Inheritance diagram for GVecGFF:
GVec

List of all members.

Classes

class  GFFRecord

Public Member Functions

 GVecGFF (QString, GVec *parent=0)
 GVecGFF (QString, QString, bool, GVec *parent=0)
GVec::vtype get_type ()
void push_back (list< string > &, string, long, long, real, string, string, string, string, bool, vector< QColor * > *=0)
void insert (list< QString >, string, long, long, real score=0, string source=".", string strand=".", string frame=".", string attribs="", bool has_score=false, vector< QColor * > *colors=0)
void insert (string, long, long, real score=0, string source=".", string strand=".", string frame=".", string attribs="", bool has_score=false, vector< QColor * > *colors=0)
void insert (string, long, long, vector< QColor * > *colors)
set< QString > get_attributes ()
GVecGFF::GFFRecordat (size_t)
long get_start (size_t)
long get_stop (size_t)
real get_score (size_t)
vector< QColor * > * get_colors (size_t)
string get_info (size_t)
QString get_attribute_value (size_t, QString)
QString get_feature ()
void set_start (size_t, long)
void set_stop (size_t, long)
void set_colors (size_t, vector< QColor * > *)
void append_colors (size_t, vector< QColor * > *)
bool has_text ()
bool has_stop_position ()

Member Function Documentation

GVecGFF::GFFRecord * GVecGFF::at ( size_t  i  )  [virtual]

This method functions somewhat like its namesake in std::vector and similar. However, remember that a GVec is actually a map or record vectors organized by sequence focus. So, this "at" returns the value at the index argument for the current focus.

In general, one should consider using methods like get_start( i ), get_stop( i ), get_score( i ), etc.. which will look up the record at that argument and return the requested information without the caller having to handle GVec::Record objects.

Finally, the method does not fail safe if i is outside of the vector's range. It's up to the programmer to check the length of the vector via the GVec::length( ) method.

Parameters:
size_t i the index of the desired record for the current focus
Returns:
a GVec::Record*
See also:
GVec::get_start( size_t i ), GVec::get_stop( size_t i ), GVec::get_score( size_t i ), GVec::set_focus( QString new_focus ), GVec::get_focus( ), GVec::length( ), etc...

Reimplemented from GVec.

QString GVecGFF::get_feature (  )  [virtual]

DEPRECATED!!! At one time feature was more tightly defined, now this simply returns the node_name, which may or may not be the node one wants to use as the feature.

Perhaps in future versions, feature will be settable... it might be any level in a GVec tree, but the tree will keep track of its location.

Returns:
node_name

Reimplemented from GVec.

string GVecGFF::get_info ( size_t  i  )  [virtual]

Returns a formatted string representation of the record, for instance, that might be displayed when a user clicks on the records glyph.

Parameters:
size_t i the index in the current focus's vector of records
Returns:
string representation of the record, formated for display
See also:
GVec::at( size_t i )

Reimplemented from GVec.

real GVecGFF::get_score ( size_t  i  )  [virtual]

Returns the score associated with the record at the argument for the current focus. Of course, not all GVec's have scores. An assumption has been made that scored data and scoreless data (like many annotations) will not be in the same GVec; one can use the GVec::has_score( ) method to check if the GVec object is associated with scores.

Parameters:
size_t i the index in the current focus's vector of records
Returns:
the record's score
See also:
GVec::at( size_t i ), GVec::has_score( )

Reimplemented from GVec.

long GVecGFF::get_start ( size_t  i  )  [virtual]

Returns the base pair start position for the record at the argument for the current focus.

Parameters:
size_t i the index in the current focus's vector of records
Returns:
the base pair position where the record starts
See also:
GVec::at( size_t i )

Reimplemented from GVec.

long GVecGFF::get_stop ( size_t  i  )  [virtual]

Returns the base pair stop position for the record at the argument for the current focus. The records handled in this base GVec class are all associated with a single base pair locus; therefore, the start position and stop position are the same.

Parameters:
size_t i the index in the current focus's vector of records
Returns:
the base pair position where the record stops
See also:
GVec::at( size_t i )

Reimplemented from GVec.

GVec::vtype GVecGFF::get_type (  )  [virtual]

Sometimes it's important to know what class type of GVec on is working with, for instance, when choosing a graph type to match. This method was included to help avoid casting (dynamic or otherwise) and returns the value of the GVec::vtype enum defined in GVec. Of course, this only works if a GVec inheriting class actually creates a new enum type and implements this method-- it's not required too!

So, this is just a convenience and certainly not as reliable as explicitly checking a GVec's type, for instance, with a dynamic cast.

Here the value UNKNOWN is always returned.

Reimplemented from GVec.

bool GVecGFF::has_stop_position (  )  [virtual]

Does this GVec have records that contain a stop position? All records have a start position, but some (an annotation for instance) span a segment of the sequence up to and including the stop position. In the latter case, this returns true.

Reimplemented from GVec.

bool GVecGFF::has_text (  )  [virtual]

Do the records in this GVec contain text, for instance, an annotation name. This is determined by the Reader.

Reimplemented from GVec.


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

Generated on Thu Sep 17 15:19:42 2009 for BQGB by  doxygen 1.6.1