This package contains the interfaces and utility classes that you should use to build your own datasource plugin.

As far as possible, this API has been designed to make it possible to create plugins to any data source without making any assumptions about the API that you wish to use to achieve this, apart from the very simple, DAS oriented API provided here.

Getting Started with your Implementation

First of all, it is highly recommended that you become familiar with the Distributed Sequence Annotation System (DAS) 1.53 specification document. This is a complete and concise description of the DAS protocol which is implemented in this API.

Two kinds of DAS server are specified:

Implementing an Annotation Server

If you are implementing an annotation server, you should implement the {@link uk.ac.ebi.mydas.datasource.AnnotationDataSource} interface.

By default, the MydasServlet will handle requests for features within a range on the requested segment (e.g. if the DAS client requests only features between residues 200 and 400, it will automatically filter the features that your plugin returns to include only the correct features).

It is possible however, that this mechanism may be inneficient for your data source, especially if you have a large number of very massive segments with a lot of annotation. In this case, you may additionally implement the {@link uk.ac.ebi.mydas.datasource.RangeHandlingAnnotationDataSource} interface which will allow you to take control of the filtering of features by coordinate at the query level.

Implementing a Reference Server

If you are implementing a reference server, you should implement the {@link uk.ac.ebi.mydas.datasource.ReferenceDataSource} interface.

By default, the MydasServlet will handle requests for both sequence and features within a range on the requested segment (e.g. if the DAS client requests only features or sequence between residues 200 and 400, it will automatically filter the features / sequence that your plugin returns to include only the correct features or sequence).

It is possible however, that this mechanism may be inneficient for your data source, especially if you have a large number of very massive segments with a lot of annotation. In this case, you may additionally implement the {@link uk.ac.ebi.mydas.datasource.RangeHandlingAnnotationDataSource} and / or the {@link uk.ac.ebi.mydas.datasource.RangeHandlingReferenceDataSource} interfaces which will allow you to take control of filtering at the query level.

The {@link uk.ac.ebi.mydas.datasource.RangeHandlingAnnotationDataSource} interface will allow you to filter features by their coordinates and the {@link uk.ac.ebi.mydas.datasource.RangeHandlingReferenceDataSource} interface will allow you to filter sequence by coordinates. You can implement one or both of these interfaces as is most appropriate for your reference data source.