From ae9a01b03a29a9ffee77f346a41e50dc24c81906 Mon Sep 17 00:00:00 2001 From: Guillermo Carrasco Date: Thu, 26 Mar 2015 15:34:41 +0100 Subject: [PATCH] Some bug fixes and fix for #62 --- doc/_templates/intro.rst | 4 +++- taca/illumina/__init__.py | 20 ++++++++++---------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/doc/_templates/intro.rst b/doc/_templates/intro.rst index 55f380f7..14acfc6e 100644 --- a/doc/_templates/intro.rst +++ b/doc/_templates/intro.rst @@ -48,7 +48,9 @@ This is how the configuration file should look like: # Location of samplesheets for demultiplexing samplesheets_dir: /path/to/samplesheets/dir bcl2fastq: - path: /path/to/bcl2fastq + XTen: /path/to/bcl2fastq (XTen version) + HiSeq: /path/to/bcl2fastq (HiSeq version) + MiSeq: /path/to/bcl2fastq (MiSeq version) - all command line options of bcl2fastq , i.e runfolder, input-dir, etc. sync: user: remote_user_analysis_server diff --git a/taca/illumina/__init__.py b/taca/illumina/__init__.py index a50f82ac..1f85b37d 100644 --- a/taca/illumina/__init__.py +++ b/taca/illumina/__init__.py @@ -2,10 +2,11 @@ """ import os +from datetime import datetime from xml.etree import ElementTree as ET from taca.log import LOG -from scilifelab.utils import misc +from taca.utils import misc from taca.utils.config import CONFIG from taca.utils.filesystem import chdir @@ -138,7 +139,7 @@ def _extract_run_info(self): # HiSeq and HiSeq X runParameter.xml files will have a Flowcell child with run type info run_type = run_parameters.find('Flowcell') # But MiSeqs doesn't... - if not run_type: + if run_type is None: run_type = run_parameters.find('ApplicationName') try: @@ -160,13 +161,12 @@ def is_finished(self): @property def status(self): if self.run_type == 'HiSeq X': - def processing_status(run): - demux_dir = os.path.join(self.run_dir, 'Demultiplexing') - if not os.path.exists(demux_dir): - return 'TO_START' - elif os.path.exists(os.path.join(demux_dir, 'Stats', 'DemultiplexingStats.xml')): - return 'COMPLETED' - else: - return 'IN_PROGRESS' + demux_dir = os.path.join(self.run_dir, 'Demultiplexing') + if not os.path.exists(demux_dir): + return 'TO_START' + elif os.path.exists(os.path.join(demux_dir, 'Stats', 'DemultiplexingStats.xml')): + return 'COMPLETED' + else: + return 'IN_PROGRESS' else: raise NotImplementedError('Sorry... no status method defined for {} runs'.format(self.run_type))