halo.userinterface.gui.session
Class Session

java.lang.Object
  extended by halo.userinterface.gui.session.Session

public class Session
extends java.lang.Object

Contains all information of a current session, as well as methods for saving and loading

Author:
Stefanie Kaufmann

Field Summary
static java.lang.String ALPHACELLDIV
           
static java.lang.String ALPHACONSTANT
           
 
Constructor Summary
Session()
          Constructs a new session with a default file name
Session(java.io.File file)
          Constructs a new session
 
Method Summary
 java.io.File downloadFile(java.io.File output, java.lang.String address)
          Downloads a file from a given address
 java.lang.String getAlpha()
          Returns the name of the used alpha function
 java.lang.String[] getAttrDescr()
          Returns the names of the attributes for the data
 java.util.List<java.lang.String> getAttributeFiles()
          Returns the list of attribute file names
 java.util.ArrayList<java.util.ArrayList<java.lang.String>> getAttributeLabels()
          Returns the list of attribute label names
 java.util.ArrayList<java.lang.String> getAttributes()
          Returns the list of all attributes
 double getCcl()
          Returns the value of the parameter ccl
 java.util.List<java.lang.String> getColumnsNew()
          Returns the list of column labels for newly transcribed RNA, only the extracted ones
 java.util.List<java.lang.String> getColumnsPre()
          Returns the list of column labels for pre-existing RNA, only the extracted ones
 java.util.List<java.lang.String> getColumnsTotal()
          Returns the list of column labels for total RNA, only the extracted ones
 Data getData()
          Returns the data object
 java.io.File getDataFile()
          Returns the file from which the data was extracted
 java.util.List<java.lang.String> getDataMethods()
          Returns the list of filtering methods
 java.lang.StringBuffer getDisplay()
          Returns the description of half-life calculation methods and time points
 java.lang.String getGeneLabel()
          Returns the saved gene label
 GuiFilterData getGuiData()
          Returns the interface connecting GUI and filtering of the data
 GuiHalfLife getGuiHL()
          Returns the interface connecting GUI and half-life calculation
 GuiNormal getGuiNorm()
          Returns the interface connecting GUI and linear regression
 java.util.List<java.lang.String> getHlMethods()
          Returns the list of methods used for half-life calculation
 double getLabelingTime()
          Returns the labeling time
 java.util.ArrayList<java.lang.String> getLabels()
          Returns all the labels available in the data file
 java.lang.String getNormMethod()
          Returns the name of the normalization method
 java.util.List<java.lang.String> getOriginalLabelsCalls()
          Returns the list of attributes from the original file (present calls)
 java.util.List<java.lang.String> getOriginalLabelsOther()
          Returns the list of attributes from the original file (no present calls)
 java.lang.String getPathR()
          Returns the path to R
 int getPosX()
          Returns x position of the window
 int getPosY()
          Returns y position of the window
 int getRatioMethod()
          Returns the ratio calculation method
 int getReplicate()
          Returns the constant replicate
 java.util.List<java.lang.Integer> getReplicates()
          Returns the replicate number used for calculation
 java.util.List<java.lang.Double> getTimes()
          Returns the list of time points used for half-life calculation
 boolean isCalls()
          Returns status of attributes from original file: present calls?
 boolean isCheckAbs()
          Returns information on the checked status of the checkbox for the filtering method 'absence'
 boolean isCheckFilt()
          Returns information on the checked status of the checkbox for filtering
 boolean isCheckHL()
          Returns information on the checked status of the checkbox for half-life calculation
 boolean isCheckNorm()
          Returns information on the checked status of the checkbox for normalization
 boolean isCheckPQS()
          Returns information on the checked status of the checkbox for the filtering method 'pqs'
 boolean isCheckPQSMin()
          Returns information on the checked status of the checkbox for the filtering method 'pqs min'
 boolean isCheckThresh()
          Returns information on the checked status of the checkbox for the filtering method 'threshold'
 boolean isMaxim()
          Returns maximized status
 boolean isPlotQuality()
          Returns status of quality plotting
 boolean load(java.io.File sessFile)
          Loads a session from a given file
 void setAlpha(java.lang.String alpha)
          Sets the name of the used alpha function
 void setAttrDescr(java.lang.String[] attrDescr)
          Sets the descriptor for the attributes
 void setAttributeFiles(java.util.List<java.lang.String> attributeFiles)
          Sets the list of attribute files
 void setAttributeLabels(java.util.ArrayList<java.util.ArrayList<java.lang.String>> attributeLabels)
           
 void setAttributes(java.util.ArrayList<java.lang.String> attributes)
          Sets the list of attribute labels
 void setCalls(boolean calls)
          Sets status of attributes from original file
 void setCcl(double ccl)
          Sets the value of the parameter ccl
 void setCheckAbs(boolean checkAbs)
          Sets the value holding information on the checked status of the filtering method 'absence'
 void setCheckFilt(boolean checkFilt)
          Sets the value holding information on the checked status of the checkbox that expands the filtering menu
 void setCheckHL(boolean checkHL)
          Sets the value holding information on the checked status of the checkbox that expands the half-life calculation
 void setCheckNorm(boolean checkNorm)
          Sets the value holding information on the checked status of the checkbox that expands the linear regression
 void setCheckPQS(boolean checkPQS)
          Sets the value holding information on the checked status of the filtering method 'pqs'
 void setCheckPQSMin(boolean checkPQSMin)
          Sets the value holding information on the checked status of the filtering method 'pqs min'
 void setCheckThresh(boolean checkThresh)
          Sets the value holding information on the checked status of the filtering method 'threshold'
 void setColumn(int column)
          Sets the column of the multiple fasta file header which holds the gene name
 void setColumnsNew(java.util.List<java.lang.String> columnsNew)
          Sets the list of column labels for newly transcribed RNA, only those that are extracted
 void setColumnsPre(java.util.List<java.lang.String> columnsPre)
          Sets the list of column labels for pre-existing RNA, only those that are extracted
 void setColumnsTotal(java.util.List<java.lang.String> columnsTotal)
          Sets the list of column labels for total RNA, only those that are extracted
 void setData(Data data)
          Sets the data object needed for normalization
 void setDataFile(java.io.File dataFile)
          Sets the file containing the data
 void setDataMethods(java.util.List<java.lang.String> dataMethods)
          Sets the list of filtering methods
 void setDisplay(java.lang.StringBuffer display)
          Sets the description of all used half-life calculation methods
 void setFasta(java.io.File file)
          Sets the file which contains the sequences for the data
 void setFile(java.io.File file)
          Sets the file into which the session will be saved
 void setGeneLabel(java.lang.String geneLabel)
          Sets the gene name label
 void setGuiData(GuiFilterData guiData)
          Sets the interface between GUI and data handling
 void setGuiHL(GuiHalfLife guiHL)
          Sets the interface between GUI and half-life calculation
 void setGuiNorm(GuiNormal guiNorm)
          Sets the interface between GUI and normalization
 void setHlMethods(java.util.List<java.lang.String> hlMethods)
          Sets the list of descriptions of half-life calculation methods
 void setLabelingTime(double labelingTime)
          Sets the constant labeling time
 void setLabels(java.util.ArrayList<java.lang.String> labels)
          Sets the list of all labels from the data file
 void setLog(boolean log)
          Sets scale of data (log or linear)
 void setMaxim(int m)
          Sets the attribute containing information if the window is maximized or not
 void setNormMethod(java.lang.String normMethod)
          Sets the list of methods for normalization
 void setOriginalLabelsCalls(java.util.List<java.lang.String> originalLabels)
          Sets the list of attributes from the original file (present calls)
 void setOriginalLabelsOther(java.util.List<java.lang.String> originalLabels)
          Sets the list of attributes from the original file (no present calls)
 void setPathR(java.lang.String pathR)
          Sets the constant path to R
 void setPlotQuality(boolean plotQuality)
          Sets status of quality plotting
 void setPosX(int x)
          Sets the x position of the window
 void setPosY(int y)
          Sets the y position of the window
 void setRatioMethod(int ratioMethod)
          Sets the ratio calculation method
 void setReplicate(int replicate)
          Sets a constant replicate
 void setReplicates(java.util.List<java.lang.Integer> replicate)
          Sets the (column) number of the used replicate
 void setTimes(java.util.List<java.lang.Double> times)
          Sets the list of time points for half-life calculation
 void store()
          Stores the session in the previously defined file
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALPHACONSTANT

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

ALPHACELLDIV

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

Session

public Session(java.io.File file)
Constructs a new session

Parameters:
file - The file into which the session will be saved

Session

public Session()
Constructs a new session with a default file name

Method Detail

store

public void store()
Stores the session in the previously defined file


load

public boolean load(java.io.File sessFile)
Loads a session from a given file

Parameters:
sessFile - File containing session information
Returns:
TRUE if the sessions file has been loaded successfully

downloadFile

public java.io.File downloadFile(java.io.File output,
                                 java.lang.String address)
Downloads a file from a given address

Parameters:
output - The output file
address - The URL address
Returns:
The downloaded file

setAlpha

public void setAlpha(java.lang.String alpha)
Sets the name of the used alpha function

Parameters:
alpha - The name of the used alpha function

setCcl

public void setCcl(double ccl)
Sets the value of the parameter ccl

Parameters:
ccl - The parameter ccl

setAttrDescr

public void setAttrDescr(java.lang.String[] attrDescr)
Sets the descriptor for the attributes

Parameters:
attrDescr - The list of names of the attributes of the data

setReplicates

public void setReplicates(java.util.List<java.lang.Integer> replicate)
Sets the (column) number of the used replicate

Parameters:
replicate - Number of the replicate used for calculation

setAttributes

public void setAttributes(java.util.ArrayList<java.lang.String> attributes)
Sets the list of attribute labels

Parameters:
attributes - The list of attributes

setOriginalLabelsCalls

public void setOriginalLabelsCalls(java.util.List<java.lang.String> originalLabels)
Sets the list of attributes from the original file (present calls)

Parameters:
originalLabels - List of attributes from original file

setOriginalLabelsOther

public void setOriginalLabelsOther(java.util.List<java.lang.String> originalLabels)
Sets the list of attributes from the original file (no present calls)

Parameters:
originalLabels - List of attributes from original file

setAttributeFiles

public void setAttributeFiles(java.util.List<java.lang.String> attributeFiles)
Sets the list of attribute files

Parameters:
attributeFiles - The list of attribute files

setAttributeLabels

public void setAttributeLabels(java.util.ArrayList<java.util.ArrayList<java.lang.String>> attributeLabels)

setCheckAbs

public void setCheckAbs(boolean checkAbs)
Sets the value holding information on the checked status of the filtering method 'absence'

Parameters:
checkAbs - True, if filtering method 'absence' is checked

setCheckFilt

public void setCheckFilt(boolean checkFilt)
Sets the value holding information on the checked status of the checkbox that expands the filtering menu

Parameters:
checkFilt - True, if filtering is checked

setCheckHL

public void setCheckHL(boolean checkHL)
Sets the value holding information on the checked status of the checkbox that expands the half-life calculation

Parameters:
checkHL - True, if half-life is checked

setCheckNorm

public void setCheckNorm(boolean checkNorm)
Sets the value holding information on the checked status of the checkbox that expands the linear regression

Parameters:
checkNorm - True, if normalization is checked

setPlotQuality

public void setPlotQuality(boolean plotQuality)
Sets status of quality plotting

Parameters:
plotQuality - TRUE if quality plot has been performed

setCheckPQS

public void setCheckPQS(boolean checkPQS)
Sets the value holding information on the checked status of the filtering method 'pqs'

Parameters:
checkPQS - True, if filtering method 'pqs' is checked

setCheckPQSMin

public void setCheckPQSMin(boolean checkPQSMin)
Sets the value holding information on the checked status of the filtering method 'pqs min'

Parameters:
checkPQSMin - True, if filtering method 'pqs min' is checked

setCheckThresh

public void setCheckThresh(boolean checkThresh)
Sets the value holding information on the checked status of the filtering method 'threshold'

Parameters:
checkThresh - True, if filtering method 'threshold' is checked

setPosX

public void setPosX(int x)
Sets the x position of the window

Parameters:
x - The x position of the window

setPosY

public void setPosY(int y)
Sets the y position of the window

Parameters:
y - The y position of the window

setRatioMethod

public void setRatioMethod(int ratioMethod)
Sets the ratio calculation method

Parameters:
ratioMethod - The ratio calculation method

setMaxim

public void setMaxim(int m)
Sets the attribute containing information if the window is maximized or not

Parameters:
m - True if the window is maximized

setColumnsNew

public void setColumnsNew(java.util.List<java.lang.String> columnsNew)
Sets the list of column labels for newly transcribed RNA, only those that are extracted

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

setColumnsPre

public void setColumnsPre(java.util.List<java.lang.String> columnsPre)
Sets the list of column labels for pre-existing RNA, only those that are extracted

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

setColumnsTotal

public void setColumnsTotal(java.util.List<java.lang.String> columnsTotal)
Sets the list of column labels for total RNA, only those that are extracted

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

setNormMethod

public void setNormMethod(java.lang.String normMethod)
Sets the list of methods for normalization

Parameters:
normMethod - The list of methods for normalization

setData

public void setData(Data data)
Sets the data object needed for normalization

Parameters:
data - The data object needed for normalization

setDataFile

public void setDataFile(java.io.File dataFile)
Sets the file containing the data

Parameters:
dataFile - The file containing the data

setDisplay

public void setDisplay(java.lang.StringBuffer display)
Sets the description of all used half-life calculation methods

Parameters:
display - The description of all half-life calculation methods and time points

setGuiData

public void setGuiData(GuiFilterData guiData)
Sets the interface between GUI and data handling

Parameters:
guiData - The GuiFilterData object connecting GUI and data handling

setGuiHL

public void setGuiHL(GuiHalfLife guiHL)
Sets the interface between GUI and half-life calculation

Parameters:
guiHL - The GuiHalfLife object connecting GUI and half-life calculation

setGuiNorm

public void setGuiNorm(GuiNormal guiNorm)
Sets the interface between GUI and normalization

Parameters:
guiNorm - The GuiLinReg object connecting GUI and normalization

setLabels

public void setLabels(java.util.ArrayList<java.lang.String> labels)
Sets the list of all labels from the data file

Parameters:
labels - The list of labels from the data file

setHlMethods

public void setHlMethods(java.util.List<java.lang.String> hlMethods)
Sets the list of descriptions of half-life calculation methods

Parameters:
hlMethods - The list of description of half-life methods

setTimes

public void setTimes(java.util.List<java.lang.Double> times)
Sets the list of time points for half-life calculation

Parameters:
times - The list of time points for half-life calculation

setFile

public void setFile(java.io.File file)
Sets the file into which the session will be saved

Parameters:
file - The file into which the session will be saved

setLabelingTime

public void setLabelingTime(double labelingTime)
Sets the constant labeling time

Parameters:
labelingTime - A constant labeling time

setPathR

public void setPathR(java.lang.String pathR)
Sets the constant path to R

Parameters:
pathR - The path to the R bin folder

setReplicate

public void setReplicate(int replicate)
Sets a constant replicate

Parameters:
replicate - The constant replicate

setFasta

public void setFasta(java.io.File file)
Sets the file which contains the sequences for the data

Parameters:
file - The multiple fasta file for the data

setGeneLabel

public void setGeneLabel(java.lang.String geneLabel)
Sets the gene name label

Parameters:
geneLabel - The gene name label

setColumn

public void setColumn(int column)
Sets the column of the multiple fasta file header which holds the gene name

Parameters:
column - The column which holds the gene name

setCalls

public void setCalls(boolean calls)
Sets status of attributes from original file

Parameters:
calls - TRUE if attributes from original file are present calls

setDataMethods

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

Parameters:
dataMethods - The list of filtering methods

setLog

public void setLog(boolean log)
Sets scale of data (log or linear)

Parameters:
log - TRUE if data is in log scale

getAlpha

public java.lang.String getAlpha()
Returns the name of the used alpha function

Returns:
The name of the used alpha function

getCcl

public double getCcl()
Returns the value of the parameter ccl

Returns:
The parameter ccl

getReplicates

public java.util.List<java.lang.Integer> getReplicates()
Returns the replicate number used for calculation

Returns:
The replicate number used

getOriginalLabelsCalls

public java.util.List<java.lang.String> getOriginalLabelsCalls()
Returns the list of attributes from the original file (present calls)

Returns:
The list of attributes from the original file

getOriginalLabelsOther

public java.util.List<java.lang.String> getOriginalLabelsOther()
Returns the list of attributes from the original file (no present calls)

Returns:
The list of attributes from the original file

getLabelingTime

public double getLabelingTime()
Returns the labeling time

Returns:
The labeling time

getPathR

public java.lang.String getPathR()
Returns the path to R

Returns:
The path to R

getReplicate

public int getReplicate()
Returns the constant replicate

Returns:
The constant replicate

getColumnsNew

public java.util.List<java.lang.String> getColumnsNew()
Returns the list of column labels for newly transcribed RNA, only the extracted ones

Returns:
The list of column labels for newly transcribed RNA

getColumnsPre

public java.util.List<java.lang.String> getColumnsPre()
Returns the list of column labels for pre-existing RNA, only the extracted ones

Returns:
The list of column labels for pre-existing RNA

getColumnsTotal

public java.util.List<java.lang.String> getColumnsTotal()
Returns the list of column labels for total RNA, only the extracted ones

Returns:
The list of column labels for total RNA

getData

public Data getData()
Returns the data object

Returns:
The data object

getDataFile

public java.io.File getDataFile()
Returns the file from which the data was extracted

Returns:
The file containing the expression data

getDataMethods

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

Returns:
The list of filtering methods

getDisplay

public java.lang.StringBuffer getDisplay()
Returns the description of half-life calculation methods and time points

Returns:
The description of half-life calculation

getGuiData

public GuiFilterData getGuiData()
Returns the interface connecting GUI and filtering of the data

Returns:
The GuiFilterData object

getGuiHL

public GuiHalfLife getGuiHL()
Returns the interface connecting GUI and half-life calculation

Returns:
The GuiHalfLife object

getGuiNorm

public GuiNormal getGuiNorm()
Returns the interface connecting GUI and linear regression

Returns:
The GuiNormal object

getHlMethods

public java.util.List<java.lang.String> getHlMethods()
Returns the list of methods used for half-life calculation

Returns:
The list of half-life calculation methods

getLabels

public java.util.ArrayList<java.lang.String> getLabels()
Returns all the labels available in the data file

Returns:
All labels from the data file

getNormMethod

public java.lang.String getNormMethod()
Returns the name of the normalization method

Returns:
The name of the normalization method

getRatioMethod

public int getRatioMethod()
Returns the ratio calculation method

Returns:
The ratio calculation method

getTimes

public java.util.List<java.lang.Double> getTimes()
Returns the list of time points used for half-life calculation

Returns:
The list of time points for half-life calculation

getAttrDescr

public java.lang.String[] getAttrDescr()
Returns the names of the attributes for the data

Returns:
The names of the data attributes

getAttributes

public java.util.ArrayList<java.lang.String> getAttributes()
Returns the list of all attributes

Returns:
The list of all attributes

getAttributeFiles

public java.util.List<java.lang.String> getAttributeFiles()
Returns the list of attribute file names

Returns:
The list of attribute file names

getGeneLabel

public java.lang.String getGeneLabel()
Returns the saved gene label

Returns:
Gene name label

getAttributeLabels

public java.util.ArrayList<java.util.ArrayList<java.lang.String>> getAttributeLabels()
Returns the list of attribute label names

Returns:
The list of attribute label names

isCalls

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

Returns:
TRUE if attributes from original file are present calls

isCheckAbs

public boolean isCheckAbs()
Returns information on the checked status of the checkbox for the filtering method 'absence'

Returns:
True, if 'absence' was checked

isCheckHL

public boolean isCheckHL()
Returns information on the checked status of the checkbox for half-life calculation

Returns:
True, if half-life menu was expanded

isCheckFilt

public boolean isCheckFilt()
Returns information on the checked status of the checkbox for filtering

Returns:
True, if filtering menu was expanded

isCheckNorm

public boolean isCheckNorm()
Returns information on the checked status of the checkbox for normalization

Returns:
True, if normalization menu was expanded

isCheckPQS

public boolean isCheckPQS()
Returns information on the checked status of the checkbox for the filtering method 'pqs'

Returns:
True, if 'pqs' was checked

isCheckPQSMin

public boolean isCheckPQSMin()
Returns information on the checked status of the checkbox for the filtering method 'pqs min'

Returns:
True, if 'pqs min' was checked

isCheckThresh

public boolean isCheckThresh()
Returns information on the checked status of the checkbox for the filtering method 'threshold'

Returns:
True, if 'threshold' was checked

getPosX

public int getPosX()
Returns x position of the window

Returns:
X position of the window

getPosY

public int getPosY()
Returns y position of the window

Returns:
Y position of the window

isMaxim

public boolean isMaxim()
Returns maximized status

Returns:
True, if window was maximized

isPlotQuality

public boolean isPlotQuality()
Returns status of quality plotting

Returns:
TRUE if quality should be plotted