-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCosegConfig.pm
executable file
·81 lines (73 loc) · 2.48 KB
/
CosegConfig.pm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#!/usr/bin/perl
##---------------------------------------------------------------------------##
## File:
## @(#) CosegConfig.pm
## Author:
## Robert Hubley <[email protected]>
## Description:
## This is the main configuration file for the Coseg
## perl programs. Before you can run the programs included
## in this package you will need to edit this file and
## configure for your site.
##
#******************************************************************************
#* Copyright (C) Institute for Systems Biology 2016 Developed by
#* Arian Smit and Robert Hubley.
#*
#* This work is licensed under the Open Source License v2.1. To view a copy
#* of this license, visit http://www.opensource.org/licenses/osl-2.1.php or
#* see the license.txt file contained in this distribution.
#*
###############################################################################
package CosegConfig;
use FindBin;
require Exporter;
@EXPORT_OK = qw( $REPEATMASKER_DIR );
%EXPORT_TAGS = ( all => [ @EXPORT_OK ] );
@ISA = qw(Exporter);
BEGIN {
##----------------------------------------------------------------------##
## CONFIGURE THE FOLLOWING PARAMETERS FOR YOUR INSTALLATION ##
## ##
##
## RepeatMasker Location
## ======================
## The path to the RepeatMasker programs and support files
## This is the directory with this file as well as
## the ProcessRepeats and Library/ and Matrices/ subdirectories
## reside.
##
## i.e. Typical UNIX installation
## $REPEATMASKER_DIR = "/usr/local/RepeatMasker";
##
$REPEATMASKER_DIR = "/usr/local/RepeatMasker";
## ##
## END CONFIGURATION AREA ##
##----------------------------------------------------------------------##
}
sub standalone_entry_point
{
print "Enter location of the RepeatMasker program: ";
my $answer = <STDIN>;
$answer =~ s/[\n\r]+//g;
# TODO Validate
open IN,"<CosegConfig.pm" or die;
open OUT,">CosegConfig.new" or die;
while ( <IN> )
{
if ( /^\s*\$REPEATMASKER_DIR\s*\=/ )
{
print OUT " \$REPEATMASKER_DIR = \"$answer\";\n";
}else
{
print OUT;
}
}
close IN;
close OUT;
system("mv CosegConfig.new CosegConfig.pm");
exit;
}
## Allow this module to be called as a standalone script
__PACKAGE__->standalone_entry_point() unless caller;
1;