public class SimpleAlignment<S extends org.biojava3.core.sequence.template.Sequence<C>,C extends org.biojava3.core.sequence.template.Compound> extends java.lang.Object implements Alignment<S,C>
Alignment
.Constructor and Description |
---|
SimpleAlignment() |
Modifier and Type | Method and Description |
---|---|
void |
add(int index,
java.lang.String name,
S sequence) |
void |
add(java.lang.String name,
S sequence) |
void |
addAllCharSets(java.util.Collection<CharSet> collection) |
void |
addCharSet(CharSet charSet) |
java.util.Map<java.lang.String,S> |
asMap()
Returns this alignment as a map with sequence names as keys and sequences as values.
|
void |
clear() |
boolean |
containsAllNames(java.util.Collection<?> c) |
boolean |
containsName(java.lang.String name) |
boolean |
equals(java.lang.Object other)
Checks if this alignment contains the same sequences (name and sequence) and the same character sets
(names and positions) as the specified one.
|
java.util.Map<java.lang.String,CharSet> |
getCharSets() |
S |
getSequence(int index) |
S |
getSequence(java.lang.String name) |
int |
indexByName(java.lang.String name) |
boolean |
isEmpty() |
int |
maxSequenceLength() |
void |
moveAllCharSetPositions(int start,
int offset)
Moves all contained character sets by the specified offset.
|
java.lang.String |
nameByIndex(int index) |
java.util.Iterator<java.lang.String> |
nameIterator() |
S |
remove(int index) |
boolean |
remove(java.lang.String name) |
void |
renameSequence(java.lang.String currentName,
java.lang.String newName) |
void |
renameSequences(UniqueNameMap nameMap)
Changes the sequence names in this alignment according to the parameters of the specified name map
and stores in the old and new names in map.
|
void |
replace(int index,
S sequence) |
void |
replace(java.lang.String name,
S sequence) |
boolean |
sequncesEqual(Alignment<?,?> other)
Checks if this alignment contains the same sequences (name and sequence) as the specified one.
|
int |
size() |
public SimpleAlignment()
public java.util.Map<java.lang.String,CharSet> getCharSets()
getCharSets
in interface Alignment<S extends org.biojava3.core.sequence.template.Sequence<C>,C extends org.biojava3.core.sequence.template.Compound>
public void addCharSet(CharSet charSet)
addCharSet
in interface Alignment<S extends org.biojava3.core.sequence.template.Sequence<C>,C extends org.biojava3.core.sequence.template.Compound>
public void addAllCharSets(java.util.Collection<CharSet> collection)
addAllCharSets
in interface Alignment<S extends org.biojava3.core.sequence.template.Sequence<C>,C extends org.biojava3.core.sequence.template.Compound>
public void clear()
public boolean containsName(java.lang.String name)
containsName
in interface Alignment<S extends org.biojava3.core.sequence.template.Sequence<C>,C extends org.biojava3.core.sequence.template.Compound>
public boolean containsAllNames(java.util.Collection<?> c)
containsAllNames
in interface Alignment<S extends org.biojava3.core.sequence.template.Sequence<C>,C extends org.biojava3.core.sequence.template.Compound>
public S getSequence(int index)
getSequence
in interface Alignment<S extends org.biojava3.core.sequence.template.Sequence<C>,C extends org.biojava3.core.sequence.template.Compound>
public S getSequence(java.lang.String name)
getSequence
in interface Alignment<S extends org.biojava3.core.sequence.template.Sequence<C>,C extends org.biojava3.core.sequence.template.Compound>
public int indexByName(java.lang.String name)
indexByName
in interface Alignment<S extends org.biojava3.core.sequence.template.Sequence<C>,C extends org.biojava3.core.sequence.template.Compound>
public java.lang.String nameByIndex(int index)
nameByIndex
in interface Alignment<S extends org.biojava3.core.sequence.template.Sequence<C>,C extends org.biojava3.core.sequence.template.Compound>
public boolean isEmpty()
public java.util.Iterator<java.lang.String> nameIterator()
nameIterator
in interface Alignment<S extends org.biojava3.core.sequence.template.Sequence<C>,C extends org.biojava3.core.sequence.template.Compound>
public boolean remove(java.lang.String name)
public int size()
public int maxSequenceLength()
maxSequenceLength
in interface Alignment<S extends org.biojava3.core.sequence.template.Sequence<C>,C extends org.biojava3.core.sequence.template.Compound>
public void moveAllCharSetPositions(int start, int offset)
moveAllCharSetPositions
in interface Alignment<S extends org.biojava3.core.sequence.template.Sequence<C>,C extends org.biojava3.core.sequence.template.Compound>
NonOverlappingIntervalList.movePositions(int, int)
public void renameSequence(java.lang.String currentName, java.lang.String newName)
renameSequence
in interface Alignment<S extends org.biojava3.core.sequence.template.Sequence<C>,C extends org.biojava3.core.sequence.template.Compound>
public void renameSequences(UniqueNameMap nameMap)
renameSequences
in interface Alignment<S extends org.biojava3.core.sequence.template.Sequence<C>,C extends org.biojava3.core.sequence.template.Compound>
public java.util.Map<java.lang.String,S> asMap()
public boolean sequncesEqual(Alignment<?,?> other)
sequncesEqual
in interface Alignment<S extends org.biojava3.core.sequence.template.Sequence<C>,C extends org.biojava3.core.sequence.template.Compound>
other
- public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
Object.equals(java.lang.Object)