From 7ec2019fd1af4a3240267ab2fbafb0b63fa91df5 Mon Sep 17 00:00:00 2001 From: Aviv Rosenberg Date: Thu, 13 Jun 2024 23:11:48 +0300 Subject: [PATCH] collect-prec: add number of unmodelled residues as metadata columns --- src/pp5/collect.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/pp5/collect.py b/src/pp5/collect.py index 231786a..17e08e7 100644 --- a/src/pp5/collect.py +++ b/src/pp5/collect.py @@ -58,6 +58,7 @@ COL_PDB_SOURCE = "pdb_source" COL_REJECTED_BY = "rejected_by" COL_NUM_ALTLOCS = "num_altlocs" +COL_NUM_UNMODELLED = "num_unmodelled" COLLECTION_METADATA_FILENAME = "meta.json" ALL_STRUCTS_FILENAME = "meta-structs_all" @@ -1145,6 +1146,12 @@ def _collect_single_structure( COL_SEQ_LEN: seq_len, COL_SEQ_GAPS: str.join(";", [f"{s}-{e}" for (s, e) in prec.seq_gaps]), COL_NUM_ALTLOCS: prec.num_altlocs, + **{ + f"{COL_NUM_UNMODELLED}_{suffix}": n + for n, suffix in zip( + prec.num_unmodelled, ["nterm", "inter", "cterm"] + ) + }, COL_PDB_SOURCE: pdb_source, **meta.as_dict(chain_id=chain_id, seq_to_str=True), }