R/cgpGr2Vcf.R

Defines functions variantGR2Vcf

Documented in variantGR2Vcf

## Convert variant GRanges into a VCF
## **DEPRECATED** in favor of VRanges

variantGR2Vcf <- function(x, sample.id, project = NULL,
                          genome = unique(GenomicRanges::genome(x)))
{
  variantGRangesIsDeprecated("variantGR2Vcf")
  vr <- makeVRangesFromVariantGRanges(x, genome)
  sampleNames(vr) <- sample.id
  genome(vr) <- genome
  metadata(vr)$project <- project
  asVCF(vr, meta = if (!is.null(project)) "project" else character())
}
lawremi/VariantTools documentation built on March 4, 2024, 11:54 a.m.