gds <- seqOpen(seqExampleFileName("gds"))
gds
## sample ID
head(seqGetData(gds, "sample.id"))
## variants
# granges(gds)
## alleles as comma-separated character strings
head(seqGetData(gds, "allele"))
## alleles as DNAStringSet or DNAStringSetList
ref(gds)
v <- alt(gds)
## genotype
geno <- seqGetData(gds, "genotype")
dim(geno)
## dimensions are: allele, sample, variant
geno[1,1:10,1:5]
## rsID
head(seqGetData(gds, "annotation/id"))
## alternate allele count
head(seqGetData(gds, "annotation/info/AC"))
## individual read depth
depth <- seqGetData(gds, "annotation/format/DP")
names(depth)
## VCF header defined DP as variable-length data
table(depth$length)
## all length 1, so depth$data should be a sample by variant matrix
dim(depth$data)
depth$data[1:10,1:5]
seqClose(gds)
Run the code above in your browser using DataLab