write_vcf: Annotate deaminations in input vcf file

Description Usage Arguments Details Value

View source: R/annotate_deaminations.R

Description

write_vcf is a special case of annotate_deaminations. It exports ideafix variant classification results to the vcf file ideafix has been run over.

Usage

1
2
3
4
5
6
write_vcf(
  classification,
  vcf_filename,
  outfolder = ".",
  outname = "ideafix_labels"
)

Arguments

classification

tibble containing the classification generated by classify_variants. It is the object to be written.

vcf_filename

character string naming the path to the input vcf, i.e. the vcf file containing the variants ideafix has been run over.

outfolder

character string naming the folder to write the file to. Defaults to current working directory (getwd).

outname

character string naming the output filename. Defaults to "ideafix_labels.vcf".

Details

The object to be written corresponds to a data frame or tibble with the following columns: CHROM, POS, REF, ALT, DEAM_SCORE, DEAMINATION. CHROM and POS identify the variant position, REF and ALT describe the reference and alternate alleles. DEAM_SCORE equals to the deamination score yielded by the selected classification algorithm (RF or XGBoost). Note that these values should not be interpreted as ordinary probabilities. DEAMINATION contains the label ideafix has assigned to the variant based on an optimized classification threshold.

The output vcf file is the result of adding DEAM_SCORE and DEAMINATION values as a new annotation in the INFO column of the vcf file ideafix has been run over. Note that not all variants in the file will have this new annotation, but only those C:G > T:A variants (as these are the only ones susceptible of being cytosine deaminations).

Value

None


mmaitenat/ideafix documentation built on Sept. 18, 2021, 7:55 a.m.