Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
drseb committed Nov 30, 2017
1 parent 5d5106f commit d4db81a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
Binary file modified obo2xls.jar
Binary file not shown.
13 changes: 9 additions & 4 deletions src/de/phenomics/Obo2Xls.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.stream.Collectors;

Expand Down Expand Up @@ -122,17 +123,21 @@ private static void createXlsFromObo(Ontology ontology, Term selectedRootTerm, S
XSSFCellStyle style = wb.createCellStyle();
style.setFont(bold);

/*
* New terms report
*/
Sheet sheet0 = wb.createSheet("Excel version of " + fileNameParsedOboFrom + " version: " + date);
int rowIndex = 0;
String[] headersTermAdd = new String[] { "Class Label", "Class ID", "Alternative IDs", "Synonyms (separated by semicolon)", "Definition",
"Subclass-of (label+id)" };

rowIndex = createHeaderRow(createHelper, style, rowIndex, sheet0, headersTermAdd);

for (Term term : ontology) {
ArrayList<Term> termsToReport = new ArrayList<>();
if (selectedRootTerm != null) {
termsToReport.addAll(ontologySlim.getDescendants(selectedRootTerm));
} else {
termsToReport.addAll(ontology.getAllTerms());
}

for (Term term : termsToReport) {

Row row = sheet0.createRow((short) rowIndex++);

Expand Down

0 comments on commit d4db81a

Please sign in to comment.