File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
MassBank-Project/MassBank-lib/src/main/java/massbank/export Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -83,7 +83,9 @@ public static String convert(massbank.Record record) {
83
83
sb .append ("PRECURSORTYPE: " ).append ((MS_FOCUSED_ION .getOrDefault ("PRECURSOR_TYPE" , "NA" ))).append (System .lineSeparator ());
84
84
sb .append ("FORMULA: " ).append (record .CH_FORMULA ()).append (System .lineSeparator ());
85
85
if (record .CH_LINK ().containsKey ("ChemOnt" )) {
86
- sb .append ("Ontology: " ).append (record .CH_LINK ().get ("ChemOnt" )).append (System .lineSeparator ());
86
+ String chemOntValue = record .CH_LINK ().get ("ChemOnt" );
87
+ String lastTerm = chemOntValue .substring (chemOntValue .lastIndexOf (";" ) + 1 ).trim ();
88
+ sb .append ("Ontology: " ).append (lastTerm ).append (System .lineSeparator ());
87
89
}
88
90
sb .append ("INCHIKEY: " ).append (record .CH_LINK ().getOrDefault ("INCHIKEY" , "N/A" )).append (System .lineSeparator ());
89
91
sb .append ("INCHI: " ).append (record .CH_IUPAC ()).append (System .lineSeparator ());
You can’t perform that action at this time.
0 commit comments