public abstract class SinglePassSamProgram extends CommandLineProgram
Modifier and Type | Field and Description |
---|---|
boolean |
ASSUME_SORTED |
java.io.File |
INPUT |
java.io.File |
OUTPUT |
long |
STOP_AFTER |
COMPRESSION_LEVEL, CREATE_INDEX, CREATE_MD5_FILE, GA4GH_CLIENT_SECRETS, MAX_RECORDS_IN_RAM, QUIET, REFERENCE_SEQUENCE, referenceSequence, specialArgumentsCollection, TMP_DIR, USE_JDK_DEFLATER, USE_JDK_INFLATER, VALIDATION_STRINGENCY, VERBOSITY
Constructor and Description |
---|
SinglePassSamProgram() |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
acceptRead(htsjdk.samtools.SAMRecord rec,
htsjdk.samtools.reference.ReferenceSequence ref)
Should be implemented by subclasses to accept SAMRecords one at a time.
|
protected int |
doWork()
Final implementation of doWork() that checks and loads the input and optionally reference
sequence files and the runs the sublcass through the setup() acceptRead() and finish() steps.
|
protected abstract void |
finish()
Should be implemented by subclasses to do one-time finalization work.
|
static void |
makeItSo(java.io.File input,
java.io.File referenceSequence,
boolean assumeSorted,
long stopAfter,
java.util.Collection<SinglePassSamProgram> programs) |
void |
setReferenceSequence(java.io.File referenceFile)
Set the reference File.
|
protected abstract void |
setup(htsjdk.samtools.SAMFileHeader header,
java.io.File samFile)
Should be implemented by subclasses to do one-time initialization work.
|
protected boolean |
usesNoRefReads()
Can be overridden and set to false if the section of unmapped reads at the end of the file isn't needed.
|
customCommandLineValidation, getCommandLine, getCommandLineParser, getDefaultHeaders, getFaqLink, getMetricsFile, getStandardUsagePreamble, getStandardUsagePreamble, getVersion, hasWebDocumentation, instanceMain, instanceMainWithExit, makeReferenceArgumentCollection, parseArgs, requiresReference, setDefaultHeaders, useLegacyParser
@Argument(shortName="I", doc="Input SAM or BAM file.") public java.io.File INPUT
@Argument(shortName="O", doc="File to write the output to.") public java.io.File OUTPUT
@Argument(doc="If true (default), then the sort order in the header file will be ignored.", shortName="AS") public boolean ASSUME_SORTED
@Argument(doc="Stop after processing N reads, mainly for debugging.") public long STOP_AFTER
public void setReferenceSequence(java.io.File referenceFile)
protected final int doWork()
doWork
in class CommandLineProgram
public static void makeItSo(java.io.File input, java.io.File referenceSequence, boolean assumeSorted, long stopAfter, java.util.Collection<SinglePassSamProgram> programs)
protected boolean usesNoRefReads()
protected abstract void setup(htsjdk.samtools.SAMFileHeader header, java.io.File samFile)
protected abstract void acceptRead(htsjdk.samtools.SAMRecord rec, htsjdk.samtools.reference.ReferenceSequence ref)
protected abstract void finish()