dev/retrieve-phenotype-names.R

library(tiledb)

uri <- "s3://genomic-datasets/gwas/ukbiobank-gwasdb"

query <- list(
  phenotype = NULL,
  chr = cbind("1", "1"),
  pos = cbind(0, 1e+06)
)

tdb <- tiledb_array(
    uri,
    query_type = "WRITE",
    as.data.frame = TRUE,
    attrs = c("pval"),
    selected_ranges = query
)

system.time(results <- tdb[])

unique(results$phenotype)

which(unique(results$phenotype) == "Number in household")
TileDB-Inc/gwasexplorer documentation built on Oct. 31, 2022, 8 a.m.