public class SimpleAlignment<S extends org.biojava3.core.sequence.template.Sequence<C>,C extends org.biojava3.core.sequence.template.Compound> extends Object implements Alignment<S,C>
Alignment
.Constructor and Description |
---|
SimpleAlignment() |
Modifier and Type | Method and Description |
---|---|
void |
add(int index,
String name,
S sequence) |
void |
add(String name,
S sequence) |
void |
addAllCharSets(Collection<CharSet> collection) |
void |
addCharSet(CharSet charSet) |
Map<String,S> |
asMap()
Returns this alignment as a map with sequence names as keys and sequences as values.
|
void |
clear() |
boolean |
containsAllNames(Collection<?> c) |
boolean |
containsName(String name) |
boolean |
equals(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.
|
Map<String,CharSet> |
getCharSets() |
S |
getSequence(int index) |
S |
getSequence(String name) |
int |
indexByName(String name) |
boolean |
isEmpty() |
int |
maxSequenceLength() |
void |
moveAllCharSetPositions(int start,
int offset)
Moves all contained character sets by the specified offset.
|
String |
nameByIndex(int index) |
Iterator<String> |
nameIterator() |
S |
remove(int index) |
boolean |
remove(String name) |
void |
renameSequence(String currentName,
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(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 Map<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(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(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(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(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(String name)
indexByName
in interface Alignment<S extends org.biojava3.core.sequence.template.Sequence<C>,C extends org.biojava3.core.sequence.template.Compound>
public 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 Iterator<String> nameIterator()
nameIterator
in interface Alignment<S extends org.biojava3.core.sequence.template.Sequence<C>,C extends org.biojava3.core.sequence.template.Compound>
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(String currentName, 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 Map<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(Object other)
equals
in class Object
Object.equals(java.lang.Object)