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)
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,)
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.')
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)")