Description Usage Arguments Details Author(s) References See Also Examples
genoDataAsVCF
creates a VCF-class
object.
vcfWrite
writes a VCF file from a GenotypeData
object.
vcfCheck
compares the genotypes in a VCF file to
the corresponding genotypes in genoData
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | genoDataAsVCF(genoData, sample.col="scanID",
id.col="snpID", qual.col=NULL, filter.cols=NULL,
info.cols=NULL, scan.exclude=NULL, snp.exclude=NULL,
scan.order=NULL, ref.allele=NULL)
vcfWrite(genoData, vcf.file="out.vcf", sample.col="scanID",
id.col="snpID", qual.col=NULL, filter.cols=NULL,
info.cols=NULL, scan.exclude=NULL, snp.exclude=NULL,
scan.order=NULL, ref.allele=NULL, block.size=1000, verbose=TRUE)
vcfCheck(genoData, vcf.file,
sample.col="scanID", id.col="snpID",
scan.exclude=NULL, snp.exclude=NULL,
block.size=1000, verbose=TRUE)
|
genoData |
A |
vcf.file |
Filename for the output VCF file. |
sample.col |
name of the column in the scan annotation to use as sample IDs in the VCF file |
id.col |
name of the column in the SNP annotation to use as "ID" column in the VCF file |
qual.col |
name of the column in the SNP annotation to use as "QUAL" column in the VCF file |
filter.cols |
vector of column names in the SNP annotation to use as "FILTER" column in the VCF file. These columns should be logical vectors, with |
info.cols |
vector of column names in the SNP annotation to concatenate for the "INFO" column in the VCF file. |
scan.exclude |
vector of scanIDs to exclude from creation or checking of VCF file |
snp.exclude |
vector of snpIDs to exclude from creation or checking of VCF file |
scan.order |
vector of scanIDs to include in VCF file, in the order in which they should be written |
ref.allele |
vector of "A" or "B" values indicating where allele A or allele B should be the reference allele for each SNP. Default is to use allele A as the reference allele. |
block.size |
Number of SNPs to read from |
verbose |
logical for whether to show progress information. |
REF will be alleleA and ALT will be alleleB.
vcfCheck compares the genotypes (diploid only) in a VCF file to
the corresponding genotypes in genoData
. It stops with
an error when it detects a discordant genotype. It assumes that
the "ID" column of the VCF file has unique values that can be
matched with a column in the SNP annotation. The VCF file may
contain additional samples or SNPs not present in the
genoData
; these records will be automaticlaly excluded from the check.
Users may exclude additional SNPs and samples (i.e. those
overlapping with genoData
) using the scan.exclude
and snp.exclude
arguments.
Stephanie Gogarten, Michael Lawrence, Sarah Nelson
The variant call format and VCFtools. Danecek P, Auton A, Abecasis G, Albers CA, Banks E, DePristo MA, Handsaker RE, Lunter G, Marth GT, Sherry ST, McVean G, Durbin R; 1000 Genomes Project Analysis Group. Bioinformatics. 2011 Aug 1;27(15):2156-8. Epub 2011 Jun 7.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | library(GWASdata)
library(VariantAnnotation)
gdsfile <- system.file("extdata", "illumina_geno.gds", package="GWASdata")
data(illuminaSnpADF, illuminaScanADF)
genoData <- GenotypeData(GdsGenotypeReader(gdsfile),
scanAnnot=illuminaScanADF, snpAnnot=illuminaSnpADF)
vcf <- genoDataAsVCF(genoData, id.col="rsID")
vcf
vcffile <- tempfile()
vcfWrite(genoData, vcffile, id.col="rsID", info.cols="IntensityOnly")
vcf <- readVcf(vcffile, "hg18")
vcf
vcfCheck(genoData, vcffile, id.col="rsID")
close(genoData)
unlink(vcffile)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.