Skip to content

Commit

Permalink
Updated modification output format
Browse files Browse the repository at this point in the history
  • Loading branch information
wenbostar authored Jun 25, 2019
1 parent ef3da83 commit dbdaf83
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/main/java/PDVGUI/fileimport/MzIDFileImport.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
import java.util.HashMap;
import java.util.List;
import java.util.regex.Pattern;
import org.apache.commons.lang3.StringUtils;


/**
* Import mzIdentML file
Expand Down Expand Up @@ -552,7 +554,7 @@ private void parseMzID() throws SQLException, IOException {

utilitiesModifications.add(new ModificationMatch(modificationName, true, location));
if (rankNum == 1) {
String wholeName = modificationName + "@" + location + "(" + df.format(monoMassDelta) + ")";
String wholeName = modificationName + "@" + location + "[" + df.format(monoMassDelta) + "]";
allModificationString.add(wholeName);
}
}
Expand Down Expand Up @@ -611,7 +613,11 @@ private void parseMzID() throws SQLException, IOException {
bos.close();
}

String allModificationStringToString = allModificationString.toString().replace("[", "").replace("]","");
//String allModificationStringToString = allModificationString.toString().replace("[", "").replace("]","");
String allModificationStringToString = "-";
if(allModificationString.size()>=1){
allModificationStringToString = StringUtils.join(allModificationString,";");
}

preparedStatement.setString(1, spectrumNumber);
preparedStatement.setDouble(2, experimentMZ);
Expand Down

0 comments on commit dbdaf83

Please sign in to comment.