Mercurial > repos > guerler > springsuite
comparison spring_cross.py @ 38:80a4b98121b6 draft
"planemo upload commit 22cd6b0fa88ce0ddc4052beab306f5ba10754f12"
author | guerler |
---|---|
date | Wed, 25 Nov 2020 17:38:24 +0000 |
parents | 0be0af9e695d |
children | 172398348efd |
comparison
equal
deleted
inserted
replaced
37:0be0af9e695d | 38:80a4b98121b6 |
---|---|
5 from spring_package.DBKit import createFile | 5 from spring_package.DBKit import createFile |
6 from spring_package.Molecule import Molecule | 6 from spring_package.Molecule import Molecule |
7 | 7 |
8 | 8 |
9 def getId(line): | 9 def getId(line): |
10 line = line.split()[0] | 10 line = line.strip() |
11 if len(line) != 6 or line[4:5] != "_": | |
12 raise Exception("Invalid list entry (`PDB_CHAIN`): %s." % line) | |
11 return line[:4].upper() + line[4:6] | 13 return line[:4].upper() + line[4:6] |
12 | 14 |
13 | 15 |
14 def main(args): | 16 def main(args): |
15 logFile = open(args.log, "w") | 17 logFile = open(args.log, "w") |
59 | 61 |
60 | 62 |
61 if __name__ == "__main__": | 63 if __name__ == "__main__": |
62 parser = argparse.ArgumentParser(description='List filtering.') | 64 parser = argparse.ArgumentParser(description='List filtering.') |
63 parser.add_argument('-l', '--list', help='List of PDB chains [PDB_CHAIN]', required=True) | 65 parser.add_argument('-l', '--list', help='List of PDB chains [PDB_CHAIN]', required=True) |
64 parser.add_argument('-i', '--index', help='PDB Database Index file (dbkit_index)', required=True) | 66 parser.add_argument('-i', '--index', help='PDB Database Index file (ffindex)', required=True) |
65 parser.add_argument('-d', '--database', help='PDB Database files (dbkit)', required=True) | 67 parser.add_argument('-d', '--database', help='PDB Database files (ffdata)', required=True) |
66 parser.add_argument('-o', '--output', help='Output file', required=True) | 68 parser.add_argument('-o', '--output', help='Output file', required=True) |
67 parser.add_argument('-t', '--temp', help='Temporary Directory', required=True) | 69 parser.add_argument('-t', '--temp', help='Temporary Directory', required=True) |
68 parser.add_argument('-g', '--log', help='Log File', required=True) | 70 parser.add_argument('-g', '--log', help='Log File', required=True) |
69 args = parser.parse_args() | 71 args = parser.parse_args() |
70 main(args) | 72 main(args) |