class BgenRecordWriter extends GlowLogging
Writes BGEN records.
- Alphabetic
- By Inheritance
- BgenRecordWriter
- GlowLogging
- LazyLogging
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
BgenRecordWriter(outputStream: OutputStream, schema: StructType, writeHeader: Boolean, numVariants: Long, bitsPerProb: Int, maxPloidy: Int, defaultPloidy: Int, defaultPhasing: Boolean)
- outputStream
The output stream to write to
- schema
Schema of the input rows
- writeHeader
If true, write the header
- numVariants
Number of variants (for the header)
- bitsPerProb
Number of bits used to represent each genotype/haplotype probability value
- maxPloidy
If ploidy is missing, it is inferred as some value in [1, maxPloidy]
- defaultPloidy
If phasing and ploidy are missing or the inferred ploidy is ambiguous, we assume ploidy is defaultPloidy
- defaultPhasing
If phasing is missing and the inferred phasing is ambiguous, we assume phasing is defaultPhasing
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- val buffSize: Int
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
- def close(): Unit
- val converter: InternalRowToBgenRowConverter
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
getCompressedGenotypeProbabilityData(row: BgenRow): (Int, Array[Byte])
# Bytes | Description
# Bytes | Description
+
4 | Number of samples ----------------------------------------------------------------------------------------------- 2 | Number of alleles ----------------------------------------------------------------------------------------------- 1 | Minimum ploidy of samples ----------------------------------------------------------------------------------------------- 1 | Maximum ploidy of samples ----------------------------------------------------------------------------------------------- N | The nth byte represents the ploidy and missingness of the nth sample. Ploidy is | encoded in the least significant 6 bits of this value. Missingness is encoded by the | most significant bit (1 if missing). ----------------------------------------------------------------------------------------------- 1 | 1 if phased, 0 if unphased ----------------------------------------------------------------------------------------------- 1 | Number of bits used to store each probability = B ----------------------------------------------------------------------------------------------- X | Probabilities for each possible haplotype (if phased)/genotype (if unphased) -----------------------------------------------------------------------------------------------
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- var headerHasBeenWritten: Boolean
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
lazy val
logger: Logger
- Attributes
- protected
- Definition Classes
- LazyLogging
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- val probBlockSizeMap: HashMap[GenotypeCharacteristics, ProbabilityBlockSize]
- val probabilityWriter: (Long, LittleEndianDataOutputStream) ⇒ Unit
- val stream: LittleEndianDataOutputStream
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
write(row: InternalRow): Unit
A Bgen file consists of a header followed by M variant data blocks.
A Bgen file consists of a header followed by M variant data blocks. Variant data blocks consist of: - Variant identifying data - Genotype data block
-
def
writeGenotypeDataBlock(row: BgenRow): Unit
# Bytes | Description
# Bytes | Description
+
4 | Total length of the the rest of the data for this variant = C -------------------------------------------------------------------------------------- 4 | Total length of the probability data after decompression = D -------------------------------------------------------------------------------------- C-4 | Genotype probability data for each of the N samples: decompressed to D bytes --------------------------------------------------------------------------------------