HHPaths.pm 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. # HHPaths.pm
  2. # HHsuite version 3.0.0 (15-03-2015)
  3. # (C) J. Soeding, A. Hauser 2012
  4. # This program is free software: you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation, either version 3 of the License, or
  7. # (at your option) any later version.
  8. # This program is distributed in the hope that it will be useful,
  9. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. # GNU General Public License for more details.
  12. # You should have received a copy of the GNU General Public License
  13. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  14. # We are very grateful for bug reports! Please contact us at [email protected]
  15. # PLEASE INSERT CORRECT PATHS AT POSITIONS INDICATED BY ... BELOW
  16. # THE ENVIRONMENT VARIABLE HHLIB NEEDS TO BE SET TO YOUR LOCAL HH-SUITE DIRECTORY,
  17. # AS DESCRIBED IN THE HH-SUITE USER GUIDE AND README FILE
  18. package HHPaths;
  19. # This block can stay unmodified
  20. use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $VERSION);
  21. use Exporter;
  22. our $v;
  23. our $VERSION = "version 3.0.0 (15-03-2015)";
  24. our @ISA = qw(Exporter);
  25. our @EXPORT = qw($VERSION $hhlib $hhdata $hhbin $hhscripts $execdir $datadir $ncbidir $dummydb $pdbdir $dsspdir $dssp $cs_lib $context_lib $v);
  26. push @EXPORT, qw($hhshare $hhbdata);
  27. ##############################################################################################
  28. # PLEASE COMPLETE THE PATHS ... TO PSIPRED AND OLD-STYLE BLAST (NOT BLAST+) (NEEDED FOR PSIPRED)
  29. #our $execdir = ".../psipred/bin"; # path to PSIPRED V2 binaries
  30. #our $datadir = ".../psipred/data"; # path to PSIPRED V2 data files
  31. #our $ncbidir = ".../blast/bin"; # path to NCBI binaries (for PSIPRED in addss.pl)
  32. our $execdir = "/cluster/toolkit/production/bioprogs/psipred/bin"; # path to PSIPRED V2 binaries
  33. our $datadir = "/cluster/toolkit/production/bioprogs/psipred/data"; # path to PSIPRED V2 data files
  34. our $ncbidir = "/cluster/toolkit/production/bioprogs/blast/bin"; # path to NCBI binaries (for PSIPRED in addss.pl)
  35. ##############################################################################################
  36. # PLEASE COMPLETE THE PATHS ... TO YOUR LOCAL PDB FILES, DSSP FILES ETC.
  37. #our $pdbdir = ".../pdb/all"; # where are the pdb files? (pdb/divided directory will also work)
  38. #our $dsspdir = ".../dssp/data"; # where are the dssp files? Used in addss.pl.
  39. #our $dssp = ".../dssp/bin/dsspcmbi"; # where is the dssp binary? Used in addss.pl.
  40. our $pdbdir = "/cluster/databases/pdb/all"; # where are the pdb files? (pdb/divided directory will also work)
  41. our $dsspdir = "/cluster/databases/dssp/data"; # where are the dssp files? Used in addss.pl
  42. our $dssp = "/cluster/databases/dssp/bin/dsspcmbi"; # where is the dssp binary? Used in addss.pl
  43. ##############################################################################################
  44. # The lines below probably do not need to be changed
  45. # Setting paths for hh-suite perl scripts
  46. our $hhlib = $ENV{"HHLIB"} || "/usr/lib/hhsuite"; # main hh-suite directory
  47. our $hhshare = $ENV{"HHLIB"} || "/usr/share/hhsuite"; # main hh-suite directory
  48. our $hhdata = $hhshare."/data"; # path to arch indep data directory for hhblits, example files
  49. our $hhbdata = $hhlib."/data"; # path to arch dep data directory for hhblits, example files
  50. our $hhbin = $hhlib."/bin"; # path to cstranslate (path to hhsearch, hhblits etc. should be in environment variable PATH)
  51. our $hhscripts= $hhshare."/scripts"; # path to hh perl scripts (addss.pl, reformat.pl, hhblitsdb.pl etc.)
  52. our $dummydb = $hhbdata."/do_not_delete"; # Name of dummy blast db for PSIPRED (single sequence formatted with NCBI formatdb)
  53. # HHblits data files
  54. our $cs_lib = "$hhdata/cs219.lib";
  55. our $context_lib = "$hhdata/context_data.lib";
  56. # Add hh-suite scripts directory to search path
  57. $ENV{"PATH"} = $hhscripts.":".$ENV{"PATH"}; # Add hh scripts directory to environment variable PATH
  58. ################################################################################################
  59. ### System command with return value parsed from output
  60. ################################################################################################
  61. sub System()
  62. {
  63. if ($v>=2) {printf(STDERR "\$ %s\n",$_[0]);}
  64. system($_[0]);
  65. if ($? == -1) {
  66. die("\nError: failed to execute '$_[0]': $!\n\n");
  67. } elsif ($? != 0) {
  68. printf(STDERR "\nError: command '$_[0]' returned error code %d\n\n", $? >> 8);
  69. return 1;
  70. }
  71. return $?;
  72. }
  73. return 1;