Permalink
Browse files

reverse natural order of chromosomes in chrom_sizes to workaround bio…

…perl seqfeature::store buglet
  • Loading branch information...
1 parent 0e94bec commit 49da25151653429f35ec357f2a33267c03d6a68f @lstein lstein committed Aug 30, 2012
Showing with 11 additions and 11 deletions.
  1. +1 −1 bin/gbrowse_import_ucsc_db.pl
  2. +10 −10 lib/Bio/Graphics/Browser2/Action.pm
@@ -147,7 +147,7 @@ END
print STDERR "Fetching chromosome sizes...\n";
- my $query = $dbh->prepare('select chrom,size from chromInfo')
+ my $query = $dbh->prepare('select chrom,size from chromInfo order by size')
or die $dbh->errstr;
$query->execute;
my @chroms;
@@ -806,16 +806,15 @@ sub ACTION_upload_file {
error_msg=>'empty file'}
));
- my $upload_id = $q->param('upload_id');
-
- my $render = $self->render;
- my $state = $self->state;
- my $session = $render->session;
+ my $upload_id = $q->param('upload_id');
+ my $render = $self->render;
+ my $state = $self->state;
+ my $session = $render->session;
my $usertracks = $render->user_tracks;
my $name = $fh ? basename($fh)
- : $url ? $url
- : $q->param('name');
+ : $url ? $url
+ : $q->param('name');
$name ||= 'Uploaded file';
my $content_type = "text/plain"; #? fh? $q->uploadInfo($fh)->{'Content-Type'} : 'text/plain'; - seems to be a problem with UploadInfo().
@@ -834,11 +833,12 @@ sub ACTION_upload_file {
($result,$msg,$tracks,$pid) = (1,'shared track added to your session',$t,$$);
}
else {
- ($result, $msg, $tracks, $pid) = $url ? $usertracks->mirror_url($track_name, $url, 1,$self->render)
- :$data ? $usertracks->upload_data($track_name, $data, $content_type, 1)
- : $usertracks->upload_file($track_name, $fh, $content_type, $overwrite);
+ ($result, $msg, $tracks, $pid) = $url ? $usertracks->mirror_url($track_name, $url, 1 , $self->render)
+ :$data ? $usertracks->upload_data($track_name, $data, $content_type, 1 )
+ : $usertracks->upload_file($track_name, $fh, $content_type, $overwrite );
}
+ $session->lock();
delete $self->state->{uploads}{$upload_id};
$session->flush();

0 comments on commit 49da251

Please sign in to comment.