+ found negative strand bug
[qpalma.git] / scripts / qpalma_pipeline.py
1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*-
3
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2 of the License, or
7 # (at your option) any later version.
8 #
9 # Written (W) 2008 Fabio De Bona
10 # Copyright (C) 2008 Max-Planck-Society
11
12
13 #
14 # This file contains the main interface to the QPalma pipeline.
15 #
16 #
17 #
18
19
20 from optparse import OptionParser
21
22
23 from qpalma.gridtools import *
24
25
26 def create_option_parser():
27 parser = OptionParser()
28
29 #
30 parser.add_option("-ci", "--check_and_init", help="check configuration and initialize directories")
31
32 #
33 parser.add_option("-r", "--run", help="write report to FILE", metavar="FILE")
34
35 #
36 parser.add_option("-xx", "--clear", action="store_false", dest="verbose", help="cleanup directories delete all created data")
37
38 return parser
39
40
41
42
43 class System:
44 """
45 This class wraps the outer loop of the qpalma project
46
47 It is responsible for:
48
49 - loading and checking the config file(s)
50 - setting up the different pipeline modules
51 - run the experiment and report the results
52
53
54 """
55
56 # Before creating a candidate spliced read dataset we have to first filter
57 # the matches from the first seed finding run.
58
59 grid_heuristic()
60
61 # approx_task = ApproximationTask(...)
62 # approx_task.createJobs()
63 # approx_task.submit()
64 # approx_task.checkIfTaskFinished()
65
66 # After filtering combine the filtered matches from the first run and the
67 # found matches from the second run to a full dataset
68
69 createNewDataset
70
71 # pre_task = PreprocessingTask(...)
72 # pre_task.createJobs()
73 # pre_task.submit()
74
75 # Now that we have a dataset we can perform the accurate alignments for this
76 # data
77
78 grid_predict()
79
80 # align_task = AlignmentTask(...)
81 # align_task.createJobs()
82 # align_task.submit()
83
84 # The results of the above alignment step can be converted to a data format
85 # needed for further postprocessing
86
87 grid_alignment()
88
89 # post_task = PostprocessingTask(...)
90 # post_task.createJobs()
91 # post_task.submit()
92
93
94 if __name__ == '__main__':
95 parser = create_option_parser()
96 (options, args) = parser.parse_args()