Bio::Das::ProServer::SourceAdaptor::file - adaptor for file-based DAS sources
$Revision: 688 $
See Bio::Das::ProServer::SourceAdaptor
This SourceAdaptor plugin allows for a full-featured DAS source (implementing the features command) to be created from one of a variety of simple text files. Fields that are not present in the data file may optionally be provided in the source's configuration, in which case these data will be "filled in". See the CONFIGURATION section for full details/examples.
Andy Jenkinson <andy.jenkinson@ebi.ac.uk>
Initialises the adaptor, performing some optimisation and setting the appropriate capabilities of the DAS source depending on the queries that are configured in the INI configuration.
Builds feature structures. Called by the das_features and build_types methods.
[sourcename] state = on adaptor = file coordinates = NCBI_36,Chromosome,Homo sapiens -> X:100,200 mapmaster = http://www.ensembl.org/das/Homo_sapiens.NCBI36.reference homepage = http://www.example.com/project/ title = Example source description = An example DAS source backed by a flat file # Transport parameters: filename = %serverroot/eg/data/mysimple.txt cache = yes # Adaptor parameters: cols = segment,start,end,ori,type feature_query = field0 = %segment and field2 >= %start and field1 <= %end fid_query = field3 = %feature_id gid_query = field4 = %group_id
Text file location
Cache file contents - faster but increases memory footprint
The order of the columns in the data file, separated by commas
The query to use for segment-based queries. %segment, %start and %end will be replaced with their respective values from a DAS request.
The query to use for feature ID-based queries. %feature_id will be replaced with the appropriate value from a DAS request.
The query to use for group ID-based queries. %group_id will be replaced with the appropriate value from a DAS request.
By specifying other parameters in the INI configuration, it is possible to "fill in" attributes that are not included as columns in the data file. For example, if all features were generated using the same method, it can be specified in the INI file:
[mysource] ... # Fill-in properties: typecategory = transcription method = Genscan
The supported parameters are:
method method_label note link linktxt score segment start end ori phase feature_id feature_label type typetxt typecategory typesubparts typesuperparts typereference group_id grouplabel grouptype groupnote grouplink grouplinktxt
It is also possible for such properties to include placeholders, which will be dynamically substituted for the appropriate column in each feature:
[mysource] ... # Fill-in properties: link = http://example.com?chromosome=%segment;type=%type
Although this module supports the "filling in" of feature properties from the source's INI configuration, it only supports the setting of scalar values. It is therefore not possible to set more than one note, link or group.
Also, the setting of "target" properties in this way is at present not supported (each feature's target is likely to be dynamic anyway).
Bio::Das::ProServer::SourceAdaptor
Copyright (c) 2008 EMBL-EBI
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
To install Bio::Das::ProServer, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Bio::Das::ProServer
CPAN shell
perl -MCPAN -e shell install Bio::Das::ProServer
For more information on module installation, please visit the detailed CPAN module installation guide.