Skip to content

Commit

Permalink
Fixed the following issues:
Browse files Browse the repository at this point in the history
  • Loading branch information
wenbostar committed Mar 31, 2024
1 parent 250a617 commit bcc737c
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 14 deletions.
30 changes: 25 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@
<dependency>
<groupId>com.github.chhh</groupId>
<artifactId>msftbx</artifactId>
<version>1.8.2</version>
<version>1.8.8</version>
</dependency>

<dependency>
Expand Down Expand Up @@ -225,19 +225,29 @@
<dependency>
<groupId>com.github.samtools</groupId>
<artifactId>htsjdk</artifactId>
<version>4.1.0</version>
<version>3.0.1</version>
</dependency>

<dependency>
<groupId>uk.ac.ebi.pride.jaxb</groupId>
<artifactId>pride-jaxb</artifactId>
<version>1.0.9</version>
<version>1.0.22</version>
<exclusions>
<exclusion>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</exclusion>
<exclusion>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>net.sf.jung</groupId>
<artifactId>jung-visualization</artifactId>
<version>2.0.1</version>
<version>2.1.1</version>
</dependency>

<dependency>
Expand All @@ -255,7 +265,17 @@
<dependency>
<groupId>uk.ac.ebi.pride.utilities</groupId>
<artifactId>pride-mod</artifactId>
<version>2.1.6</version>
<version>2.1.12</version>
<exclusions>
<exclusion>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</exclusion>
<exclusion>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
Expand Down
23 changes: 16 additions & 7 deletions src/main/java/PDVGUI/gui/utils/GetPredictedOnline.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import com.compomics.util.experiment.massspectrometry.MSnSpectrum;
import com.compomics.util.experiment.massspectrometry.Peak;
import com.compomics.util.experiment.massspectrometry.Precursor;
import org.apache.commons.lang3.StringUtils;
import org.json.JSONArray;
import org.json.JSONObject;
import org.kohsuke.rngom.util.Uri;
Expand All @@ -13,6 +14,7 @@
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.math.BigDecimal;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.ProtocolException;
Expand Down Expand Up @@ -97,12 +99,19 @@ private void generateInputString(){
} else {
// Add the modifications to the peptide sequence
// (the modifications are added in the order of their position in the peptide sequence)
int lastIndex = 0;
// pos: 1 - the first amino acid
String []aa_list = pepSeq.split("");
for (int index : newMods.keySet()){
modPep += pepSeq.substring(lastIndex, index) + newMods.get(index);
lastIndex = index;
// TODO: C-term modification
if(index == 0){
// N-term modification
aa_list[0] = aa_list[0]+newMods.get(index);
}else{
aa_list[index-1] = aa_list[index-1]+newMods.get(index);
}
}
modPep += pepSeq.substring(lastIndex);
modPep = StringUtils.join(aa_list, "");
// System.out.println(modPep);
}

if (model.equals("AlphaPept_ms2_generic")){
Expand Down Expand Up @@ -206,9 +215,9 @@ public MSnSpectrum getSpectra() throws IOException {

HashMap<Double, Peak> peakHashMap = new HashMap<>();
for (int i = 0; i < intensity.size(); i++) {
if ((double) intensity.get(i) > 0) {
Peak peak = new Peak((double) mzs.get(i), (double) intensity.get(i));
peakHashMap.put((double) mzs.get(i), peak);
if (((BigDecimal) intensity.get(i)).doubleValue() > 0) {
Peak peak = new Peak(((BigDecimal) mzs.get(i)).doubleValue(), ((BigDecimal) intensity.get(i)).doubleValue());
peakHashMap.put(((BigDecimal) mzs.get(i)).doubleValue(), peak);
}
}
Charge charge = new Charge(1, precursorCharge);
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/PDVGUI/gui/utils/SpectrumMainPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@
import java.util.*;

import static com.compomics.util.experiment.biology.Ion.IonType.*;
import static com.compomics.util.experiment.biology.Ion.IonType.RELATED_ION;
import static com.compomics.util.experiment.biology.Ion.IonType.REPORTER_ION;
import static com.compomics.util.experiment.biology.NeutralLoss.H3PO4;

/**
Expand Down Expand Up @@ -1680,6 +1678,7 @@ public void updateSpectrum(){
sequenceFragmentationPanel.setOpaque(false);
sequenceFragmentationPanel.setBackground(Color.WHITE);

spectrumJLayeredPane.setLayer(spectrumPanel, JLayeredPane.DEFAULT_LAYER);
spectrumJLayeredPane.add(spectrumPanel);

spectrumPanel.setBounds(0, 75, spectrumShowPanel.getWidth(),spectrumShowPanel.getHeight()-85);
Expand Down

0 comments on commit bcc737c

Please sign in to comment.