From 484dd156d09f225aee3a1218b035ae21db14248c Mon Sep 17 00:00:00 2001
From: Olivier Langella <Olivier.Langella@moulon.inra.fr>
Date: Thu, 31 Oct 2013 11:46:21 +0100
Subject: [PATCH] emPAI computing error fixed : all components are treated as
 double

---
 src/fr/inra/pappso/xtandempipeline/class_msms/Match.java      | 4 ++--
 .../xtandempipeline/grouping/HashSampleScanSetProt.java       | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/fr/inra/pappso/xtandempipeline/class_msms/Match.java b/src/fr/inra/pappso/xtandempipeline/class_msms/Match.java
index f3ad4c202..037fa9ea3 100644
--- a/src/fr/inra/pappso/xtandempipeline/class_msms/Match.java
+++ b/src/fr/inra/pappso/xtandempipeline/class_msms/Match.java
@@ -181,14 +181,14 @@ public class Match implements Comparable<Match>, GrpProtMatch {
 
 	public double getEmPAI() {
 		// compute emPAI, Ishihama 2006
-		double value = Math.pow(10.0, getPAI()) - 1;
+		double value = Math.pow(10.0, getPAI()) - (double) 1.0;
 
 		return value;
 	}
 
 	public double getEmPAIbyMsRun(MsRun samp) throws MSMSException {
 		// compute emPAI, Ishihama 2006
-		double value = Math.pow(10.0, getPAIbyMsRun(samp)) - 1;
+		double value = Math.pow(10.0, getPAIbyMsRun(samp)) - (double) 1.0;
 
 		return value;
 	}
diff --git a/src/fr/inra/pappso/xtandempipeline/grouping/HashSampleScanSetProt.java b/src/fr/inra/pappso/xtandempipeline/grouping/HashSampleScanSetProt.java
index c0327da98..645722039 100644
--- a/src/fr/inra/pappso/xtandempipeline/grouping/HashSampleScanSetProt.java
+++ b/src/fr/inra/pappso/xtandempipeline/grouping/HashSampleScanSetProt.java
@@ -181,14 +181,14 @@ public class HashSampleScanSetProt extends HashSampleScanSet {
 
 	public double getEmPAI() {
 		// compute emPAI, Ishihama 2006
-		double value = Math.pow(10.0, getPAI()) - 1;
+		double value = Math.pow(10.0, getPAI()) - (double) 1.0;
 
 		return value;
 	}
 
 	public double getEmPAIbyMsRun(MsRun samp) throws MSMSException {
 		// compute emPAI, Ishihama 2006
-		double value = Math.pow(10.0, getPAIbyMsRun(samp)) - 1;
+		double value = Math.pow(10.0, getPAIbyMsRun(samp)) - (double) 1.0;
 
 		return value;
 	}
-- 
GitLab