Compression in this function always uses "bgzip"
for compatibility with "tabix"
.
write_vcf(
haps,
out_prefix,
compress = FALSE,
sample_matrix = NULL,
show_progress = FALSE,
overwrite = FALSE
)
A haplotypes
object.
Prefix for the output file.
Logical specifying whether or not to compress output file, or
an integer specifying the level of compression, from 1 to 9.
If TRUE
, a compression level of 6
is used.
Defaults to FALSE
.
Matrix to specify how haplotypes are grouped into samples
if samples are not haploid. There should be one row for each sample, and
each row should contain indices or names for the haplotypes present in that sample.
Indices/names for haplotypes cannot be repeated.
Instead of repeating indices here, you should use the dup_haps
method of the haplotypes
class to duplicate the necessary haplotype(s).
The number of columns indicates the ploidy level: 2 columns for diploid,
3 for triploid, 4 for tetraploid, and so on;
there is no limit to the ploidy level.
If this argument is NULL
, it's assumed that each haplotype is its own
separate sample.
Defaults to NULL
.
Logical for whether to show a progress bar.
Defaults to FALSE
.
Logical for whether to overwrite existing file(s) of the
same name, if they exist. Defaults to FALSE
.
NULL