Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force monomorphic SNPs in model? #7

Closed
cbrunoels opened this issue Apr 3, 2019 · 1 comment
Closed

Force monomorphic SNPs in model? #7

cbrunoels opened this issue Apr 3, 2019 · 1 comment

Comments

@cbrunoels
Copy link

I have a dataset that I am training a HIBAG model on, which I would then like to combine with an existing HIBAG model so that I can incorporate HLA alleles outside of my training set. In order to do so, I have set the snpid in my training data to the pre-existing model's snp.id set (N = 966 SNPs). I can confirm that the length of my train.geno$snp.sel is in fact 966, but when I begin to train my HIBAG model it immediately removes 6 SNPs with the line: Exclude 6 monomorphic SNPs

Removing monomorphic SNPs before training a HIBAG model makes plenty of sense, but is there any parameter that allows me to force these SNPs into the model? Without those 6 SNPs in my model, I cannot combine my own trained model with the other model of interest. Here is the error code I receive: Error: identical(obj1$snp.id, obj2$snp.id) is not TRUE, where the only differences between the snp.id values are the 6 monomorphic SNP sites. Is there some way to force monomorphic SNPs into the model so that I can ultimately combine them?

@zhengxwen
Copy link
Owner

A new option mono.rm=TRUE is added to the latest version of HIBAG:

hlaAttrBagging(hla, snp, nclassifier=100L, mtry=c("sqrt", "all", "one"), prune=TRUE, na.rm=TRUE, mono.rm=TRUE, verbose=TRUE, verbose.detail=FALSE)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants