public class OligoSequenceDocument extends DefaultNucleotideSequence
getBindingInterval() and getBindingSequence()) is the part of the sequence
which must match a target sequence for binding to occur. The extension (which is the remainder of DefaultSequenceDocument.getSequenceString())
is made optional additional bases (eg. a restriction site) which will be introduced to the end of the PCR product. An
extension is optional.| Modifier and Type | Class and Description |
|---|---|
static class |
OligoSequenceDocument.OligoType
The possible types of oligos
|
DefaultSequenceDocument.CacheSequenceDocument.Alphabet, SequenceDocument.TransformerPluginDocument.ReferencedDocumentsAlwaysLoaded, PluginDocument.ReferencedDocumentsNotLoaded, PluginDocument.SizeRequiredToLoadIntoMemoryProviderXMLSerializable.OldVersionCompatible, XMLSerializable.VersionSupportType| Modifier and Type | Field and Description |
|---|---|
static String |
BINDING_REGION_ANNOTATION_NAME
The name of the annotation returned from
getPrimerAnnotation() |
static String |
EXTENSION_QUALIFIER_NAME
Name to use for SequenceAnnotationQualifiers that specify any primer extension sequence in addition to the
primer binding region.
|
static DocumentField |
HAIRPIN_FIELD
Displayable field for the hairpin alignment score of the oligo
|
static DocumentField |
OLIGO_TYPE_FIELD
Displayable field for the type of oligo (see
OligoSequenceDocument.OligoType)
The value of this field is the toString() value of the OligoType object |
static DocumentField |
PERCENT_GC_FIELD
Displayable field for GC percent of the oligo
|
static DocumentField |
PRIMER_DIMER_FIELD
Displayable field for the primer-dimer alignment score of the oligo
|
static String |
PRIMER_INFO_NOTE_CODE
Code for the "Primer Info" note type.
|
static String |
PRIMER_PERCENT_GC_ANNOTATION_QUALIFIER_NAME
The name of the
SequenceAnnotationQualifier on primer annotations that contains the GC%. |
static String |
SOURCE_QUALIFIER_NAME
Deprecated.
from 7.0.0, this field is not added to new primer annotations
|
static DocumentField |
TM_FIELD
Displayable field for the melting point of the oligo
|
NICE_NAMEGENOME_SEQUENCE_THRESHOLDFILE_DATA_ATTRIBUTE_NAME, MAXIMUM_HTML_LENGTH, MODIFIED_DATE_FIELDROOT_ELEMENT_NAME| Constructor and Description |
|---|
OligoSequenceDocument()
PluginDocument requirement, do not call directly
|
OligoSequenceDocument(NucleotideSequenceDocument sequenceDocument)
Create an OligoSequenceDocument from an existing SequenceDocument.
|
OligoSequenceDocument(String name,
String description,
CharSequence charSequence,
Date created)
Create an OligoSequenceDocument "from scratch".
|
| Modifier and Type | Method and Description |
|---|---|
void |
addSequenceAnnotation(SequenceAnnotation annotation)
Add a sequence annotation to this document.
|
static SequenceDocument |
createExtensionForPrimerAnnotation(SequenceAnnotation primerAnnotation)
Deprecated.
this method no longer works and there is no replacement in the API. Sorry!
|
void |
fromXML(org.jdom.Element root)
Restore the object from the JDOM Element returned by
XMLSerializable.toXML(). |
SequenceAnnotationInterval |
getBindingInterval()
Get the interval for the binding region of the oligo sequence (excluding any 5' extension).
|
CharSequence |
getBindingSequence()
Get the sequence of bases making up the binding region of this oligo.
|
SequenceAnnotationInterval |
getExtensionInterval()
Get the interval for the 5' extension region of the oligo sequence .
|
CharSequence |
getExtensionSequence()
Get the sequence of bases making up the 5' extension region of this oligo.
|
OligoSequenceDocument.OligoType |
getOligoType() |
SequenceAnnotation |
getPrimerAnnotation() |
Geneious.MajorVersion |
getVersionSupport(XMLSerializable.VersionSupportType versionType)
Gets either the latest version this class can serialize to via
XMLSerializable.OldVersionCompatible.toXML(com.biomatters.geneious.publicapi.plugin.Geneious.MajorVersion, jebl.util.ProgressListener)
or the most recent version in which the XML returned from XMLSerializable.OldVersionCompatible.toXML(com.biomatters.geneious.publicapi.plugin.Geneious.MajorVersion, jebl.util.ProgressListener) last changed. |
void |
setAnnotations(List<SequenceAnnotation> annotations)
Sets new annotations on this document, replacing the existing ones.
|
void |
setSequenceAndAnnotations(CharSequence sequence,
List<SequenceAnnotation> annotations)
Sets the sequence and annotations of this document.
|
String |
toHTML()
Provide a textual view of document.
|
org.jdom.Element |
toXML()
Convert object to a JDOM element.
|
org.jdom.Element |
toXML(Geneious.MajorVersion version,
ProgressListener progressListener)
Serializes this class to XML format, potentially to a format readable by an earlier version of Geneious.
|
annotationsFromXML, copySequenceTracksFrom, createCopy, createCopy, getAnnotationsRevisionNumber, getCharSequence, getCharSequenceRevisionNumber, getDescription, getDisplayableFields, getFieldValue, getName, getSequenceAnnotations, getSequenceGapInformation, getSequenceGapInformation, getSequenceLength, getSequenceString, getTrackManager, isBestSerializedToXmlRatherThanBinaryFormat, isCircular, isStandardImplementation, readObject, readObject, sequenceAnnotationsToXML, sequenceAnnotationsToXML, setCache, setCircular, setDescription, setFieldValue, setName, writeObject, writeObject, writeObjectaddDisplayableField, addReferencedDocumentUrn, clearReferencedDocumentUrns, createFromBaseElement, getBaseElement, getBaseElementString, getCreationDate, getFieldValueCodes, getReferencedDocumentUrns, getURN, hasProperties, setBaseElement, setCreated, setFieldValue, setFieldValues, setURNclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetCharSequence, getSequenceAnnotations, getSequenceLength, getSequenceString, isCirculargetCreationDate, getDescription, getDisplayableFields, getFieldValue, getName, getURNpublic static final String PRIMER_INFO_NOTE_CODE
DocumentNoteUtilities.getNoteType(PRIMER_INFO_NOTE_CODE)public static final String BINDING_REGION_ANNOTATION_NAME
getPrimerAnnotation()public static final DocumentField OLIGO_TYPE_FIELD
OligoSequenceDocument.OligoType)
The value of this field is the toString() value of the OligoType objectpublic static final DocumentField TM_FIELD
public static final String PRIMER_PERCENT_GC_ANNOTATION_QUALIFIER_NAME
SequenceAnnotationQualifier on primer annotations that contains the GC%.public static final DocumentField PERCENT_GC_FIELD
public static final DocumentField HAIRPIN_FIELD
public static final DocumentField PRIMER_DIMER_FIELD
public static final String SOURCE_QUALIFIER_NAME
OligoSequenceDocument
from which an annotation was created.
If an OligoSequenceDocument with an extension has had its binding region annotated onto another sequence
then the extension is not visible. However the annotation should still hold a reference to the original
OligoSequenceDocument by storing a qualifier that uses this name and has a value of the URN of
the source document. This qualifier is hidden from the Geneious user interface.
This, for example, is done by the bundled Primer and Probe Design Plugin when doing Test Primers.
public static final String EXTENSION_QUALIFIER_NAME
An OligoSequenceDocument may have an extension in addition to the binding sequence. If the binding
region is annotated onto a sequence then the extension will appear as a qualifier of the binding annotation.
public OligoSequenceDocument()
public OligoSequenceDocument(String name, String description, CharSequence charSequence, Date created)
name - name of the document, must not be nulldescription - sequence descriptions (may be null or "")charSequence - sequence bases as a CharSequencecreated - sequence creation date. May be null.public OligoSequenceDocument(NucleotideSequenceDocument sequenceDocument)
AnnotatedPluginDocument. This constructor copies all displayable
fields and values from the source SequenceDocument.
Primer characteristics such as TM and GC% are not added in this
class, they must be added separately as an annotation by the core Primer plugin.
Primer characteristics will be picked up from a primer_bind annotation if there is one and only one that
covers the sequence entirely. If such an annotation exists and the sequence qualifier for the annotation differs
from the source sequence itself, then the sequence in the qualifier will be used for the sequence of this document.sequenceDocument - the sequence document to copy data frompublic void addSequenceAnnotation(SequenceAnnotation annotation)
DefaultSequenceDocumentaddSequenceAnnotation in class DefaultSequenceDocumentannotation - a SequenceAnnotationpublic void setSequenceAndAnnotations(CharSequence sequence, List<SequenceAnnotation> annotations)
EditableSequenceDocumentSequenceTracks
EditableNucleotideGraphSequenceDocument.setSequenceAndAnnotationsAndGraph(CharSequence, java.util.List, NucleotideGraph).
Hence, it is illegal to change the length of the sequence through this method if
this is instanceof NucleotideGraphSequenceDocument;
Therefore, implementations of this method should start with the following code:
if (this instanceof NucleotideGraphSequenceDocument && sequence.length() != getSequenceLength()) {
throw new IllegalArgumentException("Can't change sequence length without updating graph for " + getClass());
}
setSequenceAndAnnotations in interface EditableSequenceDocumentsetSequenceAndAnnotations in class DefaultSequenceDocumentsequence - new residues; NOTE: This CharSequence must not change its length or characters after it was passed to this method!annotations - new annotationspublic void setAnnotations(List<SequenceAnnotation> annotations)
SequenceDocumentWithEditableAnnotationsSequenceTrackssetAnnotations in interface SequenceDocumentWithEditableAnnotationssetAnnotations in class DefaultSequenceDocumentannotations - New annotations to set on this document.SequenceDocument.getSequenceAnnotations()public Geneious.MajorVersion getVersionSupport(XMLSerializable.VersionSupportType versionType)
XMLSerializable.OldVersionCompatibleXMLSerializable.OldVersionCompatible.toXML(com.biomatters.geneious.publicapi.plugin.Geneious.MajorVersion, jebl.util.ProgressListener)
or the most recent version in which the XML returned from XMLSerializable.OldVersionCompatible.toXML(com.biomatters.geneious.publicapi.plugin.Geneious.MajorVersion, jebl.util.ProgressListener) last changed.getVersionSupport in interface XMLSerializable.OldVersionCompatiblegetVersionSupport in class DefaultSequenceDocumentversionType - specifies which version property to returnpublic org.jdom.Element toXML()
XMLSerializableXMLSerializable.fromXML(org.jdom.Element) can completely
restore the objects representation.
It is recommended that the returned element use XMLSerializable.ROOT_ELEMENT_NAME as its name,
in which case it must not define an attribute called "type". In this case,
fromXML, will be called with an element whose name may differ from the element
return from this function. This recommendation allows a more compact representation
of the XML can be stored.
This method generally should not be called directly. Instead, you should usually call
XMLSerializer.classToXML(String, XMLSerializable)
which calls this method internally.
PluginDocument implementations of this method may choose to throw an XMLSerializationException,
enclosed in a RuntimeException.toXML in interface XMLSerializabletoXML in class DefaultSequenceDocumentpublic org.jdom.Element toXML(Geneious.MajorVersion version, ProgressListener progressListener)
XMLSerializable.OldVersionCompatibleXMLSerializable.toXML() for a more
detailed description of what it means to serialize to XML.
All classes that implement this method must also implement XMLSerializable.toXML() and should delegate back to
this method using Geneious.getMajorVersion() and ProgressListener.EMPTY as parameters.toXML in interface XMLSerializable.OldVersionCompatibletoXML in class DefaultSequenceDocumentversion - the major version of Geneious to serialize to XML for. For example "6.0" but not "6.0.0". This must be a version
returned greater or equal to a version returned from
getVersionSupport(VersionSupportType.OldestVersionSerializableTo)
and must never be greater than the current version (Geneious.getMajorVersion())progressListener - for reporting progress and cancellingpublic void fromXML(org.jdom.Element root)
throws XMLSerializationException
XMLSerializableXMLSerializable.toXML().
This method generally should not be called directly. Instead, you should usually call
XMLSerializer.classFromXML(org.jdom.Element)
or XMLSerializer.classFromXML(org.jdom.Element, Class)
which calls this method internally.
It is optional to implement this method. Instead of implementing an empty constructor and implementing
this method properly, the implementation may instead
throw an UnsupportedOperationException and implement a constructor
that takes a single Element as a parameter.
This allows for cleaner code such as support for final fields in the XMLSerializable class.
The element parameter should not be modified since it may be reused. If you need a modified version of it,
take a copy with Element.clone().fromXML in interface XMLSerializablefromXML in class DefaultSequenceDocumentroot - representation from a previous call to XMLSerializable.toXML()XMLSerializationException - if the Element can't be converted into this type of objectpublic String toHTML()
PluginDocument<html>toHTML in interface PluginDocumenttoHTML in class DefaultSequenceDocumentpublic OligoSequenceDocument.OligoType getOligoType()
OligoSequenceDocument.OligoTypepublic SequenceAnnotation getPrimerAnnotation()
public SequenceAnnotationInterval getBindingInterval()
public SequenceAnnotationInterval getExtensionInterval()
public CharSequence getExtensionSequence()
public CharSequence getBindingSequence()
@Deprecated public static SequenceDocument createExtensionForPrimerAnnotation(SequenceAnnotation primerAnnotation)
primerAnnotation - An annotation of type SequenceAnnotation.TYPE_PRIMER_BIND,
SequenceAnnotation.TYPE_PRIMER_BIND_REVERSE or SequenceAnnotation.TYPE_DNA_PROBENucleotideSequenceDocument that represents the extension for the binding region
described by the primerAnnotation or null if no extension is found.