Skip to content

Commit

Permalink
exponentials weight coefficient to wi. exponentials centroids chosen …
Browse files Browse the repository at this point in the history
…by score magnitude.
  • Loading branch information
AdamDS committed Sep 27, 2017
1 parent f4e4dfb commit e3ee4f7
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 8 deletions.
Binary file renamed HotSpot3D-1.8.0.tar.gz → HotSpot3D-1.8.0.0.tar.gz
Binary file not shown.
4 changes: 2 additions & 2 deletions bin/hotspot3d
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
#----------------------------------
# $Authors: Beifang Niu & Adam D Scott
# $Date: 2013-08-08 13:22:08 -0500 (Thu Aug 8 13:22:08 CDT 2013) $
# $Revision: 1.8.0 $
# $Revision: 1.8.0.0 $
# $URL: $
#----------------------------------
use strict;
use warnings;

our $VERSION = 'V1.8.0';
our $VERSION = 'V1.8.0.0';

use Carp;
use FileHandle;
Expand Down
2 changes: 1 addition & 1 deletion dist.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = HotSpot3D
author = Beifang Niu, John Wallis, Adam D Scott, Sohini Sengupta, Amila Weerasinghe, & Matthew H Bailey from McDonnell Genome Institute of Washington University at St. Louis
version = 1.8.0
version = 1.8.0.0
license = Perl_5
copyright_holder = McDonnell Genome Institute at Washington University
copyright_year = 2017
Expand Down
15 changes: 10 additions & 5 deletions lib/TGI/Mutpro/Main/Network.pm
Original file line number Diff line number Diff line change
Expand Up @@ -346,8 +346,14 @@ sub isRadiusOkay {
sub determineCentroid {
my ( $this , $mutationKey , $newScore ,
$currentCentroid , $currentScore ) = @_;
if ( $newScore > $currentScore ) {
return ( $mutationKey , $newScore );
if ( $this->{'vertex_score'} eq $EXPONENTIALS ) {
if ( abs( $newScore ) > abs( $currentScore ) ) {
return ( $mutationKey , $newScore );
}
} else {
if ( $newScore > $currentScore ) {
return ( $mutationKey , $newScore );
}
}
return ( $currentCentroid , $currentScore );
}
Expand All @@ -359,7 +365,7 @@ sub determineSubClusters {
my $subClusterID = -1;
while ( $moreToFind == 1 ) {
my $score = 0;
my $centroidScore = $MAXWEIGHT - 2*$MAXWEIGHT;
my $centroidScore = 0;
my $centroid;
$subClusterID++;
print "Finding subcluster: ".$subClusterID."\n";
Expand Down Expand Up @@ -496,8 +502,7 @@ sub exponential {
my ( $this , $weight , $geodesic ) = @_;
my $weightExp = abs( $weight / $this->{'weight_scale'} );
my $geodesicExp = $geodesic / $this->{'length_scale'};
my $weightShifted = $weight + $MAXWEIGHT + 1;
my $score = $weightShifted * exp( $weightExp - $geodesicExp );
my $score = $weight * exp( $weightExp - $geodesicExp );
return $score;
}

Expand Down

0 comments on commit e3ee4f7

Please sign in to comment.