Author: Andreas Tille <tille@debian.org>
Last-Update: Thu, 28 Jul 2016 15:13:14 +0200
Bug-Debian: https://bugs.debian.org/859090
Description: Use Debian packaged seqtk

--- a/setup.py
+++ b/setup.py
@@ -11,21 +11,6 @@ if sys.version_info < (3, 5):
     print("At least Python 3.5 is required.\n", file=sys.stderr)
     exit(1)
 
-def compile_seqtk():
-    """Compiling the seqtk toolkit"""
-    old_wd = os.getcwd()
-    new_wd = os.path.join(old_wd,"mapdamage","seqtk")
-    os.chdir(new_wd)
-    if not os.path.isfile("seqtk.c"):
-        raise SystemExit("Cannot find seqtk.c")
-    if (os.path.isfile("seqtk")):
-        os.system("rm seqtk")
-    xs = os.system("make -f Makefile")
-    os.chdir(old_wd)
-    if (xs != 0):
-        raise SystemExit("Cannot compile seqtk")
-
-
 def setup_version():
     if not os.path.exists(".git"):
         # Release version, no .git folder
@@ -45,17 +30,8 @@ class compileInstall(DistutilsInstall):
     def run(self):
         self.record=""
         setup_version()
-        compile_seqtk()
         DistutilsInstall.run(self)
         # fixing the permission problem of seqtk
-        files = self.get_outputs()
-        for fi in files:
-            if fi.endswith("seqtk/seqtk"):
-                os.chmod(fi,0o755)
-
-
-
-
 
 setup(
     cmdclass={'install': compileInstall},
@@ -64,7 +40,7 @@ setup(
     author='AurÃ©lien Ginolhac, Mikkel Schubert, Ãkon JÃ³nsson',
     author_email='MSchubert@snm.ku.dk, jonsson.hakon@gmail.com',
     packages=['mapdamage'],
-    package_data={'mapdamage': ['Rscripts/*.R','Rscripts/stats/*.R','tests/*','seqtk/seqtk']},
+    package_data={'mapdamage': ['Rscripts/*.R','Rscripts/stats/*.R','tests/*']},
     scripts=['bin/mapDamage'],
     url='https://github.com/ginolhac/mapDamage',
     license='LICENSE.txt',
--- a/bin/mapDamage
+++ b/bin/mapDamage
@@ -163,7 +163,7 @@ def main():
         sys.path.insert(0,path_to_mm)
     import mapdamage
 
-    fpath_seqtk = mapdamage.rscript.construct_path("seqtk", folder="seqtk")
+    fpath_seqtk = '/usr/bin/seqtk'
     if not (os.path.isfile(fpath_seqtk) and os.access(fpath_seqtk, os.X_OK)):
         sys.stderr.write("Seqtk executable not accessible; mapDamage has not\n"
                          "been intalled properly or current user does not\n"
--- a/mapdamage/composition.py
+++ b/mapdamage/composition.py
@@ -33,7 +33,7 @@ def get_base_comp(filename,destination=F
     Gets the basecomposition of all the sequences in filename
     and returns the value to destination if given.
     """
-    path_to_seqtk = mapdamage.rscript.construct_path("seqtk",folder="seqtk")
+    path_to_seqtk = "/usr/bin/seqtk"
     bases = {"A":0,"C":0,"G":0,"T":0}
     alp = ["A","C","G","T"]
     try:
