Skip to content

Commit

Permalink
escaped special chars with \
Browse files Browse the repository at this point in the history
  • Loading branch information
eead-csic-compbio committed Nov 15, 2024
1 parent 6d6b080 commit a5ab97c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions repeats/Red2Ensembl.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ def _parse_files_from_log(regex, log_filename, order=[]):
for elem in order:
elemOK = False
for file in parsed_files:
thisregex = "rpt/" + elem + "\."
thisregex = "rpt/" + elem + "\\."
match = re.search(thisregex, file)
if match:
order_files.append(file)
Expand Down Expand Up @@ -217,7 +217,7 @@ def run_red(red_exe, cores, outmskfilename, gnmdirname, rptdirname,
# check whether previous results exist
if os.path.isfile(log_filepath):
rpt_files = _parse_files_from_log(
"locations to: (\S+)", log_filepath, seqnames)
"locations to: (\\S+)", log_filepath, seqnames)
if rpt_files:
print("# re-using previous Red results")
return rpt_files
Expand Down Expand Up @@ -259,7 +259,7 @@ def run_red(red_exe, cores, outmskfilename, gnmdirname, rptdirname,
# merge masked chromosomes if requested
if outmskfilename:
msk_files = _parse_files_from_log(
"masked sequence to: (\S+)", log_filepath, seqnames)
"masked sequence to: (\\S+)", log_filepath, seqnames)
with open(outmskfilename, "w") as outmskfile:
for fname in msk_files:
with open(fname) as infile:
Expand All @@ -270,7 +270,7 @@ def run_red(red_exe, cores, outmskfilename, gnmdirname, rptdirname,

# parse log and capture repeat filenames
rpt_files = _parse_files_from_log(
"locations to: (\S+)", log_filepath, seqnames)
"locations to: (\\S+)", log_filepath, seqnames)
return rpt_files


Expand Down

0 comments on commit a5ab97c

Please sign in to comment.