From c61978a9c8eac041b378c53e7fc0095d2f36ed0c Mon Sep 17 00:00:00 2001 From: Remi PLANEL <rplanel@pasteur.fr> Date: Tue, 28 May 2024 10:33:50 +0200 Subject: [PATCH] create a dict system -> model version --- data/system-model-version.yaml | 147 ++++++++++++++++++ .../df-wiki-cli/df_wiki_cli/content/main.py | 5 + 2 files changed, 152 insertions(+) create mode 100644 data/system-model-version.yaml diff --git a/data/system-model-version.yaml b/data/system-model-version.yaml new file mode 100644 index 00000000..cf4af5c5 --- /dev/null +++ b/data/system-model-version.yaml @@ -0,0 +1,147 @@ +AbiA: 1.2.2 +AbiB: 1.2.2 +AbiC: 1.2.2 +AbiD: 1.2.2 +AbiE: 1.2.2 +AbiG: 1.2.2 +AbiH: 1.2.2 +AbiI: 1.2.2 +AbiJ: 1.2.2 +AbiK: 1.2.2 +AbiL: 1.2.2 +AbiN: 1.2.2 +AbiO: 1.2.2 +AbiP2: 1.2.2 +AbiQ: 1.2.2 +AbiR: 1.2.2 +AbiT: 1.2.2 +AbiU: 1.2.2 +AbiV: 1.2.2 +AbiZ: 1.2.2 +Aditi: 1.2.2 +Avs: 1.2.3 +Azaca: 1.2.2 +BREX: 1.2.2 +Borvo: 1.2.2 +BstA: 1.2.2 +Bunzi: 1.2.2 +Butters_gp30_gp31: 1.2.3 +Butters_gp57r: 1.2.3 +CBASS: 1.2.2 +CapRel: 1.2.2 +Charlie_gp32: 1.2.3 +DISARM: 1.2.2 +DRT: 1.2.2 +DarTG: 1.2.2 +Dazbog: 1.2.2 +DdmDE: 1.2.4 +Detocs: 1.2.3 +Dnd: 1.2.2 +Dodola: 1.2.2 +Dpd: 1.2.2 +Druantia: 1.2.2 +Dsr: 1.2.2 +Eleos: 1.2.2 +FS_GIY_YIG: 1.2.3 +FS_HEPN_TM: 1.2.3 +FS_HP: 1.2.3 +FS_HP_SDH_sah: 1.2.3 +FS_HsdR_like: 1.2.3 +FS_Sma: 1.2.3 +GAPS1: 1.2.3 +GAPS2: 1.2.3 +G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erTA: 1.2.2 +Rst_2TM_1TM_TIR: 1.2.2 +Rst_3HP: 1.2.2 +Rst_DUF4238: 1.2.2 +Rst_HelicaseDUF2290: 1.2.2 +Rst_Hydrolase-3Tm: 1.2.2 +Rst_RT-nitrilase-Tm: 1.2.2 +Rst_TIR-NLR: 1.2.2 +Rst_gop_beta_cll: 1.2.2 +SEFIR: 1.2.2 +SanaTA: 1.2.2 +Septu: 1.2.2 +Shango: 1.2.2 +Shedu: 1.2.2 +ShosTA: 1.2.2 +SoFIC: 1.2.2 +SpbK: 1.2.2 +SspBCDE: 1.2.2 +Stk2: 1.2.2 +Thoeris: 1.2.2 +Tiamat: 1.2.2 +Uzume: 1.2.2 +Viperin: 1.2.2 +Wadjet: 1.2.2 +Zorya: 1.2.2 +dCTPdeaminase: 1.2.2 +dGTPase: 1.2.2 +pAgo: 1.2.3 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 476e2514..918056ca 100644 --- a/packages/df-wiki-cli/df_wiki_cli/content/main.py +++ b/packages/df-wiki-cli/df_wiki_cli/content/main.py @@ -1,6 +1,7 @@ import typer import sys import json +import yaml import pandas as pd import csv import tempfile @@ -281,6 +282,7 @@ def system_operon_structure( model_dirs = list(download_model_release(releases)) systems = [] + # system_model_version = {} with open(structure) as tsvfile: tsvreader = csv.DictReader(tsvfile, delimiter="\t") for row in tsvreader: @@ -298,6 +300,7 @@ def system_operon_structure( ): system_genes_got.add(system_id) def_path = find_model_definition(system, subsystem, list_paths) + # system_model_version[system] = def_path["version"] in_exchangeables = False current_gene = {} exchangeables = [] @@ -356,6 +359,8 @@ def system_operon_structure( # gene["alternatives"] = ",".join(gene["alternatives"]) gene["id"] = id writer.writerow(gene) + # with open("./system-model-version.yaml", "w") as f_out: + # yaml.dump(system_model_version, f_out, default_flow_style=False) def download_model_release(releases): -- GitLab