[med-svn] [phylophlan] 05/10: Go with local usearch5 package. As a consequence the phylophlan package can not be released since usearch5 is not distributable

Andreas Tille tille at debian.org
Fri Dec 1 15:01:03 UTC 2017


This is an automated email from the git hooks/post-receive script.

tille pushed a commit to branch master
in repository phylophlan.

commit e784d9afe7f3fc650d0a34a90f1c7ee65b033ddf
Author: Andreas Tille <tille at debian.org>
Date:   Mon Jul 11 16:04:53 2016 +0000

    Go with local usearch5 package.  As a consequence the phylophlan package can not be released since usearch5 is not distributable
---
 debian/README.source                     | 10 ++++
 debian/control                           |  4 +-
 debian/patches/debian_tools.patch        |  2 +-
 debian/patches/series                    |  2 +-
 debian/patches/use_vsearch.patch         | 87 ++++----------------------------
 debian/phylophlan-examples.install       |  1 +
 debian/{install => phylophlan.install}   |  0
 debian/{manpages => phylophlan.manpages} |  0
 debian/postinst                          |  2 +-
 9 files changed, 25 insertions(+), 83 deletions(-)

diff --git a/debian/README.source b/debian/README.source
new file mode 100644
index 0000000..a99936e
--- /dev/null
+++ b/debian/README.source
@@ -0,0 +1,10 @@
+According to
+
+   https://lists.debian.org/debian-med/2016/05/msg00091.html
+
+phylophlan needs usearch which is non-free and non-distributable.
+
+You need to build your local usearch5 package (phylophlan needs
+version 5 of usearch) if you want to use this package.
+
+ -- Andreas Tille <tille at debian.org>  Mon, 11 Jul 2016 16:17:01 +0200
diff --git a/debian/control b/debian/control
index 6bf2529..3475709 100644
--- a/debian/control
+++ b/debian/control
@@ -1,7 +1,7 @@
 Source: phylophlan
 Maintainer: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.org>
 Uploaders: Andreas Tille <tille at debian.org>
-Section: science
+Section: contrib/science
 Priority: optional
 Build-Depends: debhelper (>= 9),
                python-all,
@@ -16,7 +16,7 @@ Architecture: all
 Depends: ${python:Depends},
          ${misc:Depends},
          fasttree,
-         vsearch,
+         usearch5,
          muscle,
          ncbi-blast+,
          python-biopython
diff --git a/debian/patches/debian_tools.patch b/debian/patches/debian_tools.patch
index aa1afce..470490f 100644
--- a/debian/patches/debian_tools.patch
+++ b/debian/patches/debian_tools.patch
@@ -9,7 +9,7 @@ Description: Use Debian packaged tools with correct names
  
  def dep_checks():
 -    for prog in ["FastTree", "usearch", "muscle", "tblastn"]:
-+    for prog in ["fasttree", "usearch", "muscle", "tblastn"]:
++    for prog in ["fasttree", "usearch5", "muscle", "tblastn"]:
          try:
              with open(os.devnull, 'w') as devnull:
                  sb.call([prog], stdout=devnull, stderr=devnull)
diff --git a/debian/patches/series b/debian/patches/series
index 0d35121..12c55fa 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,4 +1,4 @@
 debian_tools.patch
 datadir.patch
-# use_vsearch.patch   --> see https://lists.debian.org/debian-med/2016/05/msg00091.html
+use_vsearch.patch
 fasttree_name.patch
diff --git a/debian/patches/use_vsearch.patch b/debian/patches/use_vsearch.patch
index 57a8740..c566363 100644
--- a/debian/patches/use_vsearch.patch
+++ b/debian/patches/use_vsearch.patch
@@ -1,96 +1,27 @@
 Author: Andreas Tille <tille at debian.org>
 Last-Update: Mon, 23 May 2016 16:09:13 +0200
-Description: Debian can not package usearch which is non-free but it has
- the free replacement vsearch which is currently under active development
- and performs better than usearch
-Remark: According to
+Description: According to upstream we need to use userach5 which
+ is non-distributable
   https://lists.debian.org/debian-med/2016/05/msg00091.html
- in this case vsearch doese not serve as a replacement for usearch.
- Thus for the moment the patch needs to be deactivated
 
 --- a/phylophlan.py
 +++ b/phylophlan.py
-@@ -153,8 +153,9 @@ def init():
-                 info("Done!\n")
+@@ -154,7 +154,8 @@ def init():
  
      if not os.path.exists( ppa_wdb ):
--        info("Generating "+ppa_wdb+" (usearch indexed DB)... ")
+         info("Generating "+ppa_wdb+" (usearch indexed DB)... ")
 -        sb.call( ["usearch","-quiet",
-+        info("Generating "+ppa_wdb+" (vsearch indexed DB)... ")
-+        print("vsearch -quiet --makewdb %s --output %s" % (ppa_fna,ppa_wdb))
-+        sb.call( ["vsearch","-quiet",
++        print("usearch5 -quiet --makewdb %s --output %s" % (ppa_fna,ppa_wdb))
++        sb.call( ["usearch5","-quiet",
                    "--makewdb",ppa_fna,
                    "--output",ppa_wdb])
          info("Done!\n")
-@@ -265,29 +266,29 @@ def exe_usearch(x):
-         screen_usearch_wdb( x[5] )
-         info( x[5] + " generated!\n" )
-     except OSError:
--        error( "OSError: fatal error running usearch." )
-+        error( "OSError: fatal error running vsearch." )
-         return
-     except ValueError:
--        error( "ValueError: fatal error running usearch." )
-+        error( "ValueError: fatal error running vsearch." )
-         return
-     except KeyboardInterrupt:
--        error( "KeyboardInterrupt: usearch process interrupted." )
-+        error( "KeyboardInterrupt: vsearch process interrupted." )
-         return
- 
- 
- def faa2ppafaa( inps, nproc, proj ):
-     inp_fol = "input/"+proj+"/"
--    dat_fol = "data/"+proj+"/usearch/"
-+    dat_fol = "data/"+proj+"/vsearch/"
-     pool = mp.Pool( nproc )
-     mmap = [(inp_fol+i+'.faa', dat_fol+i+'.b6o') for i in inps if not os.path.exists(dat_fol+i+'.b6o')]
- 
-     if not os.path.isdir(dat_fol): os.mkdir(dat_fol) # create the tmp directory if does not exists
- 
-     if not mmap:
--        info("All usearch runs already performed!\n")
-+        info("All vsearch runs already performed!\n")
+@@ -287,7 +288,7 @@ def faa2ppafaa( inps, nproc, proj ):
+         info("All usearch runs already performed!\n")
      else:
          info("Looking for PhyloPhlAn proteins in input faa files\n")
 -        us_cmd = [ ["usearch","-quiet",
-+        us_cmd = [ ["vsearch","-quiet",
++        us_cmd = [ ["usearch5","-quiet",
                      "-wdb",ppa_wdb,
                      "-blast6out",o,
                      "-query",i,
-@@ -295,7 +296,7 @@ def faa2ppafaa( inps, nproc, proj ):
-         pool.map_async( exe_usearch, us_cmd )
-         pool.close()
-         pool.join()
--        info("All usearch runs performed!\n")
-+        info("All vsearch runs performed!\n")
- 
-     if os.path.exists(dat_fol+up2prots):
-         return
-@@ -418,7 +419,7 @@ def blast(inps, nproc, proj, blast_full=
- 
- def gens2prots(inps, proj ):
-     inp_fol = "input/"+proj+"/"
--    dat_fol = "data/"+proj+"/usearch/"
-+    dat_fol = "data/"+proj+"/vsearch/"
- 
-     if not os.path.isdir(dat_fol): os.mkdir(dat_fol) # create the tmp directory if does not exists
- 
-@@ -523,7 +524,7 @@ def exe_muscle(x):
-         error( "ValueError: fatal error running muscle." )
-         raise e
-     except KeyboardInterrupt, e:
--        error( "KeyboardInterrupt: usearch process muscle." )
-+        error( "KeyboardInterrupt: vsearch process muscle." )
-         raise e
-     except Exception, e:
-         error( e )
-@@ -881,7 +882,7 @@ def tax_curation_test( proj, tax,
- 
- def merge_usearch_blast(inps, proj):
-     dat_fol = 'data/'+proj+'/'
--    usearch_fol = 'data/'+proj+'/usearch/'
-+    usearch_fol = 'data/'+proj+'/vsearch/'
-     tblastn_fol = 'data/'+proj+'/tblastn/'
-     usearch_files = []
-     tblastn_files = []
diff --git a/debian/phylophlan-examples.install b/debian/phylophlan-examples.install
new file mode 100644
index 0000000..1226998
--- /dev/null
+++ b/debian/phylophlan-examples.install
@@ -0,0 +1 @@
+input/example_*	usr/share/doc/phylophlan/examples
diff --git a/debian/install b/debian/phylophlan.install
similarity index 100%
rename from debian/install
rename to debian/phylophlan.install
diff --git a/debian/manpages b/debian/phylophlan.manpages
similarity index 100%
rename from debian/manpages
rename to debian/phylophlan.manpages
diff --git a/debian/postinst b/debian/postinst
index 54cadfc..037cc45 100755
--- a/debian/postinst
+++ b/debian/postinst
@@ -3,7 +3,7 @@
 case "$1" in
   configure)
     # enable users to unpack data files
-    find /var/lib/phylophlan -type d -exec chmod a+w \{\} \;
+    find /var/lib/phylophlan -type d -exec chmod 1777 \{\} \;
   ;;
   abort-upgrade|abort-remove|abort-deconfigure)
     echo "$1"

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/phylophlan.git



More information about the debian-med-commit mailing list