__init__.py 2.86 KB
Newer Older
Audrey Gibert's avatar
Audrey Gibert committed
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
#
# Copyright (C) 2012 INRA
# 
# 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/>.
#
import logging
from ng6.ng6workflow import NG6Workflow
from ng6.utils import Utils

class SequelQualityCheck (NG6Workflow):
    
    def __init__(self):
        """Classe héritant de NG6Workflow"""
    
    def get_name(self):
        return 'sequel_qc'
    
    def get_description(self):
        return "Sequel II PacBio data loading and quality check"
    
    def define_parameters(self, function="process"):
        logging.getLogger("jflow").debug("SequelQC | SequelQualityCheck.define_parameters!")
34
35
        self.add_parameter("CCS_min_reads_length", "Subreads shorter than this value (in base pairs) are filtered out and excluded from CCS analysis", default=0, type='int')
        self.add_parameter("CCS_min_passes", "Minimum of passes for CSS analys ", default=3, type='int')
Audrey Gibert's avatar
Audrey Gibert committed
36
37
38
39
40
41
42
43
44
45
46
47
48
49
        self.add_parameter("polymerase_read_qual", "Polymerase reads with lower quality than this value are filtered out and excluded from analysis", default=0, type='float')
        self.add_parameter("polymerase_read_length", "Polymerase reads shorter than this value (in base pairs) are filtered out and excluded from analysis", default=0, type='int')
        
        self.add_input_file( "barcode_file", "Input barcode file", default=None)
        self.add_parameter("barcode_score", "Min identical base for barcode", default=22, type='int') 
    
    def process(self):
        logging.getLogger("jflow").debug("SequelQC | SequelQualityCheck.process started!")
        sample_names = []
        infiles = []
        for sample in self.samples :
            sample_names.append( sample.name )
            infiles.append(sample.reads1[0])
        add_pacbio_raw_file = self.add_component("AddPacBioRawFiles", [self.runobj, self.get_all_reads()])
50
51
52
        #h5tofastq =  self.add_component("H5toFastq", [sample_names, infiles])
        #fastqc = self.add_component("FastQC", [h5tofastq.output_fastqs, False, False, "fastqc.tar.gz", self.nb_threads], parent = h5tofastq)
        #self.add_component("RS_Subreads", [sample_names, infiles,self.min_subreads_length,self.polymerase_read_qual,self.polymerase_read_length,self.barcode_file,self.barcode_score ])
Audrey Gibert's avatar
Audrey Gibert committed
53
54
55
        logging.getLogger("jflow").debug("SequelQC | SequelQualityCheck.process ended!")