getVarSet.Rd
Retrieve varSet record(s) for specified unit(s) and/or varSetName(s).
object
can be either a varSetList
or a varSetFile
.
getVarSet(object, unit = NULL, varSetName = NULL)
A varSetList
or varSetFile
.
Vector of unit(s) to retrieve
Use listUnits()
to see which units are included in the varSetList/varSetFile.
Vector of unit(s) to retrieve
Use listVarSets()
to see which varSets are included in the varSetList/varSetFile.
library(rvatData)
# connect to varsetfile from rvatData package
# to build a varsetfile, see ?buildVarSet
varsetfile <- varSetFile(rvat_example("rvatData_varsetfile.txt.gz"))
# retrieve specific genes, this will return a varSetList (see ?varSetList)
varsets <- getVarSet(varsetfile, unit = c("SOD1", "FUS"))
head(varsets)
#> varSetList
#> Contains 6 records
#> [[1]]
#> unit=FUS
#> varSetName=Moderate
#> VAR_id=1176,1177,1180,1182,1183,1186,1188,1192,1193,1194,1196,1198,1200,1202,1205,1206,1207,1208,1210,1211,1215,1216,1218,1219,1221,1222,1223,1224,1225,1226,1227,1228,1233,1234,1236,1239,1240,1241,1244,1245,1246,1248,1249,1250,1252,1253,1254,1256,1257,1258,1261,1262,1263,1265,1266
#> w=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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
#>
#> [[2]]
#> unit=FUS
#> varSetName=ModerateHigh
#> VAR_id=1175,1176,1177,1180,1182,1183,1186,1188,1192,1193,1194,1196,1198,1200,1202,1205,1206,1207,1208,1210,1211,1215,1216,1218,1219,1221,1222,1223,1224,1225,1226,1227,1228,1233,1234,1236,1239,1240,1241,1244,1245,1246,1248,1249,1250,1252,1253,1254,1256,1257,1258,1261,1262,1263,1265,1266
#> w=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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
#>
#> [[3]]
#> unit=FUS
#> varSetName=High
#> VAR_id=1175
#> w=1
#>
#> [[4]]
#> unit=FUS
#> varSetName=CADD
#> VAR_id=1173,1174,1175,1176,1177,1178,1179,1180,1181,1182,1183,1184,1185,1186,1187,1188,1189,1190,1191,1192,1193,1194,1195,1196,1197,1198,1199,1200,1201,1202,1203,1204,1205,1206,1207,1208,1209,1210,1211,1212,1213,1214,1215,1216,1217,1218,1219,1220,1221,1222,1223,1224,1225,1226,1227,1228,1229,1230,1231,1232,1233,1234,1235,1236,1237,1238,1239,1240,1241,1242,1243,1244,1245,1246,1247,1248,1249,1250,1251,1252,1253,1254,1255,1256,1257,1258,1259,1260,1261,1262,1263,1264,1265,1266,1267
#> w=.,.,.,26.5,22.4,.,.,32,.,24.7,24.5,.,.,.,.,13.68,.,.,.,22.1,13.66,15.72,.,26.4,.,26,.,22.7,.,19.21,.,.,17.9,.,23.3,24,.,0.058,1.247,.,.,.,7.445,17.84,.,16.16,24.8,.,21.6,23.2,25.8,24.1,31,32,26.9,23.2,.,.,.,.,31,20.3,.,23.7,.,.,19.45,24.6,23.3,.,.,26,.,22.9,.,17.24,28.8,31,.,25,19.89,23.1,.,.,24.6,23.4,.,.,22,25.3,24.4,.,26.5,23.7,.
#>
#> [[5]]
#> unit=SOD1
#> varSetName=Moderate
#> VAR_id=1268,1270,1271,1273,1275,1276,1277,1278,1279,1281,1282,1283,1284,1285,1287,1288,1289,1290,1291,1292,1293,1294,1296,1297,1298,1299,1300,1304,1305,1306,1307,1308,1309,1312,1313,1314,1315,1316
#> w=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,1,1,1,1
#>
#> [[6]]
#> unit=SOD1
#> varSetName=ModerateHigh
#> VAR_id=1268,1270,1271,1273,1275,1276,1277,1278,1279,1281,1282,1283,1284,1285,1286,1287,1288,1289,1290,1291,1292,1293,1294,1296,1297,1298,1299,1300,1301,1302,1304,1305,1306,1307,1308,1309,1311,1312,1313,1314,1315,1316
#> w=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,1,1,1,1,1,1,1,1
#>
# the varsetfile contains multiple records per gene, (High impact, CADD scores etc.)
unique(listVarSets(varsetfile))
#> [1] "Moderate" "ModerateHigh" "High" "CADD"
# specific varSets can be selected using the `varSetName` parameter
varsets <- getVarSet(varsetfile,
unit = c("SOD1", "FUS"),
varSetName = "CADD"
)
head(varsets)
#> varSetList
#> Contains 2 records
#> [[1]]
#> unit=FUS
#> varSetName=CADD
#> VAR_id=1173,1174,1175,1176,1177,1178,1179,1180,1181,1182,1183,1184,1185,1186,1187,1188,1189,1190,1191,1192,1193,1194,1195,1196,1197,1198,1199,1200,1201,1202,1203,1204,1205,1206,1207,1208,1209,1210,1211,1212,1213,1214,1215,1216,1217,1218,1219,1220,1221,1222,1223,1224,1225,1226,1227,1228,1229,1230,1231,1232,1233,1234,1235,1236,1237,1238,1239,1240,1241,1242,1243,1244,1245,1246,1247,1248,1249,1250,1251,1252,1253,1254,1255,1256,1257,1258,1259,1260,1261,1262,1263,1264,1265,1266,1267
#> w=.,.,.,26.5,22.4,.,.,32,.,24.7,24.5,.,.,.,.,13.68,.,.,.,22.1,13.66,15.72,.,26.4,.,26,.,22.7,.,19.21,.,.,17.9,.,23.3,24,.,0.058,1.247,.,.,.,7.445,17.84,.,16.16,24.8,.,21.6,23.2,25.8,24.1,31,32,26.9,23.2,.,.,.,.,31,20.3,.,23.7,.,.,19.45,24.6,23.3,.,.,26,.,22.9,.,17.24,28.8,31,.,25,19.89,23.1,.,.,24.6,23.4,.,.,22,25.3,24.4,.,26.5,23.7,.
#>
#> [[2]]
#> unit=SOD1
#> varSetName=CADD
#> VAR_id=1268,1269,1270,1271,1272,1273,1274,1275,1276,1277,1278,1279,1280,1281,1282,1283,1284,1285,1286,1287,1288,1289,1290,1291,1292,1293,1294,1295,1296,1297,1298,1299,1300,1301,1302,1303,1304,1305,1306,1307,1308,1309,1310,1311,1312,1313,1314,1315,1316
#> w=31,.,23.4,.,.,13.44,.,23.9,24.9,22.7,24.9,24.5,.,29.6,26.5,27.1,31,26.2,34,26.6,32,29,14.85,26.2,25,16.46,23.2,.,24.3,17.52,22.8,27.4,27.6,.,25.1,.,.,23.4,28.2,27.9,16.67,27.4,.,42,25.7,.,29.2,22.4,27.3
#>
# see?varSetFile and ?varSetList for more details on connecting and handling varsetfiles.
# see e.g., ?assocTest and ?aggregate for downstream methods that can loop through varsetfiles and varsetlists.