Description Usage Arguments Details Value Examples
View source: R/loadSNPDataFromVCF.R
Load BAF-like data from a VCF file based on the variant allele frequency
1 | loadSNPDataFromVCF(vcf.file, regions=NULL, genome="hg19", mirror.baf=TRUE, verbose=TRUE)
|
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) |
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".
A GRanges object with a range per variant and a column named baf
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))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.