use of org.apache.poi.xssf.usermodel.XSSFCell in project ImmunogeneticDataTools by nmdp-bioinformatics.
the class DetectedFindingsWriter method reportDetectedFindings.
/**
* @param linkagesFound
* @throws IOException
* @throws SecurityException
*/
public synchronized void reportDetectedFindings(DetectedLinkageFindings findings) {
XSSFRow row = spreadsheet.createRow(rowId++);
int cellId = 0;
XSSFCell cell = row.createCell(cellId++);
cell.setCellValue(findings.getGLId());
cell = row.createCell(cellId++);
cell.setCellValue(findings.getAlleleCount(Locus.HLA_A));
cell = row.createCell(cellId++);
cell.setCellValue(findings.getAlleleCount(Locus.HLA_B));
cell = row.createCell(cellId++);
cell.setCellValue(findings.getAlleleCount(Locus.HLA_C));
cell = row.createCell(cellId++);
cell.setCellValue(findings.getAlleleCount(Locus.HLA_DRB1));
cell = row.createCell(cellId++);
cell.setCellValue(findings.getAlleleCount(Locus.HLA_DRB345));
cell = row.createCell(cellId++);
cell.setCellValue(findings.getAlleleCount(Locus.HLA_DQB1));
for (Linkages linkage : LinkagesLoader.getInstance().getLinkages()) {
cell = row.createCell(cellId++);
cell.setCellValue(findings.getLinkageCount(linkage.getLoci()));
cell = row.createCell(cellId++);
cell.setCellValue(findings.getMinimumDifference(linkage.getLoci()) + "");
}
String detectedFindings = formatDetectedFindings(findings);
printWriter.write(detectedFindings);
}
Aggregations