Skip to content

Commit

Permalink
updated url to https. added check for successful data request.
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamDS committed Sep 26, 2017
1 parent de28991 commit 3fbc655
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/TGI/Mutpro/Preprocess/HugoGeneMethods.pm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package TGI::Mutpro::Preprocess::HugoGeneMethods;
#
#----------------------------------
# $Authors: Beifang Niu
# $Authors: Beifang Niu & Adam D Scott
# $Date: 2014-01-14 14:34:50 -0500 (Tue Jan 14 14:34:50 CST 2014) $
# $Revision: $
# $URL: $
Expand All @@ -10,12 +10,12 @@ package TGI::Mutpro::Preprocess::HugoGeneMethods;
#
use strict;
use warnings;
our $VERSION = '0.2';
our $VERSION = '0.3';

use Carp;
use LWP::Simple;
use TGI::Mutpro::Preprocess::HugoGene;
my $HugoUrl = "http://www.genenames.org/cgi-bin/hgnc_downloads?".
my $HugoUrl = "https://www.genenames.org/cgi-bin/hgnc_downloads?".
"title=HGNC+output+data&hgnc_dbtag=on&".
"col=gd_hgnc_id&".
"col=gd_app_sym&".
Expand Down Expand Up @@ -117,6 +117,9 @@ sub makeHugoGeneObjects {
my $list = shift;
my %hugo_objects;
my $page = get($HugoUrl);
if ( not $page ) {
die "HotSpot3D::HugoGeneMethods::makeHugoGeneObjects ERROR: no data from url request.\n";
}
foreach my $line (split /\n/, $page) {
if ($line =~ /withdrawn/i || $line =~ /HGNC ID\s+Approved\s+Symbol\s+/) { next; }
my @entries = split /\t/, $line;
Expand Down

0 comments on commit 3fbc655

Please sign in to comment.