From 97815e0c8c16c1bfd98cb57d333fa35b24f635e2 Mon Sep 17 00:00:00 2001 From: Evan Ernst Date: Wed, 11 Jan 2017 12:06:27 -0500 Subject: [PATCH] Fix input file renaming regex The previous regular expression caused problems with input filenames containing the substring "pp" because the "." characters in the pattern were not escaped. Also enforce the appearance of ".pp." just before the fastq or fq extensions. --- SGA-ICE.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SGA-ICE.py b/SGA-ICE.py index a938526..882e42d 100755 --- a/SGA-ICE.py +++ b/SGA-ICE.py @@ -205,7 +205,7 @@ def sga_ice_write(args, filePrefix, fileEnding): % values) # sgaICE.write("rename .pp. .ec.k0. *.pp.*\n" - sgaICE.write("for f in *pp*; do mv $f $(echo $f | sed 's/.pp./.ec.k0./g') ; done\n" + sgaICE.write("for f in *pp*; do mv $f $(echo $f | sed 's/\(\.pp\.\)\(f.*q\)/.ec.k0.\2/g') ; done\n" "echo \'### Finished sga preprocessing ###\'\n\n")