当前位置: 首页>>代码示例>>C++>>正文


C++ DataSetHeader::AddShortColumn方法代码示例

本文整理汇总了C++中DataSetHeader::AddShortColumn方法的典型用法代码示例。如果您正苦于以下问题:C++ DataSetHeader::AddShortColumn方法的具体用法?C++ DataSetHeader::AddShortColumn怎么用?C++ DataSetHeader::AddShortColumn使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DataSetHeader的用法示例。


在下文中一共展示了DataSetHeader::AddShortColumn方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: AddColumns

void CHPMultiDataData::AddColumns(DataSetInfo &info, DataSetHeader& hdr)
{
	switch (info.dataType)
	{
	case ExpressionMultiDataType:
		hdr.AddAsciiColumn(PROBE_SET_NAME, info.maxName);
		hdr.AddFloatColumn(QUANTIFICATION);
		break;

	case GenotypeMultiDataType:
		hdr.AddAsciiColumn(PROBE_SET_NAME, info.maxName);
		hdr.AddUByteColumn(CALL);
		hdr.AddFloatColumn(CONFIDENCE);
		break;

	case CopyNumberMultiDataType:
		hdr.AddAsciiColumn(PROBE_SET_NAME, info.maxName);
		hdr.AddUByteColumn(CHR);
		hdr.AddUIntColumn(POSITION);
		break;

	case CytoMultiDataType:
		hdr.AddAsciiColumn(REGION, info.maxName);
		hdr.AddUByteColumn(CHR);
		hdr.AddUIntColumn(START_POSITION);
		hdr.AddUIntColumn(STOP_POSITION);
		hdr.AddUByteColumn(CALL);
		hdr.AddFloatColumn(CONFIDENCE);
		break;

	case CopyNumberVariationMultiDataType:
		hdr.AddAsciiColumn(REGION, info.maxName);  
		hdr.AddFloatColumn(SIGNAL);
		hdr.AddUByteColumn(CALL);
		hdr.AddFloatColumn(CONFIDENCE);
		break;

	case DmetCopyNumberMultiDataType:
		hdr.AddAsciiColumn(PROBE_SET_NAME, info.maxName);
		hdr.AddShortColumn(CN_CALL);
		hdr.AddFloatColumn(CN_CONFIDENCE);
		hdr.AddShortColumn(CN_FORCE);
		hdr.AddFloatColumn(CN_ESTIMATE);
		hdr.AddFloatColumn(CN_LOWER);
		hdr.AddFloatColumn(CN_UPPER);
		break;

	case DmetMultiAllelicMultiDataType:
		hdr.AddAsciiColumn(PROBE_SET_NAME, info.maxName);
		hdr.AddUByteColumn(CALL);
		hdr.AddFloatColumn(CONFIDENCE);
		hdr.AddUByteColumn(FORCE);
		hdr.AddUByteColumn(ALLELE_COUNT);
		hdr.AddFloatColumn(SIGNAL_A);
		hdr.AddFloatColumn(SIGNAL_B);
		hdr.AddFloatColumn(SIGNAL_C);
		hdr.AddFloatColumn(SIGNAL_D);
		hdr.AddFloatColumn(SIGNAL_E);
		hdr.AddFloatColumn(SIGNAL_F);
		hdr.AddUByteColumn(CONTEXT_A);
		hdr.AddUByteColumn(CONTEXT_B);
		hdr.AddUByteColumn(CONTEXT_C);
		hdr.AddUByteColumn(CONTEXT_D);
		hdr.AddUByteColumn(CONTEXT_E);
		hdr.AddUByteColumn(CONTEXT_F);
		break;

	case DmetBiAllelicMultiDataType:
		hdr.AddAsciiColumn(PROBE_SET_NAME, info.maxName);
		hdr.AddUByteColumn(CALL);
		hdr.AddFloatColumn(CONFIDENCE);
		hdr.AddUByteColumn(FORCE);
		hdr.AddFloatColumn(SIGNAL_A);
		hdr.AddFloatColumn(SIGNAL_B);
		hdr.AddUByteColumn(CONTEXT_A);
		hdr.AddUByteColumn(CONTEXT_B);
		break;

    case ChromosomeSummaryMultiDataType:
		hdr.AddUByteColumn(CHR);
		hdr.AddAsciiColumn(CHR_DISPLAY, info.maxName);
		hdr.AddUIntColumn(START_INDEX);
		hdr.AddUIntColumn(MARKER_COUNT);
        hdr.AddFloatColumn(MIN_SIGNAL);
        hdr.AddFloatColumn(MAX_SIGNAL);
        hdr.AddFloatColumn(MEDIAN_CN_STATE);
        hdr.AddFloatColumn(HOM_FREQ);
        hdr.AddFloatColumn(HET_FREQ);
        break;

    case SegmentCNMultiDataType:
		hdr.AddUIntColumn(SEGMENT_ID);
		hdr.AddUByteColumn(CHR);
		hdr.AddUIntColumn(START_POSITION);
		hdr.AddUIntColumn(STOP_POSITION);
		hdr.AddIntColumn(MARKER_COUNT);
		hdr.AddUIntColumn(MEAN_MARKER_DISTANCE);
        break;

    case SegmentLOHMultiDataType:
//.........这里部分代码省略.........
开发者ID:HenrikBengtsson,项目名称:Affx-Fusion-SDK,代码行数:101,代码来源:CHPMultiDataData.cpp

示例2: CreateReferenceFile

void DataSetUpdaterTest::CreateReferenceFile()
{
	// Create the data object.
	GenericData data;
	data.Header().SetFilename(TEST_FILE);

	DataGroupHeader dgHdr(L"data");
	DataSetHeader dsHdr;

	dsHdr.SetName(L"test");
	dsHdr.AddAsciiColumn(L"string8", 64);
	dsHdr.AddUnicodeColumn(L"string16", 64);
	dsHdr.AddByteColumn(L"int8");
	dsHdr.AddShortColumn(L"int16");
	dsHdr.AddIntColumn(L"int32");
	dsHdr.AddUByteColumn(L"uint8");
	dsHdr.AddUShortColumn(L"uint16");
	dsHdr.AddUIntColumn(L"uint32");
	dsHdr.AddFloatColumn(L"float");
	dsHdr.SetRowCnt(3);

	dgHdr.AddDataSetHdr(dsHdr);

	data.Header().AddDataGroupHdr(dgHdr);
	data.Header().GetGenericDataHdr()->SetFileTypeId("affymetrix.test.data");



	// Write the data object to the file
	GenericFileWriter writer(&data.Header());
	writer.WriteHeader();

	DataGroupWriter &dataGroupWriter = writer.GetDataGroupWriter(0);
	dataGroupWriter.WriteHeader();

	//int iSet=0;
	DataSetWriterIt beginSet;
	DataSetWriterIt endSet;
	dataGroupWriter.GetDataSetWriters(beginSet, endSet);

	beginSet->WriteHeader();

	int32_t dataSetSz = beginSet->GetDataSetSize();
	int32_t offset = writer.GetFilePos();
	writer.SeekFromCurrentPos(dataSetSz + 1);
	beginSet->UpdateNextDataSetOffset();

	dataGroupWriter.UpdateNextDataGroupPos();
	
	writer.SeekFromBeginPos(offset);


	// Write the data.
	beginSet->Write("first_row", 64);
	beginSet->Write(L"first_row", 64);
	beginSet->Write((int8_t) 1);
	beginSet->Write((int16_t) 1);
	beginSet->Write((int32_t) 1);
	beginSet->Write((u_int8_t) 1);
	beginSet->Write((u_int16_t) 1);
	beginSet->Write((u_int32_t) 1);
	beginSet->Write(1.0f);

	beginSet->Write("second_row", 64);
	beginSet->Write(L"second_row", 64);
	beginSet->Write((int8_t) 2);
	beginSet->Write((int16_t) 2);
	beginSet->Write((int32_t) 2);
	beginSet->Write((u_int8_t) 2);
	beginSet->Write((u_int16_t) 2);
	beginSet->Write((u_int32_t) 2);
	beginSet->Write(2.0f);

	beginSet->Write("third_row", 64);
	beginSet->Write(L"third_row", 64);
	beginSet->Write((int8_t) 3);
	beginSet->Write((int16_t) 3);
	beginSet->Write((int32_t) 3);
	beginSet->Write((u_int8_t) 3);
	beginSet->Write((u_int16_t) 3);
	beginSet->Write((u_int32_t) 3);
	beginSet->Write(3.0f);
}
开发者ID:einon,项目名称:affymetrix-power-tools,代码行数:83,代码来源:DataSetUpdaterTest.cpp


注:本文中的DataSetHeader::AddShortColumn方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。