Skip to content

Commit

Permalink
refactor: simplify genome picking based on hpc & --genome arg
Browse files Browse the repository at this point in the history
  • Loading branch information
kelly-sovacool committed Aug 13, 2024
1 parent e025aff commit 4c9a522
Showing 1 changed file with 10 additions and 14 deletions.
24 changes: 10 additions & 14 deletions src/renee/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,19 @@ def setup(sub_args, ifiles, repo_path, output_path):
# bundled reference genome or a user generated reference genome built via
# renee build subcommand
hpcname = get_hpcname()
if hpcname == "biowulf":
print("Thank you for running RENEE on BIOWULF!")
genome_config = os.path.join(
output_path, "config", "genomes", hpcname, sub_args.genome + ".json"
)
elif hpcname == "frce":
print("Thank you for running RENEE on FRCE!")
genome_config = os.path.join(
output_path, "config", "genomes", hpcname, sub_args.genome + ".json"
)
else:
genome_config = os.path.join(
output_path, "config", "genomes", sub_args.genome + ".json"
)
ty_message = "Thank you for running RENEE"
ty_message += f" on {hpcname.upper()}!" if hpcname else "!"
print(ty_message)

if sub_args.genome.endswith(".json"):
# Provided a custom reference genome generated by renee build
genome_config = os.path.abspath(sub_args.genome)
else:
genome_config = os.path.join(
output_path, "config", "genomes", hpcname, sub_args.genome + ".json"
)
if not os.path.exists(genome_config):
raise FileNotFoundError(f"Genome config file does not exist: {genome_config}")

required = {
# Template for project-level information
Expand Down

0 comments on commit 4c9a522

Please sign in to comment.