userinterface.gui
Class GuiFilterData

java.lang.Object
  extended by 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)
          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 evaluateFasta()
          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.util.List<java.lang.String> getMethods()
          Returns the list of filtering methods
 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
 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 hasLinReg()
           
 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 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 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 setLR(LinearRegression lr)
          Sets the linear regression object needed for evaluation
 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 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 setPreOut(java.util.List<java.lang.String> lab)
          Sets the column labels for pre-existing RNA that will be written into the output
 void setTotOut(java.util.List<java.lang.String> lab)
          Sets the column labels for total RNA that will be written into the output
 
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()
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

hasLinReg

public boolean hasLinReg()

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)
Extracts a new attribute from a given file and adds it to the data

Parameters:
file - The file containing the attribute

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

setFile

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

Parameters:
file - The file containing the expression data

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

setLR

public void setLR(LinearRegression lr)
Sets the linear regression object needed for evaluation

Parameters:
lr - The linear regression object needed for evaluation

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

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