loadSNPDataFromVCF {CopyNumberPlots} | R Documentation

## loadSNPDataFromVCF

### Description

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

### Usage

    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

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

[Package CopyNumberPlots version 1.4.0 Index]