public class CompositeMotifFinder extends MotifFinder
SuffixArray
as its internal representation of a biological sequence, allowing access to the number of occurrences of a
given motif and the indices of these occurrences in the sequence.Modifier and Type | Class and Description |
---|---|
private static class |
CompositeMotifFinder.CompositeFindResults |
MotifFinder.EmptyFindResults, MotifFinder.UncompressedFindResults
Modifier and Type | Field and Description |
---|---|
private java.util.List<MotifFinder> |
motifFinders |
private static long |
serialVersionUID |
private int[] |
startOffsets |
BIPARTITE_INIT_CACHE_SIZE, BIPARTITE_INIT_LEN, BIPARTITE_INIT_N_COUNT_MAX, BIPARTITE_INIT_N_COUNT_MIN, checkMotifFinderResults, countCache, DEFAULT_MAX_HASH_LENGTH, discardOverlaps, doPersisting, ExtraGeneMotifFinderIdentifier, extraGeneSoftCache, geneLength, geneStarts, genomeSoftCache, groupSoftCache, maxHashLength, NO_WILDCARD_OPTIMIZATION, rand, seqID, sequence, simpleFindCache, TemporaryMotifFinderIdentifier, UNEQUAL_GENE_LENGTHS, wildcardOptimizationCutoff
Constructor and Description |
---|
CompositeMotifFinder(java.util.List<MotifFinder> pMotifFinders)
Calls
super(String, int) . |
CompositeMotifFinder(MotifFinder motifFinder1,
MotifFinder motifFinder2) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Returns a deep copy of this suffix array motif finder, with the exception that the new suffix array uses the same array and string,
which never get changed.
|
int |
count(Motif motif)
Returns the number of times that pattern occurs in the sequence.
|
int |
count(Motif m,
int k)
Returns the number of times that any motif with a hamming distance from m of up to k occurs in the sequence; not implemented.
|
int |
count(java.lang.String pattern)
Returns the number of times that pattern occurs in the sequence.
|
MotifFinder |
createNewInstance(java.lang.String seqID,
java.lang.String sequence,
int geneLength)
|
int[] |
find(Motif motif)
Returns the number of times that pattern occurs in the sequence.
|
int[] |
find(Motif m,
int k)
Returns the indices of where any motif with a hamming distance from m of up to k occurs in the sequence; not implemented.
|
int[] |
find(java.lang.String pattern)
Returns an unsorted array of the indices of where pattern occurs in the sequence.
|
FindResults |
findResults(Motif motif) |
FindResults |
findResults(java.lang.String pattern) |
int |
getBaseCount()
Returns the number of bases in the sequence.
|
int |
getGeneCount()
Returns the number of genes in the sequence.
|
int |
getGeneIDOf(int seqIndex)
Returns the ID of the gene on which the given index in the sequence is located-- these ID's start at 1.
|
private int |
getMotifFinderIndex(int seqIndex) |
int |
getPositionInGene(int seqIndex) |
static java.lang.String |
getUsedMemoryInMb() |
protected void |
initializeDataStructure()
Initializes the internal suffix array.
|
static void |
main(java.lang.String[] args) |
private void |
readObject(java.io.ObjectInputStream in)
Calls in.defaultReadObject() and reconstructs sa.
|
private void |
writeObject(java.io.ObjectOutputStream out)
Calls out.defaultWriteObject() and serializes sa.a so that sa can be restored.
|
areOnSameGene, count, countGenes, createFindResults, createNewInstance, find, findResults, getAveragePercentageLengthVariation, getAvgGeneLength, getCountCacheSize, getDiscardOverlaps, getEndIndexOf, getFindCacheSize, getFindResults, getGeneSequence, getInternalGeneLength, getSequence, getSequenceLength, getWildcardOptimizationCutoff, hasUniformGeneLengths, initialize, isCachingOn, loadBipartiteCaches, resetExtraGeneSoftCache, setDiscardOverlaps, setWildcardOptimization, simpleFind, strandCount, strandCount, toString, turnOffCaching, turnOnCaching, turnOnCaching, turnOnCaching, wildcardFind
private static final long serialVersionUID
private final transient java.util.List<MotifFinder> motifFinders
private final transient int[] startOffsets
public CompositeMotifFinder(java.util.List<MotifFinder> pMotifFinders)
super(String, int)
.public CompositeMotifFinder(MotifFinder motifFinder1, MotifFinder motifFinder2)
public static java.lang.String getUsedMemoryInMb()
public static void main(java.lang.String[] args)
public java.lang.Object clone()
clone
in class MotifFinder
public int count(Motif motif)
count
in class MotifFinder
public int count(Motif m, int k)
count
in class MotifFinder
java.lang.IllegalArgumentException
- Because this method hasn't been implementedpublic int count(java.lang.String pattern)
count
in class MotifFinder
public MotifFinder createNewInstance(java.lang.String seqID, java.lang.String sequence, int geneLength)
createNewInstance
in class MotifFinder
public int[] find(Motif motif)
find
in class MotifFinder
public int[] find(Motif m, int k)
find
in class MotifFinder
java.lang.IllegalArgumentException
- Because this method hasn't been implementedpublic int[] find(java.lang.String pattern)
find
in class MotifFinder
public FindResults findResults(Motif motif)
findResults
in class MotifFinder
public FindResults findResults(java.lang.String pattern)
findResults
in class MotifFinder
public int getBaseCount()
getBaseCount
in class MotifFinder
public int getGeneCount()
MotifFinder
getGeneCount
in class MotifFinder
public int getGeneIDOf(int seqIndex)
MotifFinder
getGeneIDOf
in class MotifFinder
private int getMotifFinderIndex(int seqIndex)
public int getPositionInGene(int seqIndex)
getPositionInGene
in class MotifFinder
protected void initializeDataStructure()
initializeDataStructure
in class MotifFinder
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException
java.io.IOException