本文整理汇总了C++中GenericDataHeader::AddParent方法的典型用法代码示例。如果您正苦于以下问题:C++ GenericDataHeader::AddParent方法的具体用法?C++ GenericDataHeader::AddParent怎么用?C++ GenericDataHeader::AddParent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GenericDataHeader
的用法示例。
在下文中一共展示了GenericDataHeader::AddParent方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AddStandardGenericDataHeader
void TestFileGenerator::AddStandardGenericDataHeader(GenericDataHeader& gdh)
{
// Fill the GenericDataHeader.
gdh.SetFileTypeId(SCAN_ACQUISITION_DATA_TYPE);
gdh.SetFileId("test-dat-guid");
gdh.SetFileCreationTime(L"2004-07-04T11:12:13Z");
gdh.SetLocale(L"en-US");
ParameterNameValueType nvt;
nvt.SetName(ARRAY_TYPE_PARAM_NAME);
nvt.SetValueText(L"Hg-U133A");
gdh.AddNameValParam(nvt);
nvt.SetName(ARRAY_BARCODE_PARAM_NAME);
nvt.SetValueText(L"Barcode");
gdh.AddNameValParam(nvt);
nvt.SetName(L"Parameter1");
nvt.SetValueText(L"Value1");
gdh.AddNameValParam(nvt);
GenericDataHeader gdhParent;
gdhParent.SetFileTypeId(ARRAY_TYPE_IDENTIFIER);
gdhParent.SetFileId("test-array-guid");
gdhParent.SetFileCreationTime(L"2004-07-01T13:14:15Z");
gdhParent.SetLocale(L"en-US");
nvt.SetName(ARRAY_TYPE_PARAM_NAME);
nvt.SetValueText(L"Hg-U133A");
gdhParent.AddNameValParam(nvt);
nvt.SetName(ARRAY_LOT_PARAM_NAME);
nvt.SetValueText(L"Thanks alot");
gdhParent.AddNameValParam(nvt);
gdh.AddParent(gdhParent);
}
示例2: CreateResultFile
/*
* Create a results file with the CEL file header and other parameters.
*/
void CopyNumberResultWriter::CreateResultFile(affymetrix_fusion_io::FusionCELData& cel, const std::string& fileName)
{
try
{
// Create the results file with the header.
CHPMultiDataData *data = new CHPMultiDataData(fileName);
data->SetEntryCount(CopyNumberMultiDataType, numberProbeSets, maxProbeSetNameLength[CopyNumberMultiDataType], columns);
if (numberCytoRegions > 0)
data->SetEntryCount(CytoMultiDataType, numberCytoRegions, maxProbeSetNameLength[CytoMultiDataType],cytoRegionColumns);
if (numberGenotypeProbeSets > 0)
data->SetEntryCount(GenotypeMultiDataType, numberGenotypeProbeSets, maxProbeSetNameLength[GenotypeMultiDataType], genotypeColumns);
data->SetAlgName(StringUtils::ConvertMBSToWCS(algName));
data->SetAlgVersion(StringUtils::ConvertMBSToWCS(algVersion));
data->SetArrayType(cel.GetChipType());
GenericDataHeader *gdh = data->GetFileHeader()->GetGenericDataHdr();
ParameterNameValueType param;
param.SetName(PROGRAM_NAME);
param.SetValueText(StringUtils::ConvertMBSToWCS(programName));
gdh->AddNameValParam(param);
param.SetName(L"program-version");
param.SetValueText(StringUtils::ConvertMBSToWCS(programVersion));
gdh->AddNameValParam(param);
param.SetName(PROGRAM_COMPANY);
param.SetValueText(StringUtils::ConvertMBSToWCS(programCompany));
gdh->AddNameValParam(param);
ParameterNameValueTypeList params = algParams;
param.SetName(L"ArraySet");
param.SetValueText(cel.GetChipType());
params.push_back(param);
data->AddAlgParams(params);
data->AddSummaryParams(summaryParams);
DataSetHeader *dsh = data->GetDataSetHeader(CopyNumberMultiDataType);
for (ParameterNameValueTypeList::iterator it=chrStartStop.begin(); it!=chrStartStop.end(); it++)
dsh->AddNameValParam(*it);
GenericData *gdata = cel.GetGenericData();
if (gdata != NULL)
gdh->AddParent(*gdata->Header().GetGenericDataHdr());
CHPMultiDataFileWriter *writer = new CHPMultiDataFileWriter(*data);
delete writer;
delete data;
// Create a buffer writer object
outputFiles.clear();
outputFiles.push_back(fileName);
vector<MultiDataType> dataTypes;
dataTypes.push_back(CopyNumberMultiDataType);
if (numberCytoRegions > 0)
dataTypes.push_back(CytoMultiDataType);
if (numberGenotypeProbeSets > 0)
dataTypes.push_back(GenotypeMultiDataType);
bufferWriter = new CHPMultiDataFileBufferWriter();
bufferWriter->Initialize(&outputFiles, dataTypes, maxProbeSetNameLength);
}
catch (CalvinException &ex)
{
string err = "Error creating the output file: " + fileName;
wstring msg = ex.ToString();
if (msg.empty() == false)
err += " " + StringUtils::ConvertWCSToMBS(msg);
throw err;
}
catch (...)
{
string err = "Error creating the output file: " + fileName;
throw err;
}
}