From 0ea4a15f74b7569b6cf9aa8a6aa59a1e7750a2e0 Mon Sep 17 00:00:00 2001 From: jnoms Date: Thu, 16 May 2024 12:48:28 -0700 Subject: [PATCH] Handle cases with RMSD is greater than 100 - this causes the RMSD column and the Z column of the DALI file to merge... --- sat/scripts/aln_parse_dali.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sat/scripts/aln_parse_dali.py b/sat/scripts/aln_parse_dali.py index 4bea3cc..f5b2237 100644 --- a/sat/scripts/aln_parse_dali.py +++ b/sat/scripts/aln_parse_dali.py @@ -105,7 +105,14 @@ def aln_parse_dali_main(args): # Otherwise, we're at alignments line = line.split() - _, chain, z, rmsd, alnlen, tlen, pident, *_ = line + try: + _, chain, z, rmsd, alnlen, tlen, pident, *_ = line + except ValueError: + msg = ( + f"Failed to parse LINE: {line}. This probably happened because the" + "RMSD is above 100 so its column merged with z score column." + ) + print(msg) # Removing the chain identifier (-A for chain A, etc) target_id = chain[:-2]