#257 gave BigMHC a row-wise predict_pairs(peptides, alleles) / predict_pairs_dataframe. The command-line pan-allele predictors (NetMHCpan, NetMHCstabpan, and their BaseCommandlinePredictor siblings) still only take a fixed allele set in the constructor and score peptide × allele — there is no way to score row-wise (peptide[i], allele[i]) pairs.
For paired data — each peptide carries its own allele (neoantigen / patient-genotype scoring) — every caller writes the same grouping loop:
scores = {}
for allele, rows in df.groupby("allele"):
predictor = NetMHCpan(alleles=[allele])
result = predictor.predict_peptides_dataframe(rows.peptide.unique())
for _, r in result.iterrows():
scores[(r.peptide, allele)] = r.score
Request
Add predict_pairs(peptides, alleles) and predict_pairs_dataframe(...) to the command-line predictors (ideally on BaseCommandlinePredictor, so every pan-allele tool gets it), matching BigMHC's signature from #257. It would group by allele internally, run the binary once per allele, and return one row per pair in input order. Alleles a tool cannot parse could be surfaced the way predict_peptides already handles UnsupportedAllele, rather than each caller reinventing skip-vs-fail.
This is the generalization noted in #254 — the same row-wise gap, for the command-line side.
#257 gave
BigMHCa row-wisepredict_pairs(peptides, alleles)/predict_pairs_dataframe. The command-line pan-allele predictors (NetMHCpan,NetMHCstabpan, and theirBaseCommandlinePredictorsiblings) still only take a fixed allele set in the constructor and score peptide × allele — there is no way to score row-wise(peptide[i], allele[i])pairs.For paired data — each peptide carries its own allele (neoantigen / patient-genotype scoring) — every caller writes the same grouping loop:
Request
Add
predict_pairs(peptides, alleles)andpredict_pairs_dataframe(...)to the command-line predictors (ideally onBaseCommandlinePredictor, so every pan-allele tool gets it), matching BigMHC's signature from #257. It would group by allele internally, run the binary once per allele, and return one row per pair in input order. Alleles a tool cannot parse could be surfaced the waypredict_peptidesalready handlesUnsupportedAllele, rather than each caller reinventing skip-vs-fail.This is the generalization noted in #254 — the same row-wise gap, for the command-line side.