|
Cytoscape 2.6.2 (c) 2006,2007 ISB, MSKCC, UCSD | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cytoscape.data.ExpressionData
public class ExpressionData
This class provides a reader for the common file format for expression data and an interface to access the data.
There are variations in the file format used; the following assumptions about the file format are considered valid. Attempting to read a file that does not satisfy these assumptions is not guaranteed to work.
1. A token is a consecutive sequence of alphanumeric characters separated by whitespace.
<\t><\t>RATIOS<\t><\t>...LAMBDAS
Here cond1 through condN are the names of the conditions. In the first case, the two sequences of condition names must match exactly in order and lexicographically; each name among cond1 ... condN must be unique. In the second case, each name must be unique, but need only appear once. The last label, NumSigConds, is optional.
4. Each successive line represents the measurements for a partcular gene, and has one of the following two formats, depending on the header:
where
The first format is used in conjuction with the first or third header formats. The second format is used in conjunction with the second header format.
5. An optional last line can be included with the following form:
NumSigGenes: I I ... I
where there are N I's, each an integer representing the number of significant genes in that condition.
Field Summary | |
---|---|
static int |
LAMBDA
Significance value: LAMBA. |
static int |
MAX_LINE_SIZE
|
static int |
NONE
Significance value: NONE. |
static int |
PVAL
Significance value: PVAL. |
static int |
UNKNOWN
Significance value: UNKNOWN. |
Constructor Summary | |
---|---|
ExpressionData()
Constructor. |
|
ExpressionData(String filename)
Constructor. |
|
ExpressionData(String filename,
String keyAttributeName)
Constructor. |
|
ExpressionData(String filename,
String keyAttributeName,
TaskMonitor taskMonitor)
Constructor. |
|
ExpressionData(String filename,
TaskMonitor taskMonitor)
Constructor. |
Method Summary | |
---|---|
void |
convertLambdasToPvals()
Converts all lambdas to p-values. |
void |
copyToAttribs(CyAttributes nodeAttribs,
TaskMonitor taskMonitor)
Copies ExpressionData data structure into CyAttributes data structure. |
Vector |
getAllMeasurements()
Gets all Measurements. |
int |
getConditionIndex(String condition)
Gets the index value of the specified experimenal conditon. |
String[] |
getConditionNames()
Gets an Array of All Experimental Conditions. |
String |
getDescription()
Returns a text description of this data object. |
double[][] |
getExtremeValues()
Returns a 2D Matrix of Extreme Values. |
String |
getFileName()
Gets the Name of the Expression Data File. |
File |
getFullPath()
Gets the File representation of the Expression Data Object. |
String |
getGeneDescriptor(String gene)
Gets the Gene Descriptor for the specified gene. |
String[] |
getGeneDescriptors()
Gets an Array of GeneDescriptors. |
Vector |
getGeneDescriptorsVector()
Gets a Vector Gene Descriptors. |
String[] |
getGeneNames()
Gets a List of All Gene Names. |
Vector |
getGeneNamesVector()
Gets a List of All Gene Names. |
mRNAMeasurement |
getMeasurement(String gene,
String condition)
Gets Single Measurement Value for the specified gene at the specified condition. |
Vector |
getMeasurements(String gene)
Gets a Vector of all Measurements associated with the specified gene. |
int |
getNumberOfConditions()
Gets Total Number of Experimental Conditions. |
int |
getNumberOfGenes()
Gets Total Number of Genes. |
static double |
getPvalueFromLambda(double lambda)
Gets a PValue of the specified lambda value. |
int |
getSignificanceType()
Gets the Significance Type. |
boolean |
hasSignificanceValues()
Indicates whether the expression data has significance values. |
boolean |
loadData(String filename,
String keyAttributeName)
Loads the Specified File into memory. |
void |
setGeneDescriptors(Vector newDescripts)
Sets a List of Gene Descriptors. |
void |
setGeneNames(Vector newNames)
Sets a List of Gene Names. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int MAX_LINE_SIZE
public static final int PVAL
public static final int LAMBDA
public static final int NONE
public static final int UNKNOWN
Constructor Detail |
---|
public ExpressionData()
public ExpressionData(String filename) throws IOException
filename
- Name of Expression Data File.
IOException
- Error opening/parsing the expression data file.public ExpressionData(String filename, String keyAttributeName) throws IOException
filename
- Name of Expression Data File.
IOException
- Error opening/parsing the expression data file.public ExpressionData(String filename, TaskMonitor taskMonitor) throws IOException
filename
- Name of Expression Data File.taskMonitor
- TaskMonitor for reporting/monitoring progress.
IOException
- Error opening/parsing the expression data file.public ExpressionData(String filename, String keyAttributeName, TaskMonitor taskMonitor) throws IOException
filename
- Name of Expression Data File.keyAttributeName
- Identifies an attribute to use in mapping
the data to the nodes.taskMonitor
- TaskMonitor for reporting/monitoring progress.
IOException
- Error opening/parsing the expression data file.Method Detail |
---|
public String getFileName()
public File getFullPath()
public boolean loadData(String filename, String keyAttributeName) throws IOException
filename
- Name of Expression Data File.
IOException
- Error loading / parsing the Expression Data File.public void convertLambdasToPvals()
public static double getPvalueFromLambda(double lambda)
public int getSignificanceType()
public String getDescription()
public void setGeneNames(Vector newNames)
newNames
- Vector of String Objects.public String[] getGeneDescriptors()
public Vector getGeneDescriptorsVector()
public void setGeneDescriptors(Vector newDescripts)
newDescripts
- Vector of String Objects.public String[] getConditionNames()
public int getConditionIndex(String condition)
condition
- Name of experimental condition.
public String getGeneDescriptor(String gene)
gene
- Gene Name.
public boolean hasSignificanceValues()
public Vector getAllMeasurements()
public String[] getGeneNames()
public Vector getGeneNamesVector()
public int getNumberOfConditions()
public int getNumberOfGenes()
public double[][] getExtremeValues()
maxVals[0][0] = minExp; maxVals[0][1] = maxExp; maxVals[1][0] = minSig; maxVals[0][1] = maxSig;
public Vector getMeasurements(String gene)
gene
- Gene Name.
public mRNAMeasurement getMeasurement(String gene, String condition)
gene
- Gene Name.condition
- Condition Name (corresponds to column heading in original
expression data file.)
public void copyToAttribs(CyAttributes nodeAttribs, TaskMonitor taskMonitor)
nodeAttribs
- Node Attributes Object.taskMonitor
- Task Monitor. Can be null.
|
www.cytoscape.org | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |