public interface ReferenceDataSource extends GATKDataSource<java.lang.Byte>, java.lang.AutoCloseable
Modifier and Type | Method and Description |
---|---|
default void |
close()
Permanently close this data source.
|
htsjdk.samtools.SAMSequenceDictionary |
getSequenceDictionary()
Get the sequence dictionary for this reference
|
static ReferenceDataSource |
of(java.nio.file.Path fastaPath)
Initialize this data source using a fasta file.
|
static ReferenceDataSource |
of(java.nio.file.Path fastaPath,
boolean preserveAmbiguityCodesAndCapitalization)
Initialize this data source using a fasta file.
|
static ReferenceDataSource |
of(ReferenceBases bases,
htsjdk.samtools.SAMSequenceDictionary referenceSequenceDictionary)
Initialize this data source using ReferenceBases and corresponding sequence dictionary.
|
default java.util.Iterator<java.lang.Byte> |
query(SimpleInterval interval)
Query a specific interval on this reference, and get back an iterator over the bases spanning that interval.
|
default htsjdk.samtools.reference.ReferenceSequence |
queryAndPrefetch(SimpleInterval interval)
Query a specific interval on this reference, and get back all bases spanning that interval at once.
|
htsjdk.samtools.reference.ReferenceSequence |
queryAndPrefetch(java.lang.String contig,
long start,
long stop)
Query a specific interval on this reference, and get back all bases spanning that interval at once.
|
static ReferenceDataSource of(java.nio.file.Path fastaPath)
fastaPath
- reference fasta Pathstatic ReferenceDataSource of(java.nio.file.Path fastaPath, boolean preserveAmbiguityCodesAndCapitalization)
preserveFileBases
is true
, will NOT convert IUPAC bases in the file to `N` and will NOT capitalize lower-case bases.
NOTE: Most GATK tools do not support data created by setting preserveFileBases
to true
.fastaPath
- reference fasta PathpreserveAmbiguityCodesAndCapitalization
- Whether to preserve the original bases in the given reference file path.static ReferenceDataSource of(ReferenceBases bases, htsjdk.samtools.SAMSequenceDictionary referenceSequenceDictionary)
default htsjdk.samtools.reference.ReferenceSequence queryAndPrefetch(SimpleInterval interval)
interval
- query intervalhtsjdk.samtools.reference.ReferenceSequence queryAndPrefetch(java.lang.String contig, long start, long stop)
contig
- query interval contigstart
- query interval startstop
- query interval stopdefault java.util.Iterator<java.lang.Byte> query(SimpleInterval interval)
query
in interface GATKDataSource<java.lang.Byte>
interval
- query intervalhtsjdk.samtools.SAMSequenceDictionary getSequenceDictionary()
default void close()
close
in interface java.lang.AutoCloseable