diff --git a/pom.xml b/pom.xml
index bf97bce..e478eeb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
hk.ust.bioinformatics
ECL2
- 2.1.4-dev-201705281102
+ 2.1.4-dev-201705291100
jar
ECL2
diff --git a/src/main/java/proteomics/ECL2.java b/src/main/java/proteomics/ECL2.java
index ca86d06..5009144 100644
--- a/src/main/java/proteomics/ECL2.java
+++ b/src/main/java/proteomics/ECL2.java
@@ -21,10 +21,9 @@
public class ECL2 {
public static final int score_point_t = 15000;
- public static final boolean flankingPeaks = true;
private static final Logger logger = LoggerFactory.getLogger(ECL2.class);
- public static final String version = "2.1.4-dev-201705281102";
+ public static final String version = "2.1.4-dev-201705291100";
public static boolean debug;
public static boolean dev;
@@ -59,6 +58,11 @@ public static void main(String[] args) {
delta_c_t = Float.valueOf(parameter_map.get("delta_c_t"));
}
+ boolean flankingPeaks = true;
+ if (parameter_map.containsKey("flanking_peaks") && parameter_map.get("flanking_peaks").contentEquals("0")) {
+ flankingPeaks = false;
+ }
+
debug = parameter_map.get("debug").contentEquals("1");
dev = parameter_map.get("dev").contentEquals("1");
@@ -117,7 +121,7 @@ public static void main(String[] args) {
Search search_obj = new Search(build_index_obj, parameter_map);
List> temp_result_list = new LinkedList<>();
for (int scanNum : scanNumArray) {
- temp_result_list.add(thread_pool.submit(new SearchWrap(search_obj, num_spectrum_map.get(scanNum), build_index_obj, mass_tool_obj, max_common_ion_charge, build_index_obj.getSeqProMap(), cal_evalue, delta_c_t)));
+ temp_result_list.add(thread_pool.submit(new SearchWrap(search_obj, num_spectrum_map.get(scanNum), build_index_obj, mass_tool_obj, max_common_ion_charge, build_index_obj.getSeqProMap(), cal_evalue, delta_c_t, flankingPeaks)));
}
// check progress every minute
diff --git a/src/main/java/proteomics/Search/SearchWrap.java b/src/main/java/proteomics/Search/SearchWrap.java
index f83151f..e9b1783 100644
--- a/src/main/java/proteomics/Search/SearchWrap.java
+++ b/src/main/java/proteomics/Search/SearchWrap.java
@@ -29,13 +29,13 @@ public class SearchWrap implements Callable {
private final boolean cal_evalue;
private final float delta_c_t;
- public SearchWrap(Search search_obj, SpectrumEntry spectrumEntry, BuildIndex build_index_obj, MassTool mass_tool_obj, int max_common_ion_charge, Map> seqProMap, boolean cal_evalue, float delta_c_t) {
+ public SearchWrap(Search search_obj, SpectrumEntry spectrumEntry, BuildIndex build_index_obj, MassTool mass_tool_obj, int max_common_ion_charge, Map> seqProMap, boolean cal_evalue, float delta_c_t, boolean flankingPeaks) {
this.search_obj = search_obj;
this.spectrumEntry = spectrumEntry;
this.build_index_obj = build_index_obj;
this.mass_tool_obj = mass_tool_obj;
this.max_common_ion_charge = max_common_ion_charge;
- preSpectrumObj = new PreSpectrum(mass_tool_obj);
+ preSpectrumObj = new PreSpectrum(mass_tool_obj, flankingPeaks);
this.seqProMap = seqProMap;
this.cal_evalue = cal_evalue;
this.delta_c_t = delta_c_t;
diff --git a/src/main/java/proteomics/Spectrum/PreSpectra.java b/src/main/java/proteomics/Spectrum/PreSpectra.java
index 5ced01c..862307a 100644
--- a/src/main/java/proteomics/Spectrum/PreSpectra.java
+++ b/src/main/java/proteomics/Spectrum/PreSpectra.java
@@ -40,8 +40,6 @@ public PreSpectra(MzXMLFile spectra_parser, BuildIndex build_index_obj, Map peaks_map, float precursor_mass, int scanNum) {
@@ -76,7 +78,7 @@ private SparseVector prepareXcorr(double[] pl_array) {
for (int i = 1; i < pl_array.length; ++i) {
double temp = pl_array[i] - tempArray[i];
- if (ECL2.flankingPeaks) {
+ if (flankingPeaks) {
temp += (pl_array[i - 1] - tempArray[i - 1]) * 0.5;
if (i + 1 < pl_array.length) {
temp += (pl_array[i + 1] - tempArray[i + 1]) * 0.5;
diff --git a/src/main/resources/parameter.def b/src/main/resources/parameter.def
index ea93b17..2e47fa3 100644
--- a/src/main/resources/parameter.def
+++ b/src/main/resources/parameter.def
@@ -1,4 +1,4 @@
-# 2.1.4-dev-201705281102
+# 2.1.4-dev-201705291100
# The first line is the parameter file version. Do not change it.
thread_num = 0
debug = 0
@@ -74,6 +74,7 @@ single_chain_t = 0.1
cal_evalue = 1
ms1_bin_size = 0.001
delta_c_t = 0.00
+flanking_peaks = 1
# for debug
# put interested scan numbers below. One number each line
\ No newline at end of file