Commit eaeee36f authored by Audrey Gibert's avatar Audrey Gibert

[ont_qc>__init__]

Logs are retrieved from the path of fastq files, and not on the working
directory
parent 737d141d
......@@ -54,20 +54,17 @@ class OntQualityCheck (NG6Workflow):
logging.getLogger("jflow").debug("OntQualityCheck.process! sample_name : "+str(sample_names))
logging.getLogger("jflow").debug("OntQualityCheck.process! summary_file : "+str(self.summary_file))
### check for log file
# get current path
cmd = [self.get_exec_path("pwd")]
p = Popen(cmd, stdout=PIPE, stderr=PIPE)
stdout, stderr = p.communicate()
exec_path = stdout.decode("utf-8").rsplit()[0]
logging.getLogger("jflow").debug("OntQualityCheck._process.logfile pwd = " + str(exec_path))
### check for log file self.fastq_files
# get the dirname of reads folder, logs are in this dirname/jflow/
logpath = os.path.dirname( self.get_all_reads()[0] ) + "/jflow/"
logging.getLogger("jflow").debug("OntQualityCheck._process.logfile logpath = " + logpath)
# find .log files
for file in glob(exec_path+"/*.log"):
for file in glob(logpath+"/*.log"):
self.log_files.append(file)
for file in glob(exec_path+"/*.pdf"):
for file in glob(logpath+"/*.pdf"):
self.log_files.append(file)
logging.getLogger("jflow").debug("OntQualityCheck._process.logfile self.log_files = " + ",".join(self.log_files))
logging.getLogger("jflow").debug("OntQualityCheck._process.logfile exiting")
# add logs
if len(self.log_files) > 0 :
......@@ -81,4 +78,7 @@ class OntQualityCheck (NG6Workflow):
trim_porechop = self.add_component("Trim_porechop", [self.get_all_reads() , "discard_middle"])
if self.fast5dir != None:
fast5archive = self.add_component("Fast5archive", [self.fast5dir, "fast5archive.tar"])
logging.getLogger("jflow").debug("OntQualityCheck._process.logfile exiting")
Markdown is supported
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