Scientific Publications
The Expression Console software stores the probe set summarizations (quantification/detection values) from the RMA, PLIER, DABG algorithms in a binary file with a .CHP extension. This file is referred to as the CHP ("chip") file. The format of the CHP file which the Expression Console software generates is referred to as the Command Console format. Documentation on the file format is available on the DevNet section of the Affymetrix web site.
The Command Console file format is a flexible format in that there can be any number of columns of results, of which each column can be of a variety of data types (integer, float, 8 byte string, 16 byte string as examples). When the Expression Console software uses this format for its algorithms, it only needs to allocate its results table with only either two or three columns - probe set id, quantification and detection values.
Parsers in the form of C++ and Java source code are available from Affymetrix to parse the CHP files. These parsers, along with sample code and documentation, are contained within the Fusion SDK.
The classes/interfaces provided within the Fusion SDK provides the ability to parse CHP files. The FusionCHPQuantificationData and FusionCHPQuantificationDetectionData classes in the Fusion SDK provides the Exon CHP parsing capabilities. The first is used for files with just a probe set id and quantification value. The later class is used for files with probe set id, quantification and detection p-values (generated from the DABG algorithm).
Java developers - The parsers need to be registered (only once) within your application. This is performed by calling the following functions:
FusionCHPQuantificationData.registerReader();
FusionCHPQuantificationDetectionData.registerReader();
FusionCHPLegacyData.registerReader();
The following is an example of C++ code using the Fusion SDK to extract the quantification values from a CHP.
#include "FusionCHPData.h" // header file for reading CHP files.
#include "FusionCHPQuantificationData.h" // RMA/PLIER type CHP files
#include "FusionCHPQuantificationDetectionData.h" // RMA/PLIER with DABG detection type CHP files
#include "StringUtils.h"
#include <string>using namespace std;
using namespace affymetrix_calvin_utilities;
using namespace affymetrix_calvin_data;
using namespace affymetrix_fusion_io;/*! This function extracts the quantification value and id from the CHP file.
* This file type only contains a quantification (no detection).
* @param sigchp The CHP file object.
* @return True if successfully read.
*/
bool ExtractData(FusionCHPQuantificationData *sigchp)
{
// Now loop over the probe sets to get the quantification and id.
float quantification;
string id;
ProbeSetQuantificationData psResults;
int n = sigchp->GetEntryCount();
for (int i = 0; i < n; i++)
{
sigchp->GetQuantificationEntry(i, psResults);
quantification = psResults.quantification;
id = psResults.name;
}
return true;
}/*! This function extracts the quantification/detection value and id from the CHP file.
* @param sigchp The CHP file object.
* @return True if successfully read.
*/
bool ExtractData(FusionCHPQuantificationDetectionData *sigchp)
{
// Now loop over the probe sets to get the quantification and id.
float quantification;
float pvalue;
string id;
ProbeSetQuantificationDetectionData psResults;
int n = sigchp->GetEntryCount();
for (int i = 0; i < n; i++)
{
sigchp->GetQuantificationEntry(i, psResults);
quantification = psResults.quantification;
pvalue = psResults.pvalue;
id = psResults.name;
}
return true;
}/*! This will read the CHP file, determine the type and extract the results.
* @param fileName The full path to the CHP file.
* @return True if successfully read.
*/
bool ReadCHPFile(const char *fileName)
{// Read the CHP file. This function will read any type of CHP file whose parsers (from Fusion)
// have been compiled and linked into the program.
FusionCHPData *chp = FusionCHPDataReg::Read(fileName);
if (chp == null)
return false;// The following function will determine if the CHP file read is a "quantification" type file. This file contains
// the probe set id and the quantification value. This is will be a Command Console format
// file with RMA or PLIER results
bool status = false;
FusionCHPQuantificationData *sigchp = FusionCHPQuantificationData::FromBase(chp);
if (sigchp != null)
{
status = ExtractData(sigchp);
}// The following function will determine if the CHP file read is a "quantification/detection" type file. This file contains
// the probe set id, quantification and detection p-values.
FusionCHPQuantificationDetectionData *sigdchp = FusionCHPQuantificationDetectionData::FromBase(chp);
if (sigdchp != null)
{
status = ExtractData(sigdchp);
}
delete chp;// If the status is false then the CHP file was read, but not of the type we wanted.
return status;
}

