"Add Update File" does the same thing except that a particular kind of .ace file called an Update file is read, and "Read models" is executed first.
Figure 1. Obtaining write access.
Once this initial step has been performed,
A second, smaller hurdle is that ACEDB can't modify blocks.wrm unless the Unix file permissions for the directory $ACEDB/database and its contents include write-permission for the username you are logged in under.
Yet another Unix-related gotcha: if your default umask does not allow any one else to write and you're the first one to create the database/lock.wrm file, then even if everything else is setup other people still can't get write access. [DEM 3/96: This no longer seems to be true. Ace4_1 removes lock.wrm when the database is Saved or Quit. There is still a problem if ace crashes while lock.wrm exists; in this case it must be removed manually.]
New! See the document ftp://ncbi.nlm.nih.gov/repository/acedb/doc/, which see for possible updates.
#!/bin/csh foreach acefile (`ls $ACEDB/rawdata/*.ace`) $ACEDB/bin/tace <<quit parse $acefile quit end
set ACEDB $env(ACEDB)
#
# ----------Subprocedures----------
#
proc send_message {messg} {
puts stderr $messg
}
set loadDirectories [glob -nocomplain $ACEDB/acedata/load*]
foreach loadDir $loadDirectories {
send_message "Loading $loadDir\n"
set aceFiles [glob -nocomplain $loadDir/*.ace]
set sortedFiles [lsort $aceFiles]
foreach filename $aceFiles {
acedb Parse $filename
}
}
Something to be aware of when doing this is that each Parse command, in both tace and tclace, creates a new session. It automatically grabs write access and then, after Parsing, saves the new data. If you compare the sizes of databases made from identical data sets; one of which has been created using a single save from the graphical interface and the other of which has been created using such scripts, they can be considerably different. The latter will be larger because of the overhead of saving each session.
Colleague : "Matthews, Dave" Phone "123-4567"and new.ace says
Colleague : "Matthews, Dave" Phone "987-6543", simply loading new.ace into the existing database would produce
Colleague : "Matthews, Dave" Phone "123-4567" Phone "987-6543"Instead, use the program acediff, which you should find included in your $ACEDB/bin directory. Saying "acediff old.ace new.ace > DIFF.ace" produces a file DIFF.ace containing:
Colleague "Matthews, Dave" -D Phone "123-4567" Phone "987-6543"Now load DIFF.ace into the database, and replace rawdata/old.ace with new.ace.
1. Build a set of saved queries for particular invalid conditions, e.g. "find germplasm COUNT species > 1". Load the new .ace file and run these validation queries before saying "Save".
2. To examine all the values of a tag present in a particular .ace file:
% grep <tagname> <acefile> | sort | uniqFor example:
% grep Species germplasm.ace | sort | uniq Species "Aegilops elongatum" Species "Triticum aestivum" Species "Triticum tauschii" Species "Triticum umbellulata"This kind of "overview" examination can also be done conveniently using the TableMaker.
The gist of this problem is the transforming these types of data sets into .ace files. Mappings must be created between the schemas and data records of these databases to the classes and the tags defined in the models. While some work has been done writing code to solve this problem there are not yet general solutions.
line2ace is one effort, but many essential features are missing. However, if the data records are simple it is a very useful tool. By simple I mean that one line strictly correlates to one ace object and that each field in the line corresponds to one object tag. This easily becomes complicated in the case of Mac excel data because visually empty cells may result in either a tab character or nothing at all.
Another available tool is TextConvert, by Joachim Baumann. The conversion rules are described in an AWK-like language.
Some of the Sybase translators that have been created are as follows:
Once the .ace files are correctly created there comes a secondary problem, of course, which is validating the data, as discussed (cursorily) elsewhere in this document.