halo.userinterface.gui
Class GuiFilterData

java.lang.Object
  extended by halo.userinterface.gui.GuiFilterData

public class GuiFilterData
extends java.lang.Object

'Interface' which connects GUI and loading/filtering methods for data

Author:
Stefanie Kaufmann

Field Summary
static java.lang.String PQS
           
static java.lang.String PQSMIN
           
static java.lang.String PRESENT
           
static java.lang.String THRESHOLD
           
 
Constructor Summary
GuiFilterData()
          Constructor creating an object of GuiFilterData
 
Method Summary
 void addAttr(java.io.File file, java.util.ArrayList<java.lang.String> labels)
          Extracts a new attribute from a given file and adds it to the data
 void addAttributesList(java.util.ArrayList<Mapping<java.lang.String,java.lang.String>> list, java.lang.String[] attrDescr)
          Adds a list of attributes to the data, as well as the corresponding descriptors
 void addFasta(java.io.File file, int column)
          Adds the necessary information for the multiple fasta file; its location and the column containing the gene name
 void addMethod(java.lang.String method, java.lang.String filterValue)
          Adds a filtering method and a corresponding value, e.g. a threshold
 void addOriginalAttr(java.util.ArrayList<java.lang.String> labels, boolean calls)
           
 void evaluateFasta(java.lang.String uraMeth, java.lang.String printName, java.util.HashMap<java.lang.String,java.lang.Double> corr, boolean plot)
          Starts the evaluation using the multiple fasta file
 java.lang.String[] getAttrDescr()
          Returns the descriptors for the attribute list
 java.util.ArrayList<Mapping<java.lang.String,java.lang.String>> getAttributesList()
          Returns the list of attributes for the data
 double getAvgL()
          Returns the average log(e'/n')
 double getAvgU()
          Returns the average number of uracils
 int getColumn()
          Returns the column of the fasta header that keeps the gene name
 Data getData()
          Returns the complete Data object
 java.io.File getFasta()
          Returns the file containing the sequences for the data
 java.lang.String getGenename()
          Returns the name of the column with gene names
 java.util.List<java.lang.String> getMethods()
          Returns the list of filtering methods
 java.util.List<java.lang.String> getOriginalAtts()
          Returns the attributes from the datafile
 java.lang.String getOriginalGene()
          Returns the original name of the gene attribute
 java.lang.String getPlotName()
          Returns the name of the file containing the plotting information for evaluation
 int getSize()
          Returns the size of the data after the performed filtering steps
 java.lang.String getSpotid()
          Returns the name of the column with spotIDs
 boolean hasData()
          Checks whether Data has been set
 boolean hasGeneNames()
          Checks whether the attribute containing gene names for each spot has been set
 boolean hasGenes()
          Checks whether the multiple fasta file containing the sequences has been set and whether the attribute describing the gene names for each spot exists
 boolean hasNormalization()
          Checks whether normalization has been performed
 boolean isCalls()
          Returns status of attributes in original file: present calls?
 boolean isLog()
          Returns scale of data (log or linear)
 void loadData()
          Creates a Data object from previously set variables
 void prepareData()
          Filters a previously loaded Data object according to the set methods
 void saveData()
          Saves the Data object into a file
 void setAttributes(java.util.List<java.lang.String> attributes)
          Sets the list of attributes corresponding to the data
 void setAttributesInFile(boolean attributesInFile)
          Sets a variable that remembers if attributes were loaded from original file
 void setAttributesOut(java.util.List<java.lang.String> attributesOut)
          Sets the list of attributes for output
 void setCombined(boolean combined)
          Defines whether single or combined filtering should be performed
 void setFasta(java.lang.String fasta, int column)
          Sets the file containing the sequences for the data, as well as the column defining where the gene name is found in the header of each sequence
 void setFile(java.io.File file)
          Sets the file containing the initial data
 void setFirst(boolean first)
          Sets status if data is loaded for the first time
 void setGenename(java.lang.String genename)
          Sets the name of the gene name attribute
 void setLabelsNew(java.util.List<java.lang.String> lab)
          Sets the column labels for newly transcribed RNA that will be read in
 void setLabelsPre(java.util.List<java.lang.String> lab)
          Sets the column labels for pre-existing RNA that will be read in
 void setLabelsTot(java.util.List<java.lang.String> lab)
          Sets the column labels for total RNA that will be read in
 void setLog(boolean log)
          Sets the scale; true for log scale, false for linear
 void setMethods(java.util.List<java.lang.String> methods)
          Sets the list of filtering methods
 void setNewOut(java.util.List<java.lang.String> lab)
          Sets the column labels for newly transcribed RNA that will be written into the output
 void setNorm(Normalization norm)
          Sets the normalization object needed for evaluation
 void setOriginalAtts(java.util.List<java.lang.String> originalAtts)
          Sets the attributes from the data file
 void setOutput(java.io.File outputFile)
          Sets the file in which the filtered data will be written
 void setPQSName(java.lang.String pqs)
          Sets the name of the file in which the quality scores will be written
 void setPqsPlot(boolean pqsPlot)
          Sets the pqs-plot variable
 void setPreOut(java.util.List<java.lang.String> lab)
          Sets the column labels for pre-existing RNA that will be written into the output
 void setSpotid(java.lang.String spot)
          Sets the name of the column with probe-set-ids
 void setTotOut(java.util.List<java.lang.String> lab)
          Sets the column labels for total RNA that will be written into the output
 void setTurnReverseMapOff(boolean turnReverseMapOff)
          Should be set true for present calls
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

THRESHOLD

public static final java.lang.String THRESHOLD
See Also:
Constant Field Values

PRESENT

public static final java.lang.String PRESENT
See Also:
Constant Field Values

PQSMIN

public static final java.lang.String PQSMIN
See Also:
Constant Field Values

PQS

public static final java.lang.String PQS
See Also:
Constant Field Values
Constructor Detail

GuiFilterData

public GuiFilterData()
Constructor creating an object of GuiFilterData

Method Detail

loadData

public void loadData()
Creates a Data object from previously set variables


prepareData

public void prepareData()
Filters a previously loaded Data object according to the set methods


evaluateFasta

public void evaluateFasta(java.lang.String uraMeth,
                          java.lang.String printName,
                          java.util.HashMap<java.lang.String,java.lang.Double> corr,
                          boolean plot)
Starts the evaluation using the multiple fasta file


saveData

public void saveData()
Saves the Data object into a file


hasData

public boolean hasData()
Checks whether Data has been set

Returns:
TRUE if data is filled

hasNormalization

public boolean hasNormalization()
Checks whether normalization has been performed

Returns:
TRUE if normalization has been performed, FALSE otherwise

hasGenes

public boolean hasGenes()
Checks whether the multiple fasta file containing the sequences has been set and whether the attribute describing the gene names for each spot exists

Returns:
TRUE if gene names and sequences are set, FALSE otherwise

hasGeneNames

public boolean hasGeneNames()
Checks whether the attribute containing gene names for each spot has been set

Returns:
TRUE if there are gene names for the spots, FALSE otherwise

addAttr

public void addAttr(java.io.File file,
                    java.util.ArrayList<java.lang.String> labels)
Extracts a new attribute from a given file and adds it to the data

Parameters:
file - The file containing the attribute

addOriginalAttr

public void addOriginalAttr(java.util.ArrayList<java.lang.String> labels,
                            boolean calls)

addAttributesList

public void addAttributesList(java.util.ArrayList<Mapping<java.lang.String,java.lang.String>> list,
                              java.lang.String[] attrDescr)
Adds a list of attributes to the data, as well as the corresponding descriptors

Parameters:
list - A list of different attributes, each mapped to spots
attrDescr - A descriptor which holds the name of each attribute

addFasta

public void addFasta(java.io.File file,
                     int column)
Adds the necessary information for the multiple fasta file; its location and the column containing the gene name

Parameters:
file - The multiple fasta file containing sequences of the data
column - The 'column' of the fasta header which contains the gene name; columns are divided by '|'

addMethod

public void addMethod(java.lang.String method,
                      java.lang.String filterValue)
Adds a filtering method and a corresponding value, e.g. a threshold

Parameters:
method - The name of a filtering method
filterValue - The value used in this filtering method, e.g. a threshold

setAttributesOut

public void setAttributesOut(java.util.List<java.lang.String> attributesOut)
Sets the list of attributes for output

Parameters:
attributesOut - List of attributes for output

setOriginalAtts

public void setOriginalAtts(java.util.List<java.lang.String> originalAtts)
Sets the attributes from the data file

Parameters:
originalAtts - Attributes from the data file

setFile

public void setFile(java.io.File file)
Sets the file containing the initial data

Parameters:
file - The file containing the expression data

setAttributesInFile

public void setAttributesInFile(boolean attributesInFile)
Sets a variable that remembers if attributes were loaded from original file

Parameters:
attributesInFile - TRUE if attributes are contained in data file

setPqsPlot

public void setPqsPlot(boolean pqsPlot)
Sets the pqs-plot variable

Parameters:
pqsPlot - TRUE if pqs should be plotted, FALSE otherwise

setTurnReverseMapOff

public void setTurnReverseMapOff(boolean turnReverseMapOff)
Should be set true for present calls

Parameters:
turnReverseMapOff - TRUE for present calls

setLog

public void setLog(boolean log)
Sets the scale; true for log scale, false for linear

Parameters:
log - TRUE for log scale, false for linear scale

setGenename

public void setGenename(java.lang.String genename)
Sets the name of the gene name attribute

Parameters:
genename - The name of the gene name attribute in the data

setSpotid

public void setSpotid(java.lang.String spot)
Sets the name of the column with probe-set-ids

Parameters:
spot - The name of the column with spot-ids

setLabelsNew

public void setLabelsNew(java.util.List<java.lang.String> lab)
Sets the column labels for newly transcribed RNA that will be read in

Parameters:
lab - The list of column labels for newly transcribed RNA

setLabelsPre

public void setLabelsPre(java.util.List<java.lang.String> lab)
Sets the column labels for pre-existing RNA that will be read in

Parameters:
lab - The list of column labels for pre-existing RNA

setLabelsTot

public void setLabelsTot(java.util.List<java.lang.String> lab)
Sets the column labels for total RNA that will be read in

Parameters:
lab - The list of column labels for total RNA

setNewOut

public void setNewOut(java.util.List<java.lang.String> lab)
Sets the column labels for newly transcribed RNA that will be written into the output

Parameters:
lab - The list of column labels for newly transcribed RNA

setPreOut

public void setPreOut(java.util.List<java.lang.String> lab)
Sets the column labels for pre-existing RNA that will be written into the output

Parameters:
lab - The list of column labels for pre-existing RNA

setTotOut

public void setTotOut(java.util.List<java.lang.String> lab)
Sets the column labels for total RNA that will be written into the output

Parameters:
lab - The list of column labels for total RNA

setAttributes

public void setAttributes(java.util.List<java.lang.String> attributes)
Sets the list of attributes corresponding to the data

Parameters:
attributes - The list of attributes

setMethods

public void setMethods(java.util.List<java.lang.String> methods)
Sets the list of filtering methods

Parameters:
methods - The list of filtering methods

setFasta

public void setFasta(java.lang.String fasta,
                     int column)
Sets the file containing the sequences for the data, as well as the column defining where the gene name is found in the header of each sequence

Parameters:
fasta - The name of the multiple fasta file containing sequences corresponding to the data
column - The 'column' of the fasta header which keeps the gene name; columns are separated by '|'

setOutput

public void setOutput(java.io.File outputFile)
Sets the file in which the filtered data will be written

Parameters:
outputFile - The file which will hold the filtered data

setFirst

public void setFirst(boolean first)
Sets status if data is loaded for the first time

Parameters:
first - TRUE if data is loaded for the first time

setNorm

public void setNorm(Normalization norm)
Sets the normalization object needed for evaluation

Parameters:
norm - The normalization object needed for evaluation

setCombined

public void setCombined(boolean combined)
Defines whether single or combined filtering should be performed

Parameters:
combined - TRUE if all filtering steps should be performed together

setPQSName

public void setPQSName(java.lang.String pqs)
Sets the name of the file in which the quality scores will be written

Parameters:
pqs - The name of the file holding the quality scores

getData

public Data getData()
Returns the complete Data object

Returns:
The complete Data object

getSpotid

public java.lang.String getSpotid()
Returns the name of the column with spotIDs

Returns:
The name of the column with spotIDs

isCalls

public boolean isCalls()
Returns status of attributes in original file: present calls?

Returns:
TRUE if attributes in original file are present calls

isLog

public boolean isLog()
Returns scale of data (log or linear)

Returns:
TRUE if data is in log scale

getOriginalAtts

public java.util.List<java.lang.String> getOriginalAtts()
Returns the attributes from the datafile

Returns:
Attributes from the datafile

getGenename

public java.lang.String getGenename()
Returns the name of the column with gene names

Returns:
The name of the column with gene names

getOriginalGene

public java.lang.String getOriginalGene()
Returns the original name of the gene attribute

Returns:
originalGene The original name of the gene attribute

getFasta

public java.io.File getFasta()
Returns the file containing the sequences for the data

Returns:
The multiple fasta file for the data

getColumn

public int getColumn()
Returns the column of the fasta header that keeps the gene name

Returns:
The column of the gene name in the fasta header

getSize

public int getSize()
Returns the size of the data after the performed filtering steps

Returns:
The number of experiments contained in the data

getMethods

public java.util.List<java.lang.String> getMethods()
Returns the list of filtering methods

Returns:
The list of filtering methods

getAttrDescr

public java.lang.String[] getAttrDescr()
Returns the descriptors for the attribute list

Returns:
The descriptors for the attribute list

getAttributesList

public java.util.ArrayList<Mapping<java.lang.String,java.lang.String>> getAttributesList()
Returns the list of attributes for the data

Returns:
The list of attributes

getAvgU

public double getAvgU()
Returns the average number of uracils

Returns:
The average number of uracils

getAvgL

public double getAvgL()
Returns the average log(e'/n')

Returns:
The average log(e'/n')

getPlotName

public java.lang.String getPlotName()
Returns the name of the file containing the plotting information for evaluation

Returns:
The name of the plotting file for evaluation