public class ReferenceSource extends java.lang.Object implements CRAMReferenceSource
Constructor and Description |
---|
ReferenceSource(java.io.File file) |
ReferenceSource(java.nio.file.Path path) |
ReferenceSource(ReferenceSequenceFile rsFile) |
Modifier and Type | Method and Description |
---|---|
void |
clearCache() |
static CRAMReferenceSource |
getDefaultCRAMReferenceSource()
Attempts to construct a default CRAMReferenceSource for use with CRAM files when
one has not been explicitly provided.
|
int |
getDownloadTriesBeforeFailing() |
byte[] |
getReferenceBases(SAMSequenceRecord record,
boolean tryNameVariants)
getReferenceBases
|
void |
setDownloadTriesBeforeFailing(int downloadTriesBeforeFailing) |
public ReferenceSource(java.io.File file)
public ReferenceSource(java.nio.file.Path path)
public ReferenceSource(ReferenceSequenceFile rsFile)
public static CRAMReferenceSource getDefaultCRAMReferenceSource()
java.lang.IllegalStateException
- if no default reference source can be acquiredjava.lang.IllegalArgumentException
- if the reference_fasta environment variable refers to a
a file that doesn't exist
Construct a default reference source to use when an explicit reference has not been provided by checking for fallback sources in this order:
public void clearCache()
public byte[] getReferenceBases(SAMSequenceRecord record, boolean tryNameVariants)
CRAMReferenceSource
getReferenceBases
in interface CRAMReferenceSource
record
- the SAMSequenceRecord identifying the reference
being requestedtryNameVariants
- if true, attempt to match the requested sequence name
against the reference by using common name variations,
such as adding or removing a leading "chr" prefix
from the requested name. if false, use exact matchUtils.normalizeBase(byte)
)
bases representing the requested sequence, or null if the sequence cannot be foundpublic int getDownloadTriesBeforeFailing()
public void setDownloadTriesBeforeFailing(int downloadTriesBeforeFailing)