CRAMReferenceSource
public class ReferenceSource extends Object implements CRAMReferenceSource
Constructor | Description |
---|---|
ReferenceSource(ReferenceSequenceFile rsFile) |
|
ReferenceSource(File file) |
|
ReferenceSource(Path path) |
Modifier and Type | Method | 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(File file)
public ReferenceSource(Path path)
public ReferenceSource(ReferenceSequenceFile rsFile)
public static CRAMReferenceSource getDefaultCRAMReferenceSource()
IllegalStateException
- if no default reference source can be acquiredIllegalArgumentException
- 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)