zhengxwen / HIBAG

R package – HLA Genotype Imputation with Attribute Bagging (development version only)
https://hibag.s3.amazonaws.com/index.html
29 stars 7 forks source link

Error loading sample pre-built models #9

Closed rwanwork closed 5 years ago

rwanwork commented 5 years ago

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!

zhengxwen commented 5 years ago

Use

model_obj <- get(load("European-HLA4-hg19.RData"))
model <- hlaModelFromObj(model_obj$A)
rwanwork commented 5 years ago

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