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

Training in parallel causes error for loci "other" than HLA #13

Open shubhamsaini opened 3 years ago

shubhamsaini commented 3 years ago

I am trying to train HIBAG models for loci other than HLA. Training the models in parallel causes the following error:

> hlaAllele(true_kir_types_train$sample.id, H1=true_kir_types_train$allele1, H2=true_kir_types_train$allele2, locus="any")
....
....
....
> hlaParallelAttrBagging(cl, train.allele, traingeno, nclassifier=10, auto.save="output.RData")

Calculating matching proportion:
Error in hlaCombineAllele(res, rv[[i]]) : 
  H1$pos.start == H2$pos.start is not TRUE

However, if I change the locus parameter in hlaAllele to some HLA gene, no error is thrown:

> hlaAllele(true_kir_types_train$sample.id, H1=true_kir_types_train$allele1, H2=true_kir_types_train$allele2, locus="A")
zhengxw-ab commented 3 years ago
hlaAllele(sample.id, H1, H2, max.resolution="", locus="any", assembly="auto",
         locus.pos.start=NA_integer_, locus.pos.end=NA_integer_, prob=NULL,
         na.rm=TRUE)

You will need to specify locus.pos.start and locus.pos.end.

shubhamsaini commented 3 years ago

Thanks @zhengxw-ab But specifying the locus.pos.start and locus.pos.end still causes the same error.