XREF

Dave Matthews matthews at GREENGENES.CIT.CORNELL.EDU
Tue Jun 6 06:54:49 EST 1995


Brian Fristensky, frist at cc.umanitoba.ca, asks:

> the syntactic definitions for ACEDB (Dec. 10 1992) gives an
> example (edited here for brevity) that reads
> 
> ?Author   Name Text
>           Paper ?Paper XREF Author
> 
> ?Paper    Title Text
>           Author ?Author XREF Paper
> 
> What does the XREF accomplish?

The purpose of the XREF command in models.wrm is to instruct ACEDB to 
create an automatic back-reference when the .ace file is loaded.  For 
example, loading a .ace file containing only the record,

  Paper : TAG-87-697
  Title "Cultivar discrimination of Brassica napus using RAPDs"
  Author Mailer-RJ
  Author Scarth-R
  Author Fristensky-B

, will create in the database not only that Paper object but also the Author
objects

  Author Mailer-RJ
  Paper TAG-87-697

  Author Scarth-R
  Paper TAG-87-697

  Author Fristensky-B
  Paper TAG-87-697


That's the basic answer.  It's a very useful function.  Now for the Appendix
to the answer.


APPENDIX: "Remove the XREF from ?Author Paper ?Paper XREF Author!"

It turns out that the example used in this syntactic definitions document
is a particularly poor one, and the document should be updated.  Although
in many cases it is convenient to set up reciprocal XREFs so that two-
way links are automatically created regardless of which class of objects
are loaded, this leads to trouble in the case of ?Paper <-> ?Author.  The
problem is that the Authors of a given Paper will be listed in the order
loaded, so if all the Author objects are loaded before all the Paper
objects (as happens when the database is re-loaded from a dump file) the
presence of an XREF in the ?Author Paper field scrambles the Author orders.

Below is a fuller description of this problem (found by searching the
acedb newsgroup archive, gopher://genome-gopher.stanford.edu/77/.index/
acedb-biosci, for "xref").

regards,
- Dave

::::::::
>From BIOSCI-REQUEST  Mon Apr 24 14:09:23 1995
To: acedb at net.bio.net
>From: <rd at sanger.ac.uk>
Subject: Author order
Original-To: acedb at dl.ac.uk

> We're running version 3.0 on a SUN.  I've noticed that after several days
> of use, our database has changed the order of Author's names inside of
> Paper objects.  Have others experienced this?  Has it been addressed in
> later versions?

I doubt the order is changing.  The order in a column is determined by
the order in which items are entered.  If they are there already then
they are not reentered.  People have had problems with Author order
before, for the following reason.  

If you XREF from Author to ?Paper, e.g. your models contain something like

?Author Address ...
	Paper ?Paper XREF Author 		// <1>

?Paper Reference Title ?Text
		 Author ?Author XREF Paper 	// <2>

then if you add Author objects before the Paper objects, the Paper
object will be created by the XREF <1>, and the author list in
position <2> in the paper object will be determined by the order in
which the Author objects are read in, not the order of authors in the
Paper object.

This was a problem with the very early models used by the C. elegans
database, and hence unfortunately propagated around the world.  The
solution is to remove XREF <1>, so the models look like:

?Author Address ...
	Paper ?Paper

?Paper Reference Title ?Text
		 Author ?Author XREF Paper

Now the authors in the Paper object will only be added when the Paper
object is read, and will be in the order specified there.

I hope this is both clear, and also the cause of the reported problem.

Richard



 





More information about the Acedb mailing list