public class CombinedAlignmentAndNucleotideGraphSequenceDocument extends CombinedAlignmentAndSequenceDocument implements EditableNucleotideGraphSequenceDocument
CombinedAlignmentAndSequenceDocumentSequenceAlignmentDocument.ReferencedSequenceNucleotideGraph.ImmutableGraphProviderSequenceDocument.Alphabet, SequenceDocument.TransformerPluginDocument.ReferencedDocumentsAlwaysLoaded, PluginDocument.ReferencedDocumentsNotLoaded, PluginDocument.SizeRequiredToLoadIntoMemoryProviderXMLSerializable.OldVersionCompatible, XMLSerializable.VersionSupportTypeNICE_NAMEGENOME_SEQUENCE_THRESHOLDFILE_DATA_ATTRIBUTE_NAME, MAXIMUM_HTML_LENGTH, MODIFIED_DATE_FIELDROOT_ELEMENT_NAME| Constructor and Description |
|---|
CombinedAlignmentAndNucleotideGraphSequenceDocument()
XML Deserialization constructor.
|
CombinedAlignmentAndNucleotideGraphSequenceDocument(NucleotideGraphSequenceDocument sequenceDocument,
SequenceAlignmentDocument alignmentDocument,
boolean obtainSharedPropertiesFromSequence,
boolean showSequenceView)
Constructs a new combined alignment and sequence document.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getChromatogramLength()
The number of points for which this graph has values, which is typically larger than the
length of the nucleotide sequence because a base isn't called at every position in the graph.
|
int |
getChromatogramPositionForResidue(int residueIndex)
The graph position (can be used as an argument to
NucleotideGraph.getChromatogramValue(int, int)) where the
nucleotide at the specified residue index has been called. |
int |
getChromatogramValue(int nucleotideStateNumber,
int graphPosition)
Returns the graph value for the specified nucleotide and at the specified position.
|
int |
getSequenceQuality(int residueIndex)
Returns a measurement of confidence in the residue reported at the specified residueIndex in the sequence.
|
boolean |
hasChromatogramPositionsForResidues()
Tests whether this NucleotideGraph contains information about the position of the base calls,
i.e.
|
boolean |
hasChromatogramValues(int nucleotideStateNumber)
Specifies whether it is legal to call
NucleotideGraph.getChromatogramValue(int, int) for the specified nucleotide. |
boolean |
hasSequenceQualities()
Tests whether this graph contains information about the confidence in the associated sequence's
residues, i.e.
|
void |
setSequenceAndAnnotationsAndGraph(CharSequence sequence,
List<SequenceAnnotation> annotations,
NucleotideGraph graph)
Replaces
EditableSequenceDocument.setSequenceAndAnnotations(CharSequence,java.util.List)
which you must not call on a NucleotideGraphSequenceDocument. |
addSequence, asJeblAlignment, canAddAndRemoveSequences, canSetAnnotations, canSetAnnotationsOnConsensus, canSetSequenceNames, fromXML, getAlignmentDocument, getAnnotationsOnConsensus, getCharSequence, getContigReferenceSequenceIndex, getCreationDate, getDescription, getDisplayableFields, getFieldValue, getName, getNumberOfSequences, getReferencedDocument, getReferencedSequence, getSequence, getSequenceAnnotations, getSequenceAsJeblSequence, getSequenceDocument, getSequenceLength, getSequences, getSequenceString, getURN, getVersionSupport, isCircular, isContig, isEditable, isFreeEndGapAlignment, isReferencedDocumentReversed, removeSequence, reorderSequences, setAnnotations, setAnnotations, setAnnotationsOnConsensus, setCircular, setReferencedDocument, setReferencedSequence, setSequenceAndAnnotations, setSequenceName, showSequenceView, toHTML, toXML, toXML, updateSequenceasJeblAlignmentIfMemoryAllows, canSetFieldValue, getCircularLength, getImmutablePairedReadManager, getMateExpectedDistance, getMateIndex, getRealignedName, getReferencedDocuments, getReferencedSequences, getRefinedName, getSequencesInImmutableList, getSequenceType, isQueryCentricAlignment, setFieldValue, setMates, setReferencedSequenceclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetSequenceLengthsetCircular, setSequenceAndAnnotationssetAnnotationsgetCharSequence, getSequenceAnnotations, getSequenceLength, getSequenceString, isCirculargetCreationDate, getDescription, getDisplayableFields, getFieldValue, getName, getURN, toHTMLfromXML, toXMLpublic CombinedAlignmentAndNucleotideGraphSequenceDocument(NucleotideGraphSequenceDocument sequenceDocument, SequenceAlignmentDocument alignmentDocument, boolean obtainSharedPropertiesFromSequence, boolean showSequenceView)
CombinedAlignmentAndSequenceDocument
for documentation for the parameters to this method.public CombinedAlignmentAndNucleotideGraphSequenceDocument()
XMLSerializablepublic void setSequenceAndAnnotationsAndGraph(CharSequence sequence, List<SequenceAnnotation> annotations, NucleotideGraph graph) throws IllegalArgumentException
EditableNucleotideGraphSequenceDocumentEditableSequenceDocument.setSequenceAndAnnotations(CharSequence,java.util.List)
which you must not call on a NucleotideGraphSequenceDocument. Does the same as that method
normally would, but also sets a new graph to use (which must be consistent with the sequence,
i.e. graph.getSequenceLength()
must be equal to sequence.length()
It is recommended that an implementation call
DefaultNucleotideGraphSequence.checkChromatogramValidity(NucleotideGraphSequenceDocument)
before returning from this method, to ensure that the graph and sequence are consistent.setSequenceAndAnnotationsAndGraph in interface EditableNucleotideGraphSequenceDocumentsequence - New sequence to set on this document; must be consistent with the annotations
and the graph (see above). Must not change length or characters after being passed to this method
(as in EditableSequenceDocument.setSequenceAndAnnotations(CharSequence, java.util.List)).annotations - New annotations to set on this document, with indices relative to the new sequence.graph - New graph to set on this document; must be consistent with the new sequence. The implementation must store a copy of this graph instead
of a reference to the specified graph (using for eaxmple DefaultNucleotideGraph.copyOf(NucleotideGraph))IllegalArgumentException - if the sequence and graph are not consistent.public int getChromatogramValue(int nucleotideStateNumber,
int graphPosition)
throws IndexOutOfBoundsException
NucleotideGraphNucleotideGraph.hasChromatogramValues(int) returns true for the
specified nucleotide.getChromatogramValue in interface NucleotideGraphnucleotideStateNumber - The nucleotide for which to retrieve the graph value, encoded as
0 = A, 1 = C, 2 = G, 3 = T (alphabetic order, same as in Nucleotides)graphPosition - The position in the sequence for which to query the graph value,
with 0 <= graphPosition < graph lengthIndexOutOfBoundsException - if graphPosition < 0 or graphPosition >= NucleotideGraph.getChromatogramLength()public boolean hasChromatogramValues(int nucleotideStateNumber)
NucleotideGraphNucleotideGraph.getChromatogramValue(int, int) for the specified nucleotide.hasChromatogramValues in interface NucleotideGraphnucleotideStateNumber - A nucleotide state number encoded in the same way as for NucleotideGraph.getChromatogramValue(int, int),
i.e. 0 = A, 1 = C, 2 = G, 3 = TNucleotideGraph.getChromatogramValue(int, int) for the specified nucleotidepublic int getChromatogramPositionForResidue(int residueIndex)
throws IndexOutOfBoundsException,
UnsupportedOperationException
NucleotideGraphNucleotideGraph.getChromatogramValue(int, int)) where the
nucleotide at the specified residue index has been called. This method may only be called if
NucleotideGraph.hasChromatogramPositionsForResidues() returns true.
The graph sites are guaranteed to have the same order as the sequence nucleotides. Therefore,
any implementation must ensure that if i < j, then
getChromatogramPositionForResidue(i) <= getChromatogramPositionForResidue(j).getChromatogramPositionForResidue in interface NucleotideGraphresidueIndex - A value 0 <= residueIndex < NucleotideGraph.getSequenceLength() specifying
the index in the nucleotide sequence for which to calculate the corresponding position in the graph.NucleotideGraph.getChromatogramLength(), specifiying the
graph position where the nucleotide that is at position residueIndex has been
called. For positions residueIndex where the
sequence
length consisting of values
between 0 and getChromatogramLength()-1 inclusive. For a residueIndex where the sequence holds
a '-', the returned site position must always be Integer.MIN_VALUE.IndexOutOfBoundsException - if residueIndex < 0 or residueIndex > NucleotideGraph.getSequenceLength().UnsupportedOperationException - if !hasChromatogramPositionsForResidues().public boolean hasChromatogramPositionsForResidues()
NucleotideGraphNucleotideGraph.getChromatogramPositionForResidue(int).hasChromatogramPositionsForResidues in interface NucleotideGraphpublic int getSequenceQuality(int residueIndex)
throws IndexOutOfBoundsException,
UnsupportedOperationException
NucleotideGraphInteger.MIN_VALUE
if it is an end gap. If it is an internal gap, it should return the average quality of the non-gap positions
on either side of the gap.
This method may only be called if NucleotideGraph.hasSequenceQualities() returns true.getSequenceQuality in interface NucleotideGraphresidueIndex - A value 0 <= residueIndex < NucleotideGraph.getSequenceLength() specifying
the index in the nucleotide sequence for which to calculate the quality of the graph.IndexOutOfBoundsException - if residueIndex < 0 or residueIndex > NucleotideGraph.getSequenceLength().UnsupportedOperationException - if !hasSequenceQualities().public boolean hasSequenceQualities()
NucleotideGraphNucleotideGraph.getSequenceQuality(int).hasSequenceQualities in interface NucleotideGraphNucleotideGraph.getSequenceQuality(int) on this graph.public int getChromatogramLength()
NucleotideGraphgetChromatogramLength in interface NucleotideGraph