From 15c0113543be95d8e9d73dbca9647812b8693c12 Mon Sep 17 00:00:00 2001 From: menoliu Date: Mon, 2 Oct 2023 16:55:57 -0400 Subject: [PATCH 1/2] changelog --- CHANGELOG.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index c9b0e404..2b87a2a3 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -9,6 +9,8 @@ While in version ``0``, minor and patch upgrades converge in the ``patch`` numbe Changelog ========= +* Bug-fix in ``ldrs`` for input sequence recognition + v0.7.7 (2023-09-26) ------------------------------------------------------------ From d956b04301da3388bca43dcabca5c96f9d3bcfc6 Mon Sep 17 00:00:00 2001 From: menoliu Date: Mon, 2 Oct 2023 17:12:09 -0400 Subject: [PATCH 2/2] fix input seq processing --- src/idpconfgen/cli_ldrs.py | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/src/idpconfgen/cli_ldrs.py b/src/idpconfgen/cli_ldrs.py index 5d2a656a..8d398d7c 100644 --- a/src/idpconfgen/cli_ldrs.py +++ b/src/idpconfgen/cli_ldrs.py @@ -474,14 +474,20 @@ def main( # Accomodate multiple chains in template global MULTICHAIN - if len(input_seq) > 1: - log.info(T('multiple sequences detected. assuming they are in a multi-chain complex')) # noqa: E501 - for chain in input_seq: - log.info(S(f'{chain}: {input_seq[chain]}')) - MULTICHAIN = True + if type(input_seq) is dict: + if len(input_seq) > 1: + log.info(T('multiple sequences detected. assuming they are in a multi-chain complex')) # noqa: E501 + for chain in input_seq: + log.info(S(f'{chain}: {input_seq[chain]}')) + MULTICHAIN = True + else: + single_seq = list(input_seq.values())[0] + log.info(S(f'input sequence: {single_seq}')) + # For the case when the user just enters sequence without .fasta else: - single_seq = list(input_seq.values())[0] - log.info(S(f'input sequence: {single_seq}')) + log.info(S(f'input sequence: {input_seq}')) + # convert input_seq to a dict because that's how we will process + input_seq = {"A": input_seq} # Calculates how many conformers are built per core if nconfs < ncores: