comparison external_tools/linux/lib/hh/scripts/HHPaths.pm @ 6:2277dd59b9f9 draft

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