doc.add(p1);
Font bo = new Font();
bo.setStyle(Font.BOLD);
Table pvalTable = new Table(6);
pvalTable.addCell(new Cell(new Chunk("Name",bo)), 0, 0);
pvalTable.addCell(new Cell(new Chunk("Entrez",bo)), 0, 1);
pvalTable.addCell(new Cell(new Chunk("Gene Symbol",bo)), 0, 2);
pvalTable.addCell(new Cell(new Chunk("P-Value",bo)), 0, 3);
pvalTable.addCell(new Cell(new Chunk("Fold Change",bo)), 0, 4);
pvalTable.addCell(new Cell(new Chunk("In Network?",bo)), 0, 5);
for (int i = TTEST_univariate_names.length-1; i > 0; i--) {
pvalTable.addCell(new Cell(TTEST_univariate_names[i]), i, 0);
pvalTable.addCell(new Cell(util_lookupFileConvert.tradeProbeIDforEntrez(lookupFileName,TTEST_univariate_names[i])), i, 1);
pvalTable.addCell(new Cell(util_lookupFileConvert.tradeProbeIDforSymbol(lookupFileName,TTEST_univariate_names[i])), i, 2);
Phrase pval = new Phrase("");
pval.add(p_valuer_A(String.format("%.2e",TTEST_univariate_p_value_raw[i])));
pval.add(p_valuer_B(String.format("%.2e",TTEST_univariate_p_value_raw[i])));
pvalTable.addCell(new Cell(pval), i, 3);
if (TTEST_univariate_fold_change_raw[i]>= 1){
pvalTable.addCell(new Cell(String.format("%.2f",TTEST_univariate_fold_change_raw[i])), i, 4);
} else {
pvalTable.addCell(new Cell(String.format("%.2f",-1.00/TTEST_univariate_fold_change_raw[i])), i, 4);
}
if (TTEST_univariate_p_value_raw[i]< TTEST_p_value_threshold){
pvalTable.addCell(new Cell("In network"), i, 5);
} else {
pvalTable.addCell(new Cell("No"), i, 5);
}
}
pvalTable.setCellsFitPage(attSel);
doc.add(pvalTable);
doc.newPage();
}