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 a group of probes, also known as a block. */ |
11 |
13 Sep 07 |
nicklas |
26 |
public class FusionCDFProbeGroupInformation { |
11 |
13 Sep 07 |
nicklas |
27 |
|
11 |
13 Sep 07 |
nicklas |
/** The GCOS probe group object. */ |
11 |
13 Sep 07 |
nicklas |
29 |
private CDFProbeGroupInformation gcosGroup; |
11 |
13 Sep 07 |
nicklas |
30 |
|
11 |
13 Sep 07 |
nicklas |
/** Sets the GCOS probe group object. |
11 |
13 Sep 07 |
nicklas |
* @param g The probe group object. |
11 |
13 Sep 07 |
nicklas |
33 |
*/ |
11 |
13 Sep 07 |
nicklas |
34 |
public void setGCOSObject(CDFProbeGroupInformation g) { gcosGroup=g; } |
11 |
13 Sep 07 |
nicklas |
35 |
|
11 |
13 Sep 07 |
nicklas |
/** The number of probe pairs or probe quartets in the group. */ |
11 |
13 Sep 07 |
nicklas |
37 |
public int getNumLists() { |
11 |
13 Sep 07 |
nicklas |
38 |
if (gcosGroup != null) |
11 |
13 Sep 07 |
nicklas |
39 |
return gcosGroup.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 probes in the group. */ |
11 |
13 Sep 07 |
nicklas |
44 |
public int getNumCells() { |
11 |
13 Sep 07 |
nicklas |
45 |
if (gcosGroup != null) |
11 |
13 Sep 07 |
nicklas |
46 |
return gcosGroup.getNumCells(); |
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 first probes list index value. */ |
11 |
13 Sep 07 |
nicklas |
51 |
public int getStart() { |
11 |
13 Sep 07 |
nicklas |
52 |
if (gcosGroup != null) |
11 |
13 Sep 07 |
nicklas |
53 |
return gcosGroup.getStart(); |
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 |
/** The last probes list index value. */ |
11 |
13 Sep 07 |
nicklas |
58 |
public int getStop() { |
11 |
13 Sep 07 |
nicklas |
59 |
if (gcosGroup != null) |
11 |
13 Sep 07 |
nicklas |
60 |
return gcosGroup.getStop(); |
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 |
/** The probe set index associated with the group. */ |
11 |
13 Sep 07 |
nicklas |
65 |
public int getProbeSetIndex() { |
11 |
13 Sep 07 |
nicklas |
66 |
if (gcosGroup != null) |
11 |
13 Sep 07 |
nicklas |
67 |
return gcosGroup.getProbeSetIndex(); |
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 group index. */ |
11 |
13 Sep 07 |
nicklas |
72 |
public int getGroupIndex() { |
11 |
13 Sep 07 |
nicklas |
73 |
if (gcosGroup != null) |
11 |
13 Sep 07 |
nicklas |
74 |
return gcosGroup.getGroupIndex(); |
11 |
13 Sep 07 |
nicklas |
75 |
return 0; |
11 |
13 Sep 07 |
nicklas |
76 |
} |
11 |
13 Sep 07 |
nicklas |
77 |
|
11 |
13 Sep 07 |
nicklas |
/** The name of the group. */ |
11 |
13 Sep 07 |
nicklas |
79 |
public String getName() { |
11 |
13 Sep 07 |
nicklas |
80 |
if (gcosGroup != null) |
11 |
13 Sep 07 |
nicklas |
81 |
return gcosGroup.getName(); |
11 |
13 Sep 07 |
nicklas |
82 |
return null; |
11 |
13 Sep 07 |
nicklas |
83 |
} |
11 |
13 Sep 07 |
nicklas |
84 |
|
11 |
13 Sep 07 |
nicklas |
/** The number of cells per list (2 for expression and genotyping, 4 for resquencing). */ |
11 |
13 Sep 07 |
nicklas |
86 |
public byte getNumCellsPerList() { |
11 |
13 Sep 07 |
nicklas |
87 |
if (gcosGroup != null) |
11 |
13 Sep 07 |
nicklas |
88 |
return gcosGroup.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 |
/** The direction of the target that the probes are interrogating. */ |
11 |
13 Sep 07 |
nicklas |
93 |
public byte getDirection() { |
11 |
13 Sep 07 |
nicklas |
94 |
if (gcosGroup != null) |
11 |
13 Sep 07 |
nicklas |
95 |
return gcosGroup.getDirection(); |
11 |
13 Sep 07 |
nicklas |
96 |
return FusionDirectionType.NoDirection; |
11 |
13 Sep 07 |
nicklas |
97 |
} |
11 |
13 Sep 07 |
nicklas |
98 |
|
11 |
13 Sep 07 |
nicklas |
/** Gets the cell information for the given cell index. |
11 |
13 Sep 07 |
nicklas |
* @param index The zero based index to the cell array. |
11 |
13 Sep 07 |
nicklas |
* @param cel The cell or probe information. |
11 |
13 Sep 07 |
nicklas |
102 |
*/ |
11 |
13 Sep 07 |
nicklas |
103 |
public void getCell(int index, FusionCDFProbeInformation cel) { |
11 |
13 Sep 07 |
nicklas |
104 |
cel.clear(); |
11 |
13 Sep 07 |
nicklas |
105 |
if (gcosGroup != null) |
11 |
13 Sep 07 |
nicklas |
106 |
cel.setGCOSObject(gcosGroup.getCell(index)); |
11 |
13 Sep 07 |
nicklas |
107 |
} |
11 |
13 Sep 07 |
nicklas |
108 |
|
11 |
13 Sep 07 |
nicklas |
/** Creates a new instance of FusionCDFProbeGroupInformation */ |
11 |
13 Sep 07 |
nicklas |
110 |
public FusionCDFProbeGroupInformation() { |
11 |
13 Sep 07 |
nicklas |
111 |
clear(); |
11 |
13 Sep 07 |
nicklas |
112 |
} |
11 |
13 Sep 07 |
nicklas |
113 |
|
11 |
13 Sep 07 |
nicklas |
/** Clears the members. */ |
11 |
13 Sep 07 |
nicklas |
115 |
public void clear() { |
11 |
13 Sep 07 |
nicklas |
116 |
gcosGroup = null; |
11 |
13 Sep 07 |
nicklas |
117 |
} |
11 |
13 Sep 07 |
nicklas |
118 |
} |