org.geworkbench.bison.datastructure.biocollections.sequences
Class CSSequenceSet<T extends DSSequence>

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.ArrayList<T>
              extended by org.geworkbench.bison.datastructure.complex.panels.CSItemList<T>
                  extended by org.geworkbench.bison.datastructure.complex.panels.CSSequentialItemList<T>
                      extended by org.geworkbench.bison.datastructure.biocollections.CSDataSet<T>
                          extended by org.geworkbench.bison.datastructure.biocollections.sequences.CSSequenceSet<T>
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<T>, java.util.Collection<T>, java.util.List<T>, java.util.RandomAccess, DSDataSet<T>, DSSequenceSet<T>, DSItemList<T>, DSDescribable, DSExtendable, DSIdentifiable, DSNamed

public class CSSequenceSet<T extends DSSequence>
extends CSDataSet<T>
implements DSSequenceSet<T>

Version:
$Id: CSSequenceSet.java 10155 2012-11-20 20:39:38Z youmi $
Author:
not attributable
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.geworkbench.bison.datastructure.biocollections.CSDataSet
columnOrder, compatibilityLabel, dataSetProperties, description, experimentInfo, extend
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
CSSequenceSet()
           
 
Method Summary
 void addASequence(T sequence)
           
static DSSequenceSet<DSSequence> createFASTAfile(java.io.File file)
           
 T get(java.lang.String label)
          Gets an item by label, using the HashMap.
 DSSequenceSet<DSSequence> getActiveSequenceSet(DSPanel<? extends DSGeneMarker> markerPanel)
           
 java.lang.String getCompatibilityLabel()
          getCompatibilityLabel
 java.lang.String getDataSetName()
          The name of data set.
 java.lang.String getDescription()
          Get all available descriptions in the form of an array of strings.
 java.lang.String getFASTAFileName()
           
 java.io.File getFile()
          The underlying file associated with this data set.
 java.lang.String getLabel()
          Gets the label for this data set.
 DSItemList<? extends DSGeneMarker> getMarkerList()
           
 int[] getMatchIndex()
           
 int getMaxLength()
           
 int[] getReverseIndex()
           
 T getSequence(DSGeneMarker marker)
           
 T getSequence(int i)
           
static CSSequenceSet getSequenceDB(java.io.File file)
           
 int getSequenceNo()
           
 boolean isDirty()
           
 boolean isDNA()
           
 void parseMarkers()
           
 void readFASTAFile(java.io.File inputFile)
           
 void readFromResource()
           
 void setDirty(boolean flag)
           
 void setDNA(boolean DNA)
           
 void setFASTAFile(java.io.File f)
           
 void setLabel(java.lang.String label)
          Sets the label for this data set.
 void setMatchIndex(int[] matchIndex)
           
 void setReverseIndex(int[] reverseIndex)
           
 java.lang.String toString()
          Gets a string representation for this data set.
 void writeToFile(java.lang.String fileName)
          Writes the data set to the provided filename.
 void writeToResource()
           
 
Methods inherited from class org.geworkbench.bison.datastructure.biocollections.CSDataSet
addNameValuePair, addObject, allowMultipleValues, clearName, forceUniqueValue, getColumnOrder, getExperimentInformation, getID, getObject, getValuesForName, isActive, isUniqueValue, setColumnOrder, setDescription, setExperimentInformation, setFile, setID
 
Methods inherited from class org.geworkbench.bison.datastructure.complex.panels.CSSequentialItemList
add, add, remove
 
Methods inherited from class org.geworkbench.bison.datastructure.complex.panels.CSItemList
addAll, clear, equals, hashCode, set, setLabel
 
Methods inherited from class java.util.ArrayList
addAll, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, removeRange, size, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
iterator, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, removeAll, retainAll
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.geworkbench.bison.datastructure.biocollections.DSDataSet
addObject, getColumnOrder, getExperimentInformation, getObject, isActive, setColumnOrder, setExperimentInformation, setFile
 
Methods inherited from interface org.geworkbench.bison.datastructure.properties.DSDescribable
setDescription
 
Methods inherited from interface org.geworkbench.bison.datastructure.properties.DSExtendable
addNameValuePair, allowMultipleValues, clearName, forceUniqueValue, getValuesForName, isUniqueValue
 
Methods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray
 
Methods inherited from interface org.geworkbench.bison.datastructure.properties.DSIdentifiable
getID, setID
 

Constructor Detail

CSSequenceSet

public CSSequenceSet()
Method Detail

setDNA

public void setDNA(boolean DNA)

getDataSetName

public java.lang.String getDataSetName()
Description copied from class: CSDataSet
The name of data set.

Specified by:
getDataSetName in interface DSDataSet<T extends DSSequence>
Overrides:
getDataSetName in class CSDataSet<T extends DSSequence>
Returns:
the data set name.

addASequence

public void addASequence(T sequence)
Specified by:
addASequence in interface DSSequenceSet<T extends DSSequence>

getSequenceNo

public int getSequenceNo()
Specified by:
getSequenceNo in interface DSSequenceSet<T extends DSSequence>

getSequence

public T getSequence(int i)
Specified by:
getSequence in interface DSSequenceSet<T extends DSSequence>

getSequence

public T getSequence(DSGeneMarker marker)

getActiveSequenceSet

public DSSequenceSet<DSSequence> getActiveSequenceSet(DSPanel<? extends DSGeneMarker> markerPanel)

getMaxLength

public int getMaxLength()
Specified by:
getMaxLength in interface DSSequenceSet<T extends DSSequence>

isDNA

public boolean isDNA()
Specified by:
isDNA in interface DSSequenceSet<T extends DSSequence>

createFASTAfile

public static DSSequenceSet<DSSequence> createFASTAfile(java.io.File file)

readFASTAFile

public void readFASTAFile(java.io.File inputFile)

getDescription

public java.lang.String getDescription()
Description copied from class: CSDataSet
Get all available descriptions in the form of an array of strings.

Specified by:
getDescription in interface DSDescribable
Overrides:
getDescription in class CSDataSet<T extends DSSequence>
Returns:
an array containing all descriptions.

parseMarkers

public void parseMarkers()

readFromResource

public void readFromResource()

writeToResource

public void writeToResource()

isDirty

public boolean isDirty()

setDirty

public void setDirty(boolean flag)

setLabel

public void setLabel(java.lang.String label)
Description copied from class: CSDataSet
Sets the label for this data set.

Specified by:
setLabel in interface DSNamed
Overrides:
setLabel in class CSDataSet<T extends DSSequence>
Parameters:
label - the new label.

setMatchIndex

public void setMatchIndex(int[] matchIndex)
Specified by:
setMatchIndex in interface DSSequenceSet<T extends DSSequence>

setReverseIndex

public void setReverseIndex(int[] reverseIndex)
Specified by:
setReverseIndex in interface DSSequenceSet<T extends DSSequence>

getFile

public java.io.File getFile()
Description copied from class: CSDataSet
The underlying file associated with this data set.

Specified by:
getFile in interface DSDataSet<T extends DSSequence>
Overrides:
getFile in class CSDataSet<T extends DSSequence>
Returns:
the file for this data set.

toString

public java.lang.String toString()
Description copied from class: CSDataSet
Gets a string representation for this data set.

Overrides:
toString in class CSDataSet<T extends DSSequence>
Returns:
the same result as CSDataSet.getLabel().

getSequenceDB

public static CSSequenceSet getSequenceDB(java.io.File file)

getFASTAFileName

public java.lang.String getFASTAFileName()

setFASTAFile

public void setFASTAFile(java.io.File f)

getLabel

public java.lang.String getLabel()
Description copied from class: CSDataSet
Gets the label for this data set.

Specified by:
getLabel in interface DSNamed
Overrides:
getLabel in class CSDataSet<T extends DSSequence>
Returns:
the data set's label.

getCompatibilityLabel

public java.lang.String getCompatibilityLabel()
getCompatibilityLabel

Specified by:
getCompatibilityLabel in interface DSDataSet<T extends DSSequence>
Overrides:
getCompatibilityLabel in class CSDataSet<T extends DSSequence>
Returns:
String

getMarkerList

public DSItemList<? extends DSGeneMarker> getMarkerList()
Specified by:
getMarkerList in interface DSSequenceSet<T extends DSSequence>

get

public T get(java.lang.String label)
Description copied from class: CSItemList
Gets an item by label, using the HashMap.

Specified by:
get in interface DSItemList<T extends DSSequence>
Overrides:
get in class CSItemList<T extends DSSequence>
Parameters:
label - the label of the item.
Returns:
the item found or null if not found.

getMatchIndex

public int[] getMatchIndex()
Specified by:
getMatchIndex in interface DSSequenceSet<T extends DSSequence>

getReverseIndex

public int[] getReverseIndex()
Specified by:
getReverseIndex in interface DSSequenceSet<T extends DSSequence>

writeToFile

public void writeToFile(java.lang.String fileName)
Description copied from interface: DSDataSet
Writes the data set to the provided filename.

Specified by:
writeToFile in interface DSDataSet<T extends DSSequence>
Overrides:
writeToFile in class CSDataSet<T extends DSSequence>
Parameters:
fileName - the filename (path) to which to write this file.