removed mc.dia
[PsN.git] / lib / PsN_template.pm
blob8969a34962a6a47a9cf1d086db359dde3a4a6fc6
1 use ext::Config::Tiny;
2 use debug;
3 use ext::File::HomeDir;
5 $config = ext::Config::Tiny -> read( $config_file );
7 unless( $config ){
8 debug -> die( message => "In PsN configuration file[" . $config_file . "]:" . $ext::Config::Tiny::errstr );
11 if( -e home() . "/psn.conf" ){
12 my $personal_config = ext::Config::Tiny -> read( home() . '/psn.conf' );
13 %{$config} = (%{$config}, %{$personal_config});
16 unless( exists $config -> {'low_INF'} ){
17 $config -> {'low_INF'} = -1000000;
20 unless( exists $config -> {'high_INF'} ){
21 $config -> {'high_INF'} = 1000000;
24 $out_miss_data;
25 $output_header;
26 $factorize_strings;
27 if ( $config -> {'_'} -> {'output_style'} eq 'SPLUS' ) {
28 $out_miss_data = 'NA';
29 $output_header = 1;
30 $factorize_strings = 0;
31 } elsif ( $config -> {'_'} -> {'output_style'} eq 'MATLAB' ) {
32 $out_miss_data = 'NaN';
33 $output_header = 0;
34 $factorize_strings = 1;
35 } else { # Default style EXCEL
36 $out_miss_data = undef;
37 $output_header = 1;
38 $factorize_strings = 0;