public class SAMSequenceDictionary
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
static long |
serialVersionUID |
Constructor and Description |
---|
SAMSequenceDictionary() |
SAMSequenceDictionary(java.util.List<SAMSequenceRecord> list) |
Modifier and Type | Method and Description |
---|---|
void |
addSequence(SAMSequenceRecord sequenceRecord) |
SAMSequenceRecord |
addSequenceAlias(java.lang.String originalName,
java.lang.String altName)
Add an alias to a SAMSequenceRecord.
|
void |
assertSameDictionary(SAMSequenceDictionary that)
Non-comprehensive
equals(Object) -assertion: instead of calling SAMSequenceRecord.equals(Object) on constituent
SAMSequenceRecord s in this dictionary against its pair in the target dictionary, in order, call
SAMSequenceRecord.isSameSequence(SAMSequenceRecord) . |
boolean |
equals(java.lang.Object o)
returns true if the two dictionaries are the same, aliases are NOT considered
|
long |
getReferenceLength() |
SAMSequenceRecord |
getSequence(int sequenceIndex) |
SAMSequenceRecord |
getSequence(java.lang.String name) |
int |
getSequenceIndex(java.lang.String sequenceName) |
java.util.List<SAMSequenceRecord> |
getSequences() |
int |
hashCode() |
boolean |
isEmpty() |
java.lang.String |
md5()
return a MD5 sum for ths dictionary, the checksum is re-computed each
time this method is called.
|
void |
setSequences(java.util.List<SAMSequenceRecord> list)
Replaces the existing list of SAMSequenceRecords with the given list.
|
int |
size() |
java.lang.String |
toString() |
public static final long serialVersionUID
public SAMSequenceDictionary()
public SAMSequenceDictionary(java.util.List<SAMSequenceRecord> list)
public java.util.List<SAMSequenceRecord> getSequences()
public SAMSequenceRecord getSequence(java.lang.String name)
public void setSequences(java.util.List<SAMSequenceRecord> list)
list
- This value is used directly, rather than being copied.public void addSequence(SAMSequenceRecord sequenceRecord)
public SAMSequenceRecord getSequence(int sequenceIndex)
public int getSequenceIndex(java.lang.String sequenceName)
public int size()
public long getReferenceLength()
public boolean isEmpty()
public void assertSameDictionary(SAMSequenceDictionary that)
equals(Object)
-assertion: instead of calling SAMSequenceRecord.equals(Object)
on constituent
SAMSequenceRecord
s in this dictionary against its pair in the target dictionary, in order, call
SAMSequenceRecord.isSameSequence(SAMSequenceRecord)
.
Aliases are ignored.java.lang.AssertionError
- When the dictionaries are not the same, with some human-readable information as to whypublic boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public SAMSequenceRecord addSequenceAlias(java.lang.String originalName, java.lang.String altName)
1,chr1,chr01,01,CM000663,NC_000001.10
e.g:
MT,chrM
originalName
- existing contig namealtName
- new contig namepublic java.lang.String md5()
md5( (seq1.md5_if_available) + ' '+(seq2.name+seq2.length) + ' '+...)
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object