Writes BGEN records.
Converts BgenRows into InternalRow with a given required schema.
Converts internal rows to BGEN rows.
Converts internal rows to BGEN rows. Includes logic to infer phasing and ploidy if missing (eg. when converting from VCF rows with no GT field), using the number of alleles and the number of posterior probabilities.
- If phasing and ploidy are missing, we assume ploidy is defaultPloidy. - If phasing is missing:
IllegalStateException
if phasing or ploidy cannot be inferred or a single row contains
both unphased and phased data.
Infers the schema of a set of BGEN files from the user-provided options and the header of each file.
Infers the schema of a set of BGEN files from the user-provided options and the header of each file.
Currently the implementation is very simple. It checks if sample IDs are defined in either a
.sample file or in any of the headers. If so, it returns a fixed schema that includes a
sampleId
genotype field. If not, it returns the same schema without a sampleId
field.
Converts BgenRows into InternalRow with a given required schema. During construction, this class will throw an IllegalArgumentException if any of the fields in the required schema cannot be derived from a BGEN record.