Mercurial > repos > iuc > reprof
comparison reprof.py @ 7:fb0936cf5bef draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/reprof commit db55deda35d1623ff48fbea7b3d0690a2cd9cd9f-dirty
| author | iuc |
|---|---|
| date | Tue, 08 Dec 2015 13:46:13 -0500 |
| parents | 141da185be70 |
| children |
comparison
equal
deleted
inserted
replaced
| 6:3658e4d701fc | 7:fb0936cf5bef |
|---|---|
| 87 classification = 'alpha-beta' | 87 classification = 'alpha-beta' |
| 88 else: | 88 else: |
| 89 classification = 'mixed' | 89 classification = 'mixed' |
| 90 | 90 |
| 91 with open(path, 'a') as handle: | 91 with open(path, 'a') as handle: |
| 92 handle.write("{0}\t{1}\n".format(id, classification)) | 92 handle.write('# id\t% alpha\t% beta\tclass\n') |
| 93 handle.write('{0}\t{1:.2f}\t{2:.2f}\t{3}'.format(id, h, e, classification)) | |
| 93 | 94 |
| 94 def main(fasta, modeldir): | 95 def main(fasta, modeldir): |
| 95 for record in SeqIO.parse(fasta, 'fasta'): | 96 for record in SeqIO.parse(fasta, 'fasta'): |
| 96 tmp = tempfile.NamedTemporaryFile(delete=False) | 97 tmp = tempfile.NamedTemporaryFile(delete=False) |
| 97 SeqIO.write([record], tmp, 'fasta') | 98 SeqIO.write([record], tmp, 'fasta') |
