5 # Don't edit the line below, it must look exactly like this.
6 # Everything above this line will be replaced #
13 use vars qw/ $opt_help /;
14 use vars qw/ $opt_idcolumn
19 $opt_debug_subroutine /;
21 ## Configure the command line parsing
22 Getopt::Long::config("auto_abbrev");
24 ## Declare the options
25 my $res = GetOptions("help", # Display help message
31 "debug_subroutine:s" );
40 The create_subsets script creates subsets of the individuals of
47 [-idcolumn=column_number]
48 [-stratify_on=column_number]
53 ./create_subsets.pl -idc=1 -bins=3 -stratify_on=5 datafile
60 ## Check that we do have a model file
61 if ( scalar(@ARGV) < 1 ) {
62 print "A data file must be specified. Use 'create_subsets -h' for help.\n";
66 debug
-> level
( $opt_debug );
67 debug
-> package( $opt_debug_package );
68 debug
-> subroutine
( $opt_debug_subroutine );
70 my $data = data
-> new
( filename
=> $ARGV[0],
71 idcolumn
=> $opt_idcolumn );
73 my @subsets = @
{$data -> subsets
( bins
=> $opt_bins,
74 stratify_on
=> $opt_stratify_on )};
76 foreach my $sub ( @subsets ) {