projects
/
htsworkflow.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
80978a4
)
Allow specifying which database to convert
author
Diane Trout
<diane@caltech.edu>
Tue, 27 Oct 2009 22:27:08 +0000
(22:27 +0000)
committer
Diane Trout
<diane@caltech.edu>
Tue, 27 Oct 2009 22:27:08 +0000
(22:27 +0000)
docs/conv_library_id_to_pk_v0.3.1.py
patch
|
blob
|
history
diff --git
a/docs/conv_library_id_to_pk_v0.3.1.py
b/docs/conv_library_id_to_pk_v0.3.1.py
index 125e7b49ff66ffd41db4a56d0520b0cdde38f822..6665f957d33c95adabcb5a21d064ef022b654cc5 100644
(file)
--- a/
docs/conv_library_id_to_pk_v0.3.1.py
+++ b/
docs/conv_library_id_to_pk_v0.3.1.py
@@
-1,3
+1,4
@@
+import optparse
import sqlite3
def map_library_ids(c):
import sqlite3
def map_library_ids(c):
@@
-186,8
+187,19
@@
def convert_library_id(db_path):
conn.commit()
conn.commit()
-def main():
- db_path = '/Users/diane/proj/solexa/gaworkflow/svn/woldlab.db'
+def make_parser():
+ usage = '%prog: database_filename'
+ parser = optparse.OptionParser(usage)
+ return parser
+
+def main(cmdline=None):
+ parser = make_parser()
+ opts, args = parser.parse_args(cmdline)
+ if len(args) != 1:
+ parser.error('requires path to sqlite database file')
+
+ db_path = args[0]
+
convert_library_id(db_path)
if __name__ == "__main__":
convert_library_id(db_path)
if __name__ == "__main__":