Skip to content

Commit

Permalink
Using ProteomicsLibrary's methods.
Browse files Browse the repository at this point in the history
  • Loading branch information
fcyu committed Mar 15, 2018
1 parent 9031e71 commit 6b88a18
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 903 deletions.
7 changes: 4 additions & 3 deletions src/main/java/proteomics/ECL2.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package proteomics;

import ProteomicsLibrary.IsotopeDistribution;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import proteomics.Index.BuildIndex;
Expand Down Expand Up @@ -145,11 +146,11 @@ private ECL2(String parameter_path, String spectra_path, String dbName) throws E
if (dev && parameter_map.get("C13_correction").contentEquals("1")) {
BufferedWriter writer = new BufferedWriter(new FileWriter("spectrum.dev.csv"));
writer.write("scanNum,charge,finalIsotopeCorrectionNum,isotopeCorrectionNum,pearsonCorrelationCoefficient,expMz1,expMz2,expMz3,expInt1,expInt2,expInt3,theoMz1,theoMz2,theoMz3,theoInt1,theoInt2,theoInt3\n");
Map<Integer, TreeMap<Integer, TreeSet<PreSpectra.DevEntry>>> scanDevEntryMap = preSpectra.getScanDevEntryMap();
Map<Integer, TreeMap<Integer, TreeSet<IsotopeDistribution.DevEntry>>> scanDevEntryMap = preSpectra.getScanDevEntryMap();
for (int scanNum : scanDevEntryMap.keySet()) {
TreeMap<Integer, TreeSet<PreSpectra.DevEntry>> chargeDevEntryMap = scanDevEntryMap.get(scanNum);
TreeMap<Integer, TreeSet<IsotopeDistribution.DevEntry>> chargeDevEntryMap = scanDevEntryMap.get(scanNum);
for (int charge : chargeDevEntryMap.keySet()) {
for (PreSpectra.DevEntry devEntry : chargeDevEntryMap.get(charge)) {
for (IsotopeDistribution.DevEntry devEntry : chargeDevEntryMap.get(charge)) {
writer.write(String.format(Locale.US, "%d,%d,%d,%d,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f\n", scanNum, charge, devEntry.isotopeCorrectionNum, devEntry.isotopeCorrectionNum, devEntry.pearsonCorrelationCoefficient, devEntry.expMatrix[0][0], devEntry.expMatrix[1][0], devEntry.expMatrix[2][0], devEntry.expMatrix[0][1], devEntry.expMatrix[1][1], devEntry.expMatrix[2][1], devEntry.theoMatrix[0][0], devEntry.theoMatrix[1][0], devEntry.theoMatrix[2][0], devEntry.theoMatrix[0][1], devEntry.theoMatrix[1][1], devEntry.theoMatrix[2][1]));
}
}
Expand Down
Loading

0 comments on commit 6b88a18

Please sign in to comment.