public abstract class IterateAlignments extends Object
| Constructor and Description |
|---|
IterateAlignments() |
| Modifier and Type | Method and Description |
|---|---|
protected CharSequence |
getReferenceId(int targetIndex)
Return the reference sequence id given its index.
|
void |
iterate(Collection<String> basenames)
Iterate through a set of alignments.
|
void |
iterate(FileSlice slice,
String... basenames) |
void |
iterate(GenomicRange range,
String... basenames) |
void |
iterate(long startOffset,
long endOffset,
String basename)
Iterate through one alignment, restricting the iteration to the alignment records 'within'
the bytes startOffset and endOffset.
|
void |
iterate(String... basenames)
Iterate through a set of alignments.
|
void |
parseIncludeReferenceArgument(com.martiansoftware.jsap.JSAPResult jsapResult)
Parse the string of reference sequences to process during the iteration.
|
void |
parseIncludeReferenceArgument(String includeReferenceNameCommas)
Parse the string of reference sequences to include the iteration.
|
void |
prepareDataStructuresForReference(AlignmentReader alignmentReader,
int referenceIndex)
Called to let the subclass prepare some datastructure for each reference sequence.
|
abstract void |
processAlignmentEntry(AlignmentReader alignmentReader,
Alignments.AlignmentEntry alignmentEntry)
Process one alignment entry.
|
void |
processNumberOfReferences(String basename,
int numberOfReferences)
Will be called to let the client know how many references will be processed in a given alignment.
|
void |
setAlignmentReaderFactory(AlignmentReaderFactory factory) |
public void parseIncludeReferenceArgument(com.martiansoftware.jsap.JSAPResult jsapResult)
jsapResult - The jsapResult available to the mode.public void parseIncludeReferenceArgument(String includeReferenceNameCommas)
includeReferenceNameCommas - a comma separated string of reference names to includepublic void iterate(long startOffset,
long endOffset,
String basename)
throws IOException
FastBufferedMessageChunksReader
for details about this semantic.startOffset - Start of the allowed window, in bytes in the compressed entries file.endOffset - End of the allowed window, in bytes in the compressed entries file.basename - Basename of the alignment to iterate over.IOException - If an error occured reading the input alignment.public void iterate(String... basenames) throws IOException
basenames - Basenames of the alignments to iterate over.IOException - If an error occured reading the input alignment.public void iterate(Collection<String> basenames) throws IOException
basenames - Basenames of the alignments to iterate over.IOException - If an error occured reading the input alignment.public void iterate(GenomicRange range, String... basenames) throws IOException
IOExceptionpublic void iterate(FileSlice slice, String... basenames) throws IOException
IOExceptionpublic abstract void processAlignmentEntry(AlignmentReader alignmentReader, Alignments.AlignmentEntry alignmentEntry)
alignmentReader - The reader that parsed this entry.alignmentEntry - The parsed entry.public void prepareDataStructuresForReference(AlignmentReader alignmentReader, int referenceIndex)
alignmentReader - The reader currently being iterated over.referenceIndex - The index of the reference sequence for which data structures should be initialized.public void processNumberOfReferences(String basename, int numberOfReferences) throws IOException
basename - The basename of the alignment being processed.numberOfReferences - The number of references in this alignment.IOException - If an error occcurs.protected CharSequence getReferenceId(int targetIndex)
targetIndex - The index of the desired reference sequencepublic void setAlignmentReaderFactory(AlignmentReaderFactory factory)
Copyright © 2018 Campagne Laboratory. All rights reserved.