Skip to content

Commit

Permalink
Fix for cases when modified peptide seequence is not present in pepxml
Browse files Browse the repository at this point in the history
  • Loading branch information
chhh committed Jun 25, 2019
1 parent df1ddf0 commit 3a90943
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ plugins {
}

group = 'com.dmtavt'
version = '1.2.1'
version = '1.2.2'

description = """DeltaMass - detection and visualization of common mass shifts in proteomic searches."""

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/dmtavt/deltamass/DeltaMassInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public final class DeltaMassInfo {
private static final EventBus bus = EventBus.getDefault();

public static final String Name = "DeltaMass";
public static final String Ver = "1.2.1";
public static final String Ver = "1.2.2";

private static final String PROP_VER = "deltamass.version.current";
private static final String PROP_DOWNLOAD_URL = "deltamass.download.url";
Expand Down
9 changes: 8 additions & 1 deletion src/main/java/com/dmtavt/deltamass/parsers/PepxmlParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,14 @@ public PepSearchFile parse(final Pattern decoyRegex) throws IOException {
if (mi == null) {
spm.seqModStateId = spm.seq;
} else {
StringBuilder sb = new StringBuilder(mi.getModifiedPeptide());
StringBuilder sb = new StringBuilder();
if (mi.getModifiedPeptide() != null) {
sb.append(mi.getModifiedPeptide());
} else if (sh.getPeptide() != null) {
sb.append(sh.getPeptide());
} else {
throw new IOException("ModificationInfo->ModifiedPeptide and SearchHit->Peptide were both not present");
}
StringBuilder sbMods = new StringBuilder();
if (mi.getModNtermMass() != null) {
sb.append(String.format("_%.2f@0", mi.getModNtermMass()));
Expand Down

0 comments on commit 3a90943

Please sign in to comment.