Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bio-STAR dictionary code (legacy Visual Basic)

This repository holds the original Visual Basic 6 application that BMRB used for ~20 years to build the NMR-STAR data dictionary and its many companion files from a hand-maintained master spreadsheet.

It is preserved for reference. It only runs on Windows with the VB6 IDE/runtime, and all of its file paths are hard-coded to a specific developer's machine (z:\eldonulrich\...). You cannot run it here. Its value today is as the specification of record for what the dictionary build actually does — the modern replacement (../dictionary-converter) must match this behaviour.

If you only want to know what the build does (inputs, transforms, outputs) rather than read 17,000 lines of VB, read PIPELINE.md. This file is the orientation map; PIPELINE.md is the detailed reference.

What the code produces

The one master input a human edits is a Microsoft Excel workbook, NMR-STAR_xlschem_master.xls. It is a giant table: one row per NMR-STAR tag (~5,000 rows) and 106 columns describing every property of that tag (its data type, mandatory status, enumeration flags, ADIT deposition-interface behaviour, parent/child keys, description, etc.), preceded by 4 header rows that name and annotate the columns.

The workbook is exported to a CSV (xlschem_ann.csv), and the VB program turns that CSV plus a handful of small supporting files into the whole distribution: the NMR-STAR dictionary file (NMR-STAR.dic), an internal/full version, the ADIT deposition-interface tables, enumeration tables, validation tables, template/example/"fake" STAR files, and a query interface. See PIPELINE.md for the full list.

Repository layout

soft/         The live NMR-STAR build. THIS is the code that matters.
soft_BMOD/    A near-duplicate fork for the "BMOD" (BMRB-modified / small
              molecule + metabolomics) variants. Same engine, different
              hard-coded paths and file names. Ignore unless you specifically
              need the non-NMR-STAR projects.
*.R files     Editor backup copies (RCS-style ",v"-like snapshots). Ignore.

VB6 source file types:

Extension Meaning
.vbp Project file — lists the modules/forms that make one executable and the Sub Main startup
.bas Code module
.frm Form (GUI window)
.vbw IDE window-layout state (ignore)
.vsd Visio diagram (ignore)

The projects (.vbp) and what each builds

There are several small executables. Only the first is the dictionary builder; the rest are one-off maintenance utilities that were run by hand as needed.

Project Purpose
STAR_dictionary.vbp The main build. GUI (launch_form) with 9 checkboxes; the driver is dict_control.bas → go_yahoo(), the engine is application_code.bas (~7,000 lines). Reads the master CSV + supporting files and writes the entire distribution.
NMR_STAR_Dict.vbp Older/alternate dictionary reader-writer (reads an RDB schema + rd_dict/rd_enumer). Superseded by STAR_dictionary.
nmrstar_control.vbp Dictionary read / compare / syntax-check control program.
alpha_enum.vbp Alphabetize enumeration lists (enum_alpha.bas).
dict_insert.vbp Insert entry tags into the dictionary (entry_tag_insert.bas).
inserting_id_desc.vbp Insert ID/description fields (insert_id_desc.bas).
move_tags.vbp Move/renumber ID tags (move_id_tags.bas).
oldnew_dict.vbp Diff an old vs new dictionary (oldnew.bas).
rd_cif_dict.vbp Read an mmCIF dictionary (rdmmdict.bas).
update_nmrcif_match.vbp Update the NMR-STAR ↔ mmCIF tag mapping (nmrcif_match_update.bas).

How the main build was run

STAR_dictionary shows a form with nine checkboxes; each is an independent operation. The two that matter:

  • Check 1 — "Excel file integrity check": validates xlschem_ann.csv against the ADIT group tables and writes table_err.txt / tag_err.txt.
  • Check 4 — "Update from the Excel file": the real build. Reads the master CSV, derives all computed columns (set_tag_values), and writes every output file, then copies the results into the source/ and internal_106_distribution/ folders. Everything in PIPELINE.md's output table comes from this one branch.

The other checkboxes (2, 3, 7, 8, 9) are partial/legacy operations — regenerate just the dictionary, just the interface file, update the spreadsheet back from a .dic or STAR file, write a "stub" dictionary, or check a deposition file. They were not part of the normal release build.

The target project/output set is chosen by the adit_file_source constant near the top of go_yahoo() (0=STAR v3.1, 1=v4, 2=metabolomics, 3=small-molecule, 4=current BMRB / NMR-STAR — the value actually used).

Where the files live (path variables in go_yahoo)

For adit_file_source = 4 (the real one), the hard-coded Windows paths map to these repository folders in ../nmr-star-dictionary/NMR-STAR/:

VB variable Folder Role
pathout_adit (also pathin) internal_106_source/ Working dir: holds the inputs and is where outputs are first written
pathout3 internal_106_distribution/ Public/internal distribution copy of the outputs
pathout4 source/ Copies of inputs+outputs, renamed with an NMR-STAR_ prefix

So internal_106_source is the true source and internal_106_distribution is the true output; source/ and distribution/ are renamed convenience copies. (internal_106_source, not the folder literally named source, is what both the VB build and the modern converter read.)

See also

  • PIPELINE.md — the input/transform/output reference.
  • ../dictionary-converter — the Python replacement, and ../dictionary-converter/ASSESSMENT.md — how faithfully it reproduces this code and whether it should be rewritten.

About

Bio-STAR dictionary generation code from source files.

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages