From 3539efb6b92065a9a0f8305e465c608198fc81cb Mon Sep 17 00:00:00 2001 From: Remi PLANEL <rplanel@pasteur.fr> Date: Tue, 19 Dec 2023 15:17:53 +0100 Subject: [PATCH] Handle cif --- packages/df-wiki-cli/df_wiki_cli/content/main.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/df-wiki-cli/df_wiki_cli/content/main.py b/packages/df-wiki-cli/df_wiki_cli/content/main.py index bea0f2d4..a8c1669d 100644 --- a/packages/df-wiki-cli/df_wiki_cli/content/main.py +++ b/packages/df-wiki-cli/df_wiki_cli/content/main.py @@ -134,8 +134,11 @@ def structure( for row in reader: dir_name = system_to_dir[row["system"]] # console.rule(f"[bold blue]{dir_name}", style="blue") + pdb_path_file = Path(row["pdb"]) + cif_file_name = Path(str(pdb_path_file).split(".pdb")[0] + ".cif") files = [ - {"f": Path(row["pdb"]), "d": "PDB"}, + {"f": pdb_path_file, "d": "PDB"}, + {"f": cif_file_name, "d": "CIF"}, {"f": Path(row["pae_table"]), "d": "PAE"}, {"f": Path(row["fasta_file"]), "d": "Fastas"}, {"f": Path(row["Foldseek_name"]), "d": "foldseek_monomers_html"}, @@ -151,4 +154,6 @@ def structure( if file_to_copy.exists(): shutil.copy2(file_to_copy, target_dir) else: - console.print(f"[red] file {str(file_to_copy.name)} does not exist") + console.print( + f"[red] file {str(file_to_copy.name)} does not exist" + ) -- GitLab