forked from JaneliaSciComp/msg
-
Notifications
You must be signed in to change notification settings - Fork 4
/
create_stats.py
executable file
·41 lines (32 loc) · 1.2 KB
/
create_stats.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/env python
"""
A command line wrapper around mapping_functions.create_stats
for cases such as the new style parser where we want to run this
later.
"""
import sys
from mapping_functions import *
from msglib import *
from cmdline.cmdline import CommandLineApp
class Stats(CommandLineApp):
def __init__(self):
CommandLineApp.__init__(self)
op = self.option_parser
op.set_usage('usage: create_stats -i reads.fq -b barcodes')
op.add_option('-i', '--raw-data', dest='raw_data_file', type='string', default=None,
help='Raw Illumina data file')
op.add_option('-b', '--barcodes', dest='barcodes_file', type='string', default=None,
help='Barcodes file')
def main(self):
print "create_stats.py"
print " reads file:", self.options.raw_data_file
print " barcodes file:", self.options.barcodes_file
create_stats(self.options.raw_data_file, self.options.barcodes_file)
if __name__ == '__main__':
#import doctest; doctest.testmod(); sys.exit()
try:
Stats().run()
except Exception, e:
print 'Error in create_stats\n'
print '%s' % e
sys.exit(2)