annotate idpicker_wrapper.py @ 21:e67c49262374 draft default tip

Uploaded
author galaxyp
date Tue, 25 Jun 2013 17:07:34 -0400
parents 35cf23cd8c3d
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
35cf23cd8c3d Initial commit.
galaxyp
parents:
diff changeset
1 #!/usr/bin/env python
35cf23cd8c3d Initial commit.
galaxyp
parents:
diff changeset
2 import optparse
35cf23cd8c3d Initial commit.
galaxyp
parents:
diff changeset
3 import sys
35cf23cd8c3d Initial commit.
galaxyp
parents:
diff changeset
4 import os
35cf23cd8c3d Initial commit.
galaxyp
parents:
diff changeset
5
35cf23cd8c3d Initial commit.
galaxyp
parents:
diff changeset
6
35cf23cd8c3d Initial commit.
galaxyp
parents:
diff changeset
7 def stop_err(msg):
35cf23cd8c3d Initial commit.
galaxyp
parents:
diff changeset
8 sys.stderr.write("%s\n" % msg)
35cf23cd8c3d Initial commit.
galaxyp
parents:
diff changeset
9 sys.exit(-1)
35cf23cd8c3d Initial commit.
galaxyp
parents:
diff changeset
10
35cf23cd8c3d Initial commit.
galaxyp
parents:
diff changeset
11
35cf23cd8c3d Initial commit.
galaxyp
parents:
diff changeset
12 def build_groups(input):
35cf23cd8c3d Initial commit.
galaxyp
parents:
diff changeset
13 os.makedir("input_directory")
35cf23cd8c3d Initial commit.
galaxyp
parents:
diff changeset
14
35cf23cd8c3d Initial commit.
galaxyp
parents:
diff changeset
15
35cf23cd8c3d Initial commit.
galaxyp
parents:
diff changeset
16 def main():
35cf23cd8c3d Initial commit.
galaxyp
parents:
diff changeset
17 parser = optparse.OptionParser()
35cf23cd8c3d Initial commit.
galaxyp
parents:
diff changeset
18 parser.add_option('--input')
35cf23cd8c3d Initial commit.
galaxyp
parents:
diff changeset
19 parser.add_option('--output')
35cf23cd8c3d Initial commit.
galaxyp
parents:
diff changeset
20 (options, args) = parser.parse_args()
35cf23cd8c3d Initial commit.
galaxyp
parents:
diff changeset
21 if not len(options.input):
35cf23cd8c3d Initial commit.
galaxyp
parents:
diff changeset
22 stop_err("No input file found")
35cf23cd8c3d Initial commit.
galaxyp
parents:
diff changeset
23 build_groups(options.input)
35cf23cd8c3d Initial commit.
galaxyp
parents:
diff changeset
24
35cf23cd8c3d Initial commit.
galaxyp
parents:
diff changeset
25 if __name__ == '__main__':
35cf23cd8c3d Initial commit.
galaxyp
parents:
diff changeset
26 main()