From 75dec8238952ea13024f88d0d8c56bced2307e8a Mon Sep 17 00:00:00 2001 From: Tim O'Donnell <timodonnell@gmail.com> Date: Tue, 20 Feb 2018 16:03:31 -0500 Subject: [PATCH] fix --- mhcflurry/train_allele_specific_models_command.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mhcflurry/train_allele_specific_models_command.py b/mhcflurry/train_allele_specific_models_command.py index c67eed70..adee8150 100644 --- a/mhcflurry/train_allele_specific_models_command.py +++ b/mhcflurry/train_allele_specific_models_command.py @@ -431,7 +431,9 @@ def subselect_df_held_out(df, recriprocal_held_out_fraction=10, seed=0): (train, test) = next(kf.split(df, df.key)) selected_allele_peptides = df.iloc[train].allele_peptide.unique() - result_df = df.allele_peptide.isin(selected_allele_peptides) + result_df = df.loc[ + df.allele_peptide.isin(selected_allele_peptides) + ] del result_df["allele_peptide"] return result_df -- GitLab