|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbaobab.bio.permutation.UnsignedPermutationBPGraph
public class UnsignedPermutationBPGraph
The UnsignedPermutationBPGraph class represents an unsigned permutation pair and its breakpoint graph
Constructor Summary | |
---|---|
UnsignedPermutationBPGraph(int[] permutationList)
Creates a new linear permutation (assumes the identity permutation as target) |
|
UnsignedPermutationBPGraph(int[] permutationList,
boolean isLinear)
Creates a new permutation (assumes the identity permutation as target) |
|
UnsignedPermutationBPGraph(int[] originList,
int[] targetList)
Creates a new linear permutation |
|
UnsignedPermutationBPGraph(int[] originList,
int[] targetList,
boolean isLinear)
Creates a new permutation |
|
UnsignedPermutationBPGraph(java.util.Vector<java.lang.String> origin,
java.util.Vector<java.lang.String> target,
boolean isLinear)
Creates a new permutation |
Method Summary | |
---|---|
static java.util.Vector<int[]> |
blocksToIntArrays(java.util.Collection blocks)
Transforms the collection of blocks to a collection of arrays of int (with length = 2) |
java.lang.Object |
clone()
|
int |
compareTo(java.lang.Object object)
Compares this block to another block |
boolean |
equals(UnsignedPermutationBPGraph perm)
|
java.util.TreeSet<BPGraphPoint> |
getBreakpoints()
Gets the breakpoint list of this block |
BPGraphCycle |
getCycle(int number)
Gets the list of cycles of this group of cycles |
java.util.SortedSet<BPGraphCycle> |
getCycles()
Gets the list of cycles of this group of cycles |
java.lang.String |
getData()
|
BPGraphPoint |
getFirstPoint()
Gets the start point of the permutation |
PermutationBPGraphFormatter |
getFormatter()
Gets this breakpoint graph formatter |
BPGraphPoint |
getLastPoint()
Gets the end point of the permutation |
int |
getLastPointIndex()
Gets the index of the last point of the permutation breakpoint graph |
int |
getLongestNameLength()
Gets the longest length of a value name in the breakpoint graph |
int |
getMappedValueAt(int pos)
Gets the value of the mapped element located at a specified position of the permutation |
java.lang.String |
getNameAt(int pos)
Gets the value of the element located at a specified position of the permutation |
int |
getNumberOfCycles()
Gets the number of cycles of this group of cycles |
PermutationBPGraph |
getPermutationBPGraph()
Gets this permutation |
BPGraphPoint |
getPointAt(int pos)
Gets a point at a specific position of the permutation |
java.util.SortedSet<BPGraphPoint> |
getPoints()
Gets all points which belong to this group of cycles |
int |
getPositionOf(int value)
Gets the position where a specified element of the permutation is located |
int |
getPositionOf(java.lang.String name)
Gets the position of the element identified by the given name |
int |
getPositionOfMapped(int value)
Gets the position where a specified mapped element of the permutation is located |
java.util.SortedSet<BPGraphCycle> |
getUnorientedCycles()
Gets the list of non-oriented cycles of this group of cycles |
int |
getValueAt(int pos)
Gets the value of the element located at a specified position of the permutation |
boolean |
isAdjacency()
Tests whether this permutation is sorted |
boolean |
isLinear()
Tests whether the permutation is linear or circular |
boolean |
isRevertedAt(int pos)
Gets the value of the element located at a specified position of the permutation |
boolean |
isSorted()
Tests whether this permutation is sorted |
int |
length()
Gets the length of the block (the number of values of the permutation between its start and end points) |
UnsignedPermutationBPGraph |
revert(BPGraphPoint start,
BPGraphPoint end)
Reverts the permutation between the specified points |
UnsignedPermutationBPGraph |
revert(BPGraphReversalBlock block)
Reverts the specified block of the permutation |
UnsignedPermutationBPGraph |
revert(int start,
int end)
Reverts the permutation between the specified positions |
UnsignedPermutationBPGraph |
revertToNewPermutation(BPGraphPoint start,
BPGraphPoint end)
Make a new permutation, by reverting the permutation between the specified positions |
int |
size()
Gets the size (or the number of elements) of the permutation |
int[] |
toIntArray()
Gets a representation of the block as an array of int, with size 2, representing its start and end positions |
java.lang.String |
toString()
|
UnsignedPermutationBPGraph |
transposeToNewPermutation(BPGraphPoint start,
BPGraphPoint middle,
BPGraphPoint end)
Make a new permutation, by transposing the permutation between the specified positions |
UnsignedPermutationBPGraph |
transposeToNewPermutation(int start,
int middle,
int end)
Make a new permutation, by transposing the permutation between the specified positions |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface baobab.bio.permutation.PermutationBPGraph |
---|
getNumberOfCycles |
Constructor Detail |
---|
public UnsignedPermutationBPGraph(int[] permutationList)
permutationList
- the list of signed integers (from +/-1 to +/-n), as an array of intpublic UnsignedPermutationBPGraph(int[] permutationList, boolean isLinear)
permutationList
- the list of signed integers (from +/-1 to +/-n), as an array of intisLinear
- indicates whether the permutation is linear or circularpublic UnsignedPermutationBPGraph(int[] originList, int[] targetList)
originList
- the origin list of signed integers (from +/-1 to +/-n), as an array of inttargetList
- the target list of signed integers (from +/-1 to +/-n), as an array of intpublic UnsignedPermutationBPGraph(int[] originList, int[] targetList, boolean isLinear)
originList
- the origin list of signed integers (from +/-1 to +/-n), as an array of inttargetList
- the target list of signed integers (from +/-1 to +/-n), as an array of intisLinear
- indicates whether the permutation is linear or circularpublic UnsignedPermutationBPGraph(java.util.Vector<java.lang.String> origin, java.util.Vector<java.lang.String> target, boolean isLinear)
origin
- the origin list of unsigned markerstarget
- the target list of unsigned markersisLinear
- indicates whether the permutation is linear or circularMethod Detail |
---|
public boolean isLinear()
isLinear
in interface PermutationBPGraph
public BPGraphPoint getFirstPoint()
getFirstPoint
in interface PermutationBPGraph
public int getLastPointIndex()
PermutationBPGraph
getLastPointIndex
in interface PermutationBPGraph
public BPGraphPoint getLastPoint()
getLastPoint
in interface PermutationBPGraph
public PermutationBPGraph getPermutationBPGraph()
public int size()
size
in interface PermutationBPGraph
public BPGraphPoint getPointAt(int pos)
getPointAt
in interface PermutationBPGraph
pos
- the given position
public int getMappedValueAt(int pos)
getMappedValueAt
in interface PermutationBPGraph
pos
- the specified position
public int getValueAt(int pos)
getValueAt
in interface PermutationBPGraph
pos
- the specified position
public int getLongestNameLength()
PermutationBPGraph
getLongestNameLength
in interface PermutationBPGraph
public java.lang.String getNameAt(int pos)
getNameAt
in interface PermutationBPGraph
pos
- the specified position
public int getPositionOf(java.lang.String name)
getPositionOf
in interface PermutationBPGraph
name
- the given name
public boolean isRevertedAt(int pos)
isRevertedAt
in interface PermutationBPGraph
pos
- the specified position
public int getPositionOf(int value)
getPositionOf
in interface PermutationBPGraph
value
- the value of the specified element
public int getPositionOfMapped(int value)
getPositionOfMapped
in interface PermutationBPGraph
value
- the value of the specified mapped element
public UnsignedPermutationBPGraph revert(BPGraphReversalBlock block) throws PermutationException
block
- the block to be reverted
PermutationException
public UnsignedPermutationBPGraph revert(BPGraphPoint start, BPGraphPoint end) throws PermutationException
start
- the beginning of the reversion blockend
- the end of the reversion block
PermutationException
public UnsignedPermutationBPGraph revert(int start, int end)
start
- the beginning of the reversion blockend
- the end of the reversion block
public UnsignedPermutationBPGraph revertToNewPermutation(BPGraphPoint start, BPGraphPoint end) throws PermutationException
start
- the beginning of the reversion blockend
- the end of the reversion block
PermutationException
public UnsignedPermutationBPGraph transposeToNewPermutation(BPGraphPoint start, BPGraphPoint middle, BPGraphPoint end) throws PermutationException
start
- the beginning of the transposition blockmiddle
- the middle of the transposition blockend
- the end of the transposition block
PermutationException
public UnsignedPermutationBPGraph transposeToNewPermutation(int start, int middle, int end)
start
- the beginning of the transposition blockmiddle
- the middle of the transposition blockend
- the end of the transposition block
public boolean isAdjacency()
public boolean isSorted()
isSorted
in interface PermutationBPGraph
public java.lang.Object clone()
clone
in class java.lang.Object
public boolean equals(UnsignedPermutationBPGraph perm)
public PermutationBPGraphFormatter getFormatter()
PermutationBPGraph
getFormatter
in interface PermutationBPGraph
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getData()
public java.util.TreeSet<BPGraphPoint> getBreakpoints()
public java.util.SortedSet<BPGraphPoint> getPoints()
public int getNumberOfCycles()
public java.util.SortedSet<BPGraphCycle> getCycles()
public BPGraphCycle getCycle(int number)
public java.util.SortedSet<BPGraphCycle> getUnorientedCycles()
public int length()
public int[] toIntArray()
public int compareTo(java.lang.Object object)
compareTo
in interface java.lang.Comparable
object
- the other block
public static java.util.Vector<int[]> blocksToIntArrays(java.util.Collection blocks)
blocks
- a collection of blocks
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |