Skip to content

Commit

Permalink
Remove enum of _entity_experimental_src.host_org_scientific_name
Browse files Browse the repository at this point in the history
  • Loading branch information
Masashi Yokochi committed Aug 25, 2021
1 parent b945a50 commit 33ca5de
Show file tree
Hide file tree
Showing 17 changed files with 15,014 additions and 11,713 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Updated dictionary NMR-STAR v3.2.1.15 to v3.2.1.18.
Updated xsd2pgschema to 4.2.1.
Added remediation for '_chem_comp_identifier.type' for bmr archive.
Updated dictionary and translation profiles for processing entries released on 2019-03-13, 2019-05-15, 2019-05-29, 2019-08-28, 2019-12-04, 2020-01-15, 2020-02-05, 2020-07-15, 2020-07-22, 2020-09-02, 2020-09-23, 2020-09-30.
Updated dictionary and translation profiles for processing entries released on 2019-03-13, 2019-05-15, 2019-05-29, 2019-08-28, 2019-12-04, 2020-01-15, 2020-02-05, 2020-07-15, 2020-07-22, 2020-09-02, 2020-09-23, 2020-09-30, 2021-08-25.
Fixed definition of backbone atoms of GLY.
Added remediation for database accesion code and EC number.
Added remediation for '_heteronucl_t1rho_list.temp_control_method'.
Expand Down
Binary file modified bmr-util.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion bmr_src/BMRxTool_DOM.java
Original file line number Diff line number Diff line change
Expand Up @@ -8568,7 +8568,7 @@ private static void write_util_entityexperimentalsrc(String src_dir_name, String

buffw.write("\t\t}\n\n");

buffw.write("\t\tif ((" + empty_check("ncbi_taxonomy_id") + ") && (" + empty_check("scientific_name") + " || scientific_name.equalsIgnoreCase(\"not applicable\") || scientific_name.equalsIgnoreCase(\"chemical synthesis\")))\n");
buffw.write("\t\tif ((" + empty_check("ncbi_taxonomy_id") + ") && (" + empty_check("scientific_name") + " || scientific_name.equalsIgnoreCase(\"not applicable\") || scientific_name.equalsIgnoreCase(\"chemical synthesis\") || scientific_name.equalsIgnoreCase(\"in vitro\") || scientific_name.equalsIgnoreCase(\"in-vitro\") || scientific_name.equalsIgnoreCase(\"in vitro transcription\")))\n");
buffw.write("\t\t\treturn \"na\";\n\n");

buffw.write("\t\treturn ncbi_taxonomy_id;\n");
Expand Down
33 changes: 29 additions & 4 deletions bmr_src/BMRxTool_Java.java
Original file line number Diff line number Diff line change
Expand Up @@ -1190,6 +1190,28 @@ else if (class_name.equalsIgnoreCase("PeakGeneralChar")) {

write_invoke_string_method(buffw);

// item='host_org_scientific_name'
buffw.write("\n\tprivate static boolean set_string_host_org_scientific_name(" + abs_class_name + " list, String method_name, String nil_method_name, boolean required, String val_name, Connection conn_tax, String ncbi_taxonomy_id, FileWriter logw) {\n\n");

buffw.write("\t\tboolean nil = false;\n\n");

buffw.write("\t\tString _val_name = val_name;\n\n");

buffw.write("\t\tif (" + file_prefix + "_" + BMRxTool_DOM.util_main + ".remediate_xml)\n");
buffw.write("\t\t\tval_name = " + file_prefix + "_" + BMRxTool_DOM.util_tax + ".getOrganismScientificName(val_name, conn_tax, ncbi_taxonomy_id);\n\n");

buffw.write("\t\tif (" + file_prefix + "_" + BMRxTool_DOM.util_main + ".remediate_xml && (" + empty_check("val_name") + "))\n");
buffw.write("\t\t\tval_name = \"unidentified\";\n\n");

write_remed_log_code(buffw);

buffw.write("\t\tif (" + empty_check("val_name") + ")\n");
buffw.write("\t\t\tnil = true;\n\n");

write_missing_log_code(buffw);

write_invoke_string_method(buffw);

}

// category='BMRBx:entity_natural_src'
Expand Down Expand Up @@ -3053,8 +3075,8 @@ else if (attr_name_lower.equals("species") && class_name.equalsIgnoreCase("Entit
else if (attr_name_lower.equals("organism_name_common") && class_name.equalsIgnoreCase("EntityNaturalSrc"))
buffw.write("\t\t\t\t\tif (!set_string_organism_name_common(list[0], \"" + method_name + "\", \"" + nil_method_name + "\", " + required + ", rset.getString(\"" + column_name + "\"), conn_tax, ncbi_taxonomy_id, logw))\n\t\t\t\t\t\tcontinue;\n");
// item='organism_name_scientific', category='BMRBx:entity_natural_src'
else if ((attr_name_lower.equals("organism_name_scientific")) && class_name.equalsIgnoreCase("EntityNaturalSrc"))
buffw.write("\t\t\t\t\tif (!set_string_" + attr_name_lower +"(list[0], \"" + method_name + "\", \"" + nil_method_name + "\", " + required + ", rset.getString(\"" + column_name + "\"), conn_tax, entry_id, ncbi_taxonomy_id, logw, errw))\n\t\t\t\t\t\tcontinue;\n");
else if (attr_name_lower.equals("organism_name_scientific") && class_name.equalsIgnoreCase("EntityNaturalSrc"))
buffw.write("\t\t\t\t\tif (!set_string_organism_name_scientific(list[0], \"" + method_name + "\", \"" + nil_method_name + "\", " + required + ", rset.getString(\"" + column_name + "\"), conn_tax, entry_id, ncbi_taxonomy_id, logw, errw))\n\t\t\t\t\t\tcontinue;\n");

// item='host_org_genus', category='BMRBx:entity_experimental_src'
else if (attr_name_lower.equals("host_org_genus") && class_name.equalsIgnoreCase("EntityExperimentalSrc"))
Expand All @@ -3065,6 +3087,9 @@ else if (attr_name_lower.equals("host_org_species") && class_name.equalsIgnoreCa
// item='host_org_name_common', category='BMRBx:entity_experimental_src'
else if (attr_name_lower.equals("host_org_name_common") && class_name.equalsIgnoreCase("EntityExperimentalSrc"))
buffw.write("\t\t\t\t\tif (!set_string_host_org_name_common(list[0], \"" + method_name + "\", \"" + nil_method_name + "\", " + required + ", rset.getString(\"" + column_name + "\"), conn_tax, ncbi_taxonomy_id, logw))\n\t\t\t\t\t\tcontinue;\n");
// item='host_org_scientific_name', category='BMRBx:entity_experimental_src'
else if (attr_name_lower.equals("host_org_scientific_name") && class_name.equalsIgnoreCase("EntityExperimentalSrc"))
buffw.write("\t\t\t\t\tif (!set_string_host_org_scientific_name(list[0], \"" + method_name + "\", \"" + nil_method_name + "\", " + required + ", rset.getString(\"" + column_name + "\"), conn_tax, ncbi_taxonomy_id, logw))\n\t\t\t\t\t\tcontinue;\n");

// item='database_code', category='BMRBx:natural_source_db'
else if (attr_name_lower.equals("database_code") && class_name.equalsIgnoreCase("NaturalSourceDb"))
Expand Down Expand Up @@ -3613,7 +3638,7 @@ else if ((attr_name_lower.equals("experimental_method") || attr_name_lower.equal
buffw.write("\t\tif (val_name != null)\n");
buffw.write("\t\t\tval_name = " + file_prefix + "_" + BMRxTool_DOM.util_chemcompbond + ".getAromaticFlag(val_name);\n\n");

}
}

// item='type'
if (attr_name_lower.equals("type")) {
Expand Down Expand Up @@ -4261,7 +4286,7 @@ else if ((attr_name_lower.equals("experimental_method") || attr_name_lower.equal
if (attr_name_lower.equals("type")) {

buffw.write("\t\tif (val_name != null)\n");
buffw.write("\t\t\tval_name = ent.getType(val_name);\n\n");
buffw.write("\t\t\tval_name = ent.getType(val_name);\n\n");

buffw.write("\t\tif (" + empty_check("val_name") + ")\n");
buffw.write("\t\t\tval_name = \"macromolecule\";\n\n");
Expand Down
Binary file modified bms-util.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion bms_src/BMSxTool_DOM.java
Original file line number Diff line number Diff line change
Expand Up @@ -8676,7 +8676,7 @@ private static void write_util_entityexperimentalsrc(String src_dir_name, String

buffw.write("\t\t}\n\n");

buffw.write("\t\tif ((" + empty_check("ncbi_taxonomy_id") + ") && (" + empty_check("scientific_name") + " || scientific_name.equalsIgnoreCase(\"not applicable\") || scientific_name.equalsIgnoreCase(\"chemical synthesis\")))\n");
buffw.write("\t\tif ((" + empty_check("ncbi_taxonomy_id") + ") && (" + empty_check("scientific_name") + " || scientific_name.equalsIgnoreCase(\"not applicable\") || scientific_name.equalsIgnoreCase(\"chemical synthesis\") || scientific_name.equalsIgnoreCase(\"in vitro\") || scientific_name.equalsIgnoreCase(\"in-vitro\") || scientific_name.equalsIgnoreCase(\"in vitro transcription\")))\n");
buffw.write("\t\t\treturn \"na\";\n\n");

buffw.write("\t\treturn ncbi_taxonomy_id;\n");
Expand Down
36 changes: 31 additions & 5 deletions bms_src/BMSxTool_Java.java
Original file line number Diff line number Diff line change
Expand Up @@ -1171,6 +1171,28 @@ else if (class_name.equalsIgnoreCase("PeakGeneralChar")) {

write_invoke_string_method(buffw);

// item='host_org_scientific_name'
buffw.write("\n\tprivate static boolean set_string_host_org_scientific_name(" + abs_class_name + " list, String method_name, String nil_method_name, boolean required, String val_name, Connection conn_tax, String ncbi_taxonomy_id, FileWriter logw) {\n\n");

buffw.write("\t\tboolean nil = false;\n\n");

buffw.write("\t\tString _val_name = val_name;\n\n");

buffw.write("\t\tif (" + file_prefix + "_" + BMSxTool_DOM.util_main + ".remediate_xml)\n");
buffw.write("\t\t\tval_name = " + file_prefix + "_" + BMSxTool_DOM.util_tax + ".getOrganismScientificName(val_name, conn_tax, ncbi_taxonomy_id);\n\n");

buffw.write("\t\tif (" + file_prefix + "_" + BMSxTool_DOM.util_main + ".remediate_xml && (" + empty_check("val_name") + "))\n");
buffw.write("\t\t\tval_name = \"unidentified\";\n\n");

write_remed_log_code(buffw);

buffw.write("\t\tif (" + empty_check("val_name") + ")\n");
buffw.write("\t\t\tnil = true;\n\n");

write_missing_log_code(buffw);

write_invoke_string_method(buffw);

}

// category='BMRBx:entity_natural_src'
Expand Down Expand Up @@ -3109,6 +3131,10 @@ else if (attr_name_lower.equals("species") && class_name.equalsIgnoreCase("Entit
// item='organism_name_common', category='BMRBx:entity_natural_src'
else if (attr_name_lower.equals("organism_name_common") && class_name.equalsIgnoreCase("EntityNaturalSrc"))
buffw.write("\t\t\t\t\tif (!set_string_organism_name_common(list[0], \"" + method_name + "\", \"" + nil_method_name + "\", " + required + ", rset.getString(\"" + column_name + "\"), conn_tax, ncbi_taxonomy_id, logw))\n\t\t\t\t\t\tcontinue;\n");
// item='organism_name_scientific', category='BMRBx:entity_natural_src'
else if ((attr_name_lower.equals("organism_name_scientific")) && class_name.equalsIgnoreCase("EntityNaturalSrc"))
buffw.write("\t\t\t\t\tif (!set_string_organism_name_scientific(list[0], \"" + method_name + "\", \"" + nil_method_name + "\", " + required + ", rset.getString(\"" + column_name + "\"), conn_tax, entry_id, ncbi_taxonomy_id, logw, errw))\n\t\t\t\t\t\tcontinue;\n");

// item='host_org_genus', category='BMRBx:entity_experimental_src'
else if (attr_name_lower.equals("host_org_genus") && class_name.equalsIgnoreCase("EntityExperimentalSrc"))
buffw.write("\t\t\t\t\tif (!set_string_host_org_genus(list[0], \"" + method_name + "\", \"" + nil_method_name + "\", " + required + ", rset.getString(\"" + column_name + "\"), conn_tax, ncbi_taxonomy_id, logw))\n\t\t\t\t\t\tcontinue;\n");
Expand All @@ -3118,9 +3144,9 @@ else if (attr_name_lower.equals("host_org_species") && class_name.equalsIgnoreCa
// item='host_org_name_common', category='BMRBx:entity_experimental_src'
else if (attr_name_lower.equals("host_org_name_common") && class_name.equalsIgnoreCase("EntityExperimentalSrc"))
buffw.write("\t\t\t\t\tif (!set_string_host_org_name_common(list[0], \"" + method_name + "\", \"" + nil_method_name + "\", " + required + ", rset.getString(\"" + column_name + "\"), conn_tax, ncbi_taxonomy_id, logw))\n\t\t\t\t\t\tcontinue;\n");
// item='organism_name_scientific', category='BMRBx:entity_natural_src'
else if ((attr_name_lower.equals("organism_name_scientific")) && class_name.equalsIgnoreCase("EntityNaturalSrc"))
buffw.write("\t\t\t\t\tif (!set_string_" + attr_name_lower +"(list[0], \"" + method_name + "\", \"" + nil_method_name + "\", " + required + ", rset.getString(\"" + column_name + "\"), conn_tax, entry_id, ncbi_taxonomy_id, logw, errw))\n\t\t\t\t\t\tcontinue;\n");
// item='host_org_scientific_name', category='BMRBx:entity_experimental_src'
else if (attr_name_lower.equals("host_org_scientific_name") && class_name.equalsIgnoreCase("EntityExperimentalSrc"))
buffw.write("\t\t\t\t\tif (!set_string_host_org_scientific_name(list[0], \"" + method_name + "\", \"" + nil_method_name + "\", " + required + ", rset.getString(\"" + column_name + "\"), conn_tax, ncbi_taxonomy_id, logw))\n\t\t\t\t\t\tcontinue;\n");

// item='database_code', category='BMRBx:natural_source_db'
else if (attr_name_lower.equals("database_code") && class_name.equalsIgnoreCase("NaturalSourceDb"))
Expand Down Expand Up @@ -3748,8 +3774,8 @@ else if (attr_name_lower.equals("stereo_config") && class_name.equalsIgnoreCase(
buffw.write("\t\tif (val_name != null)\n");
buffw.write("\t\t\tval_name = " + file_prefix + "_" + BMSxTool_DOM.util_chemcompbond + ".getAromaticFlag(val_name);\n\n");

}
}

// item='type'
if (attr_name_lower.equals("type")) {

Expand Down
Loading

0 comments on commit 33ca5de

Please sign in to comment.