Skip to content

Commit

Permalink
Add formula, SMILES, InChI(Key) to CSV peak report.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mailaender committed Mar 1, 2024
1 parent 31c24c5 commit 15cebfe
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -237,13 +237,41 @@ private void printChromatogramData(CSVPrinter csvPrinter, ReportColumns reportCo
records.add("");
}
}
if(reportColumn.equals(ReportColumns.FORMULA)) {
if(libraryInformation != null) {
records.add(libraryInformation.getFormula());
} else {
records.add("");
}
}
if(reportColumn.equals(ReportColumns.CAS)) {
if(libraryInformation != null) {
records.add(libraryInformation.getCasNumber());
} else {
records.add("");
}
}
if(reportColumn.equals(ReportColumns.SMILES)) {
if(libraryInformation != null) {
records.add(libraryInformation.getSmiles());
} else {
records.add("");
}
}
if(reportColumn.equals(ReportColumns.INCHI)) {
if(libraryInformation != null) {
records.add(libraryInformation.getInChI());
} else {
records.add("");
}
}
if(reportColumn.equals(ReportColumns.INCHI_KEY)) {
if(libraryInformation != null) {
records.add(libraryInformation.getInChIKey());
} else {
records.add("");
}
}
if(reportColumn.equals(ReportColumns.MATCH_FACTOR)) {
if(comparisonResult != null) {
records.add(comparisonResult.getMatchFactor());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ public class ReportColumns extends ArrayList<String> {
public static final String PEAK_HEIGHT = "Peak Height";
public static final String INTEGRATOR = "Integrator";
public static final String TARGET = "Target";
public static final String FORMULA = "Formula";
public static final String CAS = "CAS";
public static final String SMILES = "SMILES";
public static final String INCHI = "InChI";
public static final String INCHI_KEY = "InChIKey";
public static final String MATCH_FACTOR = "Match Factor";
public static final String MATCH_FACTOR_REVERSED = "Reverse Match Factor";
public static final String PROBABILITY = "Probability";
Expand Down Expand Up @@ -97,7 +101,11 @@ public static ReportColumns getDefault() {
reportColumns.add(PEAK_HEIGHT);
reportColumns.add(INTEGRATOR);
reportColumns.add(TARGET);
reportColumns.add(FORMULA);
reportColumns.add(CAS);
reportColumns.add(SMILES);
reportColumns.add(INCHI);
reportColumns.add(INCHI_KEY);
reportColumns.add(MATCH_FACTOR);
reportColumns.add(MATCH_FACTOR_REVERSED);
reportColumns.add(PROBABILITY);
Expand Down

0 comments on commit 15cebfe

Please sign in to comment.