Mercurial > repos > drosofff > msp_fasta_tabular_converter
changeset 2:330dd8a8c31a 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:40 -0400 |
parents | 2f7278120be9 |
children | 36388b666bfc |
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:54:00 2016 -0400 +++ b/fasta_tabular_converter.py Fri Mar 25 19:29:40 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)