Scientific Publications
The Tiling Analysis Software stores its computed signal and p-values from a single or two sample analysis in either a BAR (binary archive) or CHP ("chip") file. Documentation on the file formats are available on the DevNet section of the Affymetrix web site.
Both BAR and CHP files contains the same contents, the move to CHP file is to use the newly standardized data storage format defined by the Affymetrix® GeneChip® Command Console® (AGCC) team.
The data stored in the BAR or CHP file are the computed signal or p-values for each genomic position, grouped by each sequence interrogated by the associated GeneChip tiling array.
Parsers in the form of C++ source code are available from Affymetrix to parse the BAR and CHP files. Java parsers are also available but only for the CHP files. These parsers, along with sample code and documentation, are contained within the Fusion SDK.
The class provided within the Fusion SDK to parse a tiling array CHP files is the FusionCHPTilingData class. The class provided within the Fusion SDK to parse a BAR file is the CBARFileData class. These classes provide the high level interfaces to obtaining information within the BAR or CHP files.
The following is an example of C++ code using the Fusion SDK to extract the data from from a CHP file. The top level function is ReadCHPFile.
#include "FusionCHPData.h" // header file
for reading CHP files.
#include "FusionCHPTilingData.h" // tilng type
CHP files
#include <string>
using namespace std;
using namespace affymetrix_calvin_io;
using namespace affymetrix_fusion_io;
/*! This function extracts the values from the CHP file.
* @param tchp The CHP file object.
*/
void ExtractData(FusionCHPTilingData *tchp)
{
// The CHP file contains a header with name/value parameters.
// These parameters include (other parameter may exist in addition to the following ones):
// Name: "file_type", Value: description of the file type contents ("signal" or "p-value")
// Name: "scale", Value: description of the scale used. "Linear", "Log10", "Log2", or "-10Log10"
// Name: "genomic_map", Value: bpmap file used to perform the analysis
ParameterNameValueTypeList params = tchp->GetAlgParams();// Now loop over the sequences.
int n = tchp->GetNumberSequences();
for (int i = 0; i < n; i++)
{tchp->OpenTilingSequenceDataSet(i);
// Get the sequence data, this includes the sequence name, version and group identifier.
// Also included are a list of parameters which include a description of the type of sequence.
// One of the parameters in the list includes the purpose of the sequence. The parameter name is "probeset_type"
// and the value indicating a tiling sequence is "tiling". Other purposes may include probes for intergenic regions.
TilingSequenceData seqdata = tchp->GetTilingSequenceData();>// Now loop over each entry in the sequence. The signal or p-value will be stored in the entry. The entry
// also contains the genomic position.
int nentries = tchp->GetTilingSequenceEntryCount(i);
CHPTilingEntry entry;
for (int ientry=0; ientry<nentries; ientry++)
{tchp->GetTilingSequenceEntry(ientry, entry);
}
}
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. If you link in the expression
// parsers then the Read function will also be capable or reading expression CHP files.
FusionCHPData *chp = FusionCHPDataReg::Read(fileName);
if (chp == null) return false;// The following function will determine if the CHP file read contains "tiling" format data.
bool status = false;
FusionCHPTilingData *tchp = FusionCHPTilingData::FromBase(chp);
if (tchp != null)
{ExtractData(tchp);
delete tchp;
return true;}
// The CHP file was read, but not of the type we wanted.
delete chp;
return false;
}


