fr.umlv.gramofone.commons
Class Parameters

java.lang.Object
  extended by fr.umlv.gramofone.commons.Parameters
All Implemented Interfaces:
java.io.Serializable

public class Parameters
extends java.lang.Object
implements java.io.Serializable

Singleton to manage with parameters of the programms (nb insertions, ..)

Author:
fsikora
See Also:
Serialized Form

Method Summary
static Parameters deserialize()
          Deserialization of the parameters (loading)
 int getDelPenalty()
          get the cost of a deletion
 java.lang.String getFastaFileDirectory()
          get the directory for fasta files
 java.lang.String getHomeGramoDirectory()
           
 double getHomologieThreshold()
          get the homology threshold value for blast
 int getInsPenalty()
          get the cost of an insertion
static Parameters getInstance()
          get the singleton instance of parameters
 double getLogEValue()
          get the value of log(eValue) when eValue is 0
 int getNDel()
          Get the number of allowed deletions
 java.lang.String getNetworkFastaFile()
          return the potential path to the fasta file for the network
 int getNIns()
          Get the number of allowed insertions
 java.lang.String getPathBlast()
          get the path of the blast bin directory
 java.lang.String getPatternFastaFile()
          return the potential path to the fasta file for the pattern
 java.lang.String getPluginName()
          get the plugin name
 int getTimeOut()
          get the timeout in seconds for the LPB solver
 java.lang.String getTmpDirectory()
           
 java.lang.String getVersion()
          return the version of the plugin
 void interrupt(boolean value)
          put the interrupt signal
 boolean isChooseFastaAsPattern()
          if the pattern is determined by the fasta file or not
 boolean isChooseNetworkFastaFile()
          if there is a path for the fasta file for the network or not
 boolean isChoosePatternFastaFile()
          if there is a path for the fasta file for the pattern or not
 boolean isInterrupted()
          check if plugin has to be interrupted
 boolean isModeBatch()
          check if the plugin is in mode batch or not
 boolean isMultiSetHomologsPattern()
          check if the pattern is as a multiset (same color for homologous proteins)
 boolean isOnlyFirstSolution()
          check if only the first solution as to be returned
 void serialize()
          Serialization of the parameters
 void setChooseNetworkFastaFile(boolean b)
          set if there is a path for the fasta file for the network or not
 void setChoosePatternFastaFile(boolean chooseFastaFile)
          set if there is a path for the fasta file for the pattern or not
 void setDefault()
          set default values for options
 void setDelPenalty(int delPenalty)
          set the cost of a deletion
 void setFastaAsPattern(boolean b)
          set if the pattern is determined by the fasta file or not
 void setHomologieThreshold(double homologieThreshold)
          set the homology threshold value for blast
 void setInsPenalty(int insPenalty)
          set the cost of an insertion
 void setLogEValue(double logEValue)
          set the value of log(eValue) when eValue is 0
 void setModeBatch(boolean b)
          set the mode batch
 void setMultiSetHomologsPattern(boolean b)
          set the pattern as multiset (same color for homologous proteins)
 void setNDel(int del)
          set the number of allowed deletions
 void setNetworkFastaFile(java.lang.String fastaNetworkFile)
          set the path of fasta file for the network
 void setNIns(int ins)
          set the number of allowed insertions
 void setOnlyFirstSolution(boolean onlyFirstSolution)
          set the only first solution or not
 void setPathBlast(java.lang.String pathBlast)
          set the path of the blast bin directory
 void setPatternFastaFile(java.lang.String patternFastaFile)
          set the path of fasta file for the pattern
 void setTimeOut(int timeOut)
          set the timeout in seconds for the LPB solver
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static Parameters getInstance()
get the singleton instance of parameters

Returns:
the class

setDefault

public void setDefault()
set default values for options


getNDel

public int getNDel()
Get the number of allowed deletions

Returns:

setNDel

public void setNDel(int del)
set the number of allowed deletions

Parameters:
del -

getNIns

public int getNIns()
Get the number of allowed insertions

Returns:

setNIns

public void setNIns(int ins)
set the number of allowed insertions

Parameters:
ins -

getTimeOut

public int getTimeOut()
get the timeout in seconds for the LPB solver

Returns:

setTimeOut

public void setTimeOut(int timeOut)
set the timeout in seconds for the LPB solver

Parameters:
timeOut -

isChooseNetworkFastaFile

public boolean isChooseNetworkFastaFile()
if there is a path for the fasta file for the network or not

Returns:

setChooseNetworkFastaFile

public void setChooseNetworkFastaFile(boolean b)
set if there is a path for the fasta file for the network or not

Parameters:
b -

isChoosePatternFastaFile

public boolean isChoosePatternFastaFile()
if there is a path for the fasta file for the pattern or not

Returns:

setChoosePatternFastaFile

public void setChoosePatternFastaFile(boolean chooseFastaFile)
set if there is a path for the fasta file for the pattern or not

Parameters:
chooseFastaFile -

isChooseFastaAsPattern

public boolean isChooseFastaAsPattern()
if the pattern is determined by the fasta file or not

Returns:

setFastaAsPattern

public void setFastaAsPattern(boolean b)
set if the pattern is determined by the fasta file or not

Parameters:
b -

setDelPenalty

public void setDelPenalty(int delPenalty)
set the cost of a deletion

Parameters:
delPenalty -

getDelPenalty

public int getDelPenalty()
get the cost of a deletion

Returns:

setInsPenalty

public void setInsPenalty(int insPenalty)
set the cost of an insertion

Parameters:
insPenalty -

getInsPenalty

public int getInsPenalty()
get the cost of an insertion

Returns:

getPathBlast

public java.lang.String getPathBlast()
get the path of the blast bin directory

Returns:

setPathBlast

public void setPathBlast(java.lang.String pathBlast)
set the path of the blast bin directory

Parameters:
pathBlast -

getPatternFastaFile

public java.lang.String getPatternFastaFile()
return the potential path to the fasta file for the pattern

Returns:
the path, or null if no path specified

setPatternFastaFile

public void setPatternFastaFile(java.lang.String patternFastaFile)
set the path of fasta file for the pattern

Parameters:
patternFastaFile -

getNetworkFastaFile

public java.lang.String getNetworkFastaFile()
return the potential path to the fasta file for the network

Returns:
the path, or null if no path specified

setNetworkFastaFile

public void setNetworkFastaFile(java.lang.String fastaNetworkFile)
set the path of fasta file for the network

Parameters:
patternFastaFile -

getHomologieThreshold

public double getHomologieThreshold()
get the homology threshold value for blast


setHomologieThreshold

public void setHomologieThreshold(double homologieThreshold)
set the homology threshold value for blast

Parameters:
homologieThreshold -

getLogEValue

public double getLogEValue()
get the value of log(eValue) when eValue is 0

Returns:

setLogEValue

public void setLogEValue(double logEValue)
set the value of log(eValue) when eValue is 0

Parameters:
logEValue -

isInterrupted

public boolean isInterrupted()
check if plugin has to be interrupted

Returns:

interrupt

public void interrupt(boolean value)
put the interrupt signal


isModeBatch

public boolean isModeBatch()
check if the plugin is in mode batch or not

Returns:

setModeBatch

public void setModeBatch(boolean b)
set the mode batch

Parameters:
b -

setMultiSetHomologsPattern

public void setMultiSetHomologsPattern(boolean b)
set the pattern as multiset (same color for homologous proteins)

Parameters:
b -

isMultiSetHomologsPattern

public boolean isMultiSetHomologsPattern()
check if the pattern is as a multiset (same color for homologous proteins)

Returns:

getPluginName

public java.lang.String getPluginName()
get the plugin name

Returns:

getVersion

public java.lang.String getVersion()
return the version of the plugin

Returns:

getFastaFileDirectory

public java.lang.String getFastaFileDirectory()
get the directory for fasta files

Returns:

getTmpDirectory

public java.lang.String getTmpDirectory()

getHomeGramoDirectory

public java.lang.String getHomeGramoDirectory()

isOnlyFirstSolution

public boolean isOnlyFirstSolution()
check if only the first solution as to be returned

Returns:

setOnlyFirstSolution

public void setOnlyFirstSolution(boolean onlyFirstSolution)
set the only first solution or not

Parameters:
onlyFirstSolution -

serialize

public void serialize()
Serialization of the parameters


deserialize

public static Parameters deserialize()
Deserialization of the parameters (loading)

Returns:
the parameters