apollo.analysis
Class SeqAnalysisBase

java.lang.Object
  extended by org.bdgp.io.AbstractDataAdapter
      extended by apollo.analysis.SeqAnalysisBase
All Implemented Interfaces:
AnalysisDataAdapterI, SeqAnalysisI, org.bdgp.io.DataAdapter, org.bdgp.io.VisualDataAdapter
Direct Known Subclasses:
SeqAnalysisLocal, SeqAnalysisRemote

public abstract class SeqAnalysisBase
extends org.bdgp.io.AbstractDataAdapter
implements SeqAnalysisI, AnalysisDataAdapterI


Field Summary
protected  CurationSet curationSet
           
protected  java.util.Hashtable rawResults
           
protected  SequenceI sequence
           
 
Fields inherited from class org.bdgp.io.AbstractDataAdapter
listeners
 
Fields inherited from interface apollo.analysis.AnalysisDataAdapterI
OP_ANALYZE_DATA
 
Constructor Summary
SeqAnalysisBase()
           
SeqAnalysisBase(java.util.Hashtable ht)
          initialize with a properties hash
 
Method Summary
 void addProperty(java.lang.String name, java.lang.String value)
          set the value of a property
 java.util.Vector getAllowedProperties()
          all the known property names (in the order they should be shown in a GUI)
 java.util.Vector getAllowedValues(java.lang.String name)
          allowed/recommended Vector of values for a property
 java.lang.String getAllRawResults()
           
 CurationSet getCurationSet()
           
 java.lang.String getDesc()
           
 FeatureSet getFeatureSet()
           
 SequenceI getInputSequence()
          Retrieve the SequenceI that this analysis builds a CurationSet from
 int getInputSequenceCount()
          usually returns 1, but some programs (eg clustalw) require >1 input sequence
 java.util.Vector getInputSequences()
          Retrieve the SequenceI list that this builds a curation set from
 java.lang.String getName()
          Returns the name of this data adapter
 java.lang.String getProgramName()
           
protected  java.lang.String getProgramParams()
           
 java.util.Hashtable getProperties()
          all set properties (should this be public????)
 java.lang.String getProperty(java.lang.String name)
          get the value of a property
 java.lang.String getPropertyDescription(java.lang.String name)
          get the description of a property; this gives metadata to the GUI/front end
 java.lang.String getPropertyType(java.lang.String name)
          get the type of a property (optional).
 java.util.Hashtable getRawResultHashtable()
           
 java.util.Vector getRawResultVector()
          all the raw results - usually Vector of main output and error (if any) as Strings these Strings should *NOT* be parsed; it is up to the SeqAnalysisI implementation object to do any parsing and return the results as a CurationSet or similar object
 org.bdgp.io.IOOperation[] getSupportedOperations()
          Returns a list of all operations supported by this data adapter
 java.lang.String getType()
          Returns the type of data handled by this data adapter
 boolean hasResults()
          does the analysis have any results to read yet? note: an analysis implementation may choose to give results incrementally, so it need not be finished before returning results
 void init()
          For initialization, like opening files or database connections.
protected  void initSeqAnalysis()
           
 boolean isAsynchronous()
          is the analysis asynchronous? (ie will launching the analysis cause the program to block?)
 boolean isFinished()
          has the analysis finished?
 boolean isStarted()
          has the analysis been launched?
 boolean launch()
          Once you have configured the SeqAnalysis properties, call this method to run the analysis.
protected  void setAllowedProperties(java.util.Vector in)
           
protected  void setAllowedValues(java.util.Hashtable in)
           
protected  void setAllowedValues(java.lang.String name, java.util.Vector in)
           
 void setDesc(java.lang.String desc)
           
 void setInputSequence(SequenceI inseq)
           
 void setInputSequence(java.util.Vector sequences)
           
 void setName(java.lang.String name)
           
protected  void setPropertyDescription(java.lang.String name, java.lang.String desc)
           
protected  void setPropertyType(java.lang.String name, java.lang.String type)
           
protected  void setRawResultHashtable(java.util.Hashtable in)
           
 
Methods inherited from class org.bdgp.io.AbstractDataAdapter
addProgressListener, fireProgressEvent, removeProgressListener, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.bdgp.io.VisualDataAdapter
addProgressListener, fireProgressEvent, getUI, removeProgressListener
 

Field Detail

sequence

protected SequenceI sequence

curationSet

protected CurationSet curationSet

rawResults

protected java.util.Hashtable rawResults
Constructor Detail

SeqAnalysisBase

public SeqAnalysisBase()

SeqAnalysisBase

public SeqAnalysisBase(java.util.Hashtable ht)
initialize with a properties hash

Method Detail

init

public void init()
Description copied from interface: org.bdgp.io.DataAdapter
For initialization, like opening files or database connections.

Specified by:
init in interface org.bdgp.io.DataAdapter

initSeqAnalysis

protected void initSeqAnalysis()

getSupportedOperations

public org.bdgp.io.IOOperation[] getSupportedOperations()
Description copied from interface: org.bdgp.io.DataAdapter
Returns a list of all operations supported by this data adapter

Specified by:
getSupportedOperations in interface org.bdgp.io.DataAdapter

addProperty

public void addProperty(java.lang.String name,
                        java.lang.String value)
Description copied from interface: SeqAnalysisI
set the value of a property

Specified by:
addProperty in interface SeqAnalysisI

getProperty

public java.lang.String getProperty(java.lang.String name)
Description copied from interface: SeqAnalysisI
get the value of a property

Specified by:
getProperty in interface SeqAnalysisI

getProperties

public java.util.Hashtable getProperties()
Description copied from interface: SeqAnalysisI
all set properties (should this be public????)

Specified by:
getProperties in interface SeqAnalysisI

getAllowedProperties

public java.util.Vector getAllowedProperties()
Description copied from interface: SeqAnalysisI
all the known property names (in the order they should be shown in a GUI)

Specified by:
getAllowedProperties in interface SeqAnalysisI

setAllowedProperties

protected void setAllowedProperties(java.util.Vector in)

getPropertyDescription

public java.lang.String getPropertyDescription(java.lang.String name)
Description copied from interface: SeqAnalysisI
get the description of a property; this gives metadata to the GUI/front end

Specified by:
getPropertyDescription in interface SeqAnalysisI

setPropertyDescription

protected void setPropertyDescription(java.lang.String name,
                                      java.lang.String desc)

getPropertyType

public java.lang.String getPropertyType(java.lang.String name)
Description copied from interface: SeqAnalysisI
get the type of a property (optional). more metadata to help the GUI construct sensible interfaces

Specified by:
getPropertyType in interface SeqAnalysisI

setPropertyType

protected void setPropertyType(java.lang.String name,
                               java.lang.String type)

getAllowedValues

public java.util.Vector getAllowedValues(java.lang.String name)
Description copied from interface: SeqAnalysisI
allowed/recommended Vector of values for a property

Specified by:
getAllowedValues in interface SeqAnalysisI

setAllowedValues

protected void setAllowedValues(java.util.Hashtable in)

setAllowedValues

protected void setAllowedValues(java.lang.String name,
                                java.util.Vector in)

getName

public java.lang.String getName()
Description copied from interface: org.bdgp.io.DataAdapter
Returns the name of this data adapter

Specified by:
getName in interface SeqAnalysisI
Specified by:
getName in interface org.bdgp.io.DataAdapter
Returns:
the analysis name

getType

public java.lang.String getType()
Description copied from interface: org.bdgp.io.DataAdapter
Returns the type of data handled by this data adapter

Specified by:
getType in interface org.bdgp.io.DataAdapter

setName

public void setName(java.lang.String name)
Specified by:
setName in interface SeqAnalysisI

getDesc

public java.lang.String getDesc()
Specified by:
getDesc in interface SeqAnalysisI
Returns:
a human readable String

setDesc

public void setDesc(java.lang.String desc)
Specified by:
setDesc in interface SeqAnalysisI

getProgramName

public java.lang.String getProgramName()
Specified by:
getProgramName in interface SeqAnalysisI

getProgramParams

protected java.lang.String getProgramParams()

getInputSequence

public SequenceI getInputSequence()
Description copied from interface: SeqAnalysisI
Retrieve the SequenceI that this analysis builds a CurationSet from

Specified by:
getInputSequence in interface SeqAnalysisI
Returns:
the input SequenceI

setInputSequence

public void setInputSequence(SequenceI inseq)
Specified by:
setInputSequence in interface SeqAnalysisI

getInputSequences

public java.util.Vector getInputSequences()
Description copied from interface: SeqAnalysisI
Retrieve the SequenceI list that this builds a curation set from

Specified by:
getInputSequences in interface SeqAnalysisI
Returns:
a Vector of SequenceI objects

setInputSequence

public void setInputSequence(java.util.Vector sequences)
Specified by:
setInputSequence in interface SeqAnalysisI

getInputSequenceCount

public int getInputSequenceCount()
Description copied from interface: SeqAnalysisI
usually returns 1, but some programs (eg clustalw) require >1 input sequence

Specified by:
getInputSequenceCount in interface SeqAnalysisI

isAsynchronous

public boolean isAsynchronous()
is the analysis asynchronous? (ie will launching the analysis cause the program to block?)

Specified by:
isAsynchronous in interface SeqAnalysisI

launch

public boolean launch()
Description copied from interface: SeqAnalysisI
Once you have configured the SeqAnalysis properties, call this method to run the analysis. The

Specified by:
launch in interface SeqAnalysisI

isStarted

public boolean isStarted()
Description copied from interface: SeqAnalysisI
has the analysis been launched?

Specified by:
isStarted in interface SeqAnalysisI

isFinished

public boolean isFinished()
Description copied from interface: SeqAnalysisI
has the analysis finished?

Specified by:
isFinished in interface SeqAnalysisI

hasResults

public boolean hasResults()
Description copied from interface: SeqAnalysisI
does the analysis have any results to read yet? note: an analysis implementation may choose to give results incrementally, so it need not be finished before returning results

Specified by:
hasResults in interface SeqAnalysisI

getCurationSet

public CurationSet getCurationSet()
Specified by:
getCurationSet in interface SeqAnalysisI
Returns:
CurationSet representing the analysis results

getFeatureSet

public FeatureSet getFeatureSet()
Specified by:
getFeatureSet in interface SeqAnalysisI
Returns:
FeatureSetI representing the analysis results

getAllRawResults

public java.lang.String getAllRawResults()
Specified by:
getAllRawResults in interface SeqAnalysisI
Returns:
String representing all the results as a single string. If an analysis returns two outputs, say the main output plus an error/warnings file, then the implementation may choose to return just the main output, or the main output with the error file glommed onto the end. this String should *NOT* be parsed; it is up to the SeqAnalysisI implementation object to do any parsing and return the results as a CurationSet or similar object

getRawResultVector

public java.util.Vector getRawResultVector()
Description copied from interface: SeqAnalysisI
all the raw results - usually Vector of main output and error (if any) as Strings these Strings should *NOT* be parsed; it is up to the SeqAnalysisI implementation object to do any parsing and return the results as a CurationSet or similar object

Specified by:
getRawResultVector in interface SeqAnalysisI

getRawResultHashtable

public java.util.Hashtable getRawResultHashtable()
Specified by:
getRawResultHashtable in interface SeqAnalysisI

setRawResultHashtable

protected void setRawResultHashtable(java.util.Hashtable in)