public class GenomicsDBImporter extends Object
| Modifier and Type | Field and Description |
|---|---|
private String |
DEFAULT_ARRAYNAME |
private long |
DEFAULT_SIZE_PER_COLUMN_PARTITION |
private int |
DEFAULT_TILEDB_CELLS_PER_TILE |
private ArrayList<GenomicsDBImporterStreamWrapper> |
mBufferStreamWrapperVector |
private GenomicsDBCallsetsMapProto.CallsetMappingPB |
mCallsetMap |
private org.json.simple.JSONObject |
mCallsetMappingJSON |
private ChromosomeInterval |
mChromosomeInterval |
private boolean |
mContainsBufferStreams |
(package private) static long |
mDefaultBufferCapacity |
private boolean |
mDone |
private long[] |
mExhaustedBufferStreamIdentifiers |
private long |
mGenomicsDBImporterObjectHandle |
private boolean |
mIsLoaderSetupDone |
private long |
mLbRowIdx |
private String |
mLoaderJSONFile |
private long |
mNumExhaustedBufferStreams |
private int |
mRank |
private static String |
mTempLoaderJSONFileName |
private long |
mUbRowIdx |
private boolean |
mUsingVidMappingProtoBuf |
private GenomicsDBVidMapProto.VidMappingPB |
mVidMap |
| Constructor and Description |
|---|
GenomicsDBImporter()
Default Constructor
|
GenomicsDBImporter(Map<String,htsjdk.tribble.FeatureReader<htsjdk.variant.variantcontext.VariantContext>> sampleToVCMap,
Set<htsjdk.variant.vcf.VCFHeaderLine> mergedHeader,
ChromosomeInterval chromosomeInterval,
String workspace,
String arrayname,
Long sizePerColumnPartition,
Long segmentSize)
Constructor to create required data structures from a list
of GVCF files and a chromosome interval.
|
GenomicsDBImporter(Map<String,htsjdk.tribble.FeatureReader<htsjdk.variant.variantcontext.VariantContext>> sampleToVCMap,
Set<htsjdk.variant.vcf.VCFHeaderLine> mergedHeader,
ChromosomeInterval chromosomeInterval,
String workspace,
String arrayname,
Long sizePerColumnPartition,
Long segmentSize,
boolean useSamplesInOrderProvided)
Constructor to create required data structures from a list
of GVCF files and a chromosome interval.
|
GenomicsDBImporter(Map<String,htsjdk.tribble.FeatureReader<htsjdk.variant.variantcontext.VariantContext>> sampleToVCMap,
Set<htsjdk.variant.vcf.VCFHeaderLine> mergedHeader,
ChromosomeInterval chromosomeInterval,
String workspace,
String arrayname,
Long sizePerColumnPartition,
Long segmentSize,
String outputVidMapJSONFilePath)
Constructor to create required data structures from a list
of GVCF files and a chromosome interval.
|
GenomicsDBImporter(String loaderJSONFile)
Constructor
|
GenomicsDBImporter(String loaderJSONFile,
int rank)
Constructor
|
GenomicsDBImporter(String loaderJSONFile,
int rank,
long lbRowIdx,
long ubRowIdx)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(htsjdk.variant.variantcontext.VariantContext vc,
int streamIdx)
Write VariantContext object to stream - may fail if the buffer is full
It's the caller's responsibility keep track of the VC object that's not written
|
private int |
addBufferStream(String streamName,
htsjdk.variant.vcf.VCFHeader vcfHeader,
long bufferCapacity,
htsjdk.variant.variantcontext.writer.VariantContextWriterBuilder.OutputType streamType,
Iterator<htsjdk.variant.variantcontext.VariantContext> vcIterator,
Map<Integer,SampleInfo> sampleIndexToInfo)
Add a buffer stream or VC iterator - internal function
|
int |
addBufferStream(String streamName,
htsjdk.variant.vcf.VCFHeader vcfHeader,
long bufferCapacity,
htsjdk.variant.variantcontext.writer.VariantContextWriterBuilder.OutputType streamType,
Map<Integer,SampleInfo> sampleIndexToInfo)
Add a buffer stream as the data source - caller must:
1.
|
int |
addSortedVariantContextIterator(String streamName,
htsjdk.variant.vcf.VCFHeader vcfHeader,
Iterator<htsjdk.variant.variantcontext.VariantContext> vcIterator,
long bufferCapacity,
htsjdk.variant.variantcontext.writer.VariantContextWriterBuilder.OutputType streamType,
Map<Integer,SampleInfo> sampleIndexToInfo)
Add a sorted VC iterator as the data source - caller must:
1.
|
<SOURCE> MultiChromosomeIterator<SOURCE> |
columnPartitionIterator(htsjdk.tribble.AbstractFeatureReader<htsjdk.variant.variantcontext.VariantContext,SOURCE> reader)
Utility function that returns a MultiChromosomeIterator given an AbstractFeatureReader
that will iterate over the VariantContext objects provided by the reader belonging
to the column partition specified by this object's loader JSON file and rank/partition index
|
static <SOURCE> MultiChromosomeIterator<SOURCE> |
columnPartitionIterator(htsjdk.tribble.AbstractFeatureReader<htsjdk.variant.variantcontext.VariantContext,SOURCE> reader,
String loaderJSONFile,
int partitionIdx)
Utility function that returns a MultiChromosomeIterator given an AbstractFeatureReader
that will iterate over the VariantContext objects provided by the reader belonging
to the column partition specified by the loader JSON file and rank/partition index
|
private GenomicsDBImportConfiguration.ImportConfiguration |
createImportConfiguration(String workspace,
String arrayname,
Long sizePerColumnPartition,
Long segmentSize) |
private GenomicsDBCallsetsMapProto.CallsetMappingPB |
generateSortedCallSetMap(Map<String,htsjdk.tribble.FeatureReader<htsjdk.variant.variantcontext.VariantContext>> variants,
boolean useSamplesInOrderProvided)
Creates a sorted list of callsets and generates unique TileDB
row indices for them.
|
private GenomicsDBVidMapProto.VidMappingPB |
generateVidMapFromMergedHeader(Set<htsjdk.variant.vcf.VCFHeaderLine> mergedHeader)
Generate the ProtoBuf data structure for vid mapping
Also remember, contigs are 1-based which means
TileDB column offsets should start from 1
|
private static ArrayList<ChromosomeInterval> |
getChromosomeIntervalsForColumnPartition(String loaderJSONFile,
int partitionIdx)
Utility function that returns a list of ChromosomeInterval objects for
the column partition specified by the loader JSON file and rank/partition index
|
int |
getExhaustedBufferStreamIndex(long i)
Get buffer stream index of i-th exhausted stream
There are mNumExhaustedBufferStreams and the caller must provide data for streams
with indexes getExhaustedBufferStreamIndex(0), getExhaustedBufferStreamIndex(1),...,
getExhaustedBufferStreamIndex(mNumExhaustedBufferStreams-1)
|
private String |
getLength(htsjdk.variant.vcf.VCFHeaderLine headerLine)
Maps the "Number" from INFO or FORMAT fields in VCF header
to GenomicsDB lengths.
|
long |
getNumExhaustedBufferStreams() |
boolean |
importBatch() |
private void |
initialize(String loaderJSONFile,
int rank,
long lbRowIdx,
long ubRowIdx)
Initialize variables
|
static long |
initializeSampleInfoMapFromHeader(Map<Integer,SampleInfo> sampleIndexToInfo,
htsjdk.variant.vcf.VCFHeader vcfHeader,
long rowIdx)
Static function that reads sample names from the vcfHeader and adds entries to the map.
|
boolean |
isDone()
Is the import process completed
|
private void |
jniAddBufferStream(long genomicsDBImporterHandle,
String streamName,
boolean isBCF,
long bufferCapacity,
byte[] buffer,
long numValidBytesInBuffer)
Notify importer object that a new stream is to be added
|
private long |
jniCopyCallsetMap(long genomicsDBImporterHandle,
byte[] callsetMapAsByteArray)
Copy the callset map protocol buffer to C++ through JNI
|
private long |
jniCopyVidMap(long genomicsDBImporterHandle,
byte[] vidMapAsByteArray)
Copy the vid map protocol buffer to C++ through JNI
|
private int |
jniGenomicsDBImporter(String loaderJSONFile,
int rank,
long lbRowIdx,
long ubRowIdx)
Creates GenomicsDBImporter object when importing VCF files (no streams)
|
private static String |
jniGetChromosomeIntervalsForColumnPartition(String loaderJSONFile,
int rank)
Obtain the chromosome intervals for the column partition specified in the loader JSON file
identified by the rank.
|
private boolean |
jniImportBatch(long genomicsDBImporterHandle,
long[] exhaustedBufferIdentifiers)
Import the next batch of data into TileDB/GenomicsDB
|
private long |
jniInitializeGenomicsDBImporterObject(String loaderJSONFile,
int rank,
long lbRowIdx,
long ubRowIdx)
Creates GenomicsDBImporter object when importing VCF files (no streams)
|
private long |
jniSetupGenomicsDBLoader(long genomicsDBImporterHandle,
String callsetMappingJSON,
boolean usingVidMappingProtoBuf)
Setup loader after all the buffer streams are added
|
private void |
jniWriteDataToBufferStream(long handle,
int streamIdx,
int partitionIdx,
byte[] buffer,
long numValidBytesInBuffer) |
static File |
printLoaderJSONFile(GenomicsDBImportConfiguration.ImportConfiguration importConfiguration,
String filename)
Create a JSON file from the import configuration
|
private GenomicsDBVidMapProto.InfoField |
remove(List<GenomicsDBVidMapProto.InfoField> infoFields,
int dpIndex) |
int |
setSortedVariantContextIterator(String streamName,
htsjdk.variant.vcf.VCFHeader vcfHeader,
Iterator<htsjdk.variant.variantcontext.VariantContext> vcIterator,
long bufferCapacity,
htsjdk.variant.variantcontext.writer.VariantContextWriterBuilder.OutputType streamType,
Map<Integer,SampleInfo> sampleIndexToInfo)
Sets sorted VC iterator as the data source and calls setupGenomicsDBImporter().
|
void |
setupGenomicsDBImporter()
Setup the importer after all the buffer streams are added, but before any
data is inserted into any stream
No more buffer streams can be added once setupGenomicsDBImporter() is called
|
void |
write()
Write to TileDB/GenomicsDB using the configuration specified in the
loader file passed to constructor
|
void |
write(int rank,
long lbRowIdx)
Write to TileDB/GenomicsDB using the configuration specified in the
loader file passed to constructor
|
void |
write(int rank,
long lbRowIdx,
long ubRowIdx)
Write to TileDB/GenomicsDB using the configuration specified in the
loader file passed to constructor
|
void |
write(long lbRowIdx)
Write to TileDB/GenomicsDB using the configuration specified in the
loader file passed to constructor
|
void |
write(String loaderJSONFile,
int rank,
long lbRowIdx,
long ubRowIdx)
Write to TileDB/GenomicsDB
|
static long mDefaultBufferCapacity
private static final String mTempLoaderJSONFileName
private final String DEFAULT_ARRAYNAME
private final long DEFAULT_SIZE_PER_COLUMN_PARTITION
private final int DEFAULT_TILEDB_CELLS_PER_TILE
private String mLoaderJSONFile
private int mRank
private long mLbRowIdx
private long mUbRowIdx
private boolean mContainsBufferStreams
private long mGenomicsDBImporterObjectHandle
private ArrayList<GenomicsDBImporterStreamWrapper> mBufferStreamWrapperVector
private boolean mIsLoaderSetupDone
private long[] mExhaustedBufferStreamIdentifiers
private long mNumExhaustedBufferStreams
private boolean mDone
private org.json.simple.JSONObject mCallsetMappingJSON
private boolean mUsingVidMappingProtoBuf
private GenomicsDBVidMapProto.VidMappingPB mVidMap
private ChromosomeInterval mChromosomeInterval
private GenomicsDBCallsetsMapProto.CallsetMappingPB mCallsetMap
public GenomicsDBImporter()
public GenomicsDBImporter(String loaderJSONFile)
loaderJSONFile - GenomicsDB loader JSON configuration filepublic GenomicsDBImporter(String loaderJSONFile, int rank)
loaderJSONFile - GenomicsDB loader JSON configuration filerank - Rank of this process (TileDB/GenomicsDB partition idx)public GenomicsDBImporter(String loaderJSONFile, int rank, long lbRowIdx, long ubRowIdx)
loaderJSONFile - GenomicsDB loader JSON configuration filerank - Rank of this process (TileDB/GenomicsDB partition idx)lbRowIdx - Smallest row idx which should be imported by this objectubRowIdx - Largest row idx which should be imported by this objectpublic GenomicsDBImporter(Map<String,htsjdk.tribble.FeatureReader<htsjdk.variant.variantcontext.VariantContext>> sampleToVCMap, Set<htsjdk.variant.vcf.VCFHeaderLine> mergedHeader, ChromosomeInterval chromosomeInterval, String workspace, String arrayname, Long sizePerColumnPartition, Long segmentSize) throws IOException
sampleToVCMap - Variant Readers objects of the input GVCF fileschromosomeInterval - Chromosome interval to traverse input VCFsworkspace - TileDB workspacearrayname - TileDB array namesizePerColumnPartition - sizePerColumnPartition in bytessegmentSize - segmentSize in bytesIOExceptionpublic GenomicsDBImporter(Map<String,htsjdk.tribble.FeatureReader<htsjdk.variant.variantcontext.VariantContext>> sampleToVCMap, Set<htsjdk.variant.vcf.VCFHeaderLine> mergedHeader, ChromosomeInterval chromosomeInterval, String workspace, String arrayname, Long sizePerColumnPartition, Long segmentSize, boolean useSamplesInOrderProvided) throws IOException
sampleToVCMap - Variant Readers objects of the input GVCF fileschromosomeInterval - Chromosome interval to traverse input VCFsworkspace - TileDB workspacearrayname - TileDB array namesizePerColumnPartition - sizePerColumnPartition in bytessegmentSize - segmentSize in bytesuseSamplesInOrderProvided - if true, don't sort samples, instead use in the the order providedIOExceptionpublic GenomicsDBImporter(Map<String,htsjdk.tribble.FeatureReader<htsjdk.variant.variantcontext.VariantContext>> sampleToVCMap, Set<htsjdk.variant.vcf.VCFHeaderLine> mergedHeader, ChromosomeInterval chromosomeInterval, String workspace, String arrayname, Long sizePerColumnPartition, Long segmentSize, String outputVidMapJSONFilePath) throws IOException
sampleToVCMap - Variant Readers objects of the input GVCF fileschromosomeInterval - Chromosome interval to traverse input VCFsIOExceptionprivate int jniGenomicsDBImporter(String loaderJSONFile, int rank, long lbRowIdx, long ubRowIdx)
loaderJSONFile - Path to loader JSON filerank - Rank of object - corresponds to the partition index in the loader
for which this object will import datalbRowIdx - Smallest row idx which should be imported by this objectubRowIdx - Largest row idx which should be imported by this objectprivate long jniInitializeGenomicsDBImporterObject(String loaderJSONFile, int rank, long lbRowIdx, long ubRowIdx)
loaderJSONFile - Path to loader JSON filerank - Rank of object - corresponds to the partition index in the
loader for which this object will import datalbRowIdx - Smallest row idx which should be imported by this objectubRowIdx - Largest row idx which should be imported by this objectprivate long jniCopyVidMap(long genomicsDBImporterHandle,
byte[] vidMapAsByteArray)
genomicsDBImporterHandle - Reference to a C++ GenomicsDBImporter objectvidMapAsByteArray - INFO, FORMAT, FILTER header lines and contig positionsprivate long jniCopyCallsetMap(long genomicsDBImporterHandle,
byte[] callsetMapAsByteArray)
genomicsDBImporterHandle - Reference to a C++ GenomicsDBImporter objectcallsetMapAsByteArray - Callset name and row index mapprivate void jniAddBufferStream(long genomicsDBImporterHandle,
String streamName,
boolean isBCF,
long bufferCapacity,
byte[] buffer,
long numValidBytesInBuffer)
genomicsDBImporterHandle - "pointer" returned by jniInitializeGenomicsDBImporterObjectstreamName - name of the streamisBCF - use BCF format to pass data to C++ layerbufferCapacity - in bytesbuffer - initialization buffer containing the VCF/BCF headernumValidBytesInBuffer - num valid bytes in the buffer (length of the header)private long jniSetupGenomicsDBLoader(long genomicsDBImporterHandle,
String callsetMappingJSON,
boolean usingVidMappingProtoBuf)
genomicsDBImporterHandle - "pointer" returned by jniInitializeGenomicsDBImporterObjectcallsetMappingJSON - JSON formatted string containing globally consistent callset
name to row index mappingprivate void jniWriteDataToBufferStream(long handle,
int streamIdx,
int partitionIdx,
byte[] buffer,
long numValidBytesInBuffer)
handle - "pointer" returned by jniInitializeGenomicsDBImporterObjectstreamIdx - stream indexpartitionIdx - partition index (unused now)buffer - buffer containing datanumValidBytesInBuffer - num valid bytes in the bufferprivate boolean jniImportBatch(long genomicsDBImporterHandle,
long[] exhaustedBufferIdentifiers)
genomicsDBImporterHandle - "pointer" returned by jniInitializeGenomicsDBImporterObjectexhaustedBufferIdentifiers - contains the list of exhausted buffer stream identifiers
- the number of
exhausted streams is stored in the last element of the arrayprivate static String jniGetChromosomeIntervalsForColumnPartition(String loaderJSONFile, int rank)
loaderJSONFile - path to loader JSON filerank - rank/partition indexprivate GenomicsDBImportConfiguration.ImportConfiguration createImportConfiguration(String workspace, String arrayname, Long sizePerColumnPartition, Long segmentSize)
public static File printLoaderJSONFile(GenomicsDBImportConfiguration.ImportConfiguration importConfiguration, String filename)
importConfiguration - The configuration objectprivate GenomicsDBCallsetsMapProto.CallsetMappingPB generateSortedCallSetMap(Map<String,htsjdk.tribble.FeatureReader<htsjdk.variant.variantcontext.VariantContext>> variants, boolean useSamplesInOrderProvided)
variants - Variant Readers objects of the input GVCF filesprivate void initialize(String loaderJSONFile, int rank, long lbRowIdx, long ubRowIdx)
loaderJSONFile - GenomicsDB loader JSON configuration filerank - Rank of this process (TileDB/GenomicsDB partition idx)lbRowIdx - Smallest row idx which should be imported by this objectubRowIdx - Largest row idx which should be imported by this objectprivate GenomicsDBVidMapProto.VidMappingPB generateVidMapFromMergedHeader(Set<htsjdk.variant.vcf.VCFHeaderLine> mergedHeader)
mergedHeader - Header from all input GVCFs are merged to
create one vid map for allprivate GenomicsDBVidMapProto.InfoField remove(List<GenomicsDBVidMapProto.InfoField> infoFields, int dpIndex)
private String getLength(htsjdk.variant.vcf.VCFHeaderLine headerLine)
headerLine - Info or Format header line from VCFpublic static long initializeSampleInfoMapFromHeader(Map<Integer,SampleInfo> sampleIndexToInfo, htsjdk.variant.vcf.VCFHeader vcfHeader, long rowIdx)
sampleIndexToInfo - map: key=sampleIndex in vcfHeader: value=SampleInfovcfHeader - VCF headerrowIdx - Starting row index from which to assignpublic int addBufferStream(String streamName, htsjdk.variant.vcf.VCFHeader vcfHeader, long bufferCapacity, htsjdk.variant.variantcontext.writer.VariantContextWriterBuilder.OutputType streamType, Map<Integer,SampleInfo> sampleIndexToInfo) throws GenomicsDBException
streamName - Name of the stream being added - must be unique with respect to this
GenomicsDBImporter objectvcfHeader - VCF header for the streambufferCapacity - Capacity of the stream buffer in bytesstreamType - BCF_STREAM or VCF_STREAMsampleIndexToInfo - map from sample index in the vcfHeader to SampleInfo object which
contains row index and globally unique name
can be set to null, which implies that the mapping is stored in a callsets JSON fileGenomicsDBExceptionpublic int addSortedVariantContextIterator(String streamName, htsjdk.variant.vcf.VCFHeader vcfHeader, Iterator<htsjdk.variant.variantcontext.VariantContext> vcIterator, long bufferCapacity, htsjdk.variant.variantcontext.writer.VariantContextWriterBuilder.OutputType streamType, Map<Integer,SampleInfo> sampleIndexToInfo) throws GenomicsDBException
streamName - Name of the stream being added - must be unique with respect
to this GenomicsDBImporter objectvcfHeader - VCF header for the streamvcIterator - Iterator over VariantContext objectsbufferCapacity - Capacity of the stream buffer in bytesstreamType - BCF_STREAM or VCF_STREAMsampleIndexToInfo - map from sample index in the vcfHeader to SampleInfo object
which contains row index and globally unique name
can be set to null, which implies that the mapping is
stored in a callsets JSON fileGenomicsDBExceptionpublic int setSortedVariantContextIterator(String streamName, htsjdk.variant.vcf.VCFHeader vcfHeader, Iterator<htsjdk.variant.variantcontext.VariantContext> vcIterator, long bufferCapacity, htsjdk.variant.variantcontext.writer.VariantContextWriterBuilder.OutputType streamType, Map<Integer,SampleInfo> sampleIndexToInfo) throws GenomicsDBException, IOException
streamName - Name of the stream being added - must be unique with respect to
this GenomicsDBImporter objectvcfHeader - VCF header for the streamvcIterator - Iterator over VariantContext objectsbufferCapacity - Capacity of the stream buffer in bytesstreamType - BCF_STREAM or VCF_STREAMsampleIndexToInfo - map from sample index in the vcfHeader to SampleInfo
object which contains row index and globally unique name
can be set to null, which implies that the mapping is stored in a
callsets JSON fileGenomicsDBException - thrown if incorrect iterator or missing JSON configurationIOException - thrown if incorrect iterator or missing JSON configuration
filesprivate int addBufferStream(String streamName, htsjdk.variant.vcf.VCFHeader vcfHeader, long bufferCapacity, htsjdk.variant.variantcontext.writer.VariantContextWriterBuilder.OutputType streamType, Iterator<htsjdk.variant.variantcontext.VariantContext> vcIterator, Map<Integer,SampleInfo> sampleIndexToInfo) throws GenomicsDBException
streamName - Name of the stream being added - must be unique with respect to this
GenomicsDBImporter objectvcfHeader - VCF header for the streambufferCapacity - Capacity of the stream buffer in bytesstreamType - BCF_STREAM or VCF_STREAMvcIterator - Iterator over VariantContext objects - can be nullsampleIndexToInfo - map from sample index in the vcfHeader to SampleInfo object which
contains row index and globally unique name can be set to null,
which implies that the mapping is stored in a callsets JSON fileGenomicsDBExceptionpublic void setupGenomicsDBImporter()
throws IOException
IOException - throws IOException if modified callsets JSON cannot be writtenpublic boolean add(htsjdk.variant.variantcontext.VariantContext vc,
int streamIdx)
throws GenomicsDBException,
htsjdk.samtools.util.RuntimeIOException
vc - VariantContext objectstreamIdx - index of the stream returned by the addBufferStream() callGenomicsDBExceptionhtsjdk.samtools.util.RuntimeIOExceptionpublic boolean importBatch()
throws IOException
IOException - if the wimport failspublic long getNumExhaustedBufferStreams()
public int getExhaustedBufferStreamIndex(long i)
i - i-th exhausted buffer streampublic boolean isDone()
private static ArrayList<ChromosomeInterval> getChromosomeIntervalsForColumnPartition(String loaderJSONFile, int partitionIdx) throws org.json.simple.parser.ParseException
loaderJSONFile - path to loader JSON filepartitionIdx - rank/partition indexorg.json.simple.parser.ParseException - when there is a bug in the JNI interface and a faulty JSON is returnedpublic static <SOURCE> MultiChromosomeIterator<SOURCE> columnPartitionIterator(htsjdk.tribble.AbstractFeatureReader<htsjdk.variant.variantcontext.VariantContext,SOURCE> reader, String loaderJSONFile, int partitionIdx) throws org.json.simple.parser.ParseException, IOException
SOURCE - LineIterator for VCFs, PositionalBufferedStream for BCFsreader - AbstractFeatureReader over VariantContext objects -
SOURCE can vary - BCF v/s VCF for exampleloaderJSONFile - path to loader JSON filepartitionIdx - rank/partition indexIOException - when the reader's query method throws an IOExceptionorg.json.simple.parser.ParseException - when there is a bug in the JNI interface and a faulty JSON is returnedpublic <SOURCE> MultiChromosomeIterator<SOURCE> columnPartitionIterator(htsjdk.tribble.AbstractFeatureReader<htsjdk.variant.variantcontext.VariantContext,SOURCE> reader) throws org.json.simple.parser.ParseException, IOException
SOURCE - LineIterator for VCFs, PositionalBufferedStream for BCFsreader - AbstractFeatureReader over VariantContext objects -
SOURCE can vary - BCF v/s VCF for exampleIOException - when the reader's query method throws an IOExceptionorg.json.simple.parser.ParseException - when there is a bug in the JNI interface and a faulty JSON is returnedpublic void write()
throws GenomicsDBException
GenomicsDBExceptionpublic void write(long lbRowIdx)
throws GenomicsDBException
lbRowIdx - Minimum row idx from which new data will be addedGenomicsDBExceptionpublic void write(int rank,
long lbRowIdx)
throws GenomicsDBException
rank - Rank of this process (TileDB/GenomicsDB partition idx)lbRowIdx - Minimum row idx from which new data will be addedGenomicsDBExceptionpublic void write(int rank,
long lbRowIdx,
long ubRowIdx)
throws GenomicsDBException
rank - Rank of this process (TileDB/GenomicsDB partition idx)lbRowIdx - Minimum row idx from which new data will be addedubRowIdx - Maximum row idx upto which new data will be addedGenomicsDBExceptionpublic void write(String loaderJSONFile, int rank, long lbRowIdx, long ubRowIdx) throws GenomicsDBException
loaderJSONFile - GenomicsDB loader JSON configuration filerank - Rank of this process (TileDB/GenomicsDB partition idx)lbRowIdx - Minimum row idx from which new data will be addedubRowIdx - Maximum row idx upto which new data will be addedGenomicsDBExceptionCopyright © 2017. All rights reserved.