View source: R/readSampleNamesFromVcfHeader.R
readSampleNamesFromVcfHeader | R Documentation |
Reads the header of a VCF file and returns sample names as character vector
readSampleNamesFromVcfHeader(file, ...)
file |
a |
... |
all additional arguments are passed on internally to
|
This function is a simple wrapper around the
scanBcfHeader
function from the
Rsamtools
package
that scans the header of a VCF file and returns the sample
names as a character vector.
a character vector with sample names
Ulrich Bodenhofer
https://github.com/UBod/podkat
https://github.com/samtools/hts-specs
Li, H., Handsaker, B., Wysoker, A., Fenell, T., Ruan, J., Homer, N., Marth, G., Abecasis, G., Durbin, R., and 1000 Genome Project Data Processing Subgroup (2009) The Sequence Alignment/Map format and SAMtools. Bioinformatics 25, 2078-2079. DOI: \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1093/bioinformatics/btp352")}.
scanBcfHeader
vcfFile <- system.file("examples/example1.vcf.gz", package="podkat")
readSampleNamesFromVcfHeader(vcfFile)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.