GVecBed Class Reference

Inheritance diagram for GVecBed:
GVec

List of all members.

Classes

class  BedRecord

Public Member Functions

 GVecBed (QString, GVec *parent=0)
 GVecBed (QString, QString, bool has_score, GVec *parent=0)
void push_back (list< string > &, string chrom, long start, long stop, string name, bool score_tf, real score, string strand, long thick_start, long thick_stop, int block_count, string block_sizes, string block_starts, string item_rgb)
GVecBed::BedRecordat (size_t)
QColor * get_color (size_t)
long get_stop (size_t)
string get_info (size_t)
GVec::vtype get_type ()

Member Function Documentation

GVecBed::BedRecord * GVecBed::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.

QColor * GVecBed::get_color ( size_t  i  )  [virtual]

Returns the color associated with the record at the argument for the current focus. In GVec, this method simply returns 0 (null pointer). However, some file sources, like BED files (see GVecBed), allow for per record color data-- then this method comes in handy.

Parameters:
size_t i the index in the current focus's vector of records
Returns:
QColor associated with record
See also:
GVec::at( size_t i )

Reimplemented from GVec.

string GVecBed::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.

long GVecBed::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 GVecBed::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.


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