Skip to content

Commit

Permalink
Update PDVMainClass.java
Browse files Browse the repository at this point in the history
  • Loading branch information
KaiLiCn committed Oct 26, 2021
1 parent 58074d5 commit 9379901
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/main/java/PDVGUI/gui/PDVMainClass.java
Original file line number Diff line number Diff line change
Expand Up @@ -3528,9 +3528,15 @@ private MSnSpectrum getSpectrum(String spectrumKey, String spectrumFileName){
Charge charge = spectrumMatch.getBestPeptideAssumption().getIdentificationCharge();
ArrayList<Charge> charges = new ArrayList<>();
charges.add(charge);
IScan precursorScan = scans.getScanByNum(iScan.getPrecursor().getParentScanNum());
Double precursorInt = iScan.getPrecursor().getIntensity();

Precursor precursor = new Precursor(scans.getScanByNum(iScan.getPrecursor().getParentScanNum()).getRt(), iScan.getPrecursor().getMzTarget(),
iScan.getPrecursor().getIntensity(), charges);
if (precursorInt == null){
precursorInt = precursorScan.getBasePeakIntensity();
}

Precursor precursor = new Precursor(precursorScan.getRt(), iScan.getPrecursor().getMzTarget(),
precursorInt, charges);

double[] mzs = spectrum.getMZs();
double[] ins = spectrum.getIntensities();
Expand Down Expand Up @@ -3611,13 +3617,12 @@ public String toString() {
*/
private void updateSpectrum(MSnSpectrum mSnSpectrum, SpectrumMatch spectrumMatch) {

SpectrumFactory spectrumFactory = (SpectrumFactory) spectrumsFileFactory;

String matchKey = spectrumMatch.getKey();
String spectrumFileName = matchKey.split("_cus_")[0];

String spectrumTitle = "";
if(spectrumFileType.toLowerCase().equals("mgf")) {
SpectrumFactory spectrumFactory = (SpectrumFactory) spectrumsFileFactory;
if (isNewSoft) {
String spectrumKey = matchKey.split("_cus_")[1];
spectrumTitle = spectrumKey.split("_rank_")[0];
Expand Down

0 comments on commit 9379901

Please sign in to comment.