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

spectre output report modified to display proteins by subgroups

parent 44d44b39
No related branches found
No related tags found
No related merge requests found
......@@ -131,7 +131,7 @@ public class OdsComparPaiOutput {
odsTable.writeCell("Top Protein Description");
odsTable.writeCell("Number of proteins");
for (MsRun msSample : msSampleList) {
for (@SuppressWarnings("unused") MsRun msSample : msSampleList) {
odsTable.writeCell("PAI");
odsTable.writeCell("emPAI");
}
......
......@@ -111,9 +111,10 @@ public class OdsComparSpectraOutput {
odsTable.writeLine();
odsTable.writeCell("Group ID");
odsTable.writeCell("Sub-group ID");
odsTable.writeCell("Top Protein ID");
odsTable.writeCell("Top Protein Description");
odsTable.writeCell("Number of subgroups");
odsTable.writeCell("Number of proteins");
MsRunSet msSampleList = ident.getMsRunSet();
msRunOrderedList = new TreeMap<String, MsRun>();
......@@ -142,8 +143,10 @@ public class OdsComparSpectraOutput {
this.writeHeaders(ident);
for (Group group : ident.getGrouping().getGroupList()) {
this.writeOneGroup(ident, group);
// this.writeOneGroup(ident, group);
for (SubGroup sg : group.getSubGroupSet().getSubGroupList()) {
this.writeOneSubGroup(ident, group, sg);
}
}
odsTable.writeLine();
odsTable.writeLine();
......@@ -161,24 +164,30 @@ public class OdsComparSpectraOutput {
}
}
private void writeOneGroup(Identification ident, Group group)
private void writeOneSubGroup(Identification ident, Group group, SubGroup sg)
throws MSMSException {
try {
logger.debug("writeOneGroup begin " + group);
logger.debug("writeOneSubGroup begin " + group);
// Match topMatch = (Match) sg.getHashSampleScanSetProtList().get(0)
// .getGrpProtMatch();
odsTable.writeLine();
// odsTable.writeCell("Group ID");
odsTable.writeCell(Utils.getPappsoGroupId(group));
SubGroup topSg = group.getSubGroupSet().getSubGroupList().get(0);
Protein topProt = (Protein) topSg.getHashSampleScanSetProtList()
// odsTable.writeCell("Sub-group ID");
odsTable.writeCell(Utils.getPappsoSubGroupId(group, sg));
Protein topProt = (Protein) sg.getHashSampleScanSetProtList()
.get(0).getGrpProtMatch().getGrpProtein();
// odsTable.writeCell("Top Protein ID");
odsTable.writeCell(Utils.getPappsoGroupingNumber(group, topSg, 1));
odsTable.writeCell(Utils.getPappsoGroupingNumber(group, sg, 1));
// odsTable.writeCell("Top Protein Description");
odsTable.writeCell(topProt.get_description());
// odsTable.writeCell("Number of subgroups");
odsTable.writeCell(group.getSubGroupSet().size());
// odsTable.writeCell("Number of proteins");
odsTable.writeCell(sg.getHashSampleScanSetProtList().size());
for (String msSampleName : msRunOrderedList.keySet()) {
odsTable.writeCell(group
......@@ -186,16 +195,48 @@ public class OdsComparSpectraOutput {
.get(msSampleName)));
}
logger.debug("writeOneGroup end");
logger.debug("writeOneSubGroup end");
} catch (XMLStreamException e) {
String message = "XMLStreamException in writeOneGroup "
String message = "XMLStreamException in writeOneSubGroup "
+ e.getMessage();
logger.error(message);
throw new MSMSException(message);
} catch (Exception e) {
String message = "Exception in writeOneGroup " + e.getMessage();
String message = "Exception in writeOneSubGroup " + e.getMessage();
logger.error(message);
throw new MSMSException(message);
}
}
/*
* private void writeOneGroup(Identification ident, Group group) throws
* MSMSException { try { logger.debug("writeOneGroup begin " + group);
* odsTable.writeLine();
*
* // odsTable.writeCell("Group ID");
* odsTable.writeCell(Utils.getPappsoGroupId(group));
*
* SubGroup topSg = group.getSubGroupSet().getSubGroupList().get(0); Protein
* topProt = (Protein) topSg.getHashSampleScanSetProtList()
* .get(0).getGrpProtMatch().getGrpProtein(); //
* odsTable.writeCell("Top Protein ID");
* odsTable.writeCell(Utils.getPappsoGroupingNumber(group, topSg, 1)); //
* odsTable.writeCell("Top Protein Description");
* odsTable.writeCell(topProt.get_description()); //
* odsTable.writeCell("Number of subgroups");
* odsTable.writeCell(group.getSubGroupSet().size());
*
* for (String msSampleName : msRunOrderedList.keySet()) {
* odsTable.writeCell(group
* .getNumberOfSpectraInGrpMsSample(msRunOrderedList .get(msSampleName))); }
*
* logger.debug("writeOneGroup end"); } catch (XMLStreamException e) {
* String message = "XMLStreamException in writeOneGroup " + e.getMessage();
* logger.error(message); throw new MSMSException(message); } catch
* (Exception e) { String message = "Exception in writeOneGroup " +
* e.getMessage(); logger.error(message); throw new MSMSException(message);
* }
*
* }
*/
}
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