Browse code

updated to Fusion 1.1.2

git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/affxparser@68460 bc3139a8-67e5-0310-9ffc-ced21a209358

Kasper D. Hansen authored on 14/08/2012 21:06:53
Showing 227 changed files

... ...
@@ -1,11 +1,11 @@
1 1
 Package: affxparser
2
-Version: 1.29.7
2
+Version: 1.29.8
3 3
 Date: 2012-08-14
4 4
 Title: Affymetrix File Parsing SDK
5 5
 Author: Henrik Bengtsson, James Bullard, Robert Gentleman, Kasper Daniel Hansen, Martin Morgan
6 6
 Maintainer: Kasper Daniel Hansen <khansen@jhsph.edu>
7 7
 Description: Package for parsing Affymetrix files (CDF, CEL, CHP, BPMAP, BAR).  It provides methods for fast and memory efficient parsing of Affymetrix files using the Affymetrix' Fusion SDK.  Both ASCII- and binary-based files are supported.  Currently, there are methods for reading chip definition file (CDF) and a cell intensity file (CEL).  These files can be read either in full or in part.  For example, probe signals from a few probesets can be extracted very quickly from a set of CEL files into a convenient list structure.
8
-FusionDetails: Fusion SDK v1.1.0
8
+FusionDetails: Fusion SDK v1.1.2
9 9
 License: LGPL (>= 2)
10 10
 Depends: R (>= 2.6.0)
11 11
 Suggests: R.utils (>= 1.12.1), AffymetrixDataTestFiles
12 12
new file mode 100755
... ...
@@ -0,0 +1,90 @@
1
+rm -f src/affxparser.so\
2
+   src/R_affx_cdf_parser.o\
3
+   src/R_affx_bpmap_parser.o\
4
+   src/R_affx_clf_pgf_parser.o\
5
+   src/R_affx_cel_parser.o\
6
+   src/R_affx_cdf_extras.o\
7
+   src/R_affx_chp_parser.o\
8
+   src/fusion_sdk/file/FileIO.o\
9
+   src/fusion_sdk/file/BPMAPFileWriter.o\
10
+   src/fusion_sdk/file/CELFileData.o\
11
+   src/fusion_sdk/file/CDFFileData.o\
12
+   src/fusion_sdk/file/BPMAPFileData.o\
13
+   src/fusion_sdk/file/CHPFileData.o\
14
+   src/fusion_sdk/file/FileWriter.o\
15
+   src/fusion_sdk/file/TsvFile/ClfFile.o\
16
+   src/fusion_sdk/file/TsvFile/PgfFile.o\
17
+   src/fusion_sdk/file/TsvFile/TsvFile.o\
18
+   src/fusion_sdk/util/MsgStream.o\
19
+   src/fusion_sdk/util/AffxByteArray.o\
20
+   src/fusion_sdk/util/Fs.o\
21
+   src/fusion_sdk/util/TableFile.o\
22
+   src/fusion_sdk/util/Verbose.o\
23
+   src/fusion_sdk/util/Err.o\
24
+   src/fusion_sdk/util/Convert.o\
25
+   src/fusion_sdk/util/RowFile.o\
26
+   src/fusion_sdk/util/AffxConv.o\
27
+   src/fusion_sdk/util/Util.o\
28
+   src/fusion_sdk/calvin_files/parsers/src/GenericDataHeaderReader.o\
29
+   src/fusion_sdk/calvin_files/parsers/src/CelFileReader.o\
30
+   src/fusion_sdk/calvin_files/parsers/src/DataSetReader.o\
31
+   src/fusion_sdk/calvin_files/parsers/src/CDFFileReader.o\
32
+   src/fusion_sdk/calvin_files/parsers/src/CHPQuantificationDetectionFileReader.o\
33
+   src/fusion_sdk/calvin_files/parsers/src/CHPQuantificationFileReader.o\
34
+   src/fusion_sdk/calvin_files/parsers/src/CHPFileReader.o\
35
+   src/fusion_sdk/calvin_files/parsers/src/GenericFileReader.o\
36
+   src/fusion_sdk/calvin_files/parsers/src/FileInput.o\
37
+   src/fusion_sdk/calvin_files/parsers/src/CHPMultiDataFileReader.o\
38
+   src/fusion_sdk/calvin_files/parsers/src/DataGroupReader.o\
39
+   src/fusion_sdk/calvin_files/parsers/src/DataGroupHeaderReader.o\
40
+   src/fusion_sdk/calvin_files/parsers/src/CHPTilingFileReader.o\
41
+   src/fusion_sdk/calvin_files/parsers/src/FileHeaderReader.o\
42
+   src/fusion_sdk/calvin_files/parsers/src/DataSetHeaderReader.o\
43
+   src/fusion_sdk/calvin_files/parameter/src/ParameterNameValueType.o\
44
+   src/fusion_sdk/calvin_files/utils/src/AffymetrixGuid.o\
45
+   src/fusion_sdk/calvin_files/utils/src/StringUtils.o\
46
+   src/fusion_sdk/calvin_files/utils/src/DateTime.o\
47
+   src/fusion_sdk/calvin_files/utils/src/FileUtils.o\
48
+   src/fusion_sdk/calvin_files/utils/src/checksum.o\
49
+   src/fusion_sdk/calvin_files/fusion/src/FusionProbeSetResults.o\
50
+   src/fusion_sdk/calvin_files/fusion/src/FusionCHPTilingData.o\
51
+   src/fusion_sdk/calvin_files/fusion/src/FusionCDFData.o\
52
+   src/fusion_sdk/calvin_files/fusion/src/FusionBPMAPData.o\
53
+   src/fusion_sdk/calvin_files/fusion/src/FusionCHPGenericData.o\
54
+   src/fusion_sdk/calvin_files/fusion/src/FusionCHPMultiDataAccessor.o\
55
+   src/fusion_sdk/calvin_files/fusion/src/FusionCHPQuantificationDetectionData.o\
56
+   src/fusion_sdk/calvin_files/fusion/src/FusionCHPQuantificationData.o\
57
+   src/fusion_sdk/calvin_files/fusion/src/FusionCHPData.o\
58
+   src/fusion_sdk/calvin_files/fusion/src/FusionCDFQCProbeSetNames.o\
59
+   src/fusion_sdk/calvin_files/fusion/src/FusionCHPMultiDataData.o\
60
+   src/fusion_sdk/calvin_files/fusion/src/FusionCHPLegacyData.o\
61
+   src/fusion_sdk/calvin_files/fusion/src/FusionCELData.o\
62
+   src/fusion_sdk/calvin_files/fusion/src/GCOSAdapter/GCOSCELDataAdapter.o\
63
+   src/fusion_sdk/calvin_files/fusion/src/GCOSAdapter/GCOSCHPDataAdapter.o\
64
+   src/fusion_sdk/calvin_files/fusion/src/CalvinAdapter/CalvinCHPDataAdapter.o\
65
+   src/fusion_sdk/calvin_files/fusion/src/CalvinAdapter/CalvinCELDataAdapter.o\
66
+   src/fusion_sdk/calvin_files/data/src/CHPUniversalEntry.o\
67
+   src/fusion_sdk/calvin_files/data/src/DataGroupHeader.o\
68
+   src/fusion_sdk/calvin_files/data/src/CHPExpressionEntry.o\
69
+   src/fusion_sdk/calvin_files/data/src/CDFQCProbeSetInformation.o\
70
+   src/fusion_sdk/calvin_files/data/src/CHPQuantificationData.o\
71
+   src/fusion_sdk/calvin_files/data/src/CDFProbeSetInformation.o\
72
+   src/fusion_sdk/calvin_files/data/src/CDFProbeGroupInformation.o\
73
+   src/fusion_sdk/calvin_files/data/src/ColumnInfo.o\
74
+   src/fusion_sdk/calvin_files/data/src/CHPMultiDataData.o\
75
+   src/fusion_sdk/calvin_files/data/src/CDFQCProbeInformation.o\
76
+   src/fusion_sdk/calvin_files/data/src/GenericDataHeader.o\
77
+   src/fusion_sdk/calvin_files/data/src/DataGroup.o\
78
+   src/fusion_sdk/calvin_files/data/src/CDFProbeInformation.o\
79
+   src/fusion_sdk/calvin_files/data/src/CELData.o\
80
+   src/fusion_sdk/calvin_files/data/src/CHPTilingData.o\
81
+   src/fusion_sdk/calvin_files/data/src/DataSet.o\
82
+   src/fusion_sdk/calvin_files/data/src/CDFData.o\
83
+   src/fusion_sdk/calvin_files/data/src/FileHeader.o\
84
+   src/fusion_sdk/calvin_files/data/src/DataSetHeader.o\
85
+   src/fusion_sdk/calvin_files/data/src/CHPQuantificationDetectionData.o\
86
+   src/fusion_sdk/calvin_files/data/src/CHPData.o\
87
+   src/fusion_sdk/calvin_files/data/src/CHPBackgroundZone.o\
88
+   src/fusion_sdk/calvin_files/data/src/GenericData.o\
89
+   src/fusion_sdk/calvin_files/data/src/CHPGenotypeEntry.o\
90
+   src/fusion_sdk/calvin_files/exception/src/ExceptionBase.o
... ...
@@ -1,6 +1,9 @@
1 1
 Package: affxparser
2 2
 ===================
3 3
 
4
+Version: 1.29.8 [2012-08-14]
5
+o Upgraded to Fusion SDK 1.1.2.
6
+
4 7
 Version: 1.29.7 [2012-08-14]
5 8
 o Rearranged patchdir.
6 9
 
... ...
@@ -4,10 +4,11 @@
4 4
 ##     check for files and directories that ought to be deleted
5 5
 ##   then copy
6 6
 
7
-fusion=~/Work/packages/affy/sdk
7
+fusion=~/Work/packages/fusion_sdk
8 8
 affxparser_base=~/Work/packages/affxparser
9 9
 affxparser_fusion=${affxparser_base}/src/fusion_sdk
10 10
 affxparser_patchdir_1.1.0=${affxparser_base}/inst/info/fusion_1.1.0_patches
11
+affxparser_patchdir_1.1.2=${affxparser_base}/inst/info/fusion_1.1.2_patches
11 12
 
12 13
 compare :
13 14
 	diff -rq ${fusion} ${affxparser_fusion} | grep Only | grep -v svn | cat
... ...
@@ -21,11 +22,18 @@ cleanfusion :
21 22
 	${fusion}/libraries_and_tools \
22 23
 	${fusion}/parser_examples \
23 24
 	${fusion}/sample_data \
25
+	${fusion}/images \
26
+	${fusion}/css \
24 27
 	${fusion}/*.html \
25 28
 	${fusion}/*.gif \
26 29
 	${fusion}/portability/CPPTest \
27 30
 	${fusion}/file/CPPTest \
28 31
 	${fusion}/file/readme.html \
32
+	${fusion}/file/TsvFile/*.vcproj \
33
+	${fusion}/file/TsvFile/*.csv \
34
+	${fusion}/file/TsvFile/*.pgf \
35
+	${fusion}/file/TsvFile/*.tsv \
36
+	${fusion}/file/TsvFile/*.txt \
29 37
 	${fusion}/calvin_files/makefile.g5 \
30 38
 	${fusion}/calvin_files/template/test \
31 39
 	${fusion}/calvin_files/array/test \
... ...
@@ -51,11 +59,23 @@ cleanfusion :
51 59
 	${fusion}/file/file.vcproj \
52 60
 	${fusion}/file/file.sln \
53 61
 	${fusion}/file/lib-file-apt.vcproj \
62
+	${fusion}/util/lib-util-devnet.vcproj \
54 63
 	${fusion}/style.css \
55 64
 
65
+
56 66
 patch_1.1.0:
57 67
 #	patch -N ${affxparser_fusion}/file/CDFFileData.cpp ${affxparser_patchdir_1.1.0}/CDFFileData.cpp-patch
58 68
 	patch -N ${affxparser_fusion}/portability/affy-base-types.h ${affxparser_patchdir_1.1.0}/affy-base-types.h-patch
59 69
 	patch -N ${affxparser_fusion}/util/AffxConv.cpp ${affxparser_patchdir_1.1.0}/AffxConv.cpp-patch
60 70
 	patch -N ${affxparser_fusion}/util/AffxByteArray.cpp ${affxparser_patchdir_1.1.0}/AffxByteArray.cpp-patch
61 71
 	patch -N ${affxparser_fusion}/calvin_files/portability/src/AffymetrixBaseTypes.h ${affxparser_patchdir_1.1.0}/AffymetrixBaseTypes.h-patch
72
+
73
+patch_1.1.2:
74
+	patch -N ${affxparser_fusion}/file/CDFFileData.cpp ${affxparser_patchdir_1.1.2}/CDFFileData.cpp-patch
75
+	patch -N ${affxparser_fusion}/portability/affy-base-types.h ${affxparser_patchdir_1.1.2}/affy-base-types.h-patch
76
+	patch -N ${affxparser_fusion}/util/AffxConv.cpp ${affxparser_patchdir_1.1.2}/AffxConv.cpp-patch
77
+	patch -N ${affxparser_fusion}/util/AffxByteArray.cpp ${affxparser_patchdir_1.1.2}/AffxByteArray.cpp-patch
78
+	patch -N ${affxparser_fusion}/calvin_files/portability/src/AffymetrixBaseTypes.h ${affxparser_patchdir_1.1.2}/AffymetrixBaseTypes.h-patch
79
+	patch -N ${affxparser_fusion}/calvin_files/utils/src/FileUtils.cpp ${affxparser_patchdir_1.1.2}/FileUtils.cpp-patch
80
+
81
+
62 82
new file mode 100644
... ...
@@ -0,0 +1,11 @@
1
+--- /Users/khansen/Work/packages/affxparser/src/fusion_sdk/util/AffxByteArray.cpp	2010-02-07 11:22:29.000000000 -0500
2
+@@ -667,7 +667,7 @@
3
+ 	if (getSize() > 0)
4
+ 	{
5
+ 		char *psz = (char *)malloc(getSize() + 1);
6
+-#ifdef WIN32
7
++#if defined WIN32 && !defined WIN64
8
+ 		strncpy_s(psz, getSize() + 1, (char *)getData(), getSize());
9
+ #else
10
+ 		strncpy(psz, (char *)getData(), getSize());
0 11
new file mode 100644
... ...
@@ -0,0 +1,23 @@
1
+--- fusion_sdk/util/AffxConv.cpp	2012-08-14 11:50:46.000000000 -0600
2
+@@ -41,6 +41,11 @@
3
+ #include <stdio.h>
4
+ //
5
+ 
6
++#ifdef WIN64
7
++# undef WIN32
8
++#endif
9
++
10
++
11
+ using namespace std;
12
+ 
13
+ /** 
14
+@@ -111,7 +116,7 @@
15
+ std::string getInt(int i, bool bCommas)
16
+ {       
17
+ 	char szValue[64];
18
+-#ifdef WIN32
19
++#ifdef WIN32 && !defined(__MINGW32__)
20
+ 	sprintf_s(szValue, 64, "%d", i);
21
+ #else
22
+ 	sprintf(szValue, "%d", i);
0 23
new file mode 100644
... ...
@@ -0,0 +1,13 @@
1
+--- /Users/khansen/Work/packages/affxparser/src/fusion_sdk/calvin_files/portability/src/AffymetrixBaseTypes.h	2010-01-29 13:20:58.000000000 -0500
2
+@@ -24,6 +24,10 @@
3
+ /*! \file AffymetrixBaseTypes.h This file provides type definitions for atom types.
4
+  */ 
5
+ 
6
++#ifdef WIN64
7
++#include <stdint.h>
8
++#endif
9
++
10
+ /* Define the type for the Windows platform. */
11
+ #ifdef WIN32
12
+ 
0 13
new file mode 100644
... ...
@@ -0,0 +1,13 @@
1
+--- fusion_sdk/file/CDFFileData.cpp	2012-08-14 11:50:21.000000000 -0600
2
+@@ -919,8 +919,8 @@
3
+         ReadNextLine(instr, str, MAXLINELENGTH); // #qc ProbeSets
4
+         subStr=strchr(str,'=')+1;
5
+         m_Header.m_NumQCProbeSets = atoi(subStr);
6
+-        char strref[65000];
7
+-        ReadNextLine(instr, strref, 65000);    // The reference string.
8
++        char strref[400000];
9
++        ReadNextLine(instr, strref, 400000);    // The reference string.
10
+         subStr=strchr(strref,'=')+1;
11
+         m_Header.m_Reference = subStr;
12
+     }
0 13
new file mode 100644
... ...
@@ -0,0 +1,10 @@
1
+--- affxparser/src/fusion_sdk/calvin_files/utils/src/FileUtils.cpp	2012-08-14 14:11:38.000000000 -0600
2
+@@ -35,7 +35,6 @@
3
+ #include <direct.h>
4
+ #define 	S_ISDIR(m)   (((m) & S_IFMT) == S_IFDIR)
5
+ #else
6
+-#include <unistd.h>
7
+ #include <dirent.h>
8
+ #endif
9
+ 
0 10
new file mode 100644
... ...
@@ -0,0 +1,13 @@
1
+--- /Users/khansen/Work/packages/affxparser/src/fusion_sdk/portability/affy-base-types.h	2010-02-07 11:31:11.000000000 -0500
2
+@@ -60,6 +60,10 @@
3
+ #define Min(a,b) std::min(a,b)
4
+ #endif           // _MSC_VER
5
+ 
6
++#ifdef WIN64
7
++#include <stdint.h>
8
++#endif
9
++
10
+ /* "WIN32" should always be defined by MS C++  */
11
+ /* It shouldnt be defined on any other platform */
12
+ #ifndef WIN32
... ...
@@ -41,6 +41,7 @@ PKG_SOURCES = \
41 41
 	fusion_sdk/calvin_files/data/src/CHPQuantificationDetectionData.cpp\
42 42
 	fusion_sdk/calvin_files/data/src/CHPGenotypeEntry.cpp\
43 43
 	fusion_sdk/calvin_files/data/src/CHPUniversalEntry.cpp\
44
+	fusion_sdk/calvin_files/data/src/ColumnInfo.cpp\
44 45
 	fusion_sdk/calvin_files/data/src/DataGroup.cpp\
45 46
 	fusion_sdk/calvin_files/data/src/DataGroupHeader.cpp\
46 47
 	fusion_sdk/calvin_files/data/src/DataSet.cpp\
... ...
@@ -94,13 +95,15 @@ PKG_SOURCES = \
94 95
 	fusion_sdk/file/CHPFileData.cpp\
95 96
 	fusion_sdk/file/FileIO.cpp\
96 97
 	fusion_sdk/file/FileWriter.cpp\
98
+	fusion_sdk/file/TsvFile/ClfFile.cpp\
99
+	fusion_sdk/file/TsvFile/PgfFile.cpp\
97 100
 	fusion_sdk/file/TsvFile/TsvFile.cpp\
98 101
 	fusion_sdk/util/AffxByteArray.cpp\
99 102
 	fusion_sdk/util/AffxConv.cpp\
100
-	fusion_sdk/util/AffxFile.cpp\
101 103
 	fusion_sdk/util/MsgStream.cpp\
102 104
 	fusion_sdk/util/Util.cpp\
103 105
 	fusion_sdk/util/Err.cpp\
106
+	fusion_sdk/util/Fs.cpp\
104 107
 	fusion_sdk/util/Verbose.cpp\
105 108
 	fusion_sdk/util/RowFile.cpp\
106 109
 	fusion_sdk/util/TableFile.cpp\
... ...
@@ -39,6 +39,7 @@ PKG_SOURCES = \
39 39
 	fusion_sdk/calvin_files/data/src/CHPQuantificationDetectionData.cpp\
40 40
 	fusion_sdk/calvin_files/data/src/CHPGenotypeEntry.cpp\
41 41
 	fusion_sdk/calvin_files/data/src/CHPUniversalEntry.cpp\
42
+	fusion_sdk/calvin_files/data/src/ColumnInfo.cpp\
42 43
 	fusion_sdk/calvin_files/data/src/DataGroup.cpp\
43 44
 	fusion_sdk/calvin_files/data/src/DataGroupHeader.cpp\
44 45
 	fusion_sdk/calvin_files/data/src/DataSet.cpp\
... ...
@@ -92,13 +93,15 @@ PKG_SOURCES = \
92 93
 	fusion_sdk/file/CHPFileData.cpp\
93 94
 	fusion_sdk/file/FileIO.cpp\
94 95
 	fusion_sdk/file/FileWriter.cpp\
96
+	fusion_sdk/file/TsvFile/ClfFile.cpp\
97
+	fusion_sdk/file/TsvFile/PgfFile.cpp\
95 98
 	fusion_sdk/file/TsvFile/TsvFile.cpp\
96 99
 	fusion_sdk/util/AffxByteArray.cpp\
97 100
 	fusion_sdk/util/AffxConv.cpp\
98
-	fusion_sdk/util/AffxFile.cpp\
99 101
 	fusion_sdk/util/MsgStream.cpp\
100 102
 	fusion_sdk/util/Util.cpp\
101 103
 	fusion_sdk/util/Err.cpp\
104
+	fusion_sdk/util/Fs.cpp\
102 105
 	fusion_sdk/util/Verbose.cpp\
103 106
 	fusion_sdk/util/RowFile.cpp\
104 107
 	fusion_sdk/util/TableFile.cpp\
... ...
@@ -64,6 +64,11 @@ void CDFData::Clear()
64 64
 	nameToFilePosMap.clear();
65 65
 }
66 66
 
67
+int32_t CDFData::GetFormatVersion()
68
+{
69
+	return 0;
70
+}
71
+
67 72
 void CDFData::SetArrayRows(u_int32_t value)
68 73
 {
69 74
 	SetUInt32ToGenericHdr(CDF_ROWS_PARAM, value);
... ...
@@ -283,13 +288,13 @@ void CDFData::GetProbeSetInformation(int32_t index, CDFProbeSetInformation& info
283 288
 {
284 289
 	if (GetDataTypeId() == AFFY_CNTRL_PS)
285 290
 	{
286
-		ProbeSetNotFoundException e;
291
+		ProbeSetNotFoundException e(L"Calvin",L"Default Description, Please Update!",affymetrix_calvin_utilities::DateTime::GetCurrentDateTime().ToString(),std::string(__FILE__),(u_int16_t)__LINE__,0);
287 292
 		throw e;
288 293
 	}
289 294
 
290 295
 	if (index >= genericData.Header().GetNumDataGroups()-1)
291 296
 	{
292
-		ProbeSetNotFoundException e;
297
+		ProbeSetNotFoundException e(L"Calvin",L"Default Description, Please Update!",affymetrix_calvin_utilities::DateTime::GetCurrentDateTime().ToString(),std::string(__FILE__),(u_int16_t)__LINE__,0);
293 298
 		throw e;
294 299
 	}
295 300
 
... ...
@@ -306,7 +311,7 @@ void CDFData::GetProbeSetInformation(int32_t index, CDFProbeSetInformation& info
306 311
 		}
307 312
 		else
308 313
 		{
309
-			CDFAccessNotSupportedByModeException e;
314
+			CDFAccessNotSupportedByModeException e(L"Calvin",L"Default Description, Please Update!",affymetrix_calvin_utilities::DateTime::GetCurrentDateTime().ToString(),std::string(__FILE__),(u_int16_t)__LINE__,0);
310 315
 			throw e;
311 316
 		}
312 317
 	}
... ...
@@ -318,7 +323,7 @@ void CDFData::GetProbeSetInformation(int32_t index, CDFProbeSetInformation& info
318 323
 	}
319 324
 	else
320 325
 	{
321
-		CDFAccessNotSupportedByModeException e;
326
+		CDFAccessNotSupportedByModeException e(L"Calvin",L"Default Description, Please Update!",affymetrix_calvin_utilities::DateTime::GetCurrentDateTime().ToString(),std::string(__FILE__),(u_int16_t)__LINE__,0);
322 327
 		throw e;
323 328
 	}
324 329
 }
... ...
@@ -327,13 +332,13 @@ void CDFData::GetProbeSetInformation(const std::wstring& probeSetName, CDFProbeS
327 332
 {
328 333
 	if (GetDataTypeId() == AFFY_CNTRL_PS)
329 334
 	{
330
-		ProbeSetNotFoundException e;
335
+		ProbeSetNotFoundException e(L"Calvin",L"Default Description, Please Update!",affymetrix_calvin_utilities::DateTime::GetCurrentDateTime().ToString(),std::string(__FILE__),(u_int16_t)__LINE__,0);
331 336
 		throw e;
332 337
 	}
333 338
 
334 339
 	if (mode != ProbeSetNameMode)
335 340
 	{
336
-		CDFAccessNotSupportedByModeException e;
341
+		CDFAccessNotSupportedByModeException e(L"Calvin",L"Default Description, Please Update!",affymetrix_calvin_utilities::DateTime::GetCurrentDateTime().ToString(),std::string(__FILE__),(u_int16_t)__LINE__,0);
337 342
 		throw e;
338 343
 	}
339 344
 
... ...
@@ -347,13 +352,13 @@ void CDFData::GetQCProbeSetInformation(int32_t index, CDFQCProbeSetInformation&
347 352
 {
348 353
 	if (GetDataTypeId() != AFFY_CNTRL_PS)
349 354
 	{
350
-		ProbeSetNotFoundException e;
355
+		ProbeSetNotFoundException e(L"Calvin",L"Default Description, Please Update!",affymetrix_calvin_utilities::DateTime::GetCurrentDateTime().ToString(),std::string(__FILE__),(u_int16_t)__LINE__,0);
351 356
 		throw e;
352 357
 	}
353 358
 
354 359
 	if (index >= genericData.Header().GetNumDataGroups()-1)
355 360
 	{
356
-		ProbeSetNotFoundException e;
361
+		ProbeSetNotFoundException e(L"Calvin",L"Default Description, Please Update!",affymetrix_calvin_utilities::DateTime::GetCurrentDateTime().ToString(),std::string(__FILE__),(u_int16_t)__LINE__,0);
357 362
 		throw e;
358 363
 	}
359 364
 
... ...
@@ -371,7 +376,7 @@ void CDFData::GetQCProbeSetInformation(int32_t index, CDFQCProbeSetInformation&
371 376
 		}
372 377
 		else
373 378
 		{
374
-			CDFAccessNotSupportedByModeException e;
379
+			CDFAccessNotSupportedByModeException e(L"Calvin",L"Default Description, Please Update!",affymetrix_calvin_utilities::DateTime::GetCurrentDateTime().ToString(),std::string(__FILE__),(u_int16_t)__LINE__,0);
375 380
 			throw e;
376 381
 		}
377 382
 	}
... ...
@@ -384,7 +389,7 @@ void CDFData::GetQCProbeSetInformation(int32_t index, CDFQCProbeSetInformation&
384 389
 	}
385 390
 	else
386 391
 	{
387
-		CDFAccessNotSupportedByModeException e;
392
+		CDFAccessNotSupportedByModeException e(L"Calvin",L"Default Description, Please Update!",affymetrix_calvin_utilities::DateTime::GetCurrentDateTime().ToString(),std::string(__FILE__),(u_int16_t)__LINE__,0);
388 393
 		throw e;
389 394
 	}
390 395
 }
... ...
@@ -393,13 +398,13 @@ void CDFData::GetQCProbeSetInformation(const std::wstring& probeSetName, CDFQCPr
393 398
 {
394 399
 	if (GetDataTypeId() != AFFY_CNTRL_PS)
395 400
 	{
396
-		ProbeSetNotFoundException e;
401
+		ProbeSetNotFoundException e(L"Calvin",L"Default Description, Please Update!",affymetrix_calvin_utilities::DateTime::GetCurrentDateTime().ToString(),std::string(__FILE__),(u_int16_t)__LINE__,0);
397 402
 		throw e;
398 403
 	}
399 404
 
400 405
 	if (mode != ProbeSetNameMode)
401 406
 	{
402
-		CDFAccessNotSupportedByModeException e;
407
+		CDFAccessNotSupportedByModeException e(L"Calvin",L"Default Description, Please Update!",affymetrix_calvin_utilities::DateTime::GetCurrentDateTime().ToString(),std::string(__FILE__),(u_int16_t)__LINE__,0);
403 408
 		throw e;
404 409
 	}
405 410
 
... ...
@@ -413,7 +418,7 @@ u_int32_t CDFData::GetTOCFilePosByIndex(int32_t index)
413 418
 {
414 419
 	if (tocDataSet == 0 || tocDataSet->IsOpen() == false)
415 420
 	{
416
-		DataSetNotOpenException e;
421
+		DataSetNotOpenException e(L"Calvin",L"Default Description, Please Update!",affymetrix_calvin_utilities::DateTime::GetCurrentDateTime().ToString(),std::string(__FILE__),(u_int16_t)__LINE__,0);
417 422
 		throw e;
418 423
 	}
419 424
 
... ...
@@ -426,14 +431,14 @@ u_int32_t CDFData::GetTOCFilePosByName(const std::wstring& name)
426 431
 {
427 432
 	if (tocDataSet == 0 || tocDataSet->IsOpen() == false)
428 433
 	{
429
-		DataSetNotOpenException e;
434
+		DataSetNotOpenException e(L"Calvin",L"Default Description, Please Update!",affymetrix_calvin_utilities::DateTime::GetCurrentDateTime().ToString(),std::string(__FILE__),(u_int16_t)__LINE__,0);
430 435
 		throw e;
431 436
 	}
432 437
 
433 438
 	std::map<std::wstring, u_int32_t>::iterator ii = nameToFilePosMap.find(name);
434 439
 	if (ii == nameToFilePosMap.end())
435 440
 	{
436
-		ProbeSetNotFoundException e;
441
+		ProbeSetNotFoundException e(L"Calvin",L"Default Description, Please Update!",affymetrix_calvin_utilities::DateTime::GetCurrentDateTime().ToString(),std::string(__FILE__),(u_int16_t)__LINE__,0);
437 442
 		throw e;
438 443
 	}
439 444
 	else
... ...
@@ -450,7 +455,7 @@ std::wstring CDFData::GetProbeSetName(int32_t index)
450 455
 
451 456
 		if (tocDataSet == 0)
452 457
 		{
453
-			DataSetNotOpenException e;
458
+			DataSetNotOpenException e(L"Calvin",L"Default Description, Please Update!",affymetrix_calvin_utilities::DateTime::GetCurrentDateTime().ToString(),std::string(__FILE__),(u_int16_t)__LINE__,0);
454 459
 			throw e;
455 460
 		}
456 461
 	}
... ...
@@ -460,14 +465,14 @@ std::wstring CDFData::GetProbeSetName(int32_t index)
460 465
 		tocDataSet->Open();
461 466
 		if (tocDataSet->IsOpen() == false)
462 467
 		{
463
-			DataSetNotOpenException e;
468
+			DataSetNotOpenException e(L"Calvin",L"Default Description, Please Update!",affymetrix_calvin_utilities::DateTime::GetCurrentDateTime().ToString(),std::string(__FILE__),(u_int16_t)__LINE__,0);
464 469
 			throw e;
465 470
 		}
466 471
 	}
467 472
 	
468 473
 	if (index < 0 || index >= tocDataSet->Rows())
469 474
 	{
470
-		ProbeSetNotFoundException e;
475
+		ProbeSetNotFoundException e(L"Calvin",L"Default Description, Please Update!",affymetrix_calvin_utilities::DateTime::GetCurrentDateTime().ToString(),std::string(__FILE__),(u_int16_t)__LINE__,0);
471 476
 		throw e;
472 477
 	}
473 478
 
... ...
@@ -111,6 +111,11 @@ public:
111 111
 	 */
112 112
 	std::string GetFilename();
113 113
 
114
+	/*! Get format version.
115
+	 * @return The CDF format version.
116
+	 */
117
+	int32_t GetFormatVersion();
118
+
114 119
 	/*! Gets the probe set count.
115 120
 	 * @return The number of probe sets.
116 121
 	 */
... ...
@@ -23,6 +23,7 @@
23 23
 #include "calvin_files/data/src/DataSetHeader.h"
24 24
 #include "calvin_files/data/src/GenericDataTypes.h"
25 25
 #include "calvin_files/exception/src/ExceptionBase.h"
26
+#include "calvin_files/utils/src/FileUtils.h"
26 27
 #include "calvin_files/utils/src/StringUtils.h"
27 28
 //
28 29
 #include <sys/stat.h>
... ...
@@ -133,8 +134,7 @@ bool CelFileData::Exists()
133 134
 	if (filename != "")
134 135
 	{
135 136
 		// Find the file stats.
136
-		struct stat st;
137
-		return ((stat(filename.c_str(), &st) == 0)? true: false);
137
+          return FileUtils::Exists(filename.c_str());
138 138
 	}
139 139
 
140 140
 	return false;
... ...
@@ -219,6 +219,32 @@ const static std::wstring A_SIGNAL = L"ASignal";
219 219
 const static std::wstring B_SIGNAL = L"BSignal";
220 220
 const static std::wstring SCAR = L"SCAR";
221 221
 
222
+const static std::wstring CONTRAST = L"Contrast";
223
+const static std::wstring SIGNAL_STRENGTH = L"SignalStrength";
224
+
225
+	/*! constructor */
226
+DataSetInfo::DataSetInfo()    {
227
+  entries = NULL;
228
+  maxName = -1;
229
+  maxSegmentType = -1;
230
+  maxReferenceSegmentID = -1;
231
+  maxFamilialSegmentID = -1;
232
+  maxFamilialARRID = -1;
233
+  maxFamilialCHPID = -1;
234
+  maxFamilialCHPFile = -1;
235
+  maxFamilialRole = -1;
236
+  maxFamilialCHPFile = -1;
237
+  dataSetIndex = -1;
238
+}
239
+
240
+std::wstring CHPMultiDataData::GetGroupName(MultiDataType dataType) {
241
+  return dataTypeGroupNames[dataType];
242
+}
243
+
244
+/*! The data set information */
245
+std::map<MultiDataType, DataSetInfo> &CHPMultiDataData::GetDataSetInfo() {
246
+  return dataSetInfo;
247
+}
222 248
 
223 249
 /*! used for full column index for log2Ratio */
224 250
 const static int cnlog2RatioIndexOffset = 4;
... ...
@@ -286,6 +312,20 @@ void CHPMultiDataData::Clear()
286 312
 	genericData.Header().Clear();
287 313
 }
288 314
 
315
+/*! Gets the file header.
316
+ * @return The file header.
317
+ */
318
+FileHeader* CHPMultiDataData::GetFileHeader() {
319
+  return &genericData.Header();
320
+}
321
+
322
+/*! Gets the generic data object.
323
+ * @return The data object.
324
+ */
325
+GenericData& CHPMultiDataData::GetGenericData() {
326
+  return genericData;
327
+}
328
+
289 329
 void CHPMultiDataData::SetFilename(const std::string &p)
290 330
 {
291 331
 	genericData.Header().SetFilename(p);
... ...
@@ -534,16 +574,36 @@ void CHPMultiDataData::GetEntry(MultiDataType dataType, int index, affymetrix_ca
534 574
 	}
535 575
 }
536 576
 
577
+
578
+
537 579
 void CHPMultiDataData::GetEntry(MultiDataType dataType, int index, affymetrix_calvin_data::MarkerABSignals &entry)
580
+{
581
+	DataSetInfo *ds = OpenMultiDataDataSet(dataType);	
582
+
583
+	if (ds && ds->entries && ds->entries->IsOpen())
584
+	{
585
+		int colIndex = 0;
586
+		ds->entries->GetData(index, colIndex++, entry.index);
587
+		GetExtraMetricEntries(ds, index, colIndex, entry.metrics);
588
+	}
589
+}
590
+
591
+
592
+void CHPMultiDataData::GetEntry(MultiDataType dataType, int index, affymetrix_calvin_data::CytoGenotypeCallData &entry)
538 593
 {
539 594
 	DataSetInfo *ds = OpenMultiDataDataSet(dataType);
540 595
 	if (ds && ds->entries && ds->entries->IsOpen())
541 596
 	{
542 597
 		int colIndex = 0;
543 598
 		ds->entries->GetData(index, colIndex++, entry.index);
599
+		ds->entries->GetData(index, colIndex++, entry.call);
600
+		ds->entries->GetData(index, colIndex++, entry.confidence);
601
+		ds->entries->GetData(index, colIndex++, entry.forcedCall);
544 602
 		ds->entries->GetData(index, colIndex++, entry.aSignal);
545 603
 		ds->entries->GetData(index, colIndex++, entry.bSignal);
546
-		ds->entries->GetData(index, colIndex++, entry.scar);
604
+		ds->entries->GetData(index, colIndex++, entry.signalStrength);
605
+		ds->entries->GetData(index, colIndex++, entry.contrast);
606
+		GetExtraMetricEntries(ds, index, colIndex, entry.metrics);
547 607
 	}
548 608
 }
549 609
 
... ...
@@ -1060,9 +1120,20 @@ void CHPMultiDataData::AddColumns(DataSetInfo &info, DataSetHeader& hdr)
1060 1120
 
1061 1121
 	case MarkerABSignalsMultiDataType:
1062 1122
 		hdr.AddUIntColumn(PROBE_SET_INDEX);
1123
+		/*hdr.AddFloatColumn(A_SIGNAL);
1124
+		hdr.AddFloatColumn(B_SIGNAL);
1125
+		hdr.AddFloatColumn(SCAR);*/
1126
+		break;
1127
+
1128
+	case CytoGenotypeCallMultiDataType:
1129
+		hdr.AddUIntColumn(PROBE_SET_INDEX);
1130
+		hdr.AddByteColumn(CALL);
1131
+		hdr.AddFloatColumn(CONFIDENCE);
1132
+		hdr.AddByteColumn(FORCE);
1063 1133
 		hdr.AddFloatColumn(A_SIGNAL);
1064 1134
 		hdr.AddFloatColumn(B_SIGNAL);
1065
-		hdr.AddFloatColumn(SCAR);
1135
+		hdr.AddFloatColumn(SIGNAL_STRENGTH);
1136
+		hdr.AddFloatColumn(CONTRAST);
1066 1137
 		break;
1067 1138
 
1068 1139
 	default:
... ...
@@ -1180,7 +1251,11 @@ DataSetInfo *CHPMultiDataData::OpenMultiDataDataSet(MultiDataType dataType)
1180 1251
 		}
1181 1252
 		else if (dataType == MarkerABSignalsMultiDataType)
1182 1253
 		{
1183
-			startCol = 4;
1254
+			startCol = 1;
1255
+		}
1256
+		else if (dataType = CytoGenotypeCallMultiDataType)
1257
+		{
1258
+			startCol = 8;
1184 1259
 		}
1185 1260
 		for (int32_t icol=startCol; icol<ncols; icol++)
1186 1261
 		{
... ...
@@ -1256,6 +1331,19 @@ void CHPMultiDataData::AddAlgParams(const ParameterNameValueTypeList& params)
1256 1331
 	}
1257 1332
 }
1258 1333
 
1334
+void CHPMultiDataData::AddAppMetaInfo(const ParameterNameValueTypeList& params)
1335
+{
1336
+	ParameterNameValueType param;
1337
+	GenericDataHeader* hdr = genericData.Header().GetGenericDataHdr();
1338
+	for (ParameterNameValueTypeList::const_iterator it=params.begin(); it != params.end(); ++it)
1339
+	{
1340
+		param = *it;
1341
+		param.SetName(APPLICATION_META_INFO_PREFIX_S + param.GetName());
1342
+		hdr->AddNameValParam(param);
1343
+	}
1344
+}
1345
+
1346
+
1259 1347
 ParameterNameValueTypeList CHPMultiDataData::GetSummaryParams()
1260 1348
 {
1261 1349
 	ParameterNameValueTypeList nvt;
... ...
@@ -30,6 +30,7 @@
30 30
 #include "calvin_files/data/src/GenericData.h"
31 31
 #include "calvin_files/data/src/MarkerABSignals.h"
32 32
 #include "calvin_files/data/src/ProbeSetMultiDataData.h"
33
+#include "calvin_files/data/src/CytoGenotypeCallMultiDataData.h"
33 34
 #include "calvin_files/portability/src/AffymetrixBaseTypes.h"
34 35
 //
35 36
 #include <cstring>
... ...
@@ -73,7 +74,8 @@ typedef enum MultiDataType {
73 74
     SegmentDenovoCopyNumberMultiDataType,
74 75
     SegmentHemizygousParentOfOriginMultiDataType,
75 76
 	AllelePeaksMultiDataType,
76
-	MarkerABSignalsMultiDataType
77
+	MarkerABSignalsMultiDataType,
78
+	CytoGenotypeCallMultiDataType
77 79
 } MultiDataType_t;
78 80
 
79 81
 /*! The data set name. */
... ...
@@ -107,7 +109,8 @@ const static std::wstring MultiDataDataSetNames[] =
107 109
     L"DenovoCopyNumber",
108 110
     L"HemizygousParentOfOrigin",
109 111
 	L"AllelePeaks",
110
-	L"MarkerABSignal"
112
+	L"MarkerABSignal",
113
+	L"Calls"
111 114
 };
112 115
 
113 116
 /*! The data types. */
... ...
@@ -141,7 +144,8 @@ const static MultiDataType MultiDataDataTypes[] =
141 144
     SegmentDenovoCopyNumberMultiDataType,
142 145
     SegmentHemizygousParentOfOriginMultiDataType,
143 146
 	AllelePeaksMultiDataType,
144
-	MarkerABSignalsMultiDataType
147
+	MarkerABSignalsMultiDataType,
148
+	CytoGenotypeCallMultiDataType
145 149
 };
146 150
 
147 151
 /*! Holds data set information. */
... ...
@@ -185,20 +189,7 @@ public:
185 189
 	std::vector<ColumnInfo> metricColumns;
186 190
 
187 191
 	/*! constructor */
188
-	DataSetInfo()
189
-    {
190
-        entries = NULL;
191
-        maxName = -1;
192
-        maxSegmentType = -1;
193
-        maxReferenceSegmentID = -1;
194
-        maxFamilialSegmentID = -1;
195
-        maxFamilialARRID = -1;
196
-        maxFamilialCHPID = -1;
197
-        maxFamilialCHPFile = -1;
198
-        maxFamilialRole = -1;
199
-        maxFamilialCHPFile = -1;
200
-        dataSetIndex = -1;
201
-    }
192
+	DataSetInfo();
202 193
 };
203 194
 
204 195
 /*! Holds data associated with genotype or expression CHP files. */
... ...
@@ -230,10 +221,10 @@ private:
230 221
 
231 222
 public:
232 223
 
233
-    std::wstring GetGroupName(MultiDataType dataType) { return dataTypeGroupNames[dataType]; }
224
+    std::wstring GetGroupName(MultiDataType dataType);
234 225
 
235 226
 	/*! The data set information */
236
-	std::map<MultiDataType, DataSetInfo> &GetDataSetInfo() { return dataSetInfo; }
227
+    std::map<MultiDataType, DataSetInfo> &GetDataSetInfo();
237 228
 
238 229
 	/*! The maximum length of a probe set name.
239 230
 	* @param dataType The data type
... ...
@@ -340,6 +331,11 @@ public:
340 331
 	*/
341 332
 	void AddAlgParams(const ParameterNameValueTypeList& params);
342 333
 
334
+	/*! Adds the application meta data information
335
+	* @param params The application meta data
336
+	*/
337
+        void AddAppMetaInfo(const ParameterNameValueTypeList& params);
338
+
343 339
 	/*! Gets the summary parameters
344 340
 	* @return The summary parameters.
345 341
 	*/
... ...
@@ -353,12 +349,12 @@ public:
353 349
 	/*! Gets the file header.
354 350
 	* @return The file header.
355 351
 	*/
356
-	FileHeader* GetFileHeader() { return &genericData.Header(); }
352
+	FileHeader* GetFileHeader(); 
357 353
 
358 354
 	/*! Gets the generic data object.
359 355
 	* @return The data object.
360 356
 	*/
361
-	GenericData& GetGenericData() { return genericData; }
357
+	GenericData& GetGenericData();
362 358
 
363 359
 	/*! Gets the probe set data.
364 360
 	* @param dataType The data type
... ...
@@ -409,6 +405,13 @@ public:
409 405
 	*/
410 406
 	void GetEntry(MultiDataType dataType, int index, affymetrix_calvin_data::MarkerABSignals &entry);
411 407
 
408
+	/*! Gets the genotype data for cyto.
409
+	* @param dataType The data type
410
+	* @param index The row index.
411
+	* @param entry The results.
412
+	*/
413
+	void GetEntry(MultiDataType dataType, int index, affymetrix_calvin_data::CytoGenotypeCallData &entry);
414
+
412 415
 	/*! Gets the probe set data.
413 416
 	* @param dataType The data type
414 417
 	* @param index The row index.
415 418
new file mode 100644
... ...
@@ -0,0 +1,60 @@
1
+////////////////////////////////////////////////////////////////
2
+//
3
+// Copyright (C) 2005 Affymetrix, Inc.
4
+//
5
+// This library is free software; you can redistribute it and/or modify
6
+// it under the terms of the GNU Lesser General Public License
7
+// (version 2.1) as published by the Free Software Foundation.
8
+//
9
+// This library is distributed in the hope that it will be useful, but
10
+// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
11
+// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
12
+// for more details.
13
+//
14
+// You should have received a copy of the GNU Lesser General Public License
15
+// along with this library; if not, write to the Free Software Foundation, Inc.,
16
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
+//
18
+////////////////////////////////////////////////////////////////
19
+
20
+
21
+/*! \file ColumnInfo.cpp This file defines column information class of various types.
22
+ */
23
+
24
+#include "calvin_files/data/src/ColumnInfo.h"
25
+
26
+
27
+namespace affymetrix_calvin_io
28
+{
29
+
30
+/*! Constructor - used only by dervied types
31
+ *	@param name_ Name of the column.
32
+ *	@param type_ Type of data in the column.
33
+ *	@param size_ Size of each element of in the column.
34
+ *	@param len_ Number of elements of type in the column.
35
+ *	@param overhead_ Number of extra bytes in the column
36
+ */
37
+ColumnInfo::ColumnInfo(const std::wstring& name_, DataSetColumnTypes type_, int32_t size_, int32_t len_, int32_t overhead_) : name(name_), type(type_), size(size_), len(len_), overhead(overhead_){
38
+}
39
+  
40
+/*! Constructor - used by the file read operation
41
+ * @param name_ Name of the column.
42
+ * @param type_ Type of data in the column.
43
+ * @param totalSize Total size of the colum in bytes.
44
+ */
45
+ColumnInfo::ColumnInfo(const std::wstring& name_, DataSetColumnTypes type_, int32_t totalSize)
46
+    : name(name_), type(type_), size(totalSize), len(1), overhead(0)
47
+{
48
+  if (type == ASCIICharColType || type == UnicodeCharColType) {
49
+    overhead = 4;
50
+    if (type == UnicodeCharColType) {
51
+      size = sizeof(int16_t);
52
+      len = (totalSize - overhead) / sizeof(int16_t);
53
+    } else if (type == ASCIICharColType) {
54
+      size = sizeof(int8_t);
55
+      len = (totalSize - overhead) / sizeof(int8_t);
56
+    }
57
+  }
58
+}
59
+
60
+};
... ...
@@ -75,10 +75,7 @@ protected:
75 75
 	 *	@param len_ Number of elements of type in the column.
76 76
 	 *	@param overhead_ Number of extra bytes in the column
77 77
 	 */
78
-	ColumnInfo(const std::wstring& name_, DataSetColumnTypes type_, int32_t size_, int32_t len_, int32_t overhead_)
79
-		: name(name_), type(type_), size(size_), len(len_), overhead(overhead_)
80
-	{
81
-	}
78
+	ColumnInfo(const std::wstring& name_, DataSetColumnTypes type_, int32_t size_, int32_t len_, int32_t overhead_);
82 79
 
83 80
 public:
84 81
 
... ...
@@ -87,24 +84,7 @@ public:
87 84
 	 *	@param type_ Type of data in the column.
88 85
 	 *	@param totalSize Total size of the colum in bytes.
89 86
 	 */
90
-	ColumnInfo(const std::wstring& name_, DataSetColumnTypes type_, int32_t totalSize)
91
-		: name(name_), type(type_), size(totalSize), len(1), overhead(0)
92
-	{
93
-		if (type == ASCIICharColType || type == UnicodeCharColType)
94
-		{
95
-			overhead = 4;
96
-			if (type == UnicodeCharColType)
97
-			{
98
-				size = sizeof(int16_t);
99
-				len = (totalSize-overhead)/sizeof(int16_t);
100
-			}
101
-			else if (type == ASCIICharColType)
102
-			{
103
-				size = sizeof(int8_t);
104
-				len = (totalSize-overhead)/sizeof(int8_t);
105
-			}
106
-		}
107
-	}
87
+	ColumnInfo(const std::wstring& name_, DataSetColumnTypes type_, int32_t totalSize);
108 88
 
109 89
 	/*! Equiality operator
110 90
 	 *	@param p object to compare against
111 91
new file mode 100644
... ...
@@ -0,0 +1,69 @@
1
+////////////////////////////////////////////////////////////////
2
+//
3
+// Copyright (C) 2008 Affymetrix, Inc.
4
+//
5
+// This library is free software; you can redistribute it and/or modify
6
+// it under the terms of the GNU Lesser General Public License 
7
+// (version 2.1) as published by the Free Software Foundation.
8
+// 
9
+// This library is distributed in the hope that it will be useful, but
10
+// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
11
+// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
12
+// for more details.
13
+// 
14
+// You should have received a copy of the GNU Lesser General Public License
15
+// along with this library; if not, write to the Free Software Foundation, Inc.,
16
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 
17
+//
18
+////////////////////////////////////////////////////////////////
19
+
20
+
21
+#ifndef _Cyto_GenotypeCall_HEADER_
22
+#define _Cyto_GenotypeCall_HEADER_
23
+
24
+/*! \file CytoGenotypeCallMultiDataType.h This file provides types to hold genotyping results for cytgo arrays.
25
+ */
26
+
27
+#include "calvin_files/parameter/src/ParameterNameValueType.h"
28
+#include "calvin_files/portability/src/AffymetrixBaseTypes.h"
29
+//
30
+
31
+namespace affymetrix_calvin_data
32
+{
33
+
34
+/*! Holds the marker AB signal results */
35
+typedef struct _CytoGenotypeCallData
36
+{
37
+	/*! The index relative to the probeset in the CopyNumber 
38
+	data set of the ProbeSet data group (0 based). */
39
+	u_int32_t index;
40
+
41
+	 /*! The call. */
42
+    u_int8_t call;
43
+
44
+	/*! The cpnfidence */
45
+    float confidence;
46
+
47
+	 /*! The forced call. */
48
+    u_int8_t forcedCall;
49
+
50
+	/*! The A signal */
51
+    float aSignal;
52
+
53
+	/*! The B signal */
54
+    float bSignal;
55
+
56
+	/*! The signal strength */
57
+    float signalStrength;
58
+	
59
+	/*! The contrast */
60
+    float contrast; 
61
+
62
+	/*! The extra metrics. */
63
+	std::vector<affymetrix_calvin_parameter::ParameterNameValueType> metrics;
64
+
65
+} CytoGenotypeCallData;
66
+
67
+}
68
+
69
+#endif
0 70
new file mode 100644
... ...
@@ -0,0 +1,63 @@
1
+////////////////////////////////////////////////////////////////
2
+//
3
+// Copyright (C) 2005 Affymetrix, Inc.
4
+//
5
+// This library is free software; you can redistribute it and/or modify
6
+// it under the terms of the GNU Lesser General Public License 
7
+// (version 2.1) as published by the Free Software Foundation.
8
+// 
9
+// This library is distributed in the hope that it will be useful, but
10
+// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
11
+// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
12
+// for more details.
13
+// 
14
+// You should have received a copy of the GNU Lesser General Public License
15
+// along with this library; if not, write to the Free Software Foundation, Inc.,
16
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 
17
+//
18
+////////////////////////////////////////////////////////////////
19
+
20
+
21
+
22
+#include "calvin_files/data/src/DataException.h"
23
+//
24
+
25
+namespace affymetrix_calvin_exceptions
26
+{
27
+
28
+  const  std::wstring DataSetNotOpenException::ToString() {
29
+    return SystemInfo() + L"affymetrix_calvin_exceptions::DataSetNotOpenException thrown.";
30
+  }
31
+  const std::wstring ColumnIndexOutOfBoundsException::ToString() {
32
+    return SystemInfo() + L"affymetrix_calvin_exceptions::ColumnIndexOutOfBoundsException thrown.";
33
+  }
34
+
35
+  const std::wstring  RowIndexOutOfBoundsException::ToString() {
36
+    return SystemInfo() + L"affymetrix_calvin_exceptions::RowIndexOutOfBoundsException thrown.";
37
+  }
38
+
39
+  const std::wstring UnexpectedColumnTypeException::ToString() {
40
+    return SystemInfo() + L"affymetrix_calvin_exceptions::UnexpectedColumnTypeException thrown.";
41
+  }
42
+
43
+  const std::wstring DataGroupNotFoundException::ToString() {
44
+    return SystemInfo() + L"affymetrix_calvin_exceptions::DataGroupNotFoundException thrown.";
45
+  }
46
+
47
+  const std::wstring DataSetNotFoundException::ToString() {
48
+    return SystemInfo() + L"affymetrix_calvin_exceptions::DataSetNotFoundException thrown.";
49
+  }
50
+
51
+  const std::wstring ProbeSetNotFoundException::ToString() {
52
+    return SystemInfo() + L"affymetrix_calvin_exceptions::ProbeSetNotFoundException thrown.";
53
+  }
54
+
55
+  const std::wstring CDFAccessNotSupportedByModeException::ToString() {
56
+    return SystemInfo() + L"affymetrix_calvin_exceptions::CDFAccessNotSupportedByModeException thrown.";
57
+  }
58
+
59
+  const std::wstring DataSetRemapException::ToString() {
60
+    return SystemInfo() + L"affymetrix_calvin_exceptions::DataSetRemapException thrown.";
61
+  }
62
+  
63
+}
... ...
@@ -32,38 +32,86 @@ namespace affymetrix_calvin_exceptions
32 32
 
33 33
 class DataSetNotOpenException : public CalvinException
34 34
 {
35
+public:
36
+  DataSetNotOpenException() : CalvinException() {}
37
+  DataSetNotOpenException(std::wstring _Source, std::wstring _Description, std::wstring _TimeStamp, std::string _FileName, u_int16_t _LineNumber, u_int64_t _ErrorCode):
38
+    CalvinException(_Source, _Description, _TimeStamp, _FileName,  _LineNumber, _ErrorCode) {}
39
+  const std::wstring ToString();
35 40
 };
36 41
 
37 42
 class ColumnIndexOutOfBoundsException : public CalvinException
38 43
 {
44
+public:
45
+  ColumnIndexOutOfBoundsException() : CalvinException() {}
46
+  ColumnIndexOutOfBoundsException(std::wstring _Source, std::wstring _Description, std::wstring _TimeStamp, std::string _FileName, u_int16_t _LineNumber, u_int64_t _ErrorCode):
47
+    CalvinException(_Source, _Description, _TimeStamp, _FileName,  _LineNumber, _ErrorCode) {}
48
+  const std::wstring ToString();
39 49
 };
40 50
 
41 51
 class RowIndexOutOfBoundsException : public CalvinException
42 52
 {
53
+public:
54
+  RowIndexOutOfBoundsException() : CalvinException() {}
55
+  RowIndexOutOfBoundsException(std::wstring _Source, std::wstring _Description, std::wstring _TimeStamp, std::string _FileName, u_int16_t _LineNumber, u_int64_t _ErrorCode):
56
+    CalvinException(_Source, _Description, _TimeStamp, _FileName,  _LineNumber, _ErrorCode) {}
57
+  const std::wstring ToString();
43 58
 };
44 59
 
45 60
 class UnexpectedColumnTypeException : public CalvinException
46 61
 {
62
+public:
63
+  UnexpectedColumnTypeException() : CalvinException() {}
64
+  UnexpectedColumnTypeException(std::wstring _Source, std::wstring _Description, std::wstring _TimeStamp, std::string _FileName, u_int16_t _LineNumber, u_int64_t _ErrorCode):
65
+    CalvinException(_Source, _Description, _TimeStamp, _FileName,  _LineNumber, _ErrorCode) {}
66
+  const std::wstring ToString();
47 67
 };
48 68
 
49 69
 class DataGroupNotFoundException : public CalvinException
50 70
 {
71
+public:
72
+  DataGroupNotFoundException() : CalvinException() {}
73
+  DataGroupNotFoundException(std::wstring _Source, std::wstring _Description, std::wstring _TimeStamp, std::string _FileName, u_int16_t _LineNumber, u_int64_t _ErrorCode):
74
+    CalvinException(_Source, _Description, _TimeStamp, _FileName,  _LineNumber, _ErrorCode) {}
75
+  const std::wstring ToString();
51 76
 };
52 77
 
53 78
 class DataSetNotFoundException : public CalvinException
54 79
 {
80
+public:
81
+  DataSetNotFoundException() : CalvinException() {}
82
+  DataSetNotFoundException(std::wstring _Source, std::wstring _Description, std::wstring _TimeStamp, std::string _FileName, u_int16_t _LineNumber, u_int64_t _ErrorCode):
83
+    CalvinException(_Source, _Description, _TimeStamp, _FileName,  _LineNumber, _ErrorCode) {}
84
+    
85
+  const std::wstring ToString();
55 86
 };
56 87
 
57 88
 class ProbeSetNotFoundException : public CalvinException
58 89
 {
90
+public:
91
+  ProbeSetNotFoundException() : CalvinException() {}
92
+  ProbeSetNotFoundException(std::wstring _Source, std::wstring _Description, std::wstring _TimeStamp, std::string _FileName, u_int16_t _LineNumber, u_int64_t _ErrorCode):
93
+    CalvinException(_Source, _Description, _TimeStamp, _FileName,  _LineNumber, _ErrorCode) {}
94
+  const std::wstring ToString();
59 95
 };
60 96
 
61 97
 class CDFAccessNotSupportedByModeException : public CalvinException
62 98
 {
99
+public:
100
+  CDFAccessNotSupportedByModeException() : CalvinException() {}
101
+  CDFAccessNotSupportedByModeException(std::wstring _Source, std::wstring _Description, std::wstring _TimeStamp, std::string _FileName, u_int16_t _LineNumber, u_int64_t _ErrorCode):
102
+    CalvinException(_Source, _Description, _TimeStamp, _FileName,  _LineNumber, _ErrorCode) {}
103
+  const std::wstring ToString();
63 104
 };
64 105
 
65 106
 class DataSetRemapException : public CalvinException
66 107
 {
108
+public:
109
+  DataSetRemapException() : CalvinException() {}
110
+  DataSetRemapException(std::wstring _Source, std::wstring _Description, std::wstring _TimeStamp, std::string _FileName, u_int16_t _LineNumber, u_int64_t _ErrorCode):
111
+    CalvinException(_Source, _Description, _TimeStamp, _FileName,  _LineNumber, _ErrorCode) {}
112
+
113
+  const std::wstring ToString();
114
+
67 115
 };
68 116
 
69 117
 }
... ...
@@ -65,7 +65,7 @@ affymetrix_calvin_io::DataSet* DataGroup::DataSet(u_int32_t dataSetIdx)
65 65
 	}
66 66
 	else
67 67
 	{
68
-		affymetrix_calvin_exceptions::DataSetNotFoundException e;
68
+		affymetrix_calvin_exceptions::DataSetNotFoundException e(L"Calvin",L"Default Description, Please Update!",affymetrix_calvin_utilities::DateTime::GetCurrentDateTime().ToString(),std::string(__FILE__),(u_int16_t)__LINE__,0);
69 69
 		throw e;
70 70
 	}
71 71
 }
... ...
@@ -90,7 +90,7 @@ affymetrix_calvin_io::DataSet* DataGroup::DataSet(const std::wstring& dataSetNam
90 90
 	}
91 91
 	else
92 92
 	{
93
-		affymetrix_calvin_exceptions::DataSetNotFoundException e;
93
+		affymetrix_calvin_exceptions::DataSetNotFoundException e(L"Calvin",L"Default Description, Please Update!",affymetrix_calvin_utilities::DateTime::GetCurrentDateTime().ToString(),std::string(__FILE__),(u_int16_t)__LINE__,0);
94 94
 		throw e;
95 95
 	}
96 96
 }
... ...
@@ -23,6 +23,8 @@
23 23
 #include "calvin_files/data/src/GenericData.h"
24 24
 #include "calvin_files/parsers/src/FileInput.h"
25 25
 //
26
+#include "util/Fs.h"
27
+//
26 28
 #include <sys/stat.h>
27 29
 #include <sys/types.h>
28 30
 //
... ...
@@ -264,10 +266,9 @@ bool DataSet::MapDataPosix(u_int32_t start, u_int32_t bytes)
264 266
 	mapLen = bytes + page_offset;
265 267
 
266 268
 	// Get the file size
267
-	struct stat st;
268
-	if (stat(fileName.c_str(), &st) == 0)
269
+	if (Fs::fileExists(fileName))
269 270
 	{
270
-		int fileLen = st.st_size;
271
+          int64_t fileLen = Fs::fileSize(fileName);
271 272
 		if (fileLen < page_start + mapLen)
272 273
 			mapLen = fileLen - page_start;
273 274
 	}
... ...
@@ -338,19 +339,19 @@ void DataSet::CheckRowColumnAndType(int32_t row, int32_t col, DataSetColumnTypes
338 339
 {
339 340
 	if (isOpen == false)
340 341
 	{
341
-		affymetrix_calvin_exceptions::DataSetNotOpenException e;
342
+		affymetrix_calvin_exceptions::DataSetNotOpenException e(L"Calvin",L"Default Description, Please Update!",affymetrix_calvin_utilities::DateTime::GetCurrentDateTime().ToString(),std::string(__FILE__),(u_int16_t)__LINE__,0);
342 343
 		throw e;
343 344
 	}
344 345
 
345 346
 	if (col < 0 || col >= header.GetColumnCnt())
346 347
 	{
347
-		affymetrix_calvin_exceptions::ColumnIndexOutOfBoundsException e;
348
+		affymetrix_calvin_exceptions::ColumnIndexOutOfBoundsException e(L"Calvin",L"Default Description, Please Update!",affymetrix_calvin_utilities::DateTime::GetCurrentDateTime().ToString(),std::string(__FILE__),(u_int16_t)__LINE__,0);
348 349
 		throw e;
349 350
 	}
350 351
 
351 352
 	if (row < 0 || row >= header.GetRowCnt())
352 353
 	{
353
-		affymetrix_calvin_exceptions::RowIndexOutOfBoundsException e;
354
+		affymetrix_calvin_exceptions::RowIndexOutOfBoundsException e(L"Calvin",L"Default Description, Please Update!",affymetrix_calvin_utilities::DateTime::GetCurrentDateTime().ToString(),std::string(__FILE__),(u_int16_t)__LINE__,0);
354 355
 		throw e;
355 356
 	}
356 357
 
... ...
@@ -358,7 +359,7 @@ void DataSet::CheckRowColumnAndType(int32_t row, int32_t col, DataSetColumnTypes
358 359
 
359 360
 	if (header.GetColumnInfo(col).GetColumnType() != type)
360 361
 	{
361
-		affymetrix_calvin_exceptions::UnexpectedColumnTypeException e;
362
+		affymetrix_calvin_exceptions::UnexpectedColumnTypeException e(L"Calvin",L"Default Description, Please Update!",affymetrix_calvin_utilities::DateTime::GetCurrentDateTime().ToString(),std::string(__FILE__),(u_int16_t)__LINE__,0);
362 363
 		throw e;
363 364
 	}
364 365
 }
... ...
@@ -370,7 +371,7 @@ char* DataSet::FilePosition(int32_t rowStart, int32_t col, int32_t rowCount)
370 371
 {
371 372
 	if (isOpen == false)
372 373
 	{
373
-		affymetrix_calvin_exceptions::DataSetNotOpenException e;
374
+		affymetrix_calvin_exceptions::DataSetNotOpenException e(L"Calvin",L"Default Description, Please Update!",affymetrix_calvin_utilities::DateTime::GetCurrentDateTime().ToString(),std::string(__FILE__),(u_int16_t)__LINE__,0);
374 375
 		throw e;
375 376
 	}
376 377
 
... ...
@@ -408,7 +409,7 @@ char* DataSet::FilePosition(int32_t rowStart, int32_t col, int32_t rowCount)
408 409
 
409 410
 				if (MapDataWin32(reverseStartByte, header.GetDataStartFilePos() + header.GetDataSize() - reverseStartByte) == false)
410 411
 				{
411
-					affymetrix_calvin_exceptions::DataSetRemapException e;
412
+					affymetrix_calvin_exceptions::DataSetRemapException e(L"Calvin",L"Default Description, Please Update!",affymetrix_calvin_utilities::DateTime::GetCurrentDateTime().ToString(),std::string(__FILE__),(u_int16_t)__LINE__,0);
412 413
 					throw e;
413 414
 				}
414 415
 			}
... ...
@@ -416,7 +417,7 @@ char* DataSet::FilePosition(int32_t rowStart, int32_t col, int32_t rowCount)
416 417
 			{
417 418
 				if (MapDataWin32(startByte, header.GetDataStartFilePos() + header.GetDataSize() - startByte) == false)
418 419
 				{
419
-					affymetrix_calvin_exceptions::DataSetRemapException e;
420
+					affymetrix_calvin_exceptions::DataSetRemapException e(L"Calvin",L"Default Description, Please Update!",affymetrix_calvin_utilities::DateTime::GetCurrentDateTime().ToString(),std::string(__FILE__),(u_int16_t)__LINE__,0);
420 421
 					throw e;
421 422
 				}
422 423
 			}
... ...
@@ -193,10 +193,11 @@ public:
193 193
 	 */
194 194
 	int32_t BytesPerRow() { return columnByteOffsets[header.GetColumnCnt()]; }
195 195
 
196
-protected:
196
+//protected:
197 197
 	/*! Destructor. */
198 198
 	~DataSet();
199 199
 
200
+protected:
200 201
 	/*! Open the DataSet using memory-mapping
201 202
 	 *	@return True if the DataSet was successully mapped.
202 203
 	 */
... ...
@@ -24,6 +24,8 @@
24 24
 #include "calvin_files/parsers/src/DataGroupHeaderReader.h"
25 25
 #include "calvin_files/parsers/src/DataSetHeaderReader.h"
26 26
 //
27
+#include "util/Fs.h"
28
+//
27 29
 #include <algorithm>
28 30
 #include <cstring>
29 31
 #include <iterator>
... ...
@@ -132,7 +134,7 @@ u_int32_t GenericData::DataSetCnt(u_int32_t dataGroupIdx)
132 134
 		return dch->GetDataSetCnt();
133 135
 	else
134 136
 	{
135
-		affymetrix_calvin_exceptions::DataGroupNotFoundException e;
137
+		affymetrix_calvin_exceptions::DataGroupNotFoundException e(L"Calvin",L"Default Description, Please Update!",affymetrix_calvin_utilities::DateTime::GetCurrentDateTime().ToString(),std::string(__FILE__),(u_int16_t)__LINE__,0);
136 138
 		throw e;
137 139
 	}
138 140
 }
... ...
@@ -147,7 +149,7 @@ u_int32_t GenericData::DataSetCnt(const std::wstring& dataGroupName)
147 149
 		return dch->GetDataSetCnt();
148 150
 	else
149 151
 	{
150
-		affymetrix_calvin_exceptions::DataGroupNotFoundException e;
152
+		affymetrix_calvin_exceptions::DataGroupNotFoundException e(L"Calvin",L"Default Description, Please Update!",affymetrix_calvin_utilities::DateTime::GetCurrentDateTime().ToString(),std::string(__FILE__),(u_int16_t)__LINE__,0);
151 153
 		throw e;
152 154
 	}
153 155
 }
... ...
@@ -160,7 +162,7 @@ void GenericData::DataSetNames(u_int32_t dataGroupIdx, std::vector<std::wstring>
160 162
 	DataGroupHeader* dch = FindDataGroupHeader(dataGroupIdx);
161 163
 	if (dch == 0)
162 164
 	{
163
-		affymetrix_calvin_exceptions::DataGroupNotFoundException e;
165
+		affymetrix_calvin_exceptions::DataGroupNotFoundException e(L"Calvin",L"Default Description, Please Update!",affymetrix_calvin_utilities::DateTime::GetCurrentDateTime().ToString(),std::string(__FILE__),(u_int16_t)__LINE__,0);
164 166
 		throw e;
165 167
 	}
166 168
 
... ...
@@ -182,7 +184,7 @@ void GenericData::DataSetNames(const std::wstring& dataGroupName, std::vector<st
182 184
 	DataGroupHeader* dch = FindDataGroupHeader(dataGroupName);
183 185
 	if (dch == 0)
184 186
 	{
185
-		affymetrix_calvin_exceptions::DataGroupNotFoundException e;
187
+		affymetrix_calvin_exceptions::DataGroupNotFoundException e(L"Calvin",L"Default Description, Please Update!",affymetrix_calvin_utilities::DateTime::GetCurrentDateTime().ToString(),std::string(__FILE__),(u_int16_t)__LINE__,0);
186 188
 		throw e;
187 189
 	}
188 190
 
... ...
@@ -203,7 +205,7 @@ DataSet* GenericData::DataSet(u_int32_t dataGroupIdx, u_int32_t dataSetIdx)
203 205
 {
204 206
 	if (Open() == false)
205 207
 	{
206
-		affymetrix_calvin_exceptions::FileNotOpenException e;
208
+		affymetrix_calvin_exceptions::FileNotOpenException e(L"Calvin",L"Default Description, Please Update!",affymetrix_calvin_utilities::DateTime::GetCurrentDateTime().ToString(),std::string(__FILE__),(u_int16_t)__LINE__,0);
207 209
 		throw e;
208 210
 	}
209 211
 
... ...
@@ -217,13 +219,13 @@ DataSet* GenericData::DataSet(u_int32_t dataGroupIdx, u_int32_t dataSetIdx)
217 219
 		}
218 220
 		else
219 221
 		{
220
-			affymetrix_calvin_exceptions::DataSetNotFoundException e;
222
+			affymetrix_calvin_exceptions::DataSetNotFoundException e(L"Calvin",L"Default Description, Please Update!",affymetrix_calvin_utilities::DateTime::GetCurrentDateTime().ToString(),std::string(__FILE__),(u_int16_t)__LINE__,0);
221 223
 			throw e;
222 224
 		}
223 225
 	}
224 226
 	else
225 227
 	{
226
-		affymetrix_calvin_exceptions::DataGroupNotFoundException e;
228
+		affymetrix_calvin_exceptions::DataGroupNotFoundException e(L"Calvin",L"Default Description, Please Update!",affymetrix_calvin_utilities::DateTime::GetCurrentDateTime().ToString(),std::string(__FILE__),(u_int16_t)__LINE__,0);
227 229
 		throw e;
228 230
 	}
229 231
 }
... ...
@@ -235,7 +237,7 @@ DataSet* GenericData::DataSet(const std::wstring& dataGroupName, const std::wstr
235 237
 {
236 238
 	if (Open() == false)
237 239
 	{
238
-		affymetrix_calvin_exceptions::FileNotOpenException e;
240
+		affymetrix_calvin_exceptions::FileNotOpenException e(L"Calvin",L"Default Description, Please Update!",affymetrix_calvin_utilities::DateTime::GetCurrentDateTime().ToString(),std::string(__FILE__),(u_int16_t)__LINE__,0);
239 241
 		throw e;
240 242
 	}
241 243
 
... ...
@@ -249,13 +251,13 @@ DataSet* GenericData::DataSet(const std::wstring& dataGroupName, const std::wstr
249 251
 		}
250 252
 		else
251 253
 		{
252
-			affymetrix_calvin_exceptions::DataSetNotFoundException e;
254
+			affymetrix_calvin_exceptions::DataSetNotFoundException e(L"Calvin",L"Default Description, Please Update!",affymetrix_calvin_utilities::DateTime::GetCurrentDateTime().ToString(),std::string(__FILE__),(u_int16_t)__LINE__,0);
253 255
 			throw e;
254 256
 		}
255 257
 	}
256 258
 	else
257 259
 	{
258
-		affymetrix_calvin_exceptions::DataGroupNotFoundException e;
260
+		affymetrix_calvin_exceptions::DataGroupNotFoundException e(L"Calvin",L"Default Description, Please Update!",affymetrix_calvin_utilities::DateTime::GetCurrentDateTime().ToString(),std::string(__FILE__),(u_int16_t)__LINE__,0);
259 261
 		throw e;
260 262
 	}
261 263
 }
... ...
@@ -287,7 +289,7 @@ affymetrix_calvin_io::DataGroup GenericData::DataGroup(u_int32_t dataGroupFilePo
287 289
 {
288 290
 	if (Open() == false)
289 291
 	{
290
-		affymetrix_calvin_exceptions::FileNotOpenException e;
292
+		affymetrix_calvin_exceptions::FileNotOpenException e(L"Calvin",L"Default Description, Please Update!",affymetrix_calvin_utilities::DateTime::GetCurrentDateTime().ToString(),std::string(__FILE__),(u_int16_t)__LINE__,0);
291 293
 		throw e;
292 294
 	}
293 295
 
... ...
@@ -437,10 +439,10 @@ bool GenericData::IsDSHPartiallyRead(const DataSetHeader* dph)
437 439
  */
438 440
 void GenericData::OpenFStream(std::ifstream& ifs)
439 441
 {
440
-	ifs.open(Header().GetFilename().c_str(), std::ios::in | std::ios::binary);
441
-	if (!ifs)
442
+  Fs::aptOpen(ifs, Header().GetFilename(), std::ios::in | std::ios::binary);
443
+  if (!ifs.is_open() && !ifs.good())
442 444
 	{
443
-		affymetrix_calvin_exceptions::FileNotFoundException e;
445
+		affymetrix_calvin_exceptions::FileNotFoundException e(L"Calvin",L"Default Description, Please Update!",affymetrix_calvin_utilities::DateTime::GetCurrentDateTime().ToString(),std::string(__FILE__),(u_int16_t)__LINE__,0);
444 446
 		throw e;
445 447
 	}
446 448
 }
... ...
@@ -472,13 +474,16 @@ bool GenericData::MapFile()
472 474
 #ifdef _MSC_VER	// On Windows the map is open in the GenericData object, otherwise it is opened in the DataSet
473 475
 	if (fileHandle == INVALID_HANDLE_VALUE)
474 476
 	{
475
-		// Create the file.
476
-		fileHandle = CreateFile(Header().GetFilename().c_str(), GENERIC_READ, FILE_SHARE_READ,
477
-				NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
478
-		if (fileHandle == INVALID_HANDLE_VALUE)
479
-		{
480
-			return false;
481
-		}
477
+          // Create the file.
478
+          std::wstring filename = Fs::convertToUncPathW(Header().GetFilename(), 10);
479
+
480
+          fileHandle = CreateFileW(filename.c_str(), GENERIC_READ, FILE_SHARE_READ,
481
+                                  NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
482
+          if (fileHandle == INVALID_HANDLE_VALUE)
483
+            {
484
+				Verbose::out(1, Fs::MSC_VER_GetLastErrorString(std::string("GenericData::MapFile ") + Util::toString(filename) + ": "));
485
+              return false;
486
+            }
482 487
 	}
483 488
 	if (fileMapHandle == NULL)
484 489
 	{
... ...
@@ -489,6 +494,7 @@ bool GenericData::MapFile()
489