Skip to content
Snippets Groups Projects
Commit 9379f3b9 authored by Olivier Langella's avatar Olivier Langella
Browse files

trying to deal with fuzzy Brucker MGF

parent 19e42211
No related branches found
No related tags found
No related merge requests found
......@@ -121,10 +121,17 @@ public class Mascot {
+ pep.getDeltaMass() + 1.007825));
pep_.set_mhplus_theo((float) (pep.getPeptideMr() + 1.007825));
pep_.set_sequence(pep.getSequence());
<<<<<<< HEAD
if (XtandemPipelineSession.getInstance().getConfig()
.get_mascot_evalue_theoritical()) {
// Evalue theoritical
=======
//query.getTitle();
if(XtandemPipelineSession.getInstance().getConfig().get_mascot_evalue_theoritical()){
//Evalue theoritical
>>>>>>> trying to deal with fuzzy Brucker MGF
pep_.set_evalue((float) pep.getExpectancy());
} else {
// Evalue experimental
......
......@@ -168,9 +168,8 @@ public class xtandem extends org.xml.sax.helpers.DefaultHandler {
}
pep_ = this.peptide;
try {
pep_.set_sample_id(
identification_.getMsRunSet().getInstance(sample_),
sample_);
pep_.set_sample_id(identification_.getMsRunSet().getInstance(
sample_), sample_);
} catch (MSMSException e) {
throw new SAXException(e);
}
......@@ -199,9 +198,9 @@ public class xtandem extends org.xml.sax.helpers.DefaultHandler {
this.peptide = PeptideStore.getInstance().newPeptide();
}
pep_ = peptide;
pep_.set_Modifs(attrs.getValue("type"),
Integer.parseInt(attrs.getValue("at")),
Float.valueOf(attrs.getValue("modified")).floatValue());
pep_.set_Modifs(attrs.getValue("type"), Integer.parseInt(attrs
.getValue("at")), Float.valueOf(attrs.getValue("modified"))
.floatValue());
// modifs liste for isotopic analysis
identification_.add_modifs_to_liste(new Modifs(Float.valueOf(
attrs.getValue("modified")).floatValue()));
......@@ -229,24 +228,39 @@ public class xtandem extends org.xml.sax.helpers.DefaultHandler {
match_ = (Match) identification_.get_match(prot_);
prot_ = match_.get_protein_match();
}
prot_.set_evalue(
identification_.getMsRunSet().getInstance(sample_),
Float.valueOf(_evalue_prot).floatValue());
prot_.set_evalue(identification_.getMsRunSet().getInstance(
sample_), Float.valueOf(_evalue_prot).floatValue());
}
if (spectre_number) {
String tmp = C_data.replaceAll(" .*", "");
String[] split = tmp.split("-");
if (split.length == 2) {
try {
int scan = Integer.parseInt(split[0].replaceAll(
"ScanNumber:", ""));
float rtime = Float.valueOf(
split[1].replaceAll("RtInSec:", ""))
.floatValue();
correction_scan.put("" + _scan, "" + scan);
correction_time.put("" + scan, "" + rtime);
logger.debug("" + scan + " = " + rtime);
} catch (Exception e) {
// example of X!tandem note on spectrum from mgf Bruker :
// <note label="Description">RTINSECONDS=769.441^M Cmpd
// 5568, +MSn(709.3404), 12.82 min MS: 5567/ MSMS: 5568/^M
// </note>
Pattern patt = Pattern
.compile("RTINSECONDS=([0-9.]+).*?MS: ([0-9]+)/ MSMS: ([0-9]+)");
Matcher m = patt.matcher(C_data.trim());
if (m.matches()) {
float rtime = Float.valueOf(m.group(1)).floatValue();
int scan = Integer.parseInt(m.group(3));
correction_scan.put("" + _scan, "" + scan);
correction_time.put("" + scan, "" + rtime);
logger.debug("Bruker MGF scan time fix " + scan + " = " + rtime);
} else {
String tmp = C_data.replaceAll(" .*", "");
String[] split = tmp.split("-");
if (split.length == 2) {
try {
int scan = Integer.parseInt(split[0]
.replaceAll("ScanNumber:", ""));
float rtime = Float.valueOf(
split[1].replaceAll("RtInSec:", ""))
.floatValue();
correction_scan.put("" + _scan, "" + scan);
correction_time.put("" + scan, "" + rtime);
logger.debug("" + scan + " = " + rtime);
} catch (Exception e) {
}
}
}
spectre_number = false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment