HHPaths.pm 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. # HHPaths.pm
  2. # HHsuite version 2.0.15 (June 2012)
  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. # HHsuite version 2.0
  16. # PLEASE INSERT CORRECT PATHS AT POSITIONS INDICATED BY ... BELOW
  17. # THE ENVIRONMENT VARIABLE HHLIB NEEDS TO BE SET TO YOUR LOCAL HH-SUITE DIRECTORY,
  18. # AS DESCRIBED IN THE HH-SUITE USER GUIDE AND README FILE
  19. package HHPaths;
  20. # This block can stay unmodified
  21. use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $VERSION);
  22. use Exporter;
  23. our $VERSION = "version 2.0.15 (June 2012)";
  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);
  26. ##############################################################################################
  27. # PLEASE COMPLETE THE PATHS ... TO PSIPRED AND OLD-STYLE BLAST (NOT BLAST+) (NEEDED FOR PSIPRED)
  28. #our $execdir = ".../psipred/bin"; # path to PSIPRED V2 binaries
  29. #our $datadir = ".../psipred/data"; # path to PSIPRED V2 data files
  30. #our $ncbidir = ".../blast/bin"; # path to NCBI binaries (for PSIPRED in addss.pl)
  31. our $execdir = "/cluster/toolkit/production/bioprogs/psipred/bin"; # path to PSIPRED V2 binaries
  32. our $datadir = "/cluster/toolkit/production/bioprogs/psipred/data"; # path to PSIPRED V2 data files
  33. our $ncbidir = "/cluster/toolkit/production/bioprogs/blast/bin"; # path to NCBI binaries (for PSIPRED in addss.pl)
  34. ##############################################################################################
  35. # PLEASE COMPLETE THE PATHS ... TO YOUR LOCAL PDB FILES, DSSP FILES ETC.
  36. #our $pdbdir = ".../pdb/all"; # where are the pdb files? (pdb/divided directory will also work)
  37. #our $dsspdir = ".../dssp/data"; # where are the dssp files? Used in addss.pl.
  38. #our $dssp = ".../dssp/bin/dsspcmbi"; # where is the dssp binary? Used in addss.pl.
  39. our $pdbdir = "/cluster/databases/pdb/all"; # where are the pdb files? (pdb/divided directory will also work)
  40. our $dsspdir = "/cluster/databases/dssp/data"; # where are the dssp files? Used in addss.pl
  41. our $dssp = "/cluster/databases/dssp/bin/dsspcmbi"; # where is the dssp binary? Used in addss.pl
  42. ##############################################################################################
  43. # The lines below probably do not need to be changed
  44. # Setting paths for hh-suite perl scripts
  45. our $hhlib = $ENV{"HHLIB"}; # main hh-suite directory
  46. our $hhdata = $hhlib."/data"; # path to data directory for hhblits, example files
  47. our $hhbin = $hhlib."/bin"; # path to cstranslate (path to hhsearch, hhblits etc. should be in environment variable PATH)
  48. our $hhscripts= $hhlib."/scripts"; # path to hh perl scripts (addss.pl, reformat.pl, hhblitsdb.pl etc.)
  49. our $dummydb = $hhdata."/do_not_delete"; # Name of dummy blast db for PSIPRED (single sequence formatted with NCBI formatdb)
  50. # HHblits data files
  51. our $cs_lib = "$hhdata/cs219.lib";
  52. our $context_lib = "$hhdata/context_data.lib";
  53. # Add hh-suite scripts directory to search path
  54. $ENV{"PATH"} = $hhscripts.":".$ENV{"PATH"}; # Add hh scripts directory to environment variable PATH
  55. ################################################################################################
  56. ### System command with return value parsed from output
  57. ################################################################################################
  58. sub System()
  59. {
  60. if ($v>=2) {printf("\$ %s\n",$_[0]);}
  61. system($_[0]);
  62. if ($? == -1) {
  63. die("\nError: failed to execute '$_[0]': $!\n\n");
  64. } elsif ($? != 0) {
  65. printf("\nError: command '$_[0]' returned error code %d\n\n", $? >> 8);
  66. return 1;
  67. }
  68. return $?;
  69. }
  70. return 1;