view release on metacpan or search on metacpan
exits gracefully.
2.29
* Updated mod_fcgid "FcgidInitialEnv" directive to current recommended name.
* You can now narrow the search to features with a desired primary tag using the syntax
"desired_tag:feature_name"
* You can exclude a list of primary tags from search results in the database definition stanza
using the syntax:
[foo:database]
exclude types = type1 type2 type3
* The appearance of the track selection table has been updated to be less "busy".
* Uploaded track names assigned automatically (e.g. "upload_6842") can now be edited by
shift-clicking on the track name.
* You can now select the format for track data generated by clicking on the "disk" icon in
the track title bar.
* Fixed unwanted behavior in which searches that returned multiple features would open up all
tracks corresponding to those features even if user did not select them.
* Fixed "permission denied" error opening cgisess.db when installing on a fresh system.
2.28
* Added compile-time warnings about the bioperl version.
one data source that will pass different options to a script-based config depending
on the URL.
* From E.O. Stinson: Added a move_to_name function for navigating to a region in one step
via a URL call.
2.08 Thu May 20 22:46:13 EDT 2010
* Added the ability to control the toggle state of each category and subcategory at
startup time by using the "category state" and "category default state" options
(see the GBROWSE2 HOWTO at http://gmod.org/wiki/GBrowse_2.0_HOWTO#Appearance_Settings)
* Fixed searches on Bio::DB::GFF databases so that exact searches work again.
* Fixed the busy spinner so that it doesn't stick in "on" state when region is empty
and user turns on tracks.
2.07 Mon May 17 10:27:56 EDT 2010
` * Tracked down the "let Lincoln know bug is not fixed" bug, and found a real solution.
This was happening when user presses "back" button on browser after an unsuccessful
search. This still triggers a log message until we know the bug is really and truly
fixed.
* BAM track download now works properly under both FastCGI and mod_perl. mod_perl
download requires Bio-SamTools 1.19.
* Requires Bio::Graphics version 2.09, which addresses a bug in which subroutines
cgi-bin/gbrowse_syn view on Meta::CPAN
cache_extra => [$segment->start,$segment->end],
do_map => 1,
drag_n_drop => 0,
image_button => 0,
-grid => 0,
-pad_top => 5,
-bgcolor => $CONF->setting('overview bgcolor') || OVERVIEW_BGCOLOR,
}
);
# make sure overview is busy with redirects
#my $server =$ENV{SERVER_NAME};
#if ($server) {
# $overview =~ s/src="/src="http:\/\/$server\//;
#}
return div({-id=>'overview',-class=>'track'},$overview);
}
sub toggle {
my $title = shift;
conf/plugins/PrimerDesigner.pm view on Meta::CPAN
my $extra_args = shift;
my @panels;
my $region = $render->region;
my $features = $region->features;
my $title = $render->generate_title($features);
my $output;
my @post_load = $render->get_post_load_functions;
$output .= $render->render_html_start($title,@post_load);
$output .= $render->render_busy_signal;
push @panels, $output;
#my %extra_args = @$extra_args;
#my $postgrid = $extra_args{'postgrid'};
my $scale_bar_html = $render->scale_bar( $segment, 'detail', $extra_args );
push @panels,
div({-id=>'primer_panel', -style=>'padding:12px;position:relative'},
conf/plugins/TrackFinder.pm view on Meta::CPAN
sub configure_form {
my $self = shift;
my $current_config = $self->configuration;
my $source = $self->browser_config;
my $html = '';
$html .= div({-class=>'searchbody'},
b('Search: ').textfield(-id => 'plugin_TrackFinderKeywords',
-name => $self->config_name('keywords'),
-onKeyDown => "Controller.busy();if (typeof(timeOutID) != 'undefined') clearTimeout(timeOutID);timeOutID= setTimeout('Controller.idle();doPluginUpdate()',500)",
-override => 1,
-value => $current_config->{keywords},
-onBlur => 'clearTimeout(timeOutID)',
),
input({-type => 'checkbox',
-id => 'stickySearch',
-value => 'Stick to top when scrolled'
}
),
label({-for => 'stickySearch'}, 'Stick to top when scrolled')
htdocs/js/ajax_upload.js view on Meta::CPAN
if (containers[0].down("div.upload_field")) // We're dealing with an upload field.
status_selector = "*#" + upload_id + "_status";
else if(upload_container = $$("div[class~=custom_track][id=" + upload_id + "]")[0]) // We're dealing with an uploaded file in the main listing.
status_selector = "div[id$='_status']";
else // Couldn't find the item, return false.
return false;
var status_container = upload_container.down(status_selector);
return {upload: upload_container, status: status_container};
}
// Visually indicates an upload (whether uploaded already, or in the process of uploading) as "busy".
function showUploadBusy(upload_id, message) {
message = typeof(message) != 'undefined' ? message : Controller.translate('WORKING');
var spinner = new Element("img", {src: Controller.button_url('spinner.gif'), alt: Controller.translate('WORKING'), "class": "busy_signal"});
var containers = selectUpload(upload_id);
if (!containers) return;
// If it's condensed, just show the spinner. If the details are shown, show the message too.
if (!containers.upload.down("div.details").visible())
containers.upload.down("h1").insert({top: spinner});
else {
containers.status.update();
containers.status.insert({bottom: spinner});
containers.status.insert({bottom: " "});
containers.status.insert({bottom: message});
if (!containers.status.visible())
Effect.BlindDown(containers.status, {duration: 0.25});
}
return true;
}
// Clears a busy indicator.
function clearUploadBusy(upload_id) {
var containers = selectUpload(upload_id);
var spinner;
if (spinner = containers.status.down("img.busy_signal"))
Effect.BlindUp(containers.status, {duration: 0.25, afterFinish: function() { spinner.remove() } });
return true;
}
// Displays an error for an upload
function showUploadError(upload_id, message) {
var error_class = "upload_error";
message = typeof(message) != 'undefined' ? message : Controller.translate('ERROR');
var container = selectUpload(upload_id);
var msg = new Element("div", {"class": error_class}).setStyle({backgroundColor: "pink", "padding": "5px"});
htdocs/js/ajax_upload.js view on Meta::CPAN
// Cleanly removes an element, with a nice blinds-up effect.
function cleanRemove(element, speed) {
speed = (typeof(speed) != 'undefined')? speed : 0.25;
Effect.BlindUp(element, {duration: speed, afterFinish: function() {
try {
element.remove()
} catch (e) { } }});
}
// Start AJAX Upload - Sends the AJAX request and sets the busy indicator.
function startAjaxUpload(upload_id) {
var status = $(upload_id + '_status');
var upload_form = $(upload_id + '_form');
if ($(upload_form))
upload_form.hide();
// Create & insert the status update elements.
var spinner = Controller.button_url('spinner.gif');
// var img = new Element('img', {'href': spinner}); // broken in IE; don't know why
status.update('<img src="'+spinner+'" />');
htdocs/js/ajax_upload.js view on Meta::CPAN
var tracks = transport.responseText.evalJSON(true).tracks;
if (tracks != null)
tracks.each(function(tid) { Controller.delete_tracks(tid) });
}
}
);
}
// Updates the public file listing. If given, searches by keyword or provides and offset.
function searchPublic(keyword, offset) {
Controller.busy();
new Ajax.Request(
document.URL,
{
method: 'post',
parameters: {
action: 'update_sections',
section_names: community_tracks_id,
keyword: keyword,
offset: offset
},
htdocs/js/controller.js view on Meta::CPAN
if (snapshot == null){
snapshot = false;
}
// submit search form if the detail panel doesn't exist
if ( null == $(detail_container_id) ){
document.searchform.force_submit.value = 1;
document.searchform.submit();
}
this.busy();
TrackPan.grey_out_markers();
$('ruler_handle').setOpacity(0.3);
$('detail_scale_scale').setOpacity(0.3);
//Grey out image
this.each_track(function(gbtrack) {
if ($(gbtrack.track_image_id) != null)
$(gbtrack.track_image_id).setOpacity(0.3);
// else
htdocs/js/controller.js view on Meta::CPAN
var track_name = track_names[i];
if ( force || !this.track_exists(track_name) ) {
request_str += "&track_names="+encodeURIComponent(track_name);
found_track = true;
}
}
//track_names.reverse();
if (!found_track) return false;
this.busy();
new Ajax.Request(Controller.url, {
method: 'post',
parameters: request_str,
onSuccess: function(transport) {
if (onSuccessFunc!=null)
onSuccessFunc();
var results = transport.responseJSON;
var track_data = results.track_data;
var track_keys = new Object();
htdocs/js/controller.js view on Meta::CPAN
} // end for (var ret_track_name...
if( get_tracks)
Controller.get_multiple_tracks(track_keys);
else
Controller.idle();
}
});
return true;
},
busy:
function() {
var bi = $('busy_indicator');
var top = document.body.scrollTop||document.documentElement.scrollTop;
bi.style.top =5+"px";
bi.style.left =5+"px";
bi.show();
},
idle:
function() {
var bi = $('busy_indicator');
bi.hide();
},
rerender_track:
function(track_id,scroll_there,nocache) {
if (scroll_there == null)
scroll_there = false;
if (nocache == null)
nocache = false;
this.busy();
this.each_track(track_id,function(gbtrack) {
$(gbtrack.track_image_id).setOpacity(0.3);
Controller.set_last_update_key(gbtrack);
new Ajax.Request(Controller.url,{
method: 'post',
parameters: {
action: 'rerender_track',
track_id: gbtrack.track_id,
htdocs/js/controller.js view on Meta::CPAN
},
// Time key is there to make sure separate calls don't trounce each other
// Only Update if the tracks time_key matches the method's
get_remaining_tracks:
function (track_keys,time_out,decay,time_key){
var track_ids = [];
var finished = true;
var track_key_str = '';
this.busy();
this.retrieve_tracks.keys().each(
function(track_id) {
if(Controller.retrieve_tracks.get(track_id)){
if (Controller.ret_track_time_key.get(track_id) == time_key){
track_ids.push(track_id);
track_key_str += '&tk_'+escape(track_id)+"="+track_keys[track_id];
finished = false;
}
}
}
htdocs/js/snapshotManager.js view on Meta::CPAN
} else {
sessionName = 'snap_' + $('snapshot_name').value;
}
if(Controller.snapshotExists(sessionName)){
return;
}
// If a value was entered for the name of the snapshot then it is saved
else if(sessionName){
$('busy_indicator').show();
$('snapshot_page_title').update('Saving Snapshot...');
$('snapshot_page_title').style.color = 'red';
$('snapshot_page_title').show();
// An asynchronous request is made to save a snapshot of the session
new Ajax.Request(document.URL, {
method: 'POST',
asynchronous:true,
parameters: {
action: 'save_snapshot',
name: sessionName,
}});
// A timer is used to ensure that the snapshot table is recreated only after the information has been updated
setTimeout(function(){
// The snapshot table is updated
var sections = new Array(snapshot_table_id);
Controller.update_sections(sections);
// Another timeout is used to end the busy indicator after the table has been created
setTimeout(function(){
Sortable.create('snapshotTable',{tag:'div',only:'draggable'});
$('busy_indicator').hide();
// The page title is updated to reflect the current snapshot
//$('snapshot_page_title').update('Snapshot : ' + sessionName);
//$('snapshot_page_title').style.color = 'navy';
$('snapshot_page_title').hide();
},1500)
},2500)
} else {
alert("Please enter a name for the snapshot. The snapshot was not saved.");
}
},
setSnapshot:
function(sessionName){
$('busy_indicator').show();
$('snapshot_page_title').update('Loading Snapshot...');
$('snapshot_page_title').style.color = 'red';
$('snapshot_page_title').show();
var active = new Array();
// A request is made to update the current session
new Ajax.Request(document.URL, {
method: 'POST',
asynchronous:true,
parameters: {
htdocs/js/snapshotManager.js view on Meta::CPAN
drag.style.zIndex = 0;
})
$(snapshot).style.zIndex = 1000;
},
mailSnapshot:
function(snapshot){
var email = $('email_' + snapshot).value;
$('mail_snapshot_' + snapshot).hide();
$('busy_indicator').show();
// An asynchronous request is used to send an email to the email provided
new Ajax.Request(document.URL, {
method: 'POST',
asynchronous:true,
parameters: {
action: 'mail_snapshot',
email: email,
name: snapshot,
url: document.location.href,
},
onSuccess: function(transport) {
var results = transport.responseJSON;
if (!results.success) {
Controller.show_error('Your mail could not be sent',results.msg);
}
$('busy_indicator').hide();
}
});
},
checkSnapshot:
function(){
// The source, session, and snapshot information are stored
var browser_source = Controller.findParameter("source");
var upload = Controller.findParameter("id");
var snapcode = Controller.findParameter("snapcode");
htdocs/js/snapshotManager.js view on Meta::CPAN
method: 'POST',
asynchronous:false,
parameters: {
action: 'load_snapshot_from_file',
snapcode: snapcode,
snapname: snapname,
id: upload,
browser_source: browser_source,
},
onSuccess: function(transport) {
$('busy_indicator').show();
Controller.setSnapshot(snapname);
},
onFailure: function(transport) {
alert('failed');
},
on504: function() {
alert("GBrowse could not find the provided session or snapshot");
}
});
location.href=location.href.substr(0,location.href.indexOf('?'));
install_util/GBrowseInstall.pm view on Meta::CPAN
Options ExecCGI
SetEnv GBROWSE_CONF "$conf"
</Directory>
<IfModule mod_fcgid.c>
Alias /fgb2 "$cgibin"
<Location /fgb2>
SetHandler fcgid-script
</Location>
FcgidInitialEnv GBROWSE_CONF $conf
# these directives prevent idle/busy timeouts and may need to be
# adjusted up or down
FcgidMinProcessesPerClass 6
FcgidConnectTimeout 30
FcgidIOTimeout 600
FcgidBusyTimeout 600
# allow larger file uploads up to 128M under FastCGI (default is 128K)
FcgidMaxRequestLen 134217728
$fcgid_inc
</IfModule>
lib/Bio/Graphics/Browser2/DataLoader.pm view on Meta::CPAN
my $d = $self->{eol_char};
$self->{eol_char} = shift if @_;
return $d;
}
sub setting {
my $self = shift;
my $option = shift;
$self->settings->global_setting($option);
}
sub globals { shift->settings->globals }
sub busy_path {
my $self = shift;
return File::Spec->catfile($self->data_path,
Bio::Graphics::Browser2::UserTracks->busy_file_name);
}
sub status_path {
my $self = shift;
return File::Spec->catfile($self->data_path,
Bio::Graphics::Browser2::UserTracks->status_file_name);
}
sub sources_path {
my $self = shift;
return File::Spec->catfile($self->data_path,
Bio::Graphics::Browser2::UserTracks->sources_dir_name);
lib/Bio/Graphics/Browser2/DataLoader.pm view on Meta::CPAN
sub source_file {
my $self = shift;
return File::Spec->catfile($self->sources_path, $self->track_name);
}
sub load {
my $self = shift;
my ($initial_lines, $fh) = @_;
$self->flag_busy(1);
eval {
$self->set_status('starting load');
mkdir $self->sources_path or die "Couldn't make ",$self->sources_path," directory: $!";
my $source_file = IO::File->new($self->source_file, '>');
$self->open_conf;
$self->start_load;
$self->set_status('load data');
lib/Bio/Graphics/Browser2/DataLoader.pm view on Meta::CPAN
$source_file->print($_) if $source_file;
$self->load_line($_);
$self->set_status("loaded $count lines") if $count++ % 1000 == 0;
}
$source_file->close;
}
$self->finish_load($count);
$self->close_conf;
};
$self->flag_busy(0);
die $@ if $@;
$self->set_processing_complete;
my @tracks = $self->tracks;
return @tracks;
}
sub start_load { }
sub finish_load { }
sub flag_busy {
my $self = shift;
my $busy = shift;
my $busy_file = $self->busy_path;
if ($busy) {
my $fh = IO::File->new($busy_file,'>');
} else {
unlink $busy_file;
}
}
sub busy {
my $self = shift;
my $busy_file = $self->busy_path;
return -e $busy_file;
}
sub add_track {
my $self = shift;
my $label = shift;
$self->{_tracks} ||= {};
$self->{_tracks}{$label}++;
}
sub tracks {
lib/Bio/Graphics/Browser2/DataLoader/archive.pm view on Meta::CPAN
sub default_track_name {
my $self = shift;
return $self->{default_track_name}++;
}
sub load {
my $self = shift;
my ($initial_lines,$fh) = @_;
$self->flag_busy(1);
eval {
$self->open_conf;
$self->set_status('starting load');
mkdir $self->sources_path or die $!;
$self->{archive} = File::Spec->catfile($self->sources_path,$self->track_name);
my $source_file = IO::File->new($self->{archive},'>');
warn "sourcefile=$self->{archive}";
lib/Bio/Graphics/Browser2/DataLoader/archive.pm view on Meta::CPAN
}
$source_file->close();
$self->finish_load;
$self->check_metadata;
$self->write_conf;
$self->close_conf;
$self->set_processing_complete;
};
$self->flag_busy(0);
die $@ if $@;
return $self->tracks;
}
sub finish_load {
my $self = shift;
$self->set_status("extracting files from archive");
my $archive = $self->{archive};
my $bin = $archive =~ /\.tar$/i ? $self->search_for_binary('tar') :
lib/Bio/Graphics/Browser2/DataLoader/bam.pm view on Meta::CPAN
my $self = shift;
my @fasta = $self->get_fasta_files;
my $fasta = (grep {!/\.fai$/} @fasta)[0];
return $fasta;
}
sub load {
my $self = shift;
my ($initial_lines,$fh) = @_;
$self->flag_busy(1);
eval {
$self->open_conf;
$self->set_status('starting load');
mkdir $self->sources_path or die $!;
my $source_file = IO::File->new(
File::Spec->catfile($self->sources_path,$self->track_name),'>');
$self->start_load;
lib/Bio/Graphics/Browser2/DataLoader/bam.pm view on Meta::CPAN
$bytes_loaded += length $ buffer;
$self->set_status("loaded $bytes_loaded bytes") if $bytes++ % 10000;
}
$source_file->close();
$self->finish_load;
$self->close_conf;
$self->set_processing_complete;
};
$self->flag_busy(0);
die $@ if $@;
return $self->tracks;
}
sub finish_load {
my $self = shift;
eval "require Bio::DB::Sam; 1" or return;
# keep original copy in sources directory. Create new sorted and indexed
# copy in main level
lib/Bio/Graphics/Browser2/DataLoader/bigbed.pm view on Meta::CPAN
sub default_track_name {
my $self = shift;
return $self->{default_track_name}++;
}
sub load {
my $self = shift;
my ($initial_lines,$fh) = @_;
$self->flag_busy(1);
eval {
$self->open_conf;
$self->set_status('starting load');
mkdir $self->sources_path or die $!;
$self->{bigbed} = File::Spec->catfile($self->sources_path,$self->track_name);
my $source_file = IO::File->new($self->{bigbed},'>');
warn "sourcefile=$self->{bigbed}";
lib/Bio/Graphics/Browser2/DataLoader/bigbed.pm view on Meta::CPAN
$bytes_loaded += length $ buffer;
$self->set_status("loaded $bytes_loaded bytes") if $bytes++ % 10000;
}
$source_file->close();
$self->finish_load;
$self->close_conf;
$self->set_processing_complete;
};
$self->flag_busy(0);
die $@ if $@;
return $self->tracks;
}
sub finish_load {
my $self = shift;
my $loadid = $self->loadid;
$self->set_status('creating configuration');
lib/Bio/Graphics/Browser2/DataLoader/bigwig.pm view on Meta::CPAN
# $Id$
use strict;
use base 'Bio::Graphics::Browser2::DataLoader';
use Bio::DB::BigWig;
use File::Basename 'basename','dirname';
sub load {
my $self = shift;
my ($initial_lines,$fh) = @_;
$self->flag_busy(1);
eval {
$self->open_conf;
$self->set_status('starting load');
mkdir $self->sources_path or die $!;
$self->{bigwig} = File::Spec->catfile($self->sources_path,$self->track_name);
my $source_file = IO::File->new($self->{bigwig},'>');
warn "sourcefile=$self->{bigwig}";
lib/Bio/Graphics/Browser2/DataLoader/bigwig.pm view on Meta::CPAN
$bytes_loaded += length $ buffer;
$self->set_status("loaded $bytes_loaded bytes") if $bytes++ % 10000;
}
$source_file->close();
$self->finish_load;
$self->close_conf;
$self->set_processing_complete;
};
$self->flag_busy(0);
die $@ if $@;
return $self->tracks;
}
sub finish_load {
my $self = shift;
my $loadid = $self->loadid;
$self->set_status('creating configuration');
lib/Bio/Graphics/Browser2/DataLoader/useq.pm view on Meta::CPAN
$self->{bigPath} = $bigPath;
$self->{java} = $java;
return 1;
}
sub load {
my $self = shift;
my ($initial_lines,$fh) = @_;
$self->flag_busy(1);
eval {
$self->open_conf;
$self->set_status('starting load');
mkdir $self->sources_path or die $!;
$self->{useq} = File::Spec->catfile($self->sources_path,$self->track_name);
my $source_file = IO::File->new($self->{useq},'>');
warn "sourcefile=$self->{useq}";
lib/Bio/Graphics/Browser2/DataLoader/useq.pm view on Meta::CPAN
$bytes_loaded += length $ buffer;
$self->set_status("loaded $bytes_loaded bytes") if $bytes++ % 10000;
}
$source_file->close();
$self->finish_load;
$self->close_conf;
$self->set_processing_complete;
};
$self->flag_busy(0);
die $@ if $@;
return $self->tracks;
}
sub finish_load {
my $self = shift;
$self->convert_useq;
my @bw;
lib/Bio/Graphics/Browser2/Render.pm view on Meta::CPAN
my $features = $region->features;
my $settings = $self->state;
my $source = $self->data_source;
my $title = $self->generate_title($features);
my $output;
my @post_load = $self->get_post_load_functions;
$output .= $self->render_html_start($title,@post_load);
$output .= $self->render_user_header;
$output .= $self->render_busy_signal;
$output .= $self->render_actionmenu;
$output .= $self->render_top($title,$features);
my $main_page .= $self->render_navbar($region->seg);
if ($region->feature_count > 1) {
$main_page .= $self->render_multiple_choices($features,$self->state->{name});
$main_page .= $self->render_select_track_link;
}
lib/Bio/Graphics/Browser2/Render/HTML.pm view on Meta::CPAN
br(),$self->html_frag('html2',$self->state)
)
)
)
: '';
}
# Renders the HTML for the spinning "busy" signal on the top-left corner of the page.
sub render_busy_signal {
my $self = shift;
return img({
-id => 'busy_indicator',
-src => $self->data_source->button_url.'/spinner.gif',
-style => 'position: fixed; top: 5px; left: 5px; display: none',
-alt => ($self->translate('WORKING')||'')
});
}
# Renders the menu bar across the top of the browser.
sub render_actionmenu {
my $self = shift;
my $settings = $self->state;
lib/Bio/Graphics/Browser2/UserTracks.pm view on Meta::CPAN
use constant DEBUG => 0;
my $HASBIGWIG;
# The intent of this is to provide a single unified interface for
# managing a user's uploaded and shared tracks.
# BUG: It's still kind of screwy: there seem to be filesystem
# traversal methods in the parent class which should not be here.
# class methods
sub busy_file_name { 'BUSY' }
sub status_file_name { 'STATUS' }
sub imported_file_name { 'IMPORTED' }
sub mirrored_file_name { 'MIRRORED' }
sub sources_dir_name { 'SOURCES' }
sub new {
my $class = shift;
my ($data_source,$session) = @_;
my $globals = $data_source->globals;