[med-svn] [pipasic] 01/01: More safe path names
Andreas Tille
tille at debian.org
Thu Oct 1 21:05:19 UTC 2015
This is an automated email from the git hooks/post-receive script.
tille pushed a commit to branch master
in repository pipasic.
commit c506d95898b7db99a7f514fb9e02cc52107e6d82
Author: Andreas Tille <tille at debian.org>
Date: Thu Oct 1 23:05:04 2015 +0200
More safe path names
---
debian/patches/safe_path_names.patch | 38 ++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)
diff --git a/debian/patches/safe_path_names.patch b/debian/patches/safe_path_names.patch
index 02c17ff..72aab99 100644
--- a/debian/patches/safe_path_names.patch
+++ b/debian/patches/safe_path_names.patch
@@ -55,3 +55,41 @@ Description: Make sure directory and file are properly separated
succ = runTide(filepath=filepath, nSpec=nSpec, db_fasta=db_fasta, verbose=verbose)
if succ[0]: # database not found
print succ[0]
+--- a/pipasic.py
++++ b/pipasic.py
+@@ -111,7 +111,7 @@ Note: Pipasic requires two .fasta for ea
+ from TideProcessing import runTide_all
+ for spec in spectra:
+ print "Started Tide for "+spec
+- sample_counts = runTide_all(spec_mgf=options.spec_dir+spec+".mgf", db_list=db_list, db_path=options.db_dir, verbose=verbose)[0]
++ sample_counts = runTide_all(spec_mgf=os.path.join(options.spec_dir,spec+".mgf"), db_list=db_list, db_path=options.db_dir, verbose=verbose)[0]
+ countList.append([count for count in sample_counts])
+ else:
+ from runInspect_user_config import runInspect_config
+@@ -123,7 +123,7 @@ Note: Pipasic requires two .fasta for ea
+ sample_counts = []
+ for DB in db_list:
+ # compose filename of spectra and database
+- inspectOut = options.spec_dir+spec +"_"+ DB +"_InspectOut.txt"
++ inspectOut = os.path.join(options.spec_dir,spec +"_"+ DB +"_InspectOut.txt")
+ try:
+ count = parseInspect(inpath=inspectOut,fdr_countcut=fdr,silent=False)[1]
+ sample_counts.append(count)
+@@ -168,7 +168,7 @@ Note: Pipasic requires two .fasta for ea
+ from trypticpeptides import weightedMatrix
+ M_list_wtd = []
+ for spec in spectra:
+- M_list_wtd.append(weightedMatrix(spectra_name=options.spec_dir+spec, dbList=dbList, fdr=fdr, init_weight=0, verbose=verbose, Tide=options.Tide, decoy_tag=decoy_tag))
++ M_list_wtd.append(weightedMatrix(spectra_name=os.path.join(options.spec_dir,spec), dbList=dbList, fdr=fdr, init_weight=0, verbose=verbose, Tide=options.Tide, decoy_tag=decoy_tag))
+ np.array(M_list_wtd).dump(os.path.splitext(outfile)[0]+"_mList_wtd.dat")
+
+ # prep correction (1) - load/generate list of counts
+@@ -188,7 +188,7 @@ Note: Pipasic requires two .fasta for ea
+ sample_counts = []
+ for DB in db_list:
+ # compose filename of spectra and database
+- inspectOut = options.spec_dir+spec +"_"+ DB +"_InspectOut.txt"
++ inspectOut = os.path.join(options.spec_dir,spec +"_"+ DB +"_InspectOut.txt")
+ try:
+ count = parseInspect(inpath=inspectOut,fdr_countcut=fdr,silent=False)[1]
+ sample_counts.append(count)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/pipasic.git
More information about the debian-med-commit
mailing list