varSet.Rd
An S4 class to manage an individual varSet record. Usually multiple varSets
will be included in a varSetList
or varSetFile
object, which can be generated using the buildVarSet
method.
unit
Unit name (such as the gene or transcript ID)
varSetName
Name of the variant set (such as 'LOF', 'moderate', 'CADD')
VAR_id
VAR_ids included in the varSet
w
weights included in the varSet
metadata
metadata
In the following code snippets, x is a varSet object.
listVars(x)
: Return a vector of all VAR_ids included in the varSet
listWeights(x)
: Return a vector of all weights in the varSet
A varSet object can be supplied to the varSet
parameter in the getGT()
method to load the
variants included in the varSet.
library(rvatData)
varsetfile <- varSetFile(rvat_example("rvatData_varsetfile.txt.gz"))
varset <- getVarSet(varsetfile, unit = c("NEK1"), varSetName = "High")[[1]]
# list variants and weights included in the varSet
listVars(varset)
#> [1] "1324" "1329" "1330" "1331" "1342" "1350" "1354" "1358" "1362" "1366"
#> [11] "1377" "1384" "1390" "1394" "1407" "1408" "1410" "1416" "1422" "1423"
#> [21] "1424" "1429" "1446" "1449" "1451" "1454" "1459" "1461" "1483" "1484"
#> [31] "1485" "1493" "1496"
listWeights(varset)
#> [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
# note that usually you'll work with varSets in either a varSetList or
# a varSetFile (see ?varSetList and ?varSetFile)