comparison tools/genetrack/genetrack_peak_prediction.py @ 0:9071e359b9a3

Uploaded
author xuebing
date Fri, 09 Mar 2012 19:37:19 -0500
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:9071e359b9a3
1 #!/usr/bin/env python
2
3 """
4 Wraps genetrack.scripts.peakpred so the tool can be executed from Galaxy.
5
6 usage: %prog input output level sigma mode exclusion strand
7 """
8
9 import sys
10 from galaxy import eggs
11 import pkg_resources
12 pkg_resources.require( "GeneTrack" )
13
14 from genetrack.scripts import peakpred
15 from genetrack import logger
16
17 if __name__ == "__main__":
18
19 parser = peakpred.option_parser()
20
21 options, args = parser.parse_args()
22
23 logger.disable(options.verbosity)
24
25 from genetrack import conf
26
27 # trigger test mode
28 if options.test:
29 options.inpname = conf.testdata('test-hdflib-input.gtrack')
30 options.outname = conf.testdata('predictions.bed')
31
32 # missing input file name
33 if not options.inpname and not options.outname:
34 parser.print_help()
35 else:
36 print 'Sigma = %s' % options.sigma
37 print 'Minimum peak = %s' % options.level
38 print 'Peak-to-peak = %s' % options.exclude
39
40 peakpred.predict(options.inpname, options.outname, options)