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())
}

Try the VariantTools package in your browser

Any scripts or data that you put into this service are public.

VariantTools documentation built on Nov. 8, 2020, 8:03 p.m.