Java Query Package
The GenomicsDBFeatureReader package can be used to read from a GenomicsDB workspace.
- template<T, SOURCE> org::genomicsdb::reader::GenomicsDBFeatureReader : public htsjdk::tribble::FeatureReader< T > , public org.genomicsdb.importer.extensions.JsonFileExtensions
A reader for GenomicsDB that implements htsjdk.tribble.FeatureReader Currently, the reader only return htsjdk.variant.variantcontext.VariantContext
Public Functions
- inline GenomicsDBFeatureReader (final GenomicsDBExportConfiguration.ExportConfiguration exportConfiguration, final FeatureCodec< T, SOURCE > codec, final Optional< String > loaderJSONFile)
Constructor
- Parameters
exportConfiguration – query parameters
codec – FeatureCodec, currently only htsjdk.variant.bcf2.BCF2Codec and htsjdk.variant.vcf.VCFCodec are tested
loaderJSONFile – GenomicsDB loader JSON configuration file
- Throws
IOException – when data cannot be read from the stream
-
inline Object getHeader()
Return the VCF header of the combined gVCF stream
- Returns
the VCF header of the combined gVCF stream
-
inline List<String> getSequenceNames()
Return the list of contigs in the combined VCF header
- Returns
list of strings of the contig names
-
inline CloseableTribbleIterator<T> iterator()
Return an iterator over htsjdk.variant.variantcontext.VariantContext objects for the specified TileDB array and query configuration
- Returns
iterator over htsjdk.variant.variantcontext.VariantContext objects
- inline CloseableTribbleIterator< T > query (final String chr, final int start, final int end)
Return an iterator over htsjdk.variant.variantcontext.VariantContext objects for the specified TileDB array and queried position
- Parameters
chr – contig name
start – start position (1-based)
end – end position, inclusive (1-based)
- Returns
iterator over htsjdk.variant.variantcontext.VariantContext objects
The GenomicsDBQuery package can also be used to query a workspace.