[med-svn] [pipasic] 01/03: Remove upstream specific pathes from config

Andreas Tille tille at debian.org
Thu Oct 1 20:42:16 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 d9a7dc81af7eb2e3f14005f8497a2e9fa60155d4
Author: Andreas Tille <tille at debian.org>
Date:   Thu Oct 1 21:53:43 2015 +0200

    Remove upstream specific pathes from config
---
 debian/patches/config.patch |  16 +++++++
 debian/patches/debug.patch  | 106 --------------------------------------------
 debian/patches/series       |   1 +
 3 files changed, 17 insertions(+), 106 deletions(-)

diff --git a/debian/patches/config.patch b/debian/patches/config.patch
new file mode 100644
index 0000000..1691f41
--- /dev/null
+++ b/debian/patches/config.patch
@@ -0,0 +1,16 @@
+Author: Andreas Tille <tille at debian.org>
+Last-update: Tue, 29 Sep 2015 15:21:50 +0200
+Description: Remove upstream specific pathes from config
+
+--- a/config_files/config_Inspect_py.txt
++++ b/config_files/config_Inspect_py.txt
+@@ -1,7 +1,7 @@
+-spectra,/home/lindnerm/data/2013_06_PASiC/exp_zaripov/data/Rot.mgf
++spectra,/var/lib/pipasic/spectra/dataset.mgf
+ instrument,FT-Hybrid
+ protease,Trypsin
+-DB,/home/lindnerm/data/2013_06_PASiC/exp_zaripov/ref/F_decoy.trie
++DB,/var/lib/pipasic/proteome/species2_decoy.trie
+ # Protecting group on cysteine
+ mod,57.021464,C,fix
+ mod,15.994915,M
diff --git a/debian/patches/debug.patch b/debian/patches/debug.patch
deleted file mode 100644
index 3d4f6e7..0000000
--- a/debian/patches/debug.patch
+++ /dev/null
@@ -1,106 +0,0 @@
---- a/pipasic.py
-+++ b/pipasic.py
-@@ -129,7 +131,7 @@ Note: Pipasic requires two .fasta for ea
- 							sample_counts.append(count)
- 							correction = True
- 						except: 
--							print "Could not find PSM-file for %s and %s" %(spec,DB)
-+							print "Could not find PSM-file '%s' for %s and %s" %(inspectOut,spec,DB)
- 							sample_counts.append(0)
- 					countList.append(sample_counts)
- 			np.array(countList).dump(os.path.splitext(outfile)[0]+"_counts.dat")
-@@ -193,7 +195,7 @@ Note: Pipasic requires two .fasta for ea
- 						count = parseInspect(inpath=inspectOut,fdr_countcut=fdr,silent=False)[1]
- 						sample_counts.append(count)
- 					except: 
--						print "Could not find PSM-file for %s and %s" %(spec,DB)
-+						print "Could not find PSM-file for Inspect '%s' for %s and %s" %(inspectOut,spec,DB)
- 						sample_counts.append(0)
- 				countList.append(sample_counts)#np.transpose(sample_counts))
- 				Counts = np.array(countList)
---- a/trypticpeptides.py
-+++ b/trypticpeptides.py
-@@ -448,7 +448,7 @@ def weightedMatrix(spectra_name, dbList,
- 		if Tide:
- 			identifiedPeptides = os.path.splitext(spectra_name)[0] +"_"+ os.path.splitext(os.path.basename(DBi))[0] +"_TideOut_parsed.txt"
- 			if not os.path.exists(identifiedPeptides):
--				print "Could not find PSM-file for %s and %s" %(spectra_name,DBi)
-+				print "Could not find PSM-file '%s' for %s and %s" %(identifiedPeptides,spectra_name,DBi)
- 				continue
- 		else:
- 			inspectOut = os.path.splitext(spectra_name)[0] +"_"+ os.path.splitext(os.path.basename(DBi))[0] +"_InspectOut.txt"
---- a/simulation_based_similarity.py
-+++ b/simulation_based_similarity.py
-@@ -116,10 +116,11 @@ from readMGF import sampleMGF as samplSp
- 
- # 5.a prepare decoyDB input for Inspect (def)
- def prepDB(fastaDB, path="/usr/share/inspect/"):
--	if not os.path.exists(os.path.join(path,"PrepDB.py")):
--		print "InsPecT files not found, please correct path!"
-+	inspectpath=os.path.join(path,"PrepDB.py")
-+	if not os.path.exists(inspectpath):
-+		print "InsPecT file '%s' not found, please correct path!" % (inspectpath)
- 		return 0
--	command = "python {path}PrepDB.py FASTA {db}".format(path=path, db=fastaDB)
-+	command = "python {inspectpath} FASTA {db}".format(inspectpath=inspectpath, db=fastaDB)
- 	print "Executing: ",command
- 	sys.stdout.flush()
- 	os.system(command)
-@@ -149,7 +150,7 @@ def calculateSimilarityMatrix(DBs, db_pa
- 	
- 	for i in rng:
- 		# 1. sampling from DB (run)
--		prot_path = samplProt(db_path+DBs[i]+".fasta",nProt)
-+		prot_path = samplProt(os.path.join(db_path,DBs[i]+".fasta"),nProt)
- 		# 2. use OpenMS simulator with sampled proteins (run)
- 		out_path = sim_out_path+DBs[i]+"_sampl"+str(nProt)+"MSSim.mzML"
- 		run_MSSim(prot_path, out_path, ini=MSSim_ini, param="-threads 4")
-@@ -159,12 +160,15 @@ def calculateSimilarityMatrix(DBs, db_pa
- 		spec_path = samplSpecs(sampl_path,nSpec)
- 		# (*) with runInspect_user_config.runInspect_config for all DBs
- 		# runInspect_config(spectra=spec_path, DBs=DBs, spec_path="", db_path=db_path, inspect_dir=inspect_dir, conf=configfile, user_mods="")
-+		print "DEBUG: db_path=%s, inspect_dir=%s" % (db_path, inspect_dir)
- 		for j in rng:
- 			# 5. calling InSpecT (*)
--			db_j = db_path+DBs[j]+"_decoy.trie"
-+			db_j = os.path.join(db_path,DBs[j]+"_decoy.trie")
-+			print "DEBUG: db_path=%s, DBs[j]=%s, inspect_dir=%s" % (db_path, DBs[j], inspect_dir)
- 			# 5.a create trie if necessary 
- 			if not os.path.exists(db_j):
--				prepDB(db_path+DBs[j]+"_decoy.fasta",path=inspect_dir)
-+				print "DEBUG: path db_j %s does not exist" % (db_j)
-+				prepDB(os.path.join(db_path,DBs[j]+"_decoy.fasta"),path=inspect_dir)
- 			inspect_out = spec_path[:-4] +"_"+DBs[j]+"_InspectOut.txt" # (!!)
- 			# prepare configfile # <-- call runInspect_user_config.runInspect_config instead!! (bei 5. ansetzen, j-Schleife nur mit inspect_out behalten)
- 			conf_in = open(inspect_config,'r')
---- a/runInspect_user_config.py
-+++ b/runInspect_user_config.py
-@@ -28,12 +28,14 @@ def runInspect_config(spectra, DBs, spec
- 	#simMat = [ [0 for i in rngDB] for j in rngSpc ] # initializing output
- 	
- 	for i in rngSpc:
--		specs = spec_path+spectra[i]+".mgf"
-+		specs = os.path.join(spec_path,spectra[i]+".mgf")
- 		for j in rngDB:
--			db_j = db_path+DBs[j]+"_decoy.trie"
-+			db_j = os.path.join(db_path,DBs[j]+"_decoy.trie")
- 			# create trie if necessary
-+			print "DEBUG runInspect_config: db_j=%s" % (db_j)
- 			if not os.path.exists(db_j):
--				go_on = prepDB(db_path+DBs[j]+"_decoy.fasta", path=inspect_dir)
-+				print "DEBUG runInspect_config: db_path=%s, DBs[j]=%s, inspect_dir=%s)"%(db_path, DBs[j], inspect_dir)
-+				go_on = prepDB(os.path.join(db_path,DBs[j]+"_decoy.fasta"), path=inspect_dir)
- 				if not go_on: return
- 			inspect_out = specs[:-4] +"_"+DBs[j]+"_InspectOut.txt"
- 			
---- a/TideProcessing.py
-+++ b/TideProcessing.py
-@@ -170,7 +170,7 @@ verbose:  if True (default), print statu
- 	counts = []
- 	testout = []
- 	for db in db_list:
--		db_fasta = db_path+db+"_decoy.fasta"
-+		db_fasta = os.path.join(db_path,db+"_decoy.fasta")
- 		succ = runTide(filepath=filepath, nSpec=nSpec, db_fasta=db_fasta, verbose=verbose)
- 		if succ[0]: # database not found
- 			print succ[0]
diff --git a/debian/patches/series b/debian/patches/series
index b806743..2bb5a96 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
 inspect_files.patch
 verbosity.patch
 safe_path_names.patch
+config.patch

-- 
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