loadSNPDataFromVCF: loadSNPDataFromVCF

Description Usage Arguments Details Value Examples

View source: R/loadSNPDataFromVCF.R

Description

Load BAF-like data from a VCF file based on the variant allele frequency

Usage

1
loadSNPDataFromVCF(vcf.file, regions=NULL, genome="hg19", mirror.baf=TRUE, verbose=TRUE)

Arguments

vcf.file

The name of the VCF file with the data

regions

The regions to which we will limit the import (defaults to NULL)

genome

(a character)The name of the genome (defaults to "hg19")

mirror.baf

Flip the baf of about half the snps (the ones in odd positions in the genome) to achieve a mirror-like effect as in SNP arrays (defaults to TRUE)

verbose

Wether information messages should be generated. (defaults to TRUE)

Details

Given a VCF file the function will compute BAF-like values based on the variant allele frequency contained in it and return a GRanges object with a column named "baf".

Value

A GRanges object with a range per variant and a column named baf

Examples

1
2
3
4
5
6
vcf.file <- system.file("extdata", "example.vcf.gz", package = "CopyNumberPlots", mustWork = TRUE)
# These examples fail in windows. Commenting them out temporarily
# snps <- loadSNPDataFromVCF(vcf.file)

#kp <- plotKaryotype(plot.type = 4)
#plotBAF(kp, snps = snps, labels = names(snps))

CopyNumberPlots documentation built on Nov. 8, 2020, 6:51 p.m.