2 |
26 Feb 07 |
jari |
1 |
package org.tigr.microarray.mev; |
2 |
26 Feb 07 |
jari |
2 |
|
2 |
26 Feb 07 |
jari |
3 |
import org.tigr.microarray.mev.cgh.CGHDataObj.CGHClone; |
2 |
26 Feb 07 |
jari |
4 |
|
2 |
26 Feb 07 |
jari |
5 |
public class CGHSlideDataElement extends SlideDataElement { |
2 |
26 Feb 07 |
jari |
6 |
public static final int CLONE_ID = 0; |
2 |
26 Feb 07 |
jari |
7 |
public static final int CHR = 1; |
2 |
26 Feb 07 |
jari |
8 |
public static final int START = 2; |
2 |
26 Feb 07 |
jari |
9 |
public static final int END = 3; |
2 |
26 Feb 07 |
jari |
10 |
|
2 |
26 Feb 07 |
jari |
11 |
public CGHSlideDataElement(String UID, int[] rows, int[] columns, float[] intensities, String[] values){ |
2 |
26 Feb 07 |
jari |
12 |
super(UID, rows, columns, intensities, values); |
2 |
26 Feb 07 |
jari |
13 |
} |
2 |
26 Feb 07 |
jari |
14 |
|
2 |
26 Feb 07 |
jari |
15 |
/** |
2 |
26 Feb 07 |
jari |
* @param rows |
2 |
26 Feb 07 |
jari |
* @param cols |
2 |
26 Feb 07 |
jari |
* @param extraFields |
2 |
26 Feb 07 |
jari |
* @param uid |
2 |
26 Feb 07 |
jari |
* @param isNull |
2 |
26 Feb 07 |
jari |
* @param isNonZero |
2 |
26 Feb 07 |
jari |
22 |
*/ |
2 |
26 Feb 07 |
jari |
23 |
public CGHSlideDataElement(int[] rows, int[] cols, String[] extraFields, String uid, boolean isNull, boolean isNonZero) { |
2 |
26 Feb 07 |
jari |
24 |
super(rows, cols, extraFields, uid, isNull, isNonZero); |
2 |
26 Feb 07 |
jari |
25 |
} |
2 |
26 Feb 07 |
jari |
26 |
|
2 |
26 Feb 07 |
jari |
27 |
public String getCloneID() { |
2 |
26 Feb 07 |
jari |
28 |
return extraFields[CLONE_ID]; |
2 |
26 Feb 07 |
jari |
29 |
} |
2 |
26 Feb 07 |
jari |
30 |
|
2 |
26 Feb 07 |
jari |
31 |
public String getChromosome() { |
2 |
26 Feb 07 |
jari |
32 |
return extraFields[CHR]; |
2 |
26 Feb 07 |
jari |
33 |
} |
2 |
26 Feb 07 |
jari |
34 |
|
2 |
26 Feb 07 |
jari |
35 |
public int getProbeStart() { |
2 |
26 Feb 07 |
jari |
36 |
return Integer.parseInt(extraFields[START]); |
2 |
26 Feb 07 |
jari |
37 |
} |
2 |
26 Feb 07 |
jari |
38 |
|
2 |
26 Feb 07 |
jari |
39 |
public int getProbeEnd() { |
2 |
26 Feb 07 |
jari |
40 |
return Integer.parseInt(extraFields[END]); |
2 |
26 Feb 07 |
jari |
41 |
} |
2 |
26 Feb 07 |
jari |
42 |
|
2 |
26 Feb 07 |
jari |
43 |
public int getProbeLength(){ |
2 |
26 Feb 07 |
jari |
44 |
return getProbeEnd() - getProbeStart(); |
2 |
26 Feb 07 |
jari |
45 |
} |
2 |
26 Feb 07 |
jari |
46 |
|
2 |
26 Feb 07 |
jari |
47 |
public CGHClone getClone(int species) { |
2 |
26 Feb 07 |
jari |
//System.out.println("getClone(): " + getCloneID() + ", " + getChromosome() + ", " + getProbeStart() + ", " + getProbeEnd()); |
2 |
26 Feb 07 |
jari |
49 |
return new CGHClone(getCloneID().trim(), getChromosome(), getProbeStart(), getProbeEnd(), species); |
2 |
26 Feb 07 |
jari |
50 |
} |
2 |
26 Feb 07 |
jari |
51 |
} |