Skip to content

Commit

Permalink
Merge pull request #35 from gtonkinhill/alignment_name_fix
Browse files Browse the repository at this point in the history
Filename length fix
  • Loading branch information
nzmacalasdair authored Jan 14, 2020
2 parents d60d7c9 + 431bd1a commit 3860364
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions panaroo/generate_alignments.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ def output_sequence(node, isolate_list, temp_directory, outdir):
output_sequences = (x for x in output_sequences)
#set filename to gene name
outname = temp_directory + node["name"] + ".fasta"
#check to see if filename is too long
if len(outname) >= 248:
outname = outname[:248] + ".fasta"
#Write them to disk
SeqIO.write(output_sequences, outname, 'fasta')
return outname
Expand Down

0 comments on commit 3860364

Please sign in to comment.