__init__.py 1.52 KB
Newer Older
Jerome Mariette's avatar
Jerome Mariette committed
1
#
Jerome Mariette's avatar
Jerome Mariette committed
2
# Copyright (C) 2015 INRA
Jerome Mariette's avatar
Jerome Mariette committed
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# 
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# 
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
#

Jerome Mariette's avatar
Jerome Mariette committed
18
from jflowapp.application import Application
Jerome Mariette's avatar
Jerome Mariette committed
19

Jerome Mariette's avatar
Jerome Mariette committed
20

Jerome Mariette's avatar
Jerome Mariette committed
21
class QuickStart (Application):
22
23
    
    def get_description(self):
Jerome Mariette's avatar
Jerome Mariette committed
24
        return "Align reads against a reference genome"
25

26
    def define_parameters(self, function="process"):
27
28
        self.add_input_file_list("reads", "Which read files should be used", file_format="fastq", required=True)
        self.add_input_file("reference_genome", "Which genome should the read being align on", file_format="fasta", required=True)
Jerome Mariette's avatar
Jerome Mariette committed
29

30
    def process(self):
Jerome Mariette's avatar
Jerome Mariette committed
31
        # index the reference genome
Jerome Mariette's avatar
Jerome Mariette committed
32
        bwaindex = self.add_component("BWAIndex", [self.reference_genome])
33
34
        # align reads against the indexed genome
        bwamem = self.add_component("BWAmem", [bwaindex.databank, self.reads])
Jerome Mariette's avatar
Jerome Mariette committed
35
36
37
    
    def define_results(self):
        self.add_result_table("rna_table", [["aaaaa", "ffffff", "sdsdsd"], [1,2,3], [1,"qqqqqqqq",3], [1,2,"ppppp"]])