--- a/cgecore/cmdline.py
+++ b/cgecore/cmdline.py
@@ -6,7 +6,7 @@
 # This script is part of the CGE Pipeline structure
 import sys, os
 from subprocess import Popen, PIPE
-from pipes import quote
+from shlex import quote
 from time import time, sleep
 from datetime import timedelta
 
--- a/cgecore/cgefinder.py
+++ b/cgecore/cgefinder.py
@@ -239,8 +239,8 @@
                 align_homo = "".join(kma_results[db][hit]['homo_string'])
 
                 # Extract only aligned sequences
-                start = re.search("^-*(\w+)", align_query).start(1)
-                end = re.search("\w+(-*)$", align_query).start(1)
+                start = re.search(r"^-*(\w+)", align_query).start(1)
+                end = re.search(r"\w+(-*)$", align_query).start(1)
 
                 kma_results[db][hit]['sbjct_string'] = align_sbjct[start:end]
                 kma_results[db][hit]['query_string'] = align_query[start:end]
--- a/cgecore/utility.py
+++ b/cgecore/utility.py
@@ -134,7 +134,7 @@
       return inv_map
 
 class Reg:
-   """
+   r"""
    NAME:        Reg - Extended Regular Expression Handler
    AUTHOR:      Martin Thomsen
    DESCRIPTION:
@@ -488,9 +488,9 @@
    path given as input
    """
    # Sanity checkpoint
-   src = re.sub('[^\w/\-\.\*]', '', src)
-   dst = re.sub('[^\w/\-\.\*]', '', dst)
-   if len(re.sub('[\W]', '', src)) < 5 or len(re.sub('[\W]', '', dst)) < 5:
+   src = re.sub(r'[^\w/\-\.\*]', '', src)
+   dst = re.sub(r'[^\w/\-\.\*]', '', dst)
+   if len(re.sub(r'[\W]', '', src)) < 5 or len(re.sub(r'[\W]', '', dst)) < 5:
       debug.log("Error: Moving file failed. Provided paths are invalid! src='%s' dst='%s'"%(src, dst))
    else:
       # Check destination
@@ -517,7 +517,7 @@
             debug.log("Moving File(s)...", "Move from %s"%src, "to %s"%dst)
             for file_ in files:
                # Check if file contains invalid symbols:
-               invalid_chars = re.findall('[^\w/\-\.\*]', os.path.basename(file_))
+               invalid_chars = re.findall(r'[^\w/\-\.\*]', os.path.basename(file_))
                if invalid_chars:
                   debug.graceful_exit(("Error: File %s contains invalid "
                                       "characters %s!"
@@ -536,9 +536,9 @@
    path given as input
    """
    # Sanity checkpoint
-   src = re.sub('[^\w/\-\.\*]', '', src)
-   dst = re.sub('[^\w/\-\.\*]', '', dst)
-   if len(re.sub('[\W]', '', src)) < 5 or len(re.sub('[\W]', '', dst)) < 5:
+   src = re.sub(r'[^\w/\-\.\*]', '', src)
+   dst = re.sub(r'[^\w/\-\.\*]', '', dst)
+   if len(re.sub(r'[\W]', '', src)) < 5 or len(re.sub(r'[\W]', '', dst)) < 5:
       debug.log("Error: Copying file failed. Provided paths are invalid! src='%s' dst='%s'"%(src, dst))
    else:
       # Check destination
