From 216b2f840787ab4b283b90fa6c32a2b11b34cdfd Mon Sep 17 00:00:00 2001 From: proost Date: Wed, 3 May 2017 14:41:23 +0200 Subject: [PATCH] bug fix in fasta_to_gtf.py --- helper/fasta_to_gtf.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/helper/fasta_to_gtf.py b/helper/fasta_to_gtf.py index 9e8296a..9e8a261 100644 --- a/helper/fasta_to_gtf.py +++ b/helper/fasta_to_gtf.py @@ -4,7 +4,9 @@ fasta_file = sys.argv[1] -fasta_data = Fasta.readfile(fasta_file) +fh = Fasta() -for k, s in fasta_data.sequences.items(): - print('%s\t.\tCDS\t1\t%d\t.\t.\t.\tgene_id "Parent=%s"\n' % (k, len(s), k)) +fh.readfile(fasta_file) + +for k, s in fh.sequences.items(): + print('%s\t.\tCDS\t1\t%d\t.\t.\t.\tParent=%s' % (k, len(s), k))