// $Id: models.wrm,v 4.1.1.3 1995/02/05 17:07:17 staffan Exp staffan $
// $Log: models.wrm,v $
// Revision 4.1.1.3  1995/02/05  17:07:17  staffan
// Changed Date Text to DateType in AddressInfo, Diary and Task classes
// Added UID tag in Paper, takes ?Source and UNIQUE Text as data
//   ?Source should probably (almost always) be MedLine and the Text is the UID
//
// Revision 4.1.1.2  1995/02/05  14:59:24  staffan
// Added Antigen back as tag in Sequence model, and the reciprocal change in Antigen
// These should ideally be solved with attatchments in the future
//
// Revision 4.1.1.1  1995/02/05  13:32:22  staffan
// Branching initial development tree
//
// Revision 4.1  1995/02/05  13:31:56  staffan
// updated to revision 4
//
// Revision 3.7  1994/08/16  09:43:35  staffan
// touched up Antibody slightly
// and tried @query, but couldn't get it to work ...
//
// Revision 3.6  1994/08/01  07:39:31  staffan
// updated for use with ace3.3
//

// models.wrm - main file defining tree class structures
//
// This file is read only at run time, and furthermore
// only when you select "Read Models" or "Add Update File"
// from the main menu.
//
// all tags must appear in tags.wrm or systags.wrm
//
// for MycDB version 3-6 (or 4-6)
//
// lots of changes !
      
// Chromosome has disappeared -- subsumed to Map

?Map	Type UNIQUE Genetic          // this flag can be used to define subclasses
                    Physical
        Display Non_graphic          // Prevents a graphic display
                Circular             // prokaryote specific -- does nothing
                Title UNIQUE ?Text
                Remark Text          // Will appear in top right corner  
		Flipped              // Then coordinates go upwards
                Unit UNIQUE Text                  // i.e. kb, centiMorgan, MegaParsec
		Centre UNIQUE Float UNIQUE Float  // centre, width - else 0, 10
	    	Extent UNIQUE Float UNIQUE Float  // min, max - else min, max gene/locus
                Error_scale UNIQUE Float          // To position loci on x axis, default = 10
        Inherits  From_map ?Map 	  // (obsolete?) To locally edit
		  Author Text             // login name of who edited it
		  Date Text
 	Main_Marker Main_Locus ?Locus XREF Main_Marker // Appear left of scroll bar
	Symbol Text UNIQUE Text                        // Class Tag, if present, use tag content as name for class
        Contains Locus ?Locus XREF Map                 // Magic tag2 construct
		 Allele ?Allele XREF Map 
                 Contig ?Contig XREF Map
                 Fragment ?Fragment XREF Map
                 Clone ?Clone XREF Map
                 Sequence ?Sequence XREF Map
                 Map ?Map XREF Map #map_location

// not used at the moment
?MultiMap Map ?Map
          Anchor UNIQUE Text UNIQUE Text UNIQUE Text  // Class tag1 tag2
                            // i.e Locus Homeology_group Homelogs
	                    // class members on different maps with the
                            // same Anchor tag will be chained

?Contig Map ?Map XREF Contig #map_location
	Contains Locus ?Locus XREF Contig
                 Contains_Clone ?Clone XREF Inside_Contig
        Outside Outside_Clone ?Clone XREF Outside_Contig
                Outside_Fragment ?Fragment XREF Outside_Contig
        Overlap Overlap_Clone ?Clone XREF Overlap_Contig
                Overlap_Fragment ?Fragment XREF Overlap_Contig

?Clone  Name Other_name ?Clone XREF Other_name
	Location ?Colleague #Lab_Location
        Position Map ?Map XREF Clone #map_location
                 Contains Locus ?Locus XREF Clone
                          Contains_Clone ?Clone XREF Inside_Clone
                 Inside Inside_Fragment ?Fragment XREF Contains_Clone
                        Inside_Clone ?Clone XREF Contains_Clone
                        Inside_Contig ?Contig XREF Contains_Clone
                 Outside Outside_Fragment ?Fragment XREF Outside_Clone
                         Outside_Clone ?Clone ?Clone XREF Outside_Clone
                         Outside_Contig ?Contig XREF Outside_Clone
                 Overlaps Overlap_Fragment ?Fragment XREF Overlap_Clone 
                          Overlap_Clone ?Clone XREF Overlap_Clone
                          Overlap_Contig ?Contig XREF Overlap_Clone
        Remark  ?Text
        Hybridization  Hybridizes_to ?Clone_Grid ?Clone XREF Positive_probe ?Text // use to filter out cloneProbes as a subclass
                       Positive_probe ?Clone
	Sequence ?Sequence XREF Clone
	Length Seq_length UNIQUE Int 
	       Gel_length UNIQUE Float UNIQUE Float // Kb, and error
	Origin	Vector ?Clone
                Library ?Source
		cDNA
        Gridded Grid ?Clone_Grid
		Cosmid_grid
                Canon_for_cosmid
	Gel ?Motif #Lane // testing fingerprinting in a new, nicer way
        FingerPrint     Gel_Number UNIQUE Int // FingerPrint probably should disappear -- Gel is so much nicer
                        Approximate_Match_to UNIQUE ?Clone XREF Canonical_for
                        Exact_Match_to UNIQUE ?Clone XREF Canonical_for 
                        Funny_Match_to UNIQUE ?Clone XREF Canonical_for 
                        Canonical_for ?Clone
                        Bands   UNIQUE Int UNIQUE Int
		        Flag    UNIQUE Int


?Clone_Grid	Title	?Text
		Film	?Film
		Layout	Columns	Int
			Lines_at	Int Int	// x, y spacing
			Space_at	Int Int	// x, y spacing
			No_stagger	// default is with alternate lines staggered
			A1_labelling	// label spaced blocks a-h down LHS, 1-12 across top
		Row Int ?Clone XREF Grid REPEAT

?Fragment   Position Map ?Map XREF Fragment #map_location
            Contains Locus ?Locus XREF Inside_Fragment
                     Contains_Clone ?Clone XREF Inside_Fragment
                     Contains_Fragment ?Fragment XREF Inside_Fragment
            Inside Inside_Fragment ?Fragment XREF Contains_Fragment
                   Inside_Clone ?Clone XREF Contains_Fragment
                   Inside_Contig ?Contig XREF Contains_Fragment
            Outside Outside_Fragment ?Fragment XREF Outside_Fragment
                    Outside_Clone ?Clone ?Clone XREF Outside_Fragment
                    Outside_Contig ?Contig XREF Outside_Fragment
            Overlaps Overlap_Fragment ?Fragment XREF Overlap_Fragment
                     Overlap_Clone ?Clone XREF Overlap_Fragment
                     Overlap_Contig ?Contig XREF Overlap_Fragment
            Length UNIQUE Int // kb

//general stuff

?Allele Name	Correct_name ?Allele XREF Other_name
		Other_name ?Allele XREF Other_name // 3way XREF !Beware
		Nick_name ?Text
	Locus ?Locus XREF Allele
        Reference_Allele ?Text
                         For ?Allele XREF Like_ref_allele
        Like_ref_allele ?Allele XREF For
	Remark	?Text
        Strain ?Strain XREF Allele
        Paper ?Paper XREF Allele
        Phenotype       ?Text
			Qualifier Text
        Molecular_information	Clone ?Clone XREF Allele
                             	Sequence ?Sequence

// Gene should be a tag in Locus or some more elaborate filter for a subclass
// "Filter  FIND Locus = * AND Sequence; FOLLOW Sequence; CDS OR Transcript ; FOLLOW Locus" should give a
// list of Loci that have CDS or transcripts, defining them as 'Genes'

?Locus  Name	Correct_name ?Locus XREF Other_name
                Other_name ?Locus XREF Other_name // 3way XREF !Beware
                Nick_name ?Text
        Reference_Allele ?Allele Text
        Molecular_information	Clone   ?Clone XREF Locus // should be Inside?
				Sequence ?Sequence XREF Locus
				Antigen ?Antigen XREF Locus
        Inside Fragment ?Fragment XREF Locus
	Phenotype ?Text
	Image ?Image XREF Locus
	Remark ?Text
	Type RFLP
        Map  ?Map XREF Locus #map_location
        Allele  ?Allele XREF Locus
        Strain   ?Strain XREF Locus
        Related_loci    ?Locus XREF Related_loci
        Reference ?Paper XREF Locus
	Foreign_Reference Text

?Motif		Site UNIQUE Text
                Restriction Isoschizomers ?Motif XREF Isoschizomers
                            Offset Int   
	                    Cleavage Text  // will show the cleavage points ex: G_ACGT'C
                            Overhang  Int
                            Company  Text
                Remark Text

?Sequence Title UNIQUE ?Text
	  Other_name ?Sequence XREF Other_name // for renames of database sequences and for multiple versions
	  Type UNIQUE Nucleotide DNA UNIQUE ?DNA UNIQUE Int	// Int is the length automatically computed by the parser
                                 RNA // if this tag is set display AUGC in embl dump
		      Peptide UNIQUE ?AA
	  Structure  From	Source UNIQUE ?Sequence
				Source_Exons Int UNIQUE Int // start at 1
	                        Assembled_into ?Sequence
		     Subsequence ?Sequence XREF Source UNIQUE Int UNIQUE Int
		     Assembled_from ?Sequence XREF Assembled_into UNIQUE Int UNIQUE Int
	  Origin  Library	?Source Text Text // ID  Accession_number
                  From_Laboratory ?Colleague
		  Date Text UNIQUE Text
                  Strain ?Strain XREF Sequence
          Position Map ?Map XREF Sequence #map_location
	  General	cDNA 
			Corresponding_DNA ?Sequence XREF Corresponding_peptide
			Corresponding_peptide ?Sequence XREF Corresponding_DNA
		  	Clone ?Clone XREF Sequence 
          	        Locus ?Locus XREF Sequence //@"Antigen WHOLE" would remove the need for the next line
			Antigen ?Antigen XREF Sequence
		        Related_Sequence ?Sequence XREF Related_Sequence
			Keyword ?Keyword
	  		Remark ?Text
			DB_remark ?Text
			Brief_identification ?Text
	  		Reference ?Paper XREF Sequence
			Foreign_Reference ?Text
			DB_searched ?Source Int // version -- maybe should have date too
			Expression_construct ?Clone
	  Properties    Pseudogene Text
			Transposon Text
			Coding	CDS UNIQUE Int UNIQUE Int
				CDS_predicted_by ?Method Float // score of method
				Precursor
			Transcript	End_not_found
				 	Start_not_found Int // Int is frame of base 1
					mRNA	Processed_mRNA
						Unprocessed_mRNA
					tRNA Text
					rRNA Text
					snRNA Text
          Status Sent_to ?Colleague XREF Sequencing
                 Shotgun Text // for cosmid sequences
	         Contiguous Text
		 Finished Text
                 Submitted Text
	  Repeats	Inverted	Int UNIQUE Int #Match
			Tandem		Int UNIQUE Int #Match
			Direct		Int UNIQUE Int #Match
          Assembly_tags Comment Int Int Text // possibly this should be Text Int Int Text, is in Jeans latest version
                        Compression Int Int Text
                        Stop Int Int Text
                        Assembly_repeat Int Int Text
                        Cosmid_vector Int Int Text
                        Alu_segment Int Int Text
                        Sequencing_vector Int Int Text
                        Cloning_vector Int Int Text
                        Oligo Int Int Text
			A_Repeat Int Int Text
	  Features	3prime_UTR Int UNIQUE Int Text
			3prime_clip Int UNIQUE Int Text
			5prime_UTR Int UNIQUE Int Text
			5prime_clip Int UNIQUE Int Text
			LTR Int UNIQUE Int Text
			RBS Int UNIQUE Int Text
			STS Int UNIQUE Int Text
			attenuator Int UNIQUE Int Text
			conflict Int UNIQUE Int Text
			insertion_seq Int UNIQUE Int Text
			mat_peptide Int UNIQUE Int Text
			minus10_signal Int UNIQUE Int Text
			minus35_signal Int UNIQUE Int Text
			misc_RNA Int UNIQUE Int Text
			misc_binding Int UNIQUE Int Text
			misc_difference Int UNIQUE Int Text
			misc_feature Int UNIQUE Int ?Text
			misc_recomb Int UNIQUE Int Text
			misc_signal Int UNIQUE Int ?Text
			modified_base Int UNIQUE Int Text
			mutation Int UNIQUE Int ?Text
			old_sequence Int UNIQUE Int Text
			precursor_RNA Int UNIQUE Int Text
			prim_transcript Int UNIQUE Int Text
			primer Int UNIQUE Int Text
			primer_bind Int UNIQUE Int Text
			promoter Int UNIQUE Int ?Text
			protein_bind Int UNIQUE Int Text
			rep_origin Int UNIQUE Int Text
			repeat_region Int UNIQUE Int Text
			repeat_unit Int UNIQUE Int Text
			sig_peptide Int UNIQUE Int Text
			stem_loop Int UNIQUE Int Text
			terminator Int UNIQUE Int Text
			transit_peptide Int UNIQUE Int Text
			unsure Int UNIQUE Int Text
			variation Int UNIQUE Int Text
			virion Int UNIQUE Int Text
			Possible_exon Int UNIQUE Int UNIQUE Int ?Method UNIQUE Float // 3rd Int is frame
			TATA_signal Int UNIQUE Int Text
			TSL Int UNIQUE Int Text
			TSL_site Int UNIQUE Int Text // Trans-spliced leader
			polyA_signal Int UNIQUE Int Text  // AATAA
			polyA_site Int UNIQUE Int Text
	  Similarity	Homol ?Sequence XREF Homol ?Method Float Int UNIQUE Int Int UNIQUE Int

// Jeans models have ABI tags here for the trace editor columns
// not all feature keys from embl -- but should probably weed some and should document clearly
// with reasonable interval specs etc. -- good for 

// non-mapped stuff

?Strain  Name Other_name ?Strain XREF Other_name
              Nick_name ?Strain XREF Other_name  // 3way XREF !Beware
	      Type_strain
	 Contains ?Strain XREF Contained_in // for complexes !these are magic tags, maybe should change name -- Has_substrain, Substrain_of
	 Contained_in ?Strain XREF Contains // for substrains
         Genotype Text
	 Locus ?Locus XREF Strain
	 Sequence ?Sequence XREF Strain
         Location ?Colleague #Lab_Location
	 Source ?Source
	 Reference ?Paper
	 Remark	?Text

?Antibody  Code UNIQUE ?Text     //from CDC bank
	   Other_name ?Antibody XREF Other_name
	   Antigen ?Antigen XREF Antibody
           Type  Monoclonal
		 Polyclonal
		 Serum
		 Tcell_clone
                 Other_type ?Text
	   Reactivity Recognized ?Strain // probably should be XREFed
                      Not_recognized ?Strain
           Origin  Mouse
		   Human
		   Other_origin ?Text
	   Location ?Colleague #Lab_Location 
	   Contact ?Colleague // probably should be XREFed
	   Source ?Source
	   Reference ?Paper XREF Antibody
	   Remark ?Text

?Antigen  Code UNIQUE ?Text	//from the IMMLEP/IMMTUB paper
	  Other_name ?Antigen XREF Other_name
	  Strain ?Strain // probably should be XREFed
	  Size Float //subunit size in kDa on SDS gel -- maybe should have a Text describing the the conditions
	  Antibody ?Antibody XREF Antigen
	  Molecular_information  Clone ?Clone XREF Antigen
				 Locus ?Locus XREF Antigen //@"Sequence" would remove the need for the next line
				 Sequence ?Sequence XREF Antigen
				 Epitope Text
	  Related_antigen ?Antigen XREF Related_antigen
	  Reference ?Paper XREF Antigen
	  Location ?Colleague #Lab_Location
	  Remark ?Text
	  Function ?Text
	  Immunology ?Text

// utility classes -- not really biology

?Film  Code UNIQUE ?Text
       Remark ?Text
       Protocol Text
       Probe ?Clone XREF Probe_for
       Clone_Grid ?Clone_Grid XREF Film

// Source really should be Database

?Source Other_name ?Source XREF Other_name
        Contents Text
        Remark Text
        Paper ?Paper
        Contact ?Colleague XREF Maintains
        Address #Address_info

// biblio stuff

?Journal Paper ?Paper XREF Journal

?Paper  Reference       Title UNIQUE ?Text 
                        Journal UNIQUE ?Journal XREF Paper
			Publisher UNIQUE Text
			Contained_in ?Paper XREF Contains
                        Year UNIQUE Int
                        Volume UNIQUE Int Text
                        Page  UNIQUE  Int UNIQUE Int
			UID ?Source UNIQUE Text
        Author ?Author XREF Paper
        Abstract ?LongText
	Type UNIQUE Text
	Contains ?Paper XREF Contained_in
        Image ?Image XREF Paper
        Refers_to	Locus ?Locus XREF Reference
			Sequence ?Sequence XREF Reference
			Antibody ?Antibody XREF Reference
			Antigen ?Antigen XREF Reference
			Method ?Method XREF Reference
	Remark ?Text
        Keyword ?Keyword

?Author Full_name ?Colleague XREF Publishes_as
	Paper ?Paper // oneway XREF from Paper

?Colleague Position Text // these two strange
	   Title Text // this was Profession
           Address #Address_info // maybe should be a vector Int/Text #Addressinfo -- would allow multiple addresses
	   Research_interest Text
	   Keyword ?Keyword
	   Publishes_as ?Author XREF Full_name //@"Paper"
	   Maintains ?Source XREF Contact
	   Associate ?Colleague XREF Associate

// Method vital for blixem display
// fMap need Min_score set for variable width display of homologies

?Method	Function ?Text	// what does it do?
	Variant_of UNIQUE ?Method XREF Variant
	Variant ?Method
	Version	Text
	Parameters 	Float_Params UNIQUE Text Float REPEAT 
			Int_Params UNIQUE Text Int REPEAT
			Text_Params UNIQUE Text Text REPEAT
	Min_score	UNIQUE	Float	// used in plotting
	Remark ?Text
	Reference ?Paper XREF Method
	Foreign_Reference Text

// not used at the moment -- might be useful for future

//?Image  Author ?Author XREF Image
//	Paper  ?Paper  XREF Image
//	Locus   ?Locus XREF Image 
//	Gene	?Gene XREF Image
//	Pick_me_to_call  UNIQUE Text Text   // A program name followed by a file name
//	Secret  Text  // If set prevents display except by owner (uid == Text)

// Utility classes for the curator, to keep track of daily work...

?Task  What Description	?Text
            Involves ?KeySet REPEAT
            Subtask ?Task XREF Supertask
            Supertask ?Task XREF Subtask
       When Added Text
            Done ?Diary XREF Task
       Who ?Colleague Text

?Diary  What Description ?Text
             Task ?Task XREF Done
             Involves ?KeySet REPEAT
        When Text
        Who ?Colleague Text

// constructed subtypes used elsewhere in the models

?Address_info  Mail Text
               Phone Text
	       Fax Text
	       E_mail Text
               Last_update Text

// for Gel display -- 
?Lane UNIQUE Bands UNIQUE Float REPEAT
             Band_Lengths UNIQUE Float REPEAT
             Band Float Text

// repeats in Sequence
?Match	Percent_Identity UNIQUE Int
	Score ?Method UNIQUE Float
	N_gaps UNIQUE Int
	Loop UNIQUE Int UNIQUE Int	// rel start, stop
	Unit_Length UNIQUE Int

// 2 following for Map display
?map_location UNIQUE Position UNIQUE Float #map_error
                     Multi_Position  Float #map_error
                     Ends Left UNIQUE Float #map_error
                          Right UNIQUE Float #map_error

?map_error Error UNIQUE Float

// address for 'things'
?Lab_Location	Freezer		Text
		LiquidN2	Text
		Minus70		Text
		Remark		?Text

// end of file