void CalvinCELDataAdapter::GetParameters(FusionTagValuePairTypeList& values) { ParameterNameValueTypeVector algParams; calvinCel.GetAlgorithmParameters(algParams); for (ParameterNameValueTypeIt ii = algParams.begin(); ii!= algParams.end(); ++ii) { FusionTagValuePairType ft; ft.Tag = ii->GetName(); ft.Value = ii->ToString(); ft.DetailedType() = *ii; values.push_back(ft); } }
std::wstring CalvinCELDataAdapter::GetParams() { std::wstring params; ParameterNameValueTypeVector algParams; calvinCel.GetAlgorithmParameters(algParams); for (ParameterNameValueTypeIt ii = algParams.begin(); ii!= algParams.end(); ++ii) { if (ii != algParams.begin()) params += L";"; params += ii->GetName(); params += L":"; params += ii->ToString(); } return params; }
void GenericDataHeaderWriter::WriteNameValParams(std::ofstream &os, GenericDataHeader &g) { ParameterNameValueTypeIt begin; ParameterNameValueTypeIt end; g.GetNameValIterators(begin, end); while(begin != end) { FileOutput::WriteString16(os, begin->GetName()); MIMEValue mv = begin->GetMIMEValue(); u_int32_t sz; const void* ptr = mv.GetValue(sz); FileOutput::WriteBlob(os, ptr, sz); FileOutput::WriteString16(os, begin->GetMIMEType()); begin++; } }
STDMETHODIMP CFusionCHPMultiDataDataCOM::GetCytoRegionEntries(MultiDataType dataType, VARIANT* names, VARIANT* calls, VARIANT* confidences, VARIANT* callsLOH, VARIANT* confidencesLOH, int startIndex, int *pVal) { affymetrix_calvin_io::MultiDataType dt = (affymetrix_calvin_io::MultiDataType) dataType; int n = chp->GetEntryCount(dt); long ubound = 0; long lbound = 0; long index; SafeArrayGetUBound(names->parray, 1, &ubound); SafeArrayGetLBound(names->parray, 1, &lbound); int len = ubound - lbound + 1; int count = (len + startIndex <= n ? len : n - startIndex); *pVal = count; affymetrix_calvin_data::ProbeSetMultiDataCytoRegionData entry; for (int i=0; i<count; i++) { index = (long) i; chp->GetCytoRegionEntry(dt, i+startIndex, entry); _bstr_t bstr = entry.name.c_str(); BSTR bsstr = bstr.copy(); SafeArrayPutElement(names->parray, &index, bsstr); SysFreeString(bsstr); SafeArrayPutElement(calls->parray, &index, &entry.call); SafeArrayPutElement(confidences->parray, &index, &entry.confidenceScore); for(ParameterNameValueTypeIt it = entry.metrics.begin(); it != entry.metrics.end(); it++) { wstring name = it->GetName(); if(name == L"CallLOH") { int32_t callLOH = it->GetValueInt32(); SafeArrayPutElement(callsLOH->parray, &index, &callLOH); } else if((name == L"ConfidenceLOH")) { float confidenceLOH = it->GetValueFloat(); SafeArrayPutElement(confidencesLOH->parray, &index, &confidenceLOH); } } } return S_OK; }