Hi Dirk,
Thank you for the reply (I am in Gianmauro’s team who asked the original question:))
We are still struggling on how to do a basic import even in cases where there should not be any multi-allelic entries. For example, we have downloaded the vcf file from UKB publicly available from here: https://gwas.mrcieu.ac.uk/datasets/ukb-a-99/
We import the study ukb-a-99 study into the TileDB dataset using the command:
tiledbvcf store
And when we try to import the vcf into R we still get the same error:
library(tiledb)
Trying to import it all
gwasdb = tiledb::tiledb_array(gwasdb_uri, “READ”, return_as=“data.frame”, is.sparse = TRUE)
gwasdb[“1”,]
Non-char var.num columns are not currently supported.
…
Error: Expecting an external pointer: [type=NULL].
schema(gwasdb)
Error: tiledb_dim tile UINT32 value not representable as an R integer
When we try to import some attributes, it works fine:
gwasdb = tiledb::tiledb_array(gwasdb_uri, “READ”,attrs = c(“real_start_pos”,“end_pos”,“alleles”,“id”),return_as = “data.frame”)
But adding some other columns from the vcf, we get error:
gwasdb = tiledb::tiledb_array(gwasdb_uri, “READ”,attrs = c(“real_start_pos”,“end_pos”,“alleles”,“id”,“filter_ids”),return_as = “data.frame”)
gwasdb[“1”,]
Non-char var.num columns are not currently supported.
Error: Expecting an external pointer: [type=NULL].
Adding some other columns from the vcf, for example Allele frequency that goes from 0 to 1 in the vcf file, we get error:
gwasdb = tiledb::tiledb_array(gwasdb_uri, “READ”,attrs = c(“real_start_pos”,“end_pos”,“alleles”,“id”,“fmt_AF”),return_as = “data.frame”)
gwasdb[“1”,]
Error in if (is.na(varnum) && !nullable) { :
missing value where TRUE/FALSE needed
Can you please help point to what we can do, or a tutorial, if there is a way to import vcf and read them from ukb for example into R?
Looking int the function, it looks like the function is importing from the pointer as NA instead of 1, but we hope you could help us understand why this would be happening.
Thank you very much for any pointers and help,
All Best,
Claudia and Gianmauro