Package htsjdk.samtools.cram.ref
Class CRAMLazyReferenceSource
- java.lang.Object
-
- htsjdk.samtools.cram.ref.CRAMLazyReferenceSource
-
- All Implemented Interfaces:
CRAMReferenceSource
public class CRAMLazyReferenceSource extends Object implements CRAMReferenceSource
A lazy CRAMReferenceSource implementation, for use when no explicit reference source has been provided by the user. This allows client code to have a CRAMReferenceSource to thread through the CRAM code and to access containers, slices, and un-normalized CRAM records and otherwise perform operations such as indexing that do not require a reference to be resolved. If a reference sequence is actually requested, throws an exception.
-
-
Constructor Summary
Constructors Constructor Description CRAMLazyReferenceSource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
getReferenceBases(SAMSequenceRecord sequenceRecord, boolean tryNameVariants)
getReferenceBases
-
-
-
Method Detail
-
getReferenceBases
public byte[] getReferenceBases(SAMSequenceRecord sequenceRecord, boolean tryNameVariants)
Description copied from interface:CRAMReferenceSource
getReferenceBases- Specified by:
getReferenceBases
in interfaceCRAMReferenceSource
- Parameters:
sequenceRecord
- 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 match- Returns:
- the upper cased, normalized (see
Utils.normalizeBase(byte)
) bases representing the requested sequence, or null if the sequence cannot be found
-
-