Mercurial > repos > iuc > raxml
comparison raxml.py @ 2:a4b71be30c3c draft
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/raxml commit 9f9e37b75ae2e5735289eeec1c74ff49e6e388e0"
author | iuc |
---|---|
date | Mon, 02 Dec 2019 07:52:10 -0500 |
parents | ba29b5e2a4be |
children | b1e68bbe4cef |
comparison
equal
deleted
inserted
replaced
1:ba29b5e2a4be | 2:a4b71be30c3c |
---|---|
37 # Logs | 37 # Logs |
38 with open('RAxML_log.galaxy', 'w') as outfile: | 38 with open('RAxML_log.galaxy', 'w') as outfile: |
39 for filename in runfiles: | 39 for filename in runfiles: |
40 if fnmatch.fnmatch(filename, 'RAxML_log.galaxy.RUN.*'): | 40 if fnmatch.fnmatch(filename, 'RAxML_log.galaxy.RUN.*'): |
41 with open(filename, 'r') as infile: | 41 with open(filename, 'r') as infile: |
42 filename_line = "%s\n" % filename | |
43 outfile.write(filename_line) | |
44 for line in infile: | 42 for line in infile: |
45 outfile.write(line) | 43 outfile.write(line) |
46 # Parsimony Trees | 44 # Parsimony Trees |
47 with open('RAxML_parsimonyTree.galaxy', 'w') as outfile: | 45 with open('RAxML_parsimonyTree.galaxy', 'w') as outfile: |
48 for filename in runfiles: | 46 for filename in runfiles: |
49 if fnmatch.fnmatch(filename, 'RAxML_parsimonyTree.galaxy.RUN.*'): | 47 if fnmatch.fnmatch(filename, 'RAxML_parsimonyTree.galaxy.RUN.*'): |
50 with open(filename, 'r') as infile: | 48 with open(filename, 'r') as infile: |
51 filename_line = "%s\n" % filename | |
52 outfile.write(filename_line) | |
53 for line in infile: | 49 for line in infile: |
54 outfile.write(line) | 50 outfile.write(line) |
55 # Results | 51 # Results |
56 with open('RAxML_result.galaxy', 'w') as outfile: | 52 with open('RAxML_result.galaxy', 'w') as outfile: |
57 for filename in runfiles: | 53 for filename in runfiles: |
58 if fnmatch.fnmatch(filename, 'RAxML_result.galaxy.RUN.*'): | 54 if fnmatch.fnmatch(filename, 'RAxML_result.galaxy.RUN.*'): |
59 with open(filename, 'r') as infile: | 55 with open(filename, 'r') as infile: |
60 filename_line = "%s\n" % filename | |
61 outfile.write(filename_line) | |
62 for line in infile: | 56 for line in infile: |
63 outfile.write(line) | 57 outfile.write(line) |
64 # Multiple Model Partition Files | 58 # Multiple Model Partition Files |
65 if options.multiple_model: | 59 if options.multiple_model: |
66 files = glob.glob('RAxML_bestTree.galaxy.PARTITION.*') | 60 files = glob.glob('RAxML_bestTree.galaxy.PARTITION.*') |
69 # Best Tree Partitions | 63 # Best Tree Partitions |
70 with open('RAxML_bestTreePartitions.galaxy', 'w') as outfile: | 64 with open('RAxML_bestTreePartitions.galaxy', 'w') as outfile: |
71 for filename in files: | 65 for filename in files: |
72 if fnmatch.fnmatch(filename, 'RAxML_bestTree.galaxy.PARTITION.*'): | 66 if fnmatch.fnmatch(filename, 'RAxML_bestTree.galaxy.PARTITION.*'): |
73 with open(filename, 'r') as infile: | 67 with open(filename, 'r') as infile: |
74 filename_line = "%s\n" % filename | |
75 outfile.write(filename_line) | |
76 for line in infile: | 68 for line in infile: |
77 outfile.write(line) | 69 outfile.write(line) |
78 else: | 70 else: |
79 with open('RAxML_bestTreePartitions.galaxy', 'w') as outfile: | 71 with open('RAxML_bestTreePartitions.galaxy', 'w') as outfile: |
80 outfile.write("No partition files were produced.\n") | 72 outfile.write("No partition files were produced.\n") |
85 files.sort(key=getint) | 77 files.sort(key=getint) |
86 with open('RAxML_resultPartitions.galaxy', 'w') as outfile: | 78 with open('RAxML_resultPartitions.galaxy', 'w') as outfile: |
87 for filename in files: | 79 for filename in files: |
88 if fnmatch.fnmatch(filename, 'RAxML_result.galaxy.PARTITION.*'): | 80 if fnmatch.fnmatch(filename, 'RAxML_result.galaxy.PARTITION.*'): |
89 with open(filename, 'r') as infile: | 81 with open(filename, 'r') as infile: |
90 filename_line = "%s\n" % filename | |
91 outfile.write(filename_line) | |
92 for line in infile: | 82 for line in infile: |
93 outfile.write(line) | 83 outfile.write(line) |
94 else: | 84 else: |
95 with open('RAxML_resultPartitions.galaxy', 'w') as outfile: | 85 with open('RAxML_resultPartitions.galaxy', 'w') as outfile: |
96 outfile.write("No partition files were produced.\n") | 86 outfile.write("No partition files were produced.\n") |