readVcf-methods | R Documentation |
Read Variant Call Format (VCF) files, attaches the given TVTBparam
in the metadata
slot of the resulting VCF
object,
and attaches optional phenotype information in the phenoData
slot.
## S4 method for signature 'character,TVTBparam'
readVcf(
file, genome, param, ..., colData = DataFrame(), autodetectGT = FALSE)
## S4 method for signature 'TabixFile,TVTBparam'
readVcf(
file, genome, param, ..., colData = DataFrame(), autodetectGT = FALSE)
file , genome |
See |
param |
The |
... |
Additional arguments, passed to methods. |
colData |
Phenotype information in a If supplied, only samples identifiers present in |
autodetectGT |
If |
VCF
object.
See ?VCF
for complete details of the class structure.
A warning
message is issued if genotypes cannot be fully defined,
when autodetectGT=TRUE
.
Kevin Rue-Albrecht
readVcf,TabixFile,ScanVcfParam-method
,
and VCF
.
# Example data ----
# VCF file
vcfFile <- system.file("extdata", "moderate.vcf.gz", package = "TVTB")
# Phenotype file
phenoFile <- system.file("extdata", "moderate_pheno.txt", package = "TVTB")
phenotypes <- S4Vectors::DataFrame(read.table(phenoFile, TRUE, row.names = 1))
# TVTB parameters
tparam <- TVTBparam(Genotypes("0|0", c("0|1", "1|0"), "1|1"))
# Example usage ----
vcf <- readVcf(vcfFile, "b37", tparam, colData = phenotypes)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.