Skip to content

Commit

Permalink
fix a bug in parsing glycan spectra for library
Browse files Browse the repository at this point in the history
  • Loading branch information
dpolasky committed Sep 24, 2024
1 parent dd40254 commit c2083b3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/edu/umich/andykong/ptmshepherd/glyco/GlycoAnalysis.java
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,10 @@ public HashMap<String, GlycanSpectrumCandidate> generateConsensusSpectra(GlycoPa
boolean skip = Double.parseDouble(splits[qValCol]) >= glycoParams.speclibMaxQ;
String[] fragmentInfo = splits.length >= fragmentStartCol ? Arrays.copyOfRange(splits, fragmentStartCol, splits.length) : new String[]{};

GlycanCandidate fragmentInfoContainer = new GlycanCandidate(glycanString, fragmentInfo, glycoParams);
String glycanHash = fragmentInfoContainer.toString();
// only include targets in fragment info
if (!skip) {
GlycanCandidate fragmentInfoContainer = new GlycanCandidate(glycanString, fragmentInfo, glycoParams);
String glycanHash = fragmentInfoContainer.toString();
if (glycanInputMap.containsKey(glycanHash)) {
glycanInputMap.get(glycanHash).add(fragmentInfoContainer);
} else {
Expand Down

0 comments on commit c2083b3

Please sign in to comment.