Sleipnir
Public Member Functions
Sleipnir::CPCLSet Class Reference

A PCL set manages a collection of CPCL objects and aligns their gene indices. More...

#include <pclset.h>

Inheritance diagram for Sleipnir::CPCLSet:
Sleipnir::CPCLSetImpl

Public Member Functions

bool Open (const std::vector< std::string > &vecstrFiles, size_t iSkip=2, CPCL::ENormalize eNormalize=CPCL::ENormalizeNone)
 Create a new PCL set by opening and aligning the given PCL filenames.
size_t GetGenes () const
 Return the number of genes in the PCL set.
size_t GetPCLs () const
 Return the number of PCLs in the set.
float Get (size_t iPCL, size_t iGene, size_t iExperiment) const
 Returns the value at the requested PCL position.
const float * Get (size_t iPCL, size_t iGene) const
 Return a single gene's row from the given PCL.
size_t GetGene (const std::string &strGene) const
 Return the index of the given gene name, or -1 if it is not included in the PCL set.
const std::string & GetGene (size_t iGene) const
 Returns the gene name at the given index.
const std::vector< std::string > & GetGeneNames () const
 Returns the vector of gene names associated with this PCL set.
const CPCLGet (size_t iPCL) const
 Return the PCL at the given index.

Detailed Description

A PCL set manages a collection of CPCL objects and aligns their gene indices.

A PCL set is a set of PCLs whose gene indices have been aligned; that is, the same gene will appear at any index in all contained PCLs. Genes not actually present in individual PCLs will be given missing values for data and empty strings for feature values.

See also:
IDataset

Definition at line 42 of file pclset.h.


Member Function Documentation

float Sleipnir::CPCLSet::Get ( size_t  iPCL,
size_t  iGene,
size_t  iExperiment 
) const [inline]

Returns the value at the requested PCL position.

Parameters:
iPCLPCL index.
iGeneGene row.
iExperimentExperiment column.
Returns:
Value at the requested PCL position.
Remarks:
For efficiency, no bounds checking is performed. The given values must be smaller than GetPCLs, GetGenes, and that PCL's GetExperiments. Note that the gene index is within the PCL set, not the individual PCL; the experiment index is within the individual PCL.

Definition at line 93 of file pclset.h.

References Sleipnir::CFullMatrix< tType >::Get(), Sleipnir::CPCL::Get(), and Sleipnir::CMeta::GetNaN().

const float* Sleipnir::CPCLSet::Get ( size_t  iPCL,
size_t  iGene 
) const [inline]

Return a single gene's row from the given PCL.

Parameters:
iPCLPCL index.
iGeneGene row.
Returns:
Requested PCL row.
Remarks:
For efficiency, no bounds checking is performed. The given values must be smaller than GetPCLs and GetGenes. Note that the gene index is within the PCL set, not the individual PCL.

Definition at line 118 of file pclset.h.

References Sleipnir::CFullMatrix< tType >::Get(), and Sleipnir::CPCL::Get().

const CPCL& Sleipnir::CPCLSet::Get ( size_t  iPCL) const [inline]

Return the PCL at the given index.

Parameters:
iPCLIndex of PCL to retrieve from the set.
Returns:
PCL at the requested index.
Remarks:
For efficiency, no bounds checking is performed. The given index must be smaller than GetPCLs. Note that no gene alignment is done within the original PCL object.

Definition at line 190 of file pclset.h.

size_t Sleipnir::CPCLSet::GetGene ( const std::string &  strGene) const [inline]

Return the index of the given gene name, or -1 if it is not included in the PCL set.

Parameters:
strGeneGene name to retrieve.
Returns:
Index of the requested gene name, or -1 if it is not in the PCL set.
See also:
GetGeneNames

Definition at line 139 of file pclset.h.

const std::string& Sleipnir::CPCLSet::GetGene ( size_t  iGene) const [inline]

Returns the gene name at the given index.

Parameters:
iGeneIndex of gene name to return.
Returns:
Gene name at the requested index.
Remarks:
For efficiency, no bounds checking is performed. The given index must be smaller than GetGenes.

Definition at line 158 of file pclset.h.

const std::vector<std::string>& Sleipnir::CPCLSet::GetGeneNames ( ) const [inline]

Returns the vector of gene names associated with this PCL set.

Returns:
Vector of this PCL set's gene names.
Remarks:
Returned vector size will be identical to GetGenes.

Definition at line 172 of file pclset.h.

size_t Sleipnir::CPCLSet::GetGenes ( ) const [inline]

Return the number of genes in the PCL set.

Returns:
Number of genes in the PCL set.
Remarks:
This will be the size of the union of all genes in the contained PCLs.

Definition at line 57 of file pclset.h.

size_t Sleipnir::CPCLSet::GetPCLs ( ) const [inline]

Return the number of PCLs in the set.

Returns:
Number of PCLs in the set.

Definition at line 68 of file pclset.h.

bool Sleipnir::CPCLSet::Open ( const std::vector< std::string > &  vecstrFiles,
size_t  iSkip = 2,
CPCL::ENormalize  eNormalize = CPCL::ENormalizeNone 
)

Create a new PCL set by opening and aligning the given PCL filenames.

Parameters:
vecstrFilesVector of PCL filenames to be opened.
iSkipNumber of feature columns to skip between the gene IDs and experimental data columns in each file.
eNormalizeWay in which each PCL should be normalized.
Returns:
True if the PCL set was opened successfully.
Remarks:
The same number of skip columns must be used for each PCL in the set.

Definition at line 61 of file pclset.cpp.

References Sleipnir::CPCL::GetGene(), Sleipnir::CPCL::GetGenes(), Sleipnir::CFullMatrix< tType >::Initialize(), Sleipnir::CPCL::Normalize(), and Sleipnir::CFullMatrix< tType >::Set().


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