Biorithm  1.1
Public Member Functions | Static Public Attributes
readfile Class Reference
Inheritance diagram for readfile:
motifDataset

List of all members.

Public Member Functions

 readfile (set< int >, string, string)
 readfile (const readfile &in)
virtual void readProbeAliases (string aliasFile)
virtual void readProbeInfo (string infoFile)
void refactor (set< int > leaveOut)
virtual bool isProbe (string id) const
virtual vector< string > * probes ()
virtual vector< string > * samples ()
virtual double operator() (int, int)
virtual double operator() (string, string)
virtual bool exists (int, int)
virtual bool exists (string, string)
virtual vector< vector< int > > * classToExperiments ()
virtual vector< vector< int > > * experimentsToClass ()
virtual string computeClassNameForSamples (const set< int > &columnSet, double frac=1) const
virtual int computeClassIndexForSamples (const set< int > &columnSet, double frac=1) const
virtual string getClassNameForSample (unsigned int index) const
 Return the name of the class for the sample index.
virtual unsigned int getClassIndexForSample (unsigned int index) const
 Return the index of the class for the sample index.
virtual string getClassName (unsigned int index) const
 Return the name of the class corresponding to the index.
virtual unsigned int getClassSize (unsigned int index) const
 Return the number of rows/samples in the class corresponding to the index.
virtual unsigned int getNumClasses () const
 Return the number of classes.
virtual int getColumnIndex (string name) const
virtual int getRowIndex (string name) const
virtual string getRowName (unsigned int index) const
 Return the name corresponding to a row index.

Static Public Attributes

static const int MISSING_VALUE = -9999999

Member Function Documentation

int readfile::computeClassIndexForSamples ( const set< int > &  columnSet,
double  frac = 1 
) const [virtual]

Compute the index of the class that at least a fraction frac of the columns/samples in columnSet belong to.

Implements motifDataset.

string readfile::computeClassNameForSamples ( const set< int > &  columnSet,
double  frac = 1 
) const [virtual]

Compute the class that at least a fraction frac of the columns/samples in columnSet belong to.

Parameters:
[in]columnSet,aset of column/sample indices.
[in]frac,thefraction of columns in columnSet that must belong to the returned class.
Returns:
Any class that at least a fraction of the columns in columnSet belong to.
Warning:
The method does not check if frac lies between 0 and 1.

Implements motifDataset.

unsigned int readfile::getClassIndexForSample ( unsigned int  index) const [virtual]

Return the index of the class for the sample index.

Implements motifDataset.

int readfile::getColumnIndex ( string  name) const [virtual]

Return the index corresponding to a column name (-1 if the column does not exist).

Implements motifDataset.

int readfile::getRowIndex ( string  name) const [virtual]

Return the index corresponding to a row name (-1 if the row does not exist).

Implements motifDataset.

bool readfile::isProbe ( string  id) const [virtual]

Returns true if and only if id is a probe in the dataset.

Note:
The method will return true if id is an alias for a probe.

Implements motifDataset.

void readfile::readProbeAliases ( string  aliasFile) [virtual]

Read aliases for probes/rows from aliasFile.

Each line in aliasFile should contain the name of one probe/row and one alias, separated by tabs. The mapping can be many-to-many.

Warning:
The method ignores aliases for rows/probes/genes that are not in the dataset.

Implements motifDataset.

void readfile::readProbeInfo ( string  infoFile) [virtual]

Read information for probes/rows.

Each tab-separated line in infoFile should contain the name of one probe/row, one (gene) symbol, and one name/annotation for the probe. The mapping should be one-one.

Warning:
The method ignores info for rows/probes/genes that are not in the dataset.
If any probe has multiple lines, the method ignores all but the last one.

Implements motifDataset.


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