Skip to content

Commit

Permalink
fix a bug when input < 50
Browse files Browse the repository at this point in the history
  • Loading branch information
psj1997 committed Jun 5, 2020
1 parent f6212f4 commit f96d173
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions gmgc_finder/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,15 @@ def split(handle):
SeqIO.write(split_fasta, output_dir + '/split_{}.fna'.format(index), 'fasta')
else:
SeqIO.write(split_fasta, output_dir + '/split_{}.faa'.format(index), 'fasta')
else:
index += 1
for seq_record in records:
rec1 = SeqRecord(Seq(str(seq_record.seq)), id=seq_record.id, description='')
split_fasta.append(rec1)
if is_dna is True:
SeqIO.write(split_fasta, output_dir + '/split_{}.fna'.format(index), 'fasta')
else:
SeqIO.write(split_fasta, output_dir + '/split_{}.faa'.format(index), 'fasta')
return index

if not os.path.exists(gene_path):
Expand Down

0 comments on commit f96d173

Please sign in to comment.