org.irisa.genouest.logol.utils
Class MySequence

java.lang.Object
  extended by org.irisa.genouest.logol.utils.MySequence
All Implemented Interfaces:
org.biojava.bio.Annotatable, org.biojava.bio.seq.FeatureHolder, org.biojava.bio.seq.Sequence, org.biojava.bio.symbol.SymbolList, org.biojava.utils.Changeable
Direct Known Subclasses:
MyRevCompSequence

public class MySequence
extends java.lang.Object
implements org.biojava.bio.seq.Sequence

Simple Sequence implementation to fix memory issues with BioJava DNATools functions. Implements minimum number of functions for sequence data manipulation (no symbols and features) Fix : 1660

Author:
osallou

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.biojava.bio.seq.FeatureHolder
org.biojava.bio.seq.FeatureHolder.EmptyFeatureHolder
 
Nested classes/interfaces inherited from interface org.biojava.bio.Annotatable
org.biojava.bio.Annotatable.AnnotationForwarder
 
Field Summary
 
Fields inherited from interface org.biojava.bio.symbol.SymbolList
EDIT, EMPTY_LIST
 
Fields inherited from interface org.biojava.bio.seq.FeatureHolder
EMPTY_FEATURE_HOLDER, FEATURES, SCHEMA
 
Fields inherited from interface org.biojava.bio.Annotatable
ANNOTATION
 
Constructor Summary
MySequence()
           
MySequence(java.lang.String head, java.lang.String data)
           
 
Method Summary
 void addChangeListener(org.biojava.utils.ChangeListener arg0)
           
 void addChangeListener(org.biojava.utils.ChangeListener arg0, org.biojava.utils.ChangeType arg1)
           
 boolean containsFeature(org.biojava.bio.seq.Feature arg0)
           
 int countFeatures()
           
 org.biojava.bio.seq.Feature createFeature(org.biojava.bio.seq.Feature.Template arg0)
           
 void edit(org.biojava.bio.symbol.Edit arg0)
           
 java.util.Iterator<org.biojava.bio.seq.Feature> features()
           
 org.biojava.bio.seq.FeatureHolder filter(org.biojava.bio.seq.FeatureFilter arg0)
           
 org.biojava.bio.seq.FeatureHolder filter(org.biojava.bio.seq.FeatureFilter arg0, boolean arg1)
           
 org.biojava.bio.symbol.Alphabet getAlphabet()
           
 org.biojava.bio.Annotation getAnnotation()
           
 java.lang.String getContent()
           
 java.lang.String getHeader()
           
 java.lang.String getName()
           
 org.biojava.bio.seq.FeatureFilter getSchema()
           
 java.lang.String getURN()
           
 boolean isUnchanging(org.biojava.utils.ChangeType arg0)
           
 java.util.Iterator iterator()
           
 int length()
           
 void removeChangeListener(org.biojava.utils.ChangeListener arg0)
           
 void removeChangeListener(org.biojava.utils.ChangeListener arg0, org.biojava.utils.ChangeType arg1)
           
 void removeFeature(org.biojava.bio.seq.Feature arg0)
           
 java.lang.String seqString()
           
 void setContent(java.lang.String content)
           
 void setHeader(java.lang.String header)
           
 void setPosition(long sequencePosition)
           
 org.biojava.bio.symbol.SymbolList subList(int arg0, int arg1)
           
 java.lang.String subStr(int arg0, int arg1)
           
 org.biojava.bio.symbol.Symbol symbolAt(int arg0)
           
 java.util.List toList()
           
static void writeFasta(java.io.BufferedOutputStream bos, org.biojava.bio.seq.Sequence seq)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MySequence

public MySequence()

MySequence

public MySequence(java.lang.String head,
                  java.lang.String data)
Method Detail

writeFasta

public static void writeFasta(java.io.BufferedOutputStream bos,
                              org.biojava.bio.seq.Sequence seq)

getContent

public java.lang.String getContent()

setContent

public void setContent(java.lang.String content)

getHeader

public java.lang.String getHeader()

setHeader

public void setHeader(java.lang.String header)

getName

public java.lang.String getName()
Specified by:
getName in interface org.biojava.bio.seq.Sequence

getURN

public java.lang.String getURN()
Specified by:
getURN in interface org.biojava.bio.seq.Sequence

edit

public void edit(org.biojava.bio.symbol.Edit arg0)
          throws java.lang.IndexOutOfBoundsException,
                 org.biojava.bio.symbol.IllegalAlphabetException,
                 org.biojava.utils.ChangeVetoException
Specified by:
edit in interface org.biojava.bio.symbol.SymbolList
Throws:
java.lang.IndexOutOfBoundsException
org.biojava.bio.symbol.IllegalAlphabetException
org.biojava.utils.ChangeVetoException

getAlphabet

public org.biojava.bio.symbol.Alphabet getAlphabet()
Specified by:
getAlphabet in interface org.biojava.bio.symbol.SymbolList

iterator

public java.util.Iterator iterator()
Specified by:
iterator in interface org.biojava.bio.symbol.SymbolList

length

public int length()
Specified by:
length in interface org.biojava.bio.symbol.SymbolList

seqString

public java.lang.String seqString()
Specified by:
seqString in interface org.biojava.bio.symbol.SymbolList

subList

public org.biojava.bio.symbol.SymbolList subList(int arg0,
                                                 int arg1)
                                          throws java.lang.IndexOutOfBoundsException
Specified by:
subList in interface org.biojava.bio.symbol.SymbolList
Throws:
java.lang.IndexOutOfBoundsException

subStr

public java.lang.String subStr(int arg0,
                               int arg1)
                        throws java.lang.IndexOutOfBoundsException
Specified by:
subStr in interface org.biojava.bio.symbol.SymbolList
Throws:
java.lang.IndexOutOfBoundsException

symbolAt

public org.biojava.bio.symbol.Symbol symbolAt(int arg0)
                                       throws java.lang.IndexOutOfBoundsException
Specified by:
symbolAt in interface org.biojava.bio.symbol.SymbolList
Throws:
java.lang.IndexOutOfBoundsException

toList

public java.util.List toList()
Specified by:
toList in interface org.biojava.bio.symbol.SymbolList

addChangeListener

public void addChangeListener(org.biojava.utils.ChangeListener arg0)
Specified by:
addChangeListener in interface org.biojava.utils.Changeable

addChangeListener

public void addChangeListener(org.biojava.utils.ChangeListener arg0,
                              org.biojava.utils.ChangeType arg1)
Specified by:
addChangeListener in interface org.biojava.utils.Changeable

isUnchanging

public boolean isUnchanging(org.biojava.utils.ChangeType arg0)
Specified by:
isUnchanging in interface org.biojava.utils.Changeable

removeChangeListener

public void removeChangeListener(org.biojava.utils.ChangeListener arg0)
Specified by:
removeChangeListener in interface org.biojava.utils.Changeable

removeChangeListener

public void removeChangeListener(org.biojava.utils.ChangeListener arg0,
                                 org.biojava.utils.ChangeType arg1)
Specified by:
removeChangeListener in interface org.biojava.utils.Changeable

containsFeature

public boolean containsFeature(org.biojava.bio.seq.Feature arg0)
Specified by:
containsFeature in interface org.biojava.bio.seq.FeatureHolder

countFeatures

public int countFeatures()
Specified by:
countFeatures in interface org.biojava.bio.seq.FeatureHolder

createFeature

public org.biojava.bio.seq.Feature createFeature(org.biojava.bio.seq.Feature.Template arg0)
                                          throws org.biojava.bio.BioException,
                                                 org.biojava.utils.ChangeVetoException
Specified by:
createFeature in interface org.biojava.bio.seq.FeatureHolder
Throws:
org.biojava.bio.BioException
org.biojava.utils.ChangeVetoException

features

public java.util.Iterator<org.biojava.bio.seq.Feature> features()
Specified by:
features in interface org.biojava.bio.seq.FeatureHolder

filter

public org.biojava.bio.seq.FeatureHolder filter(org.biojava.bio.seq.FeatureFilter arg0)
Specified by:
filter in interface org.biojava.bio.seq.FeatureHolder

filter

public org.biojava.bio.seq.FeatureHolder filter(org.biojava.bio.seq.FeatureFilter arg0,
                                                boolean arg1)
Specified by:
filter in interface org.biojava.bio.seq.FeatureHolder

getSchema

public org.biojava.bio.seq.FeatureFilter getSchema()
Specified by:
getSchema in interface org.biojava.bio.seq.FeatureHolder

removeFeature

public void removeFeature(org.biojava.bio.seq.Feature arg0)
                   throws org.biojava.utils.ChangeVetoException,
                          org.biojava.bio.BioException
Specified by:
removeFeature in interface org.biojava.bio.seq.FeatureHolder
Throws:
org.biojava.utils.ChangeVetoException
org.biojava.bio.BioException

getAnnotation

public org.biojava.bio.Annotation getAnnotation()
Specified by:
getAnnotation in interface org.biojava.bio.Annotatable

setPosition

public void setPosition(long sequencePosition)