From e84cdcd3952d182c8b2c1b4a5a9039fbff7c3a26 Mon Sep 17 00:00:00 2001 From: ABignaud Date: Wed, 5 Apr 2023 19:32:58 +0200 Subject: [PATCH] Correct contigs data bug. --- metator/validation.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/metator/validation.py b/metator/validation.py index 8773529..f2c44b4 100644 --- a/metator/validation.py +++ b/metator/validation.py @@ -64,12 +64,12 @@ def correct_final_bin(contigs_data, final_fasta_dir, bin_summary): pandas.core.frame.DataFrame Dataframe with the contigs informations. """ - contigs_data.set_index("Name", inplace=True) + contigs_data = contigs_data.set_index("Name") for bin_name in bin_summary: fasta_file = join(final_fasta_dir, f"{bin_name}.fa") fasta = pyfastx.Fasta(fasta_file) for seq in fasta: - contigs_data.loc[seq.name]["Final_bin"] = bin_name + contigs_data.loc[seq.name, "Final_bin"] = bin_name return contigs_data