Skip to content

Commit

Permalink
truncate reference name if too long
Browse files Browse the repository at this point in the history
  • Loading branch information
antunderwood committed May 8, 2021
1 parent b728ca5 commit f5ad2bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/reference2single_sequence.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit f5ad2bb

Please sign in to comment.