Skip to content

Commit

Permalink
Correct contigs data bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
ABignaud committed Apr 5, 2023
1 parent bcbcd1d commit e84cdcd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions metator/validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down

0 comments on commit e84cdcd

Please sign in to comment.