[med-svn] [phylophlan] 07/10: Deal with some install issues and pathes
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 d9955d9e61c138ef12145538aab2cc157cdfecb1
Author: Andreas Tille <tille at debian.org>
Date: Mon Jul 11 19:31:03 2016 +0000
Deal with some install issues and pathes
---
debian/patches/absolute_path_taxcuration.patch | 15 ++++++++
debian/patches/create_dir.patch | 51 ++++++++++++++++++++++++++
debian/patches/series | 2 +
3 files changed, 68 insertions(+)
diff --git a/debian/patches/absolute_path_taxcuration.patch b/debian/patches/absolute_path_taxcuration.patch
new file mode 100644
index 0000000..7841dd0
--- /dev/null
+++ b/debian/patches/absolute_path_taxcuration.patch
@@ -0,0 +1,15 @@
+Author: Andreas Tille <tille at debian.org>
+Last-Update: Mon, 23 May 2016 16:09:13 +0200
+Description: Use absolute path to taxcuration dir
+
+--- a/phylophlan.py
++++ b/phylophlan.py
+@@ -719,7 +719,7 @@ def circlader( proj, integrate, tax = No
+ #info("Generating tree output images ...")
+ c_circ = "circlader/circlader.py"
+ c_circ_an = "circlader/circlader_annotate.py"
+- c_reroot = "./taxcuration/tree_reroot.py"
++ c_reroot = os.path.join(os.path.dirname(os.path.realpath(__file__)), "taxcuration/tree_reroot.py")
+
+ names = [l.strip().split('\t')[0] for l in open(dat_fol+ors2prots)]
+
diff --git a/debian/patches/create_dir.patch b/debian/patches/create_dir.patch
new file mode 100644
index 0000000..3bd44a6
--- /dev/null
+++ b/debian/patches/create_dir.patch
@@ -0,0 +1,51 @@
+Author: Andreas Tille <tille at debian.org>
+Last-Update: Mon, 23 May 2016 16:09:13 +0200
+Description: Do not require user to create output dir hierarchy in advance
+
+--- a/phylophlan.py
++++ b/phylophlan.py
+@@ -209,7 +209,7 @@ def get_inputs(proj):
+ "[No more than one txt file (the taxonomy for taxonomic analysis) allowed" )
+
+ if not os.path.isdir(dat_fol):
+- os.mkdir( dat_fol )
++ os.makedirs( dat_fol )
+
+ if not os.path.exists(dat_fol + ors2prots):
+ with open(dat_fol + ors2prots, 'w') as outf:
+@@ -282,7 +282,7 @@ def faa2ppafaa( inps, nproc, proj ):
+ 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 os.path.isdir(dat_fol): os.makedirs(dat_fol) # create the tmp directory if does not exists
+
+ if not mmap:
+ info("All usearch runs already performed!\n")
+@@ -333,7 +333,7 @@ def blast(inps, nproc, proj, blast_full=
+ pool = mp.Pool(nproc)
+ mmap = [(inp_fol+i+'.fna', 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 os.path.isdir(dat_fol): os.makedirs(dat_fol) # create the tmp directory if does not exists
+
+ if not mmap:
+ info('All tblastn runs already performed!\n')
+@@ -421,7 +421,7 @@ def gens2prots(inps, proj ):
+ inp_fol = "input/"+proj+"/"
+ dat_fol = "data/"+proj+"/usearch/"
+
+- if not os.path.isdir(dat_fol): os.mkdir(dat_fol) # create the tmp directory if does not exists
++ if not os.path.isdir(dat_fol): os.makedirs(dat_fol) # create the tmp directory if does not exists
+
+ if os.path.exists( dat_fol+ups2faa_pkl ):
+ return
+@@ -666,7 +666,7 @@ def fasttree( proj, integrate ):
+ dat_fol = "data/"+proj+"/"
+ outt = out_fol+proj+"."+ ( o_inttree if integrate else o_tree)
+ if not os.path.isdir(out_fol):
+- os.mkdir( out_fol )
++ os.makedirs( out_fol )
+ aln_in = dat_fol+aln_int_tot if integrate else dat_fol+aln_tot
+ if os.path.exists( outt ):
+ info("Final tree already built ("+outt+")!\n")
diff --git a/debian/patches/series b/debian/patches/series
index 12c55fa..1f3159b 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,5 @@ debian_tools.patch
datadir.patch
use_vsearch.patch
fasttree_name.patch
+create_dir.patch
+absolute_path_taxcuration.patch
--
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