11 |
13 Sep 07 |
nicklas |
1 |
///////////////////////////////////////////////////////////////// |
11 |
13 Sep 07 |
nicklas |
2 |
// |
11 |
13 Sep 07 |
nicklas |
// Copyright (C) 2005 Affymetrix, Inc. |
11 |
13 Sep 07 |
nicklas |
4 |
// |
11 |
13 Sep 07 |
nicklas |
// This library is free software; you can redistribute it and/or modify |
11 |
13 Sep 07 |
nicklas |
// it under the terms of the GNU Lesser General Public License as published |
11 |
13 Sep 07 |
nicklas |
// by the Free Software Foundation; either version 2.1 of the License, |
11 |
13 Sep 07 |
nicklas |
// or (at your option) any later version. |
11 |
13 Sep 07 |
nicklas |
9 |
// |
11 |
13 Sep 07 |
nicklas |
// This library is distributed in the hope that it will be useful, but |
11 |
13 Sep 07 |
nicklas |
// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY |
11 |
13 Sep 07 |
nicklas |
// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License |
11 |
13 Sep 07 |
nicklas |
// for more details. |
11 |
13 Sep 07 |
nicklas |
14 |
// |
11 |
13 Sep 07 |
nicklas |
// You should have received a copy of the GNU Lesser General Public License |
11 |
13 Sep 07 |
nicklas |
// along with this library; if not, write to the Free Software Foundation, Inc., |
11 |
13 Sep 07 |
nicklas |
// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
11 |
13 Sep 07 |
nicklas |
18 |
// |
11 |
13 Sep 07 |
nicklas |
19 |
///////////////////////////////////////////////////////////////// |
11 |
13 Sep 07 |
nicklas |
20 |
|
11 |
13 Sep 07 |
nicklas |
21 |
package affymetrix.fusion.cdf; |
11 |
13 Sep 07 |
nicklas |
22 |
|
11 |
13 Sep 07 |
nicklas |
23 |
import affymetrix.gcos.cdf.*; |
11 |
13 Sep 07 |
nicklas |
24 |
|
11 |
13 Sep 07 |
nicklas |
/** This class provides storage for probe set information from a CDF file. */ |
11 |
13 Sep 07 |
nicklas |
26 |
public class FusionCDFProbeSetInformation { |
11 |
13 Sep 07 |
nicklas |
27 |
|
11 |
13 Sep 07 |
nicklas |
/** The GCOS object. */ |
11 |
13 Sep 07 |
nicklas |
29 |
private CDFProbeSetInformation probeSet; |
11 |
13 Sep 07 |
nicklas |
30 |
|
11 |
13 Sep 07 |
nicklas |
/** Sets the gcos object. |
11 |
13 Sep 07 |
nicklas |
* @param set The gcos probe set object. |
11 |
13 Sep 07 |
nicklas |
33 |
*/ |
11 |
13 Sep 07 |
nicklas |
34 |
public void setGCOSObject(CDFProbeSetInformation set) { probeSet = set; } |
11 |
13 Sep 07 |
nicklas |
35 |
|
11 |
13 Sep 07 |
nicklas |
/** The number of lists (atoms) in the probe set. */ |
11 |
13 Sep 07 |
nicklas |
37 |
public int getNumLists() { |
11 |
13 Sep 07 |
nicklas |
38 |
if (probeSet != null) |
11 |
13 Sep 07 |
nicklas |
39 |
return probeSet.getNumLists(); |
11 |
13 Sep 07 |
nicklas |
40 |
return 0; |
11 |
13 Sep 07 |
nicklas |
41 |
} |
11 |
13 Sep 07 |
nicklas |
42 |
|
11 |
13 Sep 07 |
nicklas |
/** The number of groups (blocks) in the probe set. */ |
11 |
13 Sep 07 |
nicklas |
44 |
public int getNumGroups() { |
11 |
13 Sep 07 |
nicklas |
45 |
if (probeSet != null) |
11 |
13 Sep 07 |
nicklas |
46 |
return probeSet.getNumGroups(); |
11 |
13 Sep 07 |
nicklas |
47 |
return 0; |
11 |
13 Sep 07 |
nicklas |
48 |
} |
11 |
13 Sep 07 |
nicklas |
49 |
|
11 |
13 Sep 07 |
nicklas |
/** The number of probes in the set. */ |
11 |
13 Sep 07 |
nicklas |
51 |
public int getNumCells() { |
11 |
13 Sep 07 |
nicklas |
52 |
if (probeSet != null) |
11 |
13 Sep 07 |
nicklas |
53 |
return probeSet.getNumCells(); |
11 |
13 Sep 07 |
nicklas |
54 |
return 0; |
11 |
13 Sep 07 |
nicklas |
55 |
} |
11 |
13 Sep 07 |
nicklas |
56 |
|
11 |
13 Sep 07 |
nicklas |
/** An index for the probe set.*/ |
11 |
13 Sep 07 |
nicklas |
58 |
public int getIndex() { |
11 |
13 Sep 07 |
nicklas |
59 |
if (probeSet != null) |
11 |
13 Sep 07 |
nicklas |
60 |
return probeSet.getIndex(); |
11 |
13 Sep 07 |
nicklas |
61 |
return 0; |
11 |
13 Sep 07 |
nicklas |
62 |
} |
11 |
13 Sep 07 |
nicklas |
63 |
|
11 |
13 Sep 07 |
nicklas |
/** An arbitrary number assigned to the probe set. */ |
11 |
13 Sep 07 |
nicklas |
65 |
public int getProbeSetNumber() { |
11 |
13 Sep 07 |
nicklas |
66 |
if (probeSet != null) |
11 |
13 Sep 07 |
nicklas |
67 |
return probeSet.getProbeSetNumber(); |
11 |
13 Sep 07 |
nicklas |
68 |
return 0; |
11 |
13 Sep 07 |
nicklas |
69 |
} |
11 |
13 Sep 07 |
nicklas |
70 |
|
11 |
13 Sep 07 |
nicklas |
/** The type of probe set. */ |
11 |
13 Sep 07 |
nicklas |
72 |
public int getProbeSetType() { |
11 |
13 Sep 07 |
nicklas |
73 |
if (probeSet != null) |
11 |
13 Sep 07 |
nicklas |
74 |
return probeSet.getProbeSetType(); |
11 |
13 Sep 07 |
nicklas |
75 |
return FusionGeneChipProbeSetType.UnknownProbeSetType; |
11 |
13 Sep 07 |
nicklas |
76 |
} |
11 |
13 Sep 07 |
nicklas |
77 |
|
11 |
13 Sep 07 |
nicklas |
/** The direction of the target that the probes are interrogating. */ |
11 |
13 Sep 07 |
nicklas |
79 |
public byte getDirection() { |
11 |
13 Sep 07 |
nicklas |
80 |
if (probeSet != null) |
11 |
13 Sep 07 |
nicklas |
81 |
return probeSet.getDirection(); |
11 |
13 Sep 07 |
nicklas |
82 |
return FusionDirectionType.NoDirection; |
11 |
13 Sep 07 |
nicklas |
83 |
} |
11 |
13 Sep 07 |
nicklas |
84 |
|
11 |
13 Sep 07 |
nicklas |
/** The number of probes per list. */ |
11 |
13 Sep 07 |
nicklas |
86 |
public byte getNumCellsPerList() { |
11 |
13 Sep 07 |
nicklas |
87 |
if (probeSet != null) |
11 |
13 Sep 07 |
nicklas |
88 |
return probeSet.getNumCellsPerList(); |
11 |
13 Sep 07 |
nicklas |
89 |
return 0; |
11 |
13 Sep 07 |
nicklas |
90 |
} |
11 |
13 Sep 07 |
nicklas |
91 |
|
11 |
13 Sep 07 |
nicklas |
/** Gets the group at the given index. |
11 |
13 Sep 07 |
nicklas |
* @param index The zero based index to the group array. |
11 |
13 Sep 07 |
nicklas |
* @param info The group information. |
11 |
13 Sep 07 |
nicklas |
95 |
*/ |
11 |
13 Sep 07 |
nicklas |
96 |
public void getGroup(int index, FusionCDFProbeGroupInformation info) { |
11 |
13 Sep 07 |
nicklas |
97 |
info.clear(); |
11 |
13 Sep 07 |
nicklas |
98 |
if (probeSet != null) |
11 |
13 Sep 07 |
nicklas |
99 |
info.setGCOSObject(probeSet.getGroup(index)); |
11 |
13 Sep 07 |
nicklas |
100 |
} |
11 |
13 Sep 07 |
nicklas |
101 |
|
11 |
13 Sep 07 |
nicklas |
/** Creates a new instance of FusionCDFProbeSetInformation */ |
11 |
13 Sep 07 |
nicklas |
103 |
public FusionCDFProbeSetInformation() { |
11 |
13 Sep 07 |
nicklas |
104 |
clear(); |
11 |
13 Sep 07 |
nicklas |
105 |
} |
11 |
13 Sep 07 |
nicklas |
106 |
|
11 |
13 Sep 07 |
nicklas |
/** Clears the members. */ |
11 |
13 Sep 07 |
nicklas |
108 |
public void clear() { |
11 |
13 Sep 07 |
nicklas |
109 |
probeSet = null; |
11 |
13 Sep 07 |
nicklas |
110 |
} |
11 |
13 Sep 07 |
nicklas |
111 |
} |