diff --git a/README.md b/README.md index 95d877b..1d2b79c 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Usage Stable: v0.6.0 - Beta: up to v1.8.1 + Beta: up to v1.8.2 Author: Beifang Niu, John Wallis, Adam D Scott, Sohini Sengupta, & Amila Weerasinghe diff --git a/bin/hotspot3d b/bin/hotspot3d index 5d4f83d..c4a3166 100755 --- a/bin/hotspot3d +++ b/bin/hotspot3d @@ -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.1 $ +# $Revision: 1.8.2 $ # $URL: $ #---------------------------------- use strict; use warnings; -our $VERSION = 'V1.8.1'; +our $VERSION = 'V1.8.2'; use Carp; use FileHandle; diff --git a/dist.ini b/dist.ini index 701b973..4660a87 100644 --- a/dist.ini +++ b/dist.ini @@ -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.1 +version = 1.8.2 license = Perl_5 copyright_holder = McDonnell Genome Institute at Washington University copyright_year = 2017 diff --git a/lib/TGI/Mutpro/Preprocess/Calpro.pm b/lib/TGI/Mutpro/Preprocess/Calpro.pm index c5e3cfc..b3cc8ec 100644 --- a/lib/TGI/Mutpro/Preprocess/Calpro.pm +++ b/lib/TGI/Mutpro/Preprocess/Calpro.pm @@ -300,7 +300,7 @@ sub writeProximityFile { # Get AminoAcid object for residue in chain '$uniprotChain', # at position $position $uniprotAminoAcidRef = $$peptideRef{$uniprotChain}->getAminoAcidObject( $residuePosition ); - next if ( $$uniprotAminoAcidRef->isAA() == 0 ); + next if ( $$uniprotAminoAcidRef->isHOH() == 1 ); $uniprotAaName = $$uniprotAminoAcidRef->name(); # Updated 170510 : use a hash with chain and regions for retrieving the offset $uniprotChainOffset = getOffset( $allOffsets, $uniprotChain, $residuePosition ); @@ -339,7 +339,7 @@ sub writeProximityFile { foreach $position ( sort {$a<=>$b} @tmp_array_positions ) { $otherChainOffset = getOffset( $allOffsets, $chain, $position ); $aaObjRef = $$peptideRef{$chain}->getAminoAcidObject($position); - next if ( $$aaObjRef->isAA() == 0 ); + next if ( $$aaObjRef->isHOH() == 1 ); if ( (defined $otherChainOffset) and ($otherChainOffset eq "N/A") ) { $correctedPosition = $position; } else { @@ -526,7 +526,7 @@ sub checkOffsets { next if ( $uniprotB !~ /^\w+$/ || $offsetA !~ /^-?\d+$/ || $offsetB !~ /^-?\d+$/ || $positionA !~ /^-?\d+$/ || $positionB !~ /^-?\d+$/ ); $aminoAcidA = TGI::Mutpro::Preprocess::PdbStructure::convertAA( $aminoAcidA ); $aminoAcidB = TGI::Mutpro::Preprocess::PdbStructure::convertAA( $aminoAcidB ); - next if ( !defined $aminoAcidA || !defined $aminoAcidB ); + next if ( !defined $aminoAcidA & !defined $aminoAcidB ); #next unless ( TGI::Mutpro::Preprocess::AminoAcid::checkAA( $aminoAcidA ) and TGI::Mutpro::Preprocess::AminoAcid::checkAA( $aminoAcidB ) if ( defined $pdbUniprotPosition{$pdbId}{$uniprotA}{$positionA+$offsetA} && $pdbUniprotPosition{$pdbId}{$uniprotA}{$positionA+$offsetA} ne $aminoAcidA ) { print $coorfh "Inconsistent amino acids for $uniprotA position $positionA+$offsetA in $pdbId: '$pdbUniprotPosition{$pdbId}{$uniprotA}{$positionA+$offsetA}' and $aminoAcidA \n"; diff --git a/lib/TGI/Mutpro/Preprocess/PdbStructure.pm b/lib/TGI/Mutpro/Preprocess/PdbStructure.pm index 048ccf7..f905410 100644 --- a/lib/TGI/Mutpro/Preprocess/PdbStructure.pm +++ b/lib/TGI/Mutpro/Preprocess/PdbStructure.pm @@ -533,6 +533,7 @@ sub convertAA { # Convert single amino acid code to triplet # or triplet to single amino acid code my $residue = $_[0]; + my $convertedAA = undef; $residue = uc $residue; my %oneToThree = ( A => 'ALA', @@ -563,8 +564,8 @@ sub convertAA { }elsif ( defined $threeToOne{$residue} ) { return $threeToOne{$residue}; }elsif ( length( $residue ) <= 3 ) { - length( $residue ) == 1 ? return "Z" : return $residue; - } else { carp "Unrecognized format for amino acid '$residue'"; } + length( $residue ) == 1 ? return "Z" : return $convertedAA; + } else { return $convertedAA; carp "Unrecognized format for amino acid '$residue'"; } } sub printStructure { diff --git a/lib/TGI/Mutpro/Preprocess/Uppro.pm b/lib/TGI/Mutpro/Preprocess/Uppro.pm index bd52480..25756c3 100644 --- a/lib/TGI/Mutpro/Preprocess/Uppro.pm +++ b/lib/TGI/Mutpro/Preprocess/Uppro.pm @@ -22,6 +22,7 @@ use List::MoreUtils qw( uniq ); use TGI::Mutpro::Preprocess::Uniprot; use TGI::Mutpro::Preprocess::HugoGeneMethods; +use TGI::Files::File; use TGI::Files::MAF; use TGI::Files::List; @@ -168,8 +169,8 @@ sub process { $fh->print( "\t$alias_list\n" ); } $fh->close(); - my $cmd_list_submit_file_fh; - unless( open ( $cmd_list_submit_file_fh, ">", $this->{'cmd_list_submit_file'} ) ) { die "HotSpot3D Uppro Error: Could not open cmd file (".$this->{'cmd_list_submit_file'}.")"; } + my $cmd_list_submit_file_fh = new FileHandle; #TGI::Files::File->new( $this->{'cmd_list_submit_file'} ) ; + unless( $cmd_list_submit_file_fh -> open ( $this->{'cmd_list_submit_file'}, "w" ) ) { die "HotSpot3D Uppro Error: Could not open cmd file (".$this->{'cmd_list_submit_file'}.")"; } print STDOUT "Creating ".$this->{'cmd_list_submit_file'}."\n"; my $command = ""; if ( $this->{'parallel'} eq $BSUB ) { @@ -215,12 +216,15 @@ sub makeBSUBCalproCommand { sub makeSerialCalproCommand { my ( $this , $inpro_dir , $cmd_list_submit_file_fh , $uniprotid_toupdate ) = @_; my $log_dir = "$this->{'output_dir'}\/Logs\/"; + my $serialCommand = "echo Serially Running Calpro Commands"; map { system("touch $inpro_dir/$_.ProximityFile.csv"); my $command = $this->makeCalproCommand( $_ ); print STDOUT $command."\n"; $cmd_list_submit_file_fh->print( $command."\n" ); + $serialCommand .= ";".$command; } keys %{$uniprotid_toupdate}; + return $serialCommand; } sub makeLocalCalproCommand {