Mercurial > repos > drosofff > msp_fasta_tabular_converter
changeset 3:403f0769fc1c draft
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/msp_fasta_tabular_converter commit 030207144f0811822dbdda9a10e036ff8e794d7c
author | drosofff |
---|---|
date | Fri, 25 Mar 2016 19:29:59 -0400 |
parents | 87e27aa012d7 |
children | 87c99e4af616 |
files | fasta_tabular_converter.py |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/fasta_tabular_converter.py Tue Mar 22 18:53:39 2016 -0400 +++ b/fasta_tabular_converter.py Fri Mar 25 19:29:59 2016 -0400 @@ -26,7 +26,9 @@ stringlist=[] else: stringlist.append(line[:-1]) - seqdic["".join(stringlist)] += 1 # for the last sequence + try: + seqdic["".join(stringlist)] += 1 # for the last sequence + except: pass # in case file to convert is empty F.close() F = open(tabular, "w") for seq in sorted(seqdic, key=seqdic.get, reverse=True): @@ -105,4 +107,4 @@ if __name__ == "__main__": seqdic = defaultdict(int) args = Parser() - main (args.input, args.output, args.type) \ No newline at end of file + main (args.input, args.output, args.type)