zhengxwen/HIBAG

Error loading sample pre-built models

Closed this issue · 2 comments

I'm trying to get Hibag working with just the pre-built example data to get myself started and I'm already stuck. On Hibag v1.20 running on R 3.5.1, this is what I am experiencing:

`

library (HIBAG)
HIBAG (HLA Genotype Imputation with Attribute Bagging)
Kernel Version: v1.4
Supported by Streaming SIMD Extensions (SSE2) [64-bit]
model_obj <- get (load ("European-HLA4-hg19.RData"))
model <- hlaModelFromObj (model_obj)
Error in hlaModelFromObj(model_obj) :
inherits(obj, "hlaAttrBagObj") is not TRUE
`

I tried "solving the problem myself" by making a copy of the hlaModelFromObj function and removing the stopifnot () check at the beginning, but that did not work. I've unfortunately reached the level of my R debugging skills. I can look into model_obj and do a summary () of it and the data seems valid.

If you can tell me what I am doing wrong, feel free to let me know.

Thanks!

Use

model_obj <- get(load("European-HLA4-hg19.RData"))
model <- hlaModelFromObj(model_obj$A)

Yes, that was the problem I was facing -- thank you very much for the prompt help!