Skip to content

Commit 259a3bf

Browse files
committed
Add ChemOnt subtag to CH$LINK
1 parent 28d88ef commit 259a3bf

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

Documentation/MassBankRecordFormat.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -608,12 +608,13 @@ CH$LINK: COMPTOX DTXSID50274017
608608
CH$LINK: INCHIKEY UFFBMTHBGFGIHF-UHFFFAOYSA-N
609609
CH$LINK: KEGG C00037
610610
CH$LINK: PUBCHEM SID: 11916 CID:182232
611-
CH$LINK: CHEMONT CHEMONTID:0004209 m-Xylenes
611+
CH$LINK: ChemOnt CHEMONTID:0004209; Organic compounds; Benzenoids; Benzene and substituted derivatives; Xylenes; m-Xylenes
612612
```
613613
Currently MassBank records have links to the following external databases:
614614
```
615615
CAS
616616
CAYMAN
617+
ChemOnt
617618
CHEBI
618619
CHEMBL
619620
CHEMPDB
@@ -630,8 +631,7 @@ NIKKAJI
630631
PUBCHEM
631632
ZINC
632633
```
633-
634-
CH$LINK fields should be arranged by the alphabetical order of database names.
634+
For ChemOnt compound classes all parent classes should be given. CH$LINK fields should be arranged by the alphabetical order of database names.
635635

636636
### 2.3 Information of Biological Sample
637637
#### <a name="2.3.1"></a>2.3.1 SP$SCIENTIFIC\_NAME

MassBank-Project/MassBank-lib/src/main/java/massbank/RecordParserDefinition.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1936,6 +1936,15 @@ private Result checkSemantic(Function<Context, Result> continuation, Context con
19361936
}
19371937
}
19381938

1939+
// validate the format of CH$LINK ChemOnt
1940+
if (record.CH_LINK().containsKey("ChemOnt")) {
1941+
String ChemOnt = record.CH_LINK().get("ChemOnt");
1942+
String regex = "^CHEMONTID:\\d+; (.+; )*.+$";
1943+
if (!ChemOnt.matches(regex)) {
1944+
return context.failure("Invalid format for CH$LINK ChemOnt: " + ChemOnt);
1945+
}
1946+
}
1947+
19391948
// validate the number of peaks in the peaklist
19401949
List<Triple<BigDecimal, BigDecimal, Integer>> pk_peak = record.PK_PEAK();
19411950
if (pk_peak.size() != record.PK_NUM_PEAK()) {

MassBank-Project/MassBank-lib/src/main/resources/recordformat/ch_link.ini

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@ LIPIDBANK
1515
LIPIDMAPS
1616
NIKKAJI
1717
PUBCHEM
18-
ZINC
18+
ZINC
19+
ChemOnt

0 commit comments

Comments
 (0)