Browse files

Correct method of checking variation db existence

  • Loading branch information...
1 parent 57ced67 commit d2c5568ef8b5a517718cbc456e4da1e91c063709 @nicklangridge nicklangridge committed Mar 5, 2014
Showing with 2 additions and 15 deletions.
  1. +2 −15 modules/EnsEMBL/Web/Document/HTML/FTPtable.pm
View
17 modules/EnsEMBL/Web/Document/HTML/FTPtable.pm
@@ -27,19 +27,6 @@ use EnsEMBL::Web::Hub;
use EnsEMBL::Web::Document::Table;
use base qw(EnsEMBL::Web::Document::HTML);
-#use JSON::Parse qw /json_to_perl valid_json/;
-#use List::MoreUtils qw /first_index/;
-#
-#sub get_resources {
-# open FILE, "<".$SiteDefs::ENSEMBL_SERVERROOT."/eg-plugins/common/htdocs/species_metadata.json";
-# my $file_contents = do { local $/; <FILE> };
-# close FILE;
-#
-# if (valid_json ($file_contents)) {
-# my $data = json_to_perl ($file_contents);
-# return $data->{genome};
-# }
-#}
sub render {
my $self = shift;
@@ -117,8 +104,8 @@ mysql => join('<br/>',@mysql),
tsv => qq{<a rel="external" title="$title{'tsv'}" href="$ftp_base_path_stub/tsv/$sp_dir/">TSV</a>},
vep => qq{<a rel="external" title="$title{'vep'}" href="$ftp_base_path_stub/vep/$sp_dir">VEP</a>},
};
-
- if ($hub->databases_species($spp, 'variation')) {
+ my $db_hash = $hub->databases_species($spp, 'variation');
+ if ($db_hash->{variation}) {
$data->{'gvf'} = qq{<a rel="external" title="$title{'gvf'}" href="$ftp_base_path_stub/gvf/$sp_dir">GVF</a>};
$data->{'vcf'} = qq{<a rel="external" title="$title{'vcf'}" href="$ftp_base_path_stub/vcf/$sp_dir">VCF</a>};
}

0 comments on commit d2c5568

Please sign in to comment.