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

NAME

Bio::Graphics::Browser::UploadSet -- A set of uploaded feature files

SYNOPSIS

None. Used internally by gbrowse & gbrowse_img.

METHODS

$upload_set = Bio::Graphics::Browser::UploadSet->new($config,$state)

Initialize uploaded files according to the configuration and page state. Returns an object.

$conf = $upload_set->config

Returns the configuration object.

$state = $upload_set->state

Returns the page state hash

$url = $upload_set->upload_file($filehandle)

Given a CGI.pm-style upload filehandle, upload the file to an anonymous disk file, and return the symbolic trackname URL of the uploaded file.

$url = $upload_set->new_file([$filename])

Create a new empty file with the indicated name and returns its trackname URL. If no name is given, one will be generated automagically.

$fh = $upload_set->open_file($url [,$mode])

Attempts to open the URL for reading or writing, depending on the provided $mode (which is one of ">", "<", ">>", etc). If successful, returns the filehandle.

$upload_set->clear_file($url)

Clears and unlinks the file.

($url,$path) = $upload_set->name_file($filename)

Given a filename, generates a unique name for it under the user's temporary upload space. Returns the trackname URL and a physical path to the actual file.

$upload_set->annotate($segment,$feature_files,$coordinate_mapper)

Annotates the given segment and returns the results in the $feature_file hash. The keys of the hash will be set to tracknames defined in the uploaded files, and the values will be Bio::Graphics::FeatureFile objects. The $coordinate_mapper callback is a code ref to a function that will transform coordinates from relative to absolute coordinates. The function takes a reference sequence name and a list of [$start,$end] coordinate pairs, and returns a similar function result, except that the sequence name and coordinates are all in absolute coordinate space.

SEE ALSO

Bio::Graphics::Browser

AUTHOR

Lincoln Stein <lstein@cshl.org>.

Copyright (c) 2005 Cold Spring Harbor Laboratory

This package and its accompanying libraries is free software; you can redistribute it and/or modify it under the terms of the GPL (either version 1, or at your option, any later version) or the Artistic License 2.0. Refer to LICENSE for the full license text. In addition, please see DISCLAIMER.txt for disclaimers of warranty.