diff --git a/pom.xml b/pom.xml
index 80fc8a3..2affca9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -76,6 +76,11 @@
sqlite-jdbc
3.21.0.1
+
+ hk.ust.bioinformatics
+ ProteomicsLibrary
+ 1.0
+
diff --git a/src/main/java/proteomics/ECL2.java b/src/main/java/proteomics/ECL2.java
index 3454db4..9c7d9d6 100644
--- a/src/main/java/proteomics/ECL2.java
+++ b/src/main/java/proteomics/ECL2.java
@@ -7,7 +7,7 @@
import proteomics.Search.SearchWrap;
import proteomics.Search.Search;
import proteomics.Spectrum.PreSpectra;
-import proteomics.TheoSeq.MassTool;
+import ProteomicsLibrary.MassTool;
import proteomics.Validation.CalFDR;
import uk.ac.ebi.pride.tools.jmzreader.JMzReader;
import uk.ac.ebi.pride.tools.mgf_parser.MgfFile;
diff --git a/src/main/java/proteomics/Index/BuildIndex.java b/src/main/java/proteomics/Index/BuildIndex.java
index 53372fa..97d374a 100644
--- a/src/main/java/proteomics/Index/BuildIndex.java
+++ b/src/main/java/proteomics/Index/BuildIndex.java
@@ -3,8 +3,8 @@
import org.apache.commons.math3.util.CombinatoricsUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import proteomics.TheoSeq.DbTool;
-import proteomics.TheoSeq.MassTool;
+import ProteomicsLibrary.*;
+import ProteomicsLibrary.Types.*;
import proteomics.Types.*;
import java.util.*;
@@ -90,17 +90,17 @@ public BuildIndex(Map parameter_map) throws Exception {
DbTool db_tool_obj = new DbTool(db_path, parameter_map.get("database_type"));
if (parameter_map.get("append_contaminants").contentEquals("1")) {
DbTool contaminantsDb = new DbTool(null, "contaminants");
- pro_seq_map = contaminantsDb.getProSeqMap();
- pro_seq_map.putAll(db_tool_obj.getProSeqMap()); // using the target sequence to replace contaminant sequence if there is conflict.
- pro_annotate_map = contaminantsDb.getProAnnotateMap();
- pro_annotate_map.putAll(db_tool_obj.getProAnnotateMap()); // using the target sequence to replace contaminant sequence if there is conflict.
+ pro_seq_map = contaminantsDb.getProteinSequenceMap();
+ pro_seq_map.putAll(db_tool_obj.getProteinSequenceMap()); // using the target sequence to replace contaminant sequence if there is conflict.
+ pro_annotate_map = contaminantsDb.getProteinAnnotateMap();
+ pro_annotate_map.putAll(db_tool_obj.getProteinAnnotateMap()); // using the target sequence to replace contaminant sequence if there is conflict.
} else {
- pro_seq_map = db_tool_obj.getProSeqMap();
- pro_annotate_map = db_tool_obj.getProAnnotateMap();
+ pro_seq_map = db_tool_obj.getProteinSequenceMap();
+ pro_annotate_map = db_tool_obj.getProteinAnnotateMap();
}
// define a new MassTool object
- mass_tool_obj = new MassTool(missed_cleavage, fix_mod_map, "KR", "P", mz_bin_size, one_minus_bin_offset);
+ mass_tool_obj = new MassTool(missed_cleavage, fix_mod_map, "KR", "P", true, mz_bin_size * 0.5, one_minus_bin_offset, "N14", "[]");
// generate seq_pro_map
Map seq_term_map = new HashMap<>();
@@ -142,7 +142,7 @@ public BuildIndex(Map parameter_map) throws Exception {
// mod free
Set linkSiteSet = getLinkSiteSet(seq, proteinNTerm, proteinCTerm, linker_type);
if (!linkSiteSet.isEmpty()) {
- double totalMass = (mass_tool_obj.calResidueMass(seq) + MassTool.H2O);
+ double totalMass = (mass_tool_obj.calResidueMass(seq) + mass_tool_obj.H2O);
int bin = massToBin(totalMass);
if (bin_seq_map.containsKey(bin)) {
bin_seq_map.get(bin).add(seq);
@@ -161,7 +161,7 @@ public BuildIndex(Map parameter_map) throws Exception {
linkSiteSet = new HashSet<>(5, 1);
linkSiteSet.add(varSeq.linkSite);
if (!linkSiteSet.isEmpty()) {
- double totalMass = (mass_tool_obj.calResidueMass(varSeq.seq) + MassTool.H2O);
+ double totalMass = (mass_tool_obj.calResidueMass(varSeq.seq) + mass_tool_obj.H2O);
int bin = massToBin(totalMass);
if (bin_seq_map.containsKey(bin)) {
bin_seq_map.get(bin).add(varSeq.seq);
@@ -517,10 +517,10 @@ private List