andrewrech / antigen.garnish

Other
46 stars 13 forks source link

Error with class II #123

Closed itamuria closed 4 years ago

itamuria commented 4 years ago

Hello,

When I run the script with allele of Class I, I don't have any problem and I obtain good results. But when I try with alleles of Class II, sometimes I obtain errors.

For example with HLA-DQA1 I obtain good results but for example with HLA-DRB1*03:01:

Merging output
Error in l[[dti]]$command : $ operator is invalid for atomic vectors
Calls: %>% ... merge_predictions -> lapply -> FUN -> %>% -> eval -> eval
In addition: Warning message:

I have seen that the downloaded alleles are called HLA-DQA1 but in the case of DRB is without HLA. Could it be the source of the problem? How should I write them?

Thanks, All the best, Ibon

leeprichman commented 4 years ago

Hi Ibon, This looks like the appropriate syntax for DRB1*03:01, but that DQA1 format will not work, is it possible you have these two switched?

Antigen garnish rewrites the allele names to the correct format before sending to the prediction algorithm. list_mhc() will return a table of all possible allele formats, however this was generated a while ago and may not work for the most recent versions of netMHCII and netMHCIIpan. I would try the versions from the paper and see if you have the same trouble.

itamuria commented 4 years ago

Hi Lee,

All of them are working well:

HLA-A*01:01 HLA-A*30:02 HLA-B*08:01 HLA-B*18:02 HLA-C*05:01 HLA-C*07:02 HLA-DQA1*05:01 HLA-DQB1*02:01 HLA-DPA1*01:03

But the next 2 doesn't work.

HLA-DRB1*03:01 HLA-DPB1*04:01

I have checked the list_mhc() table and I found HLA-DRB1*03:01 but I can't find HLA-DPB1*04:01 because all DPB are without 1 (DPB1) and because smallest value after HLA-DPB is 10.

I think it would be more practical to check the alleles at the beginning of the analysis and not at the end.

Thanks, Ibon

leeprichman commented 4 years ago

Hi Ibon,

If the MHC allele does not appear in the output of list_MHC(), it is not supported by the versions of netMHCII and/or netMHCIIpan that we performed the original study around. We did not tailor our list of supported alleles to be version specific, so it is possible that these alleles would not be supported. I would make sure you are using the netMHCII and netMHCIIpan versions from the paper for the most reliable results. netMHCII-2.2 and netMHCIIpan-3.0. If those alleles are not supported by those versions, antigen.garnish may error when trying to run wrap calls to these programs. You may need to run predictions for these alleles on your own.

I would also ensure that there are no strange characters or spaces in your HLA allele string, this can cause netMHC to hang or return empty results.

-Lee