2 |
26 Feb 07 |
jari |
1 |
/* |
2 |
26 Feb 07 |
jari |
* CGHTableDataModelNoDyeSwap.java |
2 |
26 Feb 07 |
jari |
3 |
* |
2 |
26 Feb 07 |
jari |
* Created on July 5, 2003, 11:32 PM |
2 |
26 Feb 07 |
jari |
5 |
*/ |
2 |
26 Feb 07 |
jari |
6 |
|
2 |
26 Feb 07 |
jari |
7 |
package org.tigr.microarray.mev.cgh.CGHDataModel; |
2 |
26 Feb 07 |
jari |
8 |
|
2 |
26 Feb 07 |
jari |
9 |
import org.tigr.microarray.mev.cluster.gui.IData; |
2 |
26 Feb 07 |
jari |
10 |
import org.tigr.microarray.mev.cluster.gui.IFramework; |
2 |
26 Feb 07 |
jari |
11 |
|
2 |
26 Feb 07 |
jari |
12 |
/** |
2 |
26 Feb 07 |
jari |
13 |
* |
2 |
26 Feb 07 |
jari |
* @author Adam Margolin |
2 |
26 Feb 07 |
jari |
* @author Raktim Sinha |
2 |
26 Feb 07 |
jari |
16 |
*/ |
2 |
26 Feb 07 |
jari |
17 |
|
2 |
26 Feb 07 |
jari |
18 |
public class CGHTableDataModelNoDyeSwap extends CGHTableDataModel { |
2 |
26 Feb 07 |
jari |
19 |
|
2 |
26 Feb 07 |
jari |
/** Creates a new instance of CGHTableDataModelDyeSwap */ |
2 |
26 Feb 07 |
jari |
21 |
public CGHTableDataModelNoDyeSwap(/*CGHMultipleArrayDataFcd fcd,*/ IFramework framework, int experimentIndex, int chromosomeIndex){ |
2 |
26 Feb 07 |
jari |
22 |
super(/*fcd,*/ framework, experimentIndex, chromosomeIndex); |
2 |
26 Feb 07 |
jari |
23 |
} |
2 |
26 Feb 07 |
jari |
24 |
|
2 |
26 Feb 07 |
jari |
25 |
public int getColumnCount() { |
2 |
26 Feb 07 |
jari |
26 |
return adaptor.experimentIndices.length + getNumAnnotationCols(); |
2 |
26 Feb 07 |
jari |
27 |
} |
2 |
26 Feb 07 |
jari |
28 |
|
2 |
26 Feb 07 |
jari |
29 |
public String getColumnDataName(int labelIndex) { |
2 |
26 Feb 07 |
jari |
30 |
return data.getSampleName(adaptor.experimentIndices[labelIndex]); |
2 |
26 Feb 07 |
jari |
31 |
} |
2 |
26 Feb 07 |
jari |
32 |
|
2 |
26 Feb 07 |
jari |
33 |
/** |
2 |
26 Feb 07 |
jari |
* Remember getRatio Glitch |
2 |
26 Feb 07 |
jari |
35 |
*/ |
2 |
26 Feb 07 |
jari |
36 |
public Object getDataValueAt(int row, int col) { |
2 |
26 Feb 07 |
jari |
37 |
int experimentIndex = col - getNumAnnotationCols(); |
2 |
26 Feb 07 |
jari |
//Raktim |
2 |
26 Feb 07 |
jari |
//System.out.println("CGHTableDataModelNoDyeSwap, experimentIndex, adaptor.experimentIndices[experimentIndex]: " + experimentIndex + " " + adaptor.experimentIndices[experimentIndex]); |
2 |
26 Feb 07 |
jari |
40 |
int cloneIndex = adaptor.getCloneIndex(row); |
2 |
26 Feb 07 |
jari |
41 |
switch (adaptor.getCloneValueType()){ |
2 |
26 Feb 07 |
jari |
42 |
case CGHBrowserModelAdaptor.CLONE_VALUES_RATIOS: |
2 |
26 Feb 07 |
jari |
//Bug with Expr index |
2 |
26 Feb 07 |
jari |
//return new Float(data.getRatio(experimentIndex, cloneIndex, IData.LOG)); |
2 |
26 Feb 07 |
jari |
45 |
return new Float(data.getRatio(adaptor.experimentIndices[experimentIndex], cloneIndex, IData.LOG)); |
2 |
26 Feb 07 |
jari |
46 |
case CGHBrowserModelAdaptor.CLONE_VALUES_LOG_RATIOS: |
2 |
26 Feb 07 |
jari |
//Bug with Expr index |
2 |
26 Feb 07 |
jari |
//return new Float(data.getRatio(experimentIndex, cloneIndex, IData.LOG)); |
2 |
26 Feb 07 |
jari |
49 |
return new Float(data.getRatio(adaptor.experimentIndices[experimentIndex], cloneIndex, IData.LOG)); |
2 |
26 Feb 07 |
jari |
50 |
case CGHBrowserModelAdaptor.CLONE_VALUES_P_SCORE: |
2 |
26 Feb 07 |
jari |
51 |
return new Float(data.getPValueByLogCloneDistribution(experimentIndex, cloneIndex)); |
2 |
26 Feb 07 |
jari |
52 |
} |
2 |
26 Feb 07 |
jari |
53 |
return new Float(Float.NaN); |
2 |
26 Feb 07 |
jari |
54 |
} |
2 |
26 Feb 07 |
jari |
55 |
|
2 |
26 Feb 07 |
jari |
56 |
} |