Create new column database_accession_type.dbtype
As part of the ChEBI Ontology generation, it is necessary to create a new column in the table database_accession_type
. This new column would be VACHAR
, NOT NULL
and calculated based on the database_accession_type.name
following this function used to generate ChEBI ontology:
// OBOExporter.java
private String getAcronymDbAccType(String dbAcc) {
//Sorry for the hardcoded accession type ...
if (dbAcc.equalsIgnoreCase("Agricola citation"))
return "AGR";
if (dbAcc.equalsIgnoreCase("Chinese Abstracts citation"))
return "CBA";
if (dbAcc.equalsIgnoreCase("PubMed citation"))
return "PMID";
if (dbAcc.equalsIgnoreCase("PubMed Central citation"))
return "PMCID";
if (dbAcc.equalsIgnoreCase("CiteXplore citation"))
return "CTX";
if (dbAcc.contains("KEGG"))
return "KEGG";
if (dbAcc.contains("accession"))
dbAcc = dbAcc.replace("accession", "");
if (dbAcc.contains("Registry Number"))
dbAcc = dbAcc.replace("Registry Number", "");
return dbAcc.trim().replace(" ", "_");
}