apollo.datamodel.seq
Class GAMESequence
java.lang.Object
apollo.datamodel.AbstractSequence
apollo.datamodel.seq.AbstractLazySequence
apollo.datamodel.seq.GAMESequence
- All Implemented Interfaces:
- LazySequenceI, SequenceI, java.io.Serializable
public class GAMESequence
- extends AbstractLazySequence
Currently GAMESequence is not lazy. I think it extends AbstractLazySequence
because it intends to be lazy at some point. GAMESequence is the main genomic
sequence for game data(but not the result sequences)
I think the main thing it does is deal with mapping genomic range coords
(genomic start and end) to sequence coords (1 to length). This is done in
getResidueFromSourceImpl. I know Sequence does not do this, and as far as I
can tell, this is the only sequence object that does this. Should Sequence
do this? or should this be given a more general name?
so Sequence now does do this (actually has for quite some time) - so there is no
longer a reason for GAMESequence to exist and should probably be vanquished - the
only possible reason would be if game adapter holds off on sucking in sequences
and then reparses game file on demand - which actually seems silly - a better
scenario would be to have a game file with no sequence and seq is retrieved on
demand from chado db using ChadoLazySeq - or through url? but game comes in pretty
fast so the only reason would be to save on memory
flybase chado needs to use this so it should its more general than GAME.
The main thing is GAMESequence has a non null Range. The non-null Range is not
enforced, but if Range is not set null pointers will fly. Should it be more
flexible and be able to deal with null ranges (null range being one to one mapping)
Usual place Range
gets set is in CurationSet.setRefSequence, where CurationSet sets the sequences
range to itself. Currently this object is only used for the game adapter, and
chado flybase adapters curation sets. Regular Sequence objects are used for
FeaturePairs hit seqs. Maybe this should be renamed CurationSetSequence?
- See Also:
- Serialized Form
| Methods inherited from class apollo.datamodel.AbstractSequence |
addDbXref, addDbXref, addDbXref, addSequenceEdit, addSequencingErrorPosition, clearResidues, getAccessionNo, getBaseAt, getChecksum, getDbXrefs, getDescription, getFrame, getGenomicErrors, getLength, getName, getOrganism, getResidues, getResidues, getResidueType, getReverseComplement, getSequencingErrorAtPosition, hasName, hasRange, hasResidues, hasResidueType, isAA, isNewerThan, isSequenceAvailable, isSequencingErrorPosition, needShiftFromOneToZeroBasedCoords, pegLimits, removeSequenceEdit, setAccessionNo, setChecksum, setDate, setDescription, setLength, setName, setNeedShiftFromOneToZeroBasedCoords, setOrganism, setRange, setResidueType, shiftFromOneToZeroBased, usesGenomicCoords |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface apollo.datamodel.SequenceI |
addDbXref, addDbXref, addDbXref, addSequenceEdit, addSequencingErrorPosition, clearResidues, getAccessionNo, getBaseAt, getChecksum, getDbXrefs, getDescription, getFrame, getGenomicErrors, getLength, getName, getOrganism, getResidues, getResidues, getResidueType, getReverseComplement, getSequencingErrorAtPosition, hasName, hasResidues, hasResidueType, isAA, isSequenceAvailable, isSequencingErrorPosition, removeSequenceEdit, setAccessionNo, setChecksum, setDate, setDescription, setLength, setName, setOrganism, setRange, setResidueType, usesGenomicCoords |
GAMESequence
public GAMESequence(java.lang.String id,
Controller c,
java.lang.String dna)
createCacher
protected CacheSequenceLoader createCacher()
- Description copied from class:
AbstractLazySequence
- Overriden by GAMESequence
- Overrides:
createCacher in class AbstractLazySequence
getResiduesFromSource
public java.lang.String getResiduesFromSource(int low,
int high)
- Specified by:
getResiduesFromSource in interface LazySequenceI- Overrides:
getResiduesFromSource in class AbstractLazySequence
getSubSequence
public SequenceI getSubSequence(int start,
int end)
- Description copied from class:
AbstractLazySequence
- Clean up dangling reference as listener to controller that will make
old instances persist - no longer needed as doesnt listen to controller
anymore
- Specified by:
getSubSequence in interface SequenceI- Specified by:
getSubSequence in class AbstractLazySequence
needInclusiveEnd
protected boolean needInclusiveEnd()
- Whether the end needs adding to, to make it inclusive.
EnsCGISequence does not need an inclusive end and overrides
this to return false.
- Overrides:
needInclusiveEnd in class AbstractLazySequence
getResiduesFromSourceImpl
protected java.lang.String getResiduesFromSourceImpl(int low,
int high)
- Specified by:
getResiduesFromSourceImpl in class AbstractLazySequence
hasSequence
public boolean hasSequence()
setResidues
public void setResidues(java.lang.String seqString)
- Specified by:
setResidues in interface SequenceI- Overrides:
setResidues in class AbstractSequence
isLazy
public boolean isLazy()
- Change this to return true when GAMESequence actually becomes lazy
- Specified by:
isLazy in interface SequenceI- Overrides:
isLazy in class AbstractLazySequence