6 # Don't edit the line below, it must look exactly like this.
7 # Everything above this line will be replaced #
14 use vars qw/ $opt_help /;
15 use vars qw/ $opt_data
19 $opt_do_not_test_columns
22 $opt_debug_subroutine /;
24 ## Configure the command line parsing
25 Getopt::Long::config("auto_abbrev");
27 ## Declare the options
28 my $res = GetOptions("help", # Display help message
33 "do_not_test_columns:s",
37 "debug_subroutine:s" );
41 if($opt_help or not defined $opt_data) {
46 Perl script for identification of columns which contain only one
47 value per individual. Creates two new data files: one containing the
48 columns that are single valued and one containing the rest.
52 single_valued_columns -data=filename
53 [-idcolumn=column_number]
54 [-subset_name=single_value_filename]
55 [-remainder_name=remaining_data_filename]
56 [-do_not_test_columns='2,3,5..7']
60 perl single_valued_columns -data=pheno.dta -idc=1 -sub=mysub.dta -rem=myrem.dta -do_not='2,3'
67 ## Check that we do have a data file
68 unless ( $opt_data ) {
69 die "A data file must be specified\n";
73 ui
-> category
( 'data' );
75 debug
-> level
( $opt_debug );
76 debug
-> package( $opt_debug_package );
77 debug
-> subroutine
( $opt_debug_subroutine );
79 my @dont_test = split(',',$opt_do_not_test_columns);
81 my $data = data
-> new
( filename
=> $opt_data,
82 idcolumn
=> $opt_idcolumn );
84 $data -> single_valued_data
( subset_name
=> $opt_subset_name,
85 remainder_name
=> $opt_remainder_name,
86 do_not_test_columns
=> \
@dont_test,