@@ -187,7 +187,7 @@ def _parse_files_from_log(regex, log_filename, order=[]):
187
187
for elem in order :
188
188
elemOK = False
189
189
for file in parsed_files :
190
- thisregex = "rpt/" + elem + "\."
190
+ thisregex = "rpt/" + elem + "\\ ."
191
191
match = re .search (thisregex , file )
192
192
if match :
193
193
order_files .append (file )
@@ -217,7 +217,7 @@ def run_red(red_exe, cores, outmskfilename, gnmdirname, rptdirname,
217
217
# check whether previous results exist
218
218
if os .path .isfile (log_filepath ):
219
219
rpt_files = _parse_files_from_log (
220
- "locations to: (\S+)" , log_filepath , seqnames )
220
+ "locations to: (\\ S+)" , log_filepath , seqnames )
221
221
if rpt_files :
222
222
print ("# re-using previous Red results" )
223
223
return rpt_files
@@ -259,7 +259,7 @@ def run_red(red_exe, cores, outmskfilename, gnmdirname, rptdirname,
259
259
# merge masked chromosomes if requested
260
260
if outmskfilename :
261
261
msk_files = _parse_files_from_log (
262
- "masked sequence to: (\S+)" , log_filepath , seqnames )
262
+ "masked sequence to: (\\ S+)" , log_filepath , seqnames )
263
263
with open (outmskfilename , "w" ) as outmskfile :
264
264
for fname in msk_files :
265
265
with open (fname ) as infile :
@@ -270,7 +270,7 @@ def run_red(red_exe, cores, outmskfilename, gnmdirname, rptdirname,
270
270
271
271
# parse log and capture repeat filenames
272
272
rpt_files = _parse_files_from_log (
273
- "locations to: (\S+)" , log_filepath , seqnames )
273
+ "locations to: (\\ S+)" , log_filepath , seqnames )
274
274
return rpt_files
275
275
276
276
0 commit comments