Remove ReadPrep and Thumbnail_Images being generated now.
authorDiane Trout <diane@caltech.edu>
Mon, 10 Oct 2011 23:57:06 +0000 (16:57 -0700)
committerDiane Trout <diane@caltech.edu>
Mon, 10 Oct 2011 23:57:06 +0000 (16:57 -0700)
htsworkflow/pipelines/runfolder.py
scripts/htsw-runfolder

index a3e24f4048ce20ad10f9a6f86b6280bda9953bbb..fcee65ce8d32806efbffb5abf610a0bf094d0b5c 100644 (file)
@@ -595,7 +595,7 @@ def clean_runs(runs, dry_run=True):
         logging.info('In dry-run mode')
 
     for run in runs:
-        logging.info('Cleaninging %s' % (run.pathname,))
+        logging.info('Cleaning %s' % (run.pathname,))
         # rm RunLog*.xml
         runlogs = glob(os.path.join(run.pathname, 'RunLog*xml'))
         rm_list(runlogs, dry_run)
@@ -614,9 +614,17 @@ def clean_runs(runs, dry_run=True):
         logging.info("Cleaning images")
         image_dirs = glob(os.path.join(run.pathname, 'Images', 'L*'))
         rm_list(image_dirs, dry_run)
-        # cd Data/C1-*_Firecrest*
-        logging.info("Cleaning intermediate files")
+        # rm ReadPrep
+        logging.info("Cleaning ReadPrep*")
+        read_prep_dirs = glob(os.path.join(run.pathname, 'ReadPrep*'))
+        rm_list(read_prep_dirs, dry_run)
+        # rm ReadPrep
+        logging.info("Cleaning Thubmnail_images")
+        thumbnail_dirs = glob(os.path.join(run.pathname, 'Thumbnail_Images'))
+        rm_list(thumbnail_dirs, dry_run)
+
         # make clean_intermediate
+        logging.info("Cleaning intermediate files")
         if os.path.exists(os.path.join(run.image_analysis.pathname, 'Makefile')):
             clean_process = subprocess.Popen(['make', 'clean_intermediate'],
                                              cwd=run.image_analysis.pathname,)
index e98360add54b8789ea43793de2f2cb948bd999bf..7ae95b4f49ebab11f15b319647f9b19483bd1fae 100755 (executable)
@@ -46,8 +46,10 @@ def main(cmdlist=None):
     opts, args = parser.parse_args(cmdlist)
 
     logging.basicConfig()
-    if opts.verbose:
-        root_log = logging.getLogger()
+    root_log = logging.getLogger()
+    if opts.debug:
+        root_log.setLevel(logging.DEBUG)
+    elif opts.verbose:
         root_log.setLevel(logging.INFO)
 
     logging.info('Starting htsworkflow illumina runfolder processing tool.')
@@ -132,6 +134,9 @@ def make_parser():
     parser.add_option('-v', '--verbose', dest='verbose', action='store_true',
                       default=False,
                       help='turn on verbose mode')
+    parser.add_option('--debug', action='store_true',
+                      default=False,
+                      help='turn on debug logging (implies verbose)')
     parser.add_option('--dry-run', action='store_true', default=False,
                       help="Don't delete anything (in clean mode)")