Commit 37784c48 authored by Gerald Salin's avatar Gerald Salin
Browse files

#54 add logs from casava directory as a basicAnalysis in the run

parent c9bd233e
......@@ -319,6 +319,7 @@ class CasavaNG6Workflow(NG6Workflow):
self.group_prefix = None
self.undetermined_reads1 = []
self.undetermined_reads2 = []
self.log_files = []
self.is_casava = False
def __add_sample_parameters__(self):
......@@ -393,6 +394,8 @@ class CasavaNG6Workflow(NG6Workflow):
self.group_prefix = list((Utils.get_group_basenames(self.get_all_reads(), "read")).keys())
def _process_casava_18(self, casava_directory, project_name, lane_number, input_files):
logging.getLogger("ng6").debug("_process_casava_18 enter")
logging.getLogger("ng6").debug("_process_casava_18 casava_directory = " + casava_directory + ", project_name = " + str(project_name))
"""
Creates samples from casavadir (<=1.8) using input files
@param casava_directory:
......@@ -458,6 +461,12 @@ class CasavaNG6Workflow(NG6Workflow):
all_samples.append(sp_object)
all_samples_id.append(sample['sample_id'])
for file in os.listdir(casava_directory):
filepath = casava_directory + "/" + file
if file.endswith(".log"):
self.log_files.append(filepath)
logging.getLogger("ng6").debug("_process_casava_18 exiting")
return all_samples, all_samples_id
def _process_casava_216(self,casava_directory, project_name, lane_number, input_files):
......@@ -477,6 +486,9 @@ class CasavaNG6Workflow(NG6Workflow):
saved_files = []
if self.is_casava :
if len(self.log_files) > 0 :
add_log = self.add_component("BasicAnalysis", [self.log_files,"Log Files","Log files generated during primary analysis","-","-","-","gz", "","log.gz"])
if len(self.undetermined_reads1) > 0 :
if self.casava['mismatch_index'] :
demultiplex_stats = self.add_component("DemultiplexStats", [self.get_all_reads("read1"), self.undetermined_reads1, self.get_files_index('read1')])
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment