From f5ad2bbb5cfd01d479fb7898a0584538fc4dfec1 Mon Sep 17 00:00:00 2001 From: Anthony Underwood Date: Sat, 8 May 2021 16:49:07 +0000 Subject: [PATCH] truncate reference name if too long --- bin/reference2single_sequence.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/reference2single_sequence.py b/bin/reference2single_sequence.py index 467b972..de20eb8 100755 --- a/bin/reference2single_sequence.py +++ b/bin/reference2single_sequence.py @@ -36,7 +36,7 @@ def combine_sequences(reference_sequence): new_sequence = ''.join([str(record.seq) for record in records]) new_id = '|'.join([record.id for record in records]) if len(new_id) > 100: - new_id = textwrap.shorten(new_id, width=97, placeholder="...") + new_id = new_id[:97] + '...' new_record = SeqRecord(Seq(new_sequence), id = new_id, description = '') return(new_record)