|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdata.Data
public class Data
Reading and containing RNA values from an input file and providing methods for the calculation of RNA ratios as well as methods to save the filtered values to a file
Field Summary | |
---|---|
static java.lang.String |
absent
|
static java.lang.String |
absentLabel
|
static int |
AVERAGEFIRST
|
static java.lang.String |
geneName
|
static int |
RATIOFIRST
|
static java.lang.String |
spotid
|
Constructor Summary | |
---|---|
Data(double[][] totalRNA,
double[][] newRNA,
double[][] preRNA,
java.lang.String[] totalDescr,
java.lang.String[] newDescr,
java.lang.String[] preDescr,
Mapping<java.lang.String,java.lang.Integer> map)
Constructs a Data-Object based on already existing data |
|
Data(java.lang.String file,
java.util.List<java.lang.String> columnsTotal,
java.util.List<java.lang.String> columnsNew,
java.util.List<java.lang.String> columnsPre)
Constructs a Data-Object based on an Input-File and the list of columns to be read with no additional attributes |
|
Data(java.lang.String file,
java.util.List<java.lang.String> columnsTotal,
java.util.List<java.lang.String> columnsNew,
java.util.List<java.lang.String> columnsPre,
java.util.List<java.lang.String> attr)
Constructs a Data-Object based on an Input-File and the list of columns to be read, defines columns containing attributes |
Method Summary | |
---|---|
void |
addAttributes(java.lang.String inputfile)
Reads in a file containing two columns: column 1: spotID, column2: attribute (e.g. gene name) The resulting Mapping is added to the List attrMaps and accessible over the index received from attrMapsDescr, where the name of the column is stored |
double[] |
calculateAverageFirst(double[][] rna,
double[][] total)
calculates the average values from all replicates for the linear regression calculates the ratio of the averages (AVERAGEFIRST method) |
Mapping<java.lang.String,java.lang.Integer> |
calculateNewMapping()
Calculates the Mapping corresponding to the ratio |
double[] |
calculateRatio(double[][] rna,
double[][] total)
Calculates filtered Ratio of a set of RNA values (e.g. newly transcribed RNA) to a second set of values (e.g. total RNA) based on the specified method to calculate the average of multiple replicates. |
double[] |
calculateRatioFirst(double[][] allRatio)
calculates the average values from all replicates for the linear regression calculates the average of the ratios (RATIOFIRST method) |
Mapping<java.lang.String,java.lang.Integer> |
copyMap()
Copies the content of the Mapping object |
double |
evaluate(java.lang.String fasta,
int column)
Method for the Uracil-based evaluation of the values |
java.lang.String[] |
getAttrDescr()
Returns the description of the attributes |
java.util.ArrayList<Mapping<java.lang.String,java.lang.String>> |
getAttributes()
Returns the attribute lists |
double |
getAvgLo()
Returns the average log(e'/n') |
double |
getAvgUr()
Returns the average number of Uracil |
java.lang.String |
getFilename()
Returns the name of the file containing the data |
Mapping<java.lang.String,java.lang.Integer> |
getMap()
Returns the map corresponding to the data |
java.lang.String[] |
getNewDescr()
Returns the description = column labels of newly transcribed RNA |
double[][] |
getNewRNA()
Returns all the values for newly transcribed RNA |
int |
getNumberExperiments()
Returns the number of measured experiments (not changeable through filtering!) |
java.lang.String |
getPlotName()
Returns the name of the file into which evaluation results will be printed as a plotable table |
double[] |
getPqs()
Returns the probe set quality scores |
java.lang.String[] |
getPreDescr()
Returns the description = column labels of pre-existing RNA |
double[][] |
getPreRNA()
Returns all the values for pre-existing RNA |
java.lang.String[] |
getTotalDescr()
Returns the description = column labels of total RNA |
double[][] |
getTotalRNA()
Returns all the values for total RNA |
void |
readInput(java.lang.String file,
java.util.List<java.lang.String> columnsTotal,
java.util.List<java.lang.String> columnsNew,
java.util.List<java.lang.String> columnsPre,
java.util.List<java.lang.String> addit)
Takes an input file, reads the values and saves them in the class variables of the Data object |
double[] |
restrictRatio(double[][] input,
int replicate)
Restricts a multidimensional array onto an array with one dimension containing the wanted replicate |
static void |
setAbsent(java.lang.String absent)
Sets the name of the column (column label) which holds information on present/absent calls |
void |
setAttrDescr(java.lang.String[] attrDescr)
Sets the description of all attributes |
void |
setAttributes(java.util.ArrayList<Mapping<java.lang.String,java.lang.String>> attributes)
Sets the attributes list for the data |
void |
setFilename(java.lang.String filename)
Sets the name of the file holding the data information |
static void |
setGeneName(java.lang.String geneName)
Sets the name of the column which holds information on the gene name |
void |
setMap(Mapping<java.lang.String,java.lang.Integer> map)
Sets the mapping corresponding to the whole data and filtered values |
void |
setMethod(int i)
Sets the method used for calculating the average ratios over all replicates |
void |
setPqs(double[] pqs)
Sets the probe set quality scores |
void |
setUnequal(boolean unequal)
Set the value of the unequal variable, meaning if there is an unequal number of measurements (new, pre, total) |
void |
writeOutput(java.lang.String output,
java.util.List<java.lang.String> columnsTotal,
java.util.List<java.lang.String> columnsNew,
java.util.List<java.lang.String> columnsPre,
java.util.List<java.lang.String> addit)
desired columns are written to a file; former order is not kept, instead all values of one type are added sequentially |
void |
writeToFileArray(java.lang.String output,
double[] array)
Writes the half life values contained in the object and in the map together with corresponding spotIds into a file Appropriate for half lives, ratios & pqs (for which the new mapping applies) |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int RATIOFIRST
public static final int AVERAGEFIRST
public static java.lang.String absentLabel
public static java.lang.String absent
public static java.lang.String geneName
public static java.lang.String spotid
Constructor Detail |
---|
public Data(java.lang.String file, java.util.List<java.lang.String> columnsTotal, java.util.List<java.lang.String> columnsNew, java.util.List<java.lang.String> columnsPre)
file
- Name of the Input-filecolumnsTotal
- List containing the labels of columns for total RNAcolumnsNew
- List containing the labels of columns for newly transcribed RNAcolumnsPre
- List containing the labels of columns for pre-existing RNApublic Data(java.lang.String file, java.util.List<java.lang.String> columnsTotal, java.util.List<java.lang.String> columnsNew, java.util.List<java.lang.String> columnsPre, java.util.List<java.lang.String> attr)
file
- Name of the Input-filecolumnsTotal
- List containing the labels of columns for total RNAcolumnsNew
- List containing the labels of columns for newly transcribed RNAcolumnsPre
- List containing the labels of columns for pre-existing RNAattr
- List containing the labels of columns for attributespublic Data(double[][] totalRNA, double[][] newRNA, double[][] preRNA, java.lang.String[] totalDescr, java.lang.String[] newDescr, java.lang.String[] preDescr, Mapping<java.lang.String,java.lang.Integer> map)
totalRNA
- Array containing all values of total RNAnewRNA
- Array containing all values of newly transcribed RNApreRNA
- Array containing all values of pre-existing RNAtotalDescr
- A description that matches the columns of the arrays containing the values to the labels of the columns for total RNAnewDescr
- matches columns of arrays to labels for newly transcribed RNApreDescr
- matches columns of arrays to labels for pre-existing RNAmap
- A Map matching SpotId to index of RNA-arrays, containing only filtered valuesMethod Detail |
---|
public void readInput(java.lang.String file, java.util.List<java.lang.String> columnsTotal, java.util.List<java.lang.String> columnsNew, java.util.List<java.lang.String> columnsPre, java.util.List<java.lang.String> addit)
file
- Name of the input filecolumnsTotal
- List containing labels of columns for total RNAcolumnsNew
- List containing labels of columns for newly transcribed RNAcolumnsPre
- List containing labels of columns for pre-existing RNAaddit
- List containing labels of columns with additional information; null if no additional information is wantedpublic void addAttributes(java.lang.String inputfile)
inputfile
- public void writeOutput(java.lang.String output, java.util.List<java.lang.String> columnsTotal, java.util.List<java.lang.String> columnsNew, java.util.List<java.lang.String> columnsPre, java.util.List<java.lang.String> addit)
output
- Name of the output filecolumnsTotal
- List containing labels of columns for total RNA that shall be exportedcolumnsNew
- List containing labels of columns for newly transcribed RNA that shall be exportedcolumnsPre
- List containing labels of columns for pre-existing RNA that shall be exportedpublic Mapping<java.lang.String,java.lang.Integer> copyMap()
public double[] calculateRatio(double[][] rna, double[][] total)
rna
- A set of RNA values serving as numeratortotal
- A second set of RNA values serving as denominator
public Mapping<java.lang.String,java.lang.Integer> calculateNewMapping()
public double[] restrictRatio(double[][] input, int replicate)
input
- Ratio or Half life array
public double[] calculateRatioFirst(double[][] allRatio)
allRatio
- The array containing the previously calculated ratios
public double[] calculateAverageFirst(double[][] rna, double[][] total)
rna
- A set of RNA that serves as numeratortotal
- A set of RNA that serves as denominator
public void writeToFileArray(java.lang.String output, double[] array)
output
- Name of output filepublic double evaluate(java.lang.String fasta, int column)
fasta
- The fasta file which contains the sequencescolumn
- The number of the column (starting with 1) of the header in which
the genename is contained (i.e. header: > genename | attribute | attribute leads to column = 1)
public void setMethod(int i)
i
- The integer value for the methodpublic void setMap(Mapping<java.lang.String,java.lang.Integer> map)
map
- The mapping corresponding to datapublic void setFilename(java.lang.String filename)
filename
- Name of the file with the datapublic void setAttributes(java.util.ArrayList<Mapping<java.lang.String,java.lang.String>> attributes)
attributes
- The list of attribute mappingspublic void setAttrDescr(java.lang.String[] attrDescr)
attrDescr
- The description of attributespublic static void setAbsent(java.lang.String absent)
absent
- Column label for present/absent callspublic static void setGeneName(java.lang.String geneName)
geneName
- Column label for gene namepublic void setUnequal(boolean unequal)
unequal
- True, if there is an unequal number of measurementspublic void setPqs(double[] pqs)
pqs
- The probe set quality scorespublic double[] getPqs()
public java.lang.String getFilename()
public java.util.ArrayList<Mapping<java.lang.String,java.lang.String>> getAttributes()
public Mapping<java.lang.String,java.lang.Integer> getMap()
public java.lang.String[] getAttrDescr()
public java.lang.String[] getNewDescr()
public double[][] getNewRNA()
public java.lang.String[] getPreDescr()
public double[][] getPreRNA()
public java.lang.String[] getTotalDescr()
public double[][] getTotalRNA()
public int getNumberExperiments()
public double getAvgLo()
public double getAvgUr()
public java.lang.String getPlotName()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |