Roger Pettett > Bio-Das-ProServer > Bio::Das::ProServer::SourceAdaptor::file

Download:
Bio-Das-ProServer-2.20.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Source  

NAME ^

Bio::Das::ProServer::SourceAdaptor::file - adaptor for file-based DAS sources

VERSION ^

$Revision: 688 $

SYNOPSIS ^

See Bio::Das::ProServer::SourceAdaptor

DESCRIPTION ^

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.

AUTHOR ^

Andy Jenkinson <andy.jenkinson@ebi.ac.uk>

SUBROUTINES/METHODS ^

init

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.

build_features

Builds feature structures. Called by the das_features and build_types methods.

CONFIGURATION AND ENVIRONMENT ^

  [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

filename (required)

Text file location

cache (optional)

Cache file contents - faster but increases memory footprint

cols (required)

The order of the columns in the data file, separated by commas

feature_query (required)

The query to use for segment-based queries. %segment, %start and %end will be replaced with their respective values from a DAS request.

fid_query (optional)

The query to use for feature ID-based queries. %feature_id will be replaced with the appropriate value from a DAS request.

gid_query (optional)

The query to use for group ID-based queries. %group_id will be replaced with the appropriate value from a DAS request.

"fill-in" attributes

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

BUGS AND LIMITATIONS ^

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).

DIAGNOSTICS ^

INCOMPATIBILITIES ^

DEPENDENCIES ^

Bio::Das::ProServer::SourceAdaptor

LICENSE AND COPYRIGHT ^

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/>.

syntax highlighting: