![]()
FEX Version 0.1
FEX - A Feature EXchange Interface
Originally written by
Ed Griffiths <edgrif@sanger.ac.uk>, January 2002Background
There is a need for a version of the AceDB fmap that can be used over the network. The viewer/annotator could be used against any database that could provide the sequence information required by the viewer.
Overview
The fex interface is a new interface for accessing sequence data and features, it is designed to be independent of any one database.
Basic Concepts
Some basic terms:
Possible feature types in giface gff dumping based on a feature name... seg->type featName ========= ======== SEQUENCE | EXON | (GFF version == 2) && seg->key then put className(seg->key) INTRON | SEQUENCE "sequence" EXON "exon" INTRON "intron" CODING "coding_exon" (GFF version == 1) CODING "CDS" (GFF version == 2) HOMOL "similarity" FEATURE "feature" (GFF version == 1) FEATURE "misc_feature" (GFF version == 2) ATG "atg" SPLICE3 "splice3" SPLICE5 "splice5" ASSEMBLY_TAG strnew (seg->data.s, handle) ALLELE "deletion" ALLELE "variation" ALLELE "insertion_site" (GFF version == 1) ALLELE "insertion" (GFF version == 2) EMBL_FEATURE name(seg->key) CLONE_END name(seg->data.k) and for sourceName: fMapSegTypeName[type] which could be any of: "MASTER", "ASSEMBLY_TAG", "SEQUENCE", "SEQUENCE_UP", "CDS", "CDS_UP", "INTRON", "INTRON_UP", "EXON", "EXON_UP", "EMBL_FEATURE", "EMBL_FEATURE_UP", "FEATURE", "FEATURE_UP", "ATG", "ATG_UP", "SPLICE3", "SPLICE3_UP", "SPLICE5", "SPLICE5_UP", "CODING", "CODING_UP", "TRANSCRIPT", "TRANSCRIPT_UP", "SPLICED_cDNA", "SPLICED_cDNA_UP", "VIRTUAL_SUB_SEQUENCE_TAG", "VIRTUAL_SUB_SEQUENCE_TAG_UP", "VIRTUAL_MULTIPLET_TAG", "VIRTUAL_MULTIPLET_TAG_UP", "VIRTUAL_ALIGNED_TAG", "VIRTUAL_ALIGNED_TAG_UP", "VIRTUAL_PREVIOUS_CONTIG_TAG", "VIRTUAL_PREVIOUS_CONTIG_TAG_UP", "HOMOL", "HOMOL_UP", "PRIMER", "PRIMER_UP", "OLIGO", "OLIGO_UP", "OLIGO_PAIR", "OLIGO_PAIR_UP", "TRANS_SEQ", "TRANS_SEQ_UP", "ALLELE", "ALLELE_UP", "VISIBLE", "DNA_SEQ", "PEP_SEQ", "ORF", "VIRTUAL_PARENT_SEQUENCE_TAG", "VIRTUAL_CONTIG_TAG", "CLONE_END" ASSEMBLY_TAG "assembly_tag" ALLELE "variation" (GFF version == 1) "unknown" str2tag("GFF_source"), _Text, &sourceName) ; actually sourceName seems to get set to stuff like: embl_eg i.e. its from the database and looks like the "method" name ?? Yes, this seems to be it, we should work off the method stuff. Basically the source stuff is the method and the feature is the basic feature type.
- "Feature type"
- the basic types of feature that can appear on a physical map such as BASIC_FEATURE, INTRON_FEATURE. Every feature displayed must be of one of these types.
- "Feature"
- a single piece of physical data such as a transcript which will be of one of the "Feature type" types. This will have have some unique identifier such as a specific gene name.
- "Feature set"
- a set of "Features" that are grouped together because they are not only all of the same "Feature type" type, but are related in some other way, e.g. they are all Genewise predictions. They are given some name by the curator of the database, these correspond to the "methods" in acedb.
Using the interface
A normal scenario for accessing sequence data would be:
{ FexDB db = NULL ; FexSeq seq_context = NULL ; unsigned char *dna = NULL ; Array feat_set = NULL ; Array all_features = NULL ; db = fexOpenDatabase("some_location", "edgrif", "my_passwd") ; seq_context = fexSequence(db, "some_sequence", 1, 0) ; dna = fexDNA(seq_context) ; feat_set = fexQuerySeqFeatSets(seq_context) ; /* If the features bit is non-NULL, then just get those features. */ all_features = fexGetFeatures(seq_context, NULL) ; fexReleaseContext(seq_context) ; }
In more detail
I am currently thinking that we can do things in two steps:
- construct the sequence which would be essentially sMapCreate()
- construct the fex stuff which would be essentially fexConvert() using sMapMap()
One questions is: can we tell which features are in the section of sequence ahead of time, I'm not sure we can. Ah, perhaps we can using the sMapKeys() and the idea of having a special tag to indicate which method an object references.
Drawing Features
Each type of feature gets drawn with a particular style, the precise details of each style are decided from the following sources:
defaults in the code for each FeatureType V defaults from the database for each FeatureType V defaults from the database for a FeatureSet V actual values for an individual Feature
FEX 0.1
Ed Griffiths <edgrif@sanger.ac.uk> Last modified: Mon Jan 21 18:20:22 GMT 2002