The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

LICENSE

Copyright [2015-2017] EMBL-European Bioinformatics Institute

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

NAME

Bio::DB::Big::AutoSQL

SYNOPSIS

  my $raw_autosql = $bb->get_autosql();
  my $as = Bio::DB::Big::AutoSQL->new($raw_autosql);
  foreach my $field (@{$as->fields()}) {
    printf("%d: %s (%s)\n", $field->position(), $field->name(), $field->type());
  }

DESCRIPTION

Provides access to an AutoSQL definition by parsing a raw AutoSQL file into this object (representing the overall definition) and a series of Bio::DB::Big::AutoSQLField objects. Fields can be looped over in the order they appear or can be retrieved by name.

METHODS

new($autosql)

Create a new object. Must give it an AutoSQL definition otherwise the library will throw an exception. The given string is also chomped.

Give a hash where keys are alternative names and values are the target conversion name. The idea is you use the target conversion names at all times and the library will attempt to use this to translate between the two.

raw()

Getter for the raw AutoSQL definition

name()

Getter for the name found in this AutoSQL definition

type()

Getter for the type found in this AutoSQL definition

comment()

Getter for the comment found in this AutoSQL definition

fields()

Access an array of Bio::DB::Big::AutoSQLField objects parsed from the given AutoSQL definition

get_field($name)

Returns a Bio::DB::Big::AutoSQLField object for the given name. Returns undef if the field is unavailable.

has_field($name)

Return a boolean response if the given field is found in the parsed AutoSQL definition.

is_table()

Returns a boolean if this AutoSQL object represents a table i.e. the type is set to table