Skip to content

Commit

Permalink
v1.4273
Browse files Browse the repository at this point in the history
  • Loading branch information
cctsou committed Nov 21, 2015
1 parent 7816bc5 commit 0130de0
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 8 deletions.
2 changes: 1 addition & 1 deletion DIA-Umpire/src/MSUmpire/PSMDataStructure/PTMManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public PTM GetPTM(String AA, float massdiff) {
}
if (sitecorrect) {
double diff = Math.abs(ptm.getMass() - massdiff);
if (diff < 1f) {
if (diff < 0.5f) {
if (diff < smallmassdiff) {
smallmassdiff = diff;
smallestdiffptm = ptm;
Expand Down
2 changes: 1 addition & 1 deletion DIA-Umpire/src/MSUmpire/PSMDataStructure/PepIonID.java
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ public boolean IsDecoy(String decoytag) {
if (IsDecoy == -1) {
IsDecoy = 1;
for (String pro : ParentProtID_PepXML) {
if (!pro.startsWith(decoytag)) {
if (!(pro.startsWith(decoytag) | pro.endsWith(decoytag))) {
IsDecoy = 0;
break;
}
Expand Down
2 changes: 1 addition & 1 deletion DIA-Umpire/src/MSUmpire/PSMDataStructure/ProtID.java
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ public String GetGeneName() {
}

public boolean IsDecoy(String decoytag) {
if (getAccNo().startsWith(decoytag)) {
if (getAccNo().startsWith(decoytag) | getAccNo().endsWith(decoytag)) {
return true;
}
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,15 @@ public void handle(Element node) throws Exception {
private void ParseProteinGroupNode(Element protgroupnode) throws XmlPullParserException, IOException, ClassNotFoundException, InterruptedException {

int groupindex = Integer.parseInt(protgroupnode.getAttributes().getNamedItem("group_number").getNodeValue());
float groupprob = Float.parseFloat(protgroupnode.getAttributes().getNamedItem("probability").getNodeValue());

float groupprob=0f;
if (protgroupnode.getAttributes().getNamedItem("probability") != null) {
groupprob = Float.parseFloat(protgroupnode.getAttributes().getNamedItem("probability").getNodeValue());
}
else if (protgroupnode.getAttributes().getNamedItem("probability") != null) {
groupprob = Float.parseFloat(protgroupnode.getAttributes().getNamedItem("group_probability").getNodeValue());
}

int alphabet = 1;

for (int j = 0; j < protgroupnode.getChildNodes().getLength(); j++) {
Expand Down Expand Up @@ -154,9 +162,16 @@ private void ParseProteinGroupNode(Element protgroupnode) throws XmlPullParserEx
} else {
PepIonID pepIonID = new PepIonID();
pepIonID.Sequence = child.getAttributes().getNamedItem("peptide_sequence").getNodeValue();
pepIonID.MaxProbability = Float.parseFloat(child.getAttributes().getNamedItem("initial_probability").getNodeValue());
pepIonID.Is_NonDegenerate = "Y".equals(child.getAttributes().getNamedItem("is_nondegenerate_evidence").getNodeValue());
pepIonID.Weight = Float.parseFloat(child.getAttributes().getNamedItem("weight").getNodeValue());

if (child.getAttributes().getNamedItem("initial_probability") != null) {
pepIonID.MaxProbability = Float.parseFloat(child.getAttributes().getNamedItem("initial_probability").getNodeValue());
}
if (child.getAttributes().getNamedItem("is_nondegenerate_evidence") != null) {
pepIonID.Is_NonDegenerate = "Y".equals(child.getAttributes().getNamedItem("is_nondegenerate_evidence").getNodeValue());
}
if (child.getAttributes().getNamedItem("weight") != null) {
pepIonID.Weight = Float.parseFloat(child.getAttributes().getNamedItem("weight").getNodeValue());
}
if (child.getAttributes().getNamedItem("group_weight") != null) {
pepIonID.GroupWeight = Float.parseFloat(child.getAttributes().getNamedItem("group_weight").getNodeValue());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ private void ChangeScanTitlePepXML() throws FileNotFoundException, IOException{
writer.write(line.replaceAll(basename+"_Q",basename+".ForLibQ")+"\n");
}
writer.close();
}
}
}
}
}
Expand Down

0 comments on commit 0130de0

Please sign in to comment.