Skip to content

Commit

Permalink
bug fix process.py
Browse files Browse the repository at this point in the history
Missing a return for config file function and correcting a error message to print the correct df
  • Loading branch information
dthoward96 authored Feb 16, 2024
1 parent ed2402a commit c51653e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion process.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ def get_config(config_file, database):
if type(config_dict) is dict:
try:
config_dict = config_dict['Submission']
return config_dict
except:
print("Error: there is no Submission information in the config file.", file=sys.stderr)
sys.exit(1)
Expand Down Expand Up @@ -274,7 +275,7 @@ def process_fasta_samples(metadata, fasta_file):
# Check duplicates in fasta_df
duplicated_df = fasta_df[fasta_df.duplicated(subset = ["fasta_name_orig"], keep = False)]
if not duplicated_df.empty:
print("Error: Sequences in fasta file must be unique at: " + fasta_file + "\nDuplicate Sequences\n" + df["fasta_sequence_orig"].to_string(index=False), file=sys.stderr)
print("Error: Sequences in fasta file must be unique at: " + fasta_file + "\nDuplicate Sequences\n" + fasta_df["fasta_name_orig"].to_string(index=False), file=sys.stderr)
sys.exit(1)
# Validate duplicates don't appear on merge
try:
Expand Down

0 comments on commit c51653e

Please sign in to comment.