public class DualRandomAccessSequenceCache extends Object implements RandomAccessSequenceInterface
| Constructor and Description |
|---|
DualRandomAccessSequenceCache() |
| Modifier and Type | Method and Description |
|---|---|
char |
get(int referenceIndex,
int position)
Return the base in the specified reference at the given position.
|
int |
getLength(int targetIndex)
Returns the length of the target sequence at index targetIndex.
|
void |
getRange(int referenceIndex,
int position,
int length,
it.unimi.dsi.lang.MutableString bases)
Return bases from a range of positions in the cache.
|
int |
getReferenceIndex(String referenceId)
Return the index of the reference, or -1 if the name is not found in the genome.
|
String |
getReferenceName(int index)
Return the reference name corresponding to this index.
|
void |
load(String filename)
Load either a Picard fasta index genome, or goby random access genome.
|
int |
size()
Return the number of sequences in the cache.
|
public void load(String filename) throws IOException, ClassNotFoundException
filename - IOExceptionClassNotFoundExceptionpublic char get(int referenceIndex,
int position)
RandomAccessSequenceInterfaceget in interface RandomAccessSequenceInterfacereferenceIndex - index of the reference sequence.position - zero-based position in the reference for which the base is sought.public int getLength(int targetIndex)
RandomAccessSequenceInterfacegetLength in interface RandomAccessSequenceInterfacetargetIndex - Index of the target sequence.public void getRange(int referenceIndex,
int position,
int length,
it.unimi.dsi.lang.MutableString bases)
RandomAccessSequenceInterfacegetRange in interface RandomAccessSequenceInterfacereferenceIndex - Name of the reference sequenceposition - position where the range startslength - length of the range for which bases should be returned.bases - where the bases will be written.public int getReferenceIndex(String referenceId)
RandomAccessSequenceInterfacegetReferenceIndex in interface RandomAccessSequenceInterfacereferenceId - name of the reference.public String getReferenceName(int index)
RandomAccessSequenceInterfacegetReferenceName in interface RandomAccessSequenceInterfaceindex - for the specified referencepublic int size()
RandomAccessSequenceInterfacesize in interface RandomAccessSequenceInterfaceCopyright © 2017 Campagne Laboratory. All rights reserved.