Skip to main content

write_vcf_header

Function write_vcf_header 

Source
pub fn write_vcf_header<W: Write>(
    writer: &mut W,
    dict: &SequenceDictionary,
    sample: Option<&str>,
    version: &str,
    command_line: &str,
) -> Result<()>
Expand description

Write a VCF header for a methylation-annotated VCF to writer.

The header includes:

  • ##fileformat=VCFv4.4
  • ##holodeckVersion=<version>
  • ##holodeckCommand=<command_line>
  • ##FORMAT lines for GT, MT, and MB
  • One ##contig line per entry in dict
  • The #CHROM column header with one sample column

sample is the sample name written in the column header. If None, DEFAULT_METHYLATE_SAMPLE is used.

ยงErrors

Returns an error if any write to writer fails.