From 1f716d5a328ba601cdca2e47d8a9aa1b5032a5ce Mon Sep 17 00:00:00 2001 From: pontus_pih Date: Fri, 13 May 2005 12:12:17 +0000 Subject: [PATCH] small fixes --- bin/bootstrap | 2 +- bin/cdd | 2 +- bin/crossval | 2 +- bin/llp | 2 +- devel/pheno.mod | 26 ++++++++++++-------------- lib/common_options.pm | 26 +++++++++++++------------- lib/nonmem_subs.pm | 2 +- lib/psn.conf | 1 + lib/tool/xv_subs.pm | 40 +++++++++++++++++++++------------------- 9 files changed, 52 insertions(+), 51 deletions(-) diff --git a/bin/bootstrap b/bin/bootstrap index 800ac55..442148c 100755 --- a/bin/bootstrap +++ b/bin/bootstrap @@ -165,7 +165,7 @@ debug -> package( $options{'debug_package'} ); debug -> subroutine( $options{'debug_subroutine'} ); debug -> warn_with_trace( $options{'warn_with_trace'} ); -my $eval_string = common_options::model_parameters; +my $eval_string = common_options::model_parameters(\%options); my $model = model -> new ( eval( $eval_string ), filename => @ARGV[0], diff --git a/bin/cdd b/bin/cdd index 02cad12..737019a 100755 --- a/bin/cdd +++ b/bin/cdd @@ -147,7 +147,7 @@ debug -> package( $options{'debug_package'} ); debug -> subroutine( $options{'debug_subroutine'} ); debug -> warn_with_trace( $options{'warn_with_trace'} ); -my $eval_string = common_options::model_parameters; +my $eval_string = common_options::model_parameters(\%options); my $model = model -> new ( eval( $eval_string ), filename => $ARGV[0], diff --git a/bin/crossval b/bin/crossval index b88d96d..b62177f 100755 --- a/bin/crossval +++ b/bin/crossval @@ -38,7 +38,7 @@ debug -> package( $options{'debug_package'} ); debug -> subroutine( $options{'debug_subroutine'} ); debug -> warn_with_trace( $options{'warn_with_trace'} ); -my $eval_string = common_options::model_parameters; +my $eval_string = common_options::model_parameters(\%options); my $model = model -> new ( eval( $eval_string ), filename => @ARGV[0], diff --git a/bin/llp b/bin/llp index 0fac9f9..fc71ec8 100755 --- a/bin/llp +++ b/bin/llp @@ -235,7 +235,7 @@ foreach my $param ( 'thetas', 'omegas', 'sigmas' ) { } } -my $eval_string = common_options::model_parameters; +my $eval_string = common_options::model_parameters(\%options); my $model = model -> new ( eval( $eval_string ), filename => $ARGV[0], diff --git a/devel/pheno.mod b/devel/pheno.mod index 9dcabd6..e6c3d07 100644 --- a/devel/pheno.mod +++ b/devel/pheno.mod @@ -1,7 +1,7 @@ -$PROBLEM PHENOBARB SIMPLE MODEL -$INPUT ID TIME AMT WGT APGR DV -$DATA pheno.dta IGNORE=I -$SUBROUTINE ADVAN1 TRANS2 +$PROBLEM PHENOBARB SIMPLE MODEL +$INPUT ID TIME AMT WGT APGR DV +$DATA pheno.dta IGNORE=I +$SUBROUTINE ADVAN1 TRANS2 $PK TVCL=THETA(1) @@ -18,15 +18,13 @@ $ERROR IPRED=F ; individual-specific prediction IRES=DV-IPRED ; individual-specific residual IWRES=IRES/W ; individual-specific weighted residual -$THETA (0,0.0105) ; CL +$THETA (0,0.0105) ; CL +$THETA (0,1.0500,1000000) ; V +$OMEGA .4 ; IVCL + .25 ; IVV +$SIGMA .04 +$ESTIMATION MAXEVAL=9999 SIGDIGITS=4 POSTHOC +$COVARIANCE PRINT=E -$THETA (0,1.0500,INF) ; V - -$OMEGA .4 ; IVCL - .25 ; IVV - -$SIGMA .04 - -$ESTIMATION MAXEVAL=9999 SIGDIGITS=4 POSTHOC -$COVARIANCE PRINT=E ;$TABLE ID TVCL TVV NOPRINT ONEHEADER FILE=patab1 + diff --git a/lib/common_options.pm b/lib/common_options.pm index 7fb9bab..884ba1c 100644 --- a/lib/common_options.pm +++ b/lib/common_options.pm @@ -104,28 +104,28 @@ sub print_help { } sub model_parameters { - my $opt = shift; - my %options = %{$opt}; + my $options = shift; + #my %options = %{$opt}; - if( defined $options{'extra_data_file'} ){ - for( my $i=0; $i < scalar(@{$options{'extra_data_file'}}) ; $i++ ){ - my @arr = split( /,/ , @{$options{'extra_data_file'}}[$i] ); + if( defined $options -> {'extra_data_file'} ){ + for( my $i=0; $i < scalar(@{$options -> {'extra_data_file'}}) ; $i++ ){ + my @arr = split( /,/ , @{$options -> {'extra_data_file'}}[$i] ); if( @arr < 2 ){ die "extra_data_file must be of form: \"filename, head1, head2\"\n" ; } - - @{$options{'extra_data_file'}}[$i] = $arr[0]; + + @{$options -> {'extra_data_file'}}[$i] = $arr[0]; my @subarray = @arr[1..$#arr]; - push( @{$options{'extra_data_header'}}, \@subarray ) + push( @{$options -> {'extra_data_header'}}, \@subarray ) } } - if( defined $options{'extra_files'} ){ - @{$options{'extra_files'}} = split( /,/ , $opt_extra_files ); + if( defined $options -> {'extra_files'} ){ + @{$options -> {'extra_files'}} = split( /,/ , $opt_extra_files ); } - return '( extra_data_files => @options{\'extra_data_file\'}, - extra_data_headers => @options{\'extra_data_header\'}, - extra_files => @options{\'extra_files\'}, + return '( extra_data_files => $options{\'extra_data_file\'}, + extra_data_headers => $options{\'extra_data_header\'}, + extra_files => $options{\'extra_files\'}, outputfile => $options{\'outputfile\'}, sde => $options{\'sde\'})'; diff --git a/lib/nonmem_subs.pm b/lib/nonmem_subs.pm index 951767b..63ea3d6 100644 --- a/lib/nonmem_subs.pm +++ b/lib/nonmem_subs.pm @@ -188,7 +188,7 @@ start execute my $outputfile = $self -> {'outputfile'}; if( $Config{osname} eq 'MSWin32' ){ - run3( "nonmem.exe", undef, \undef ); + run3( "nonmem.exe", undef, undef ); if ( -e "output" ) { cp( "output", $outputfile ); unlink( "output" ); diff --git a/lib/psn.conf b/lib/psn.conf index 4e9a93c..c052667 100644 --- a/lib/psn.conf +++ b/lib/psn.conf @@ -27,6 +27,7 @@ default=/export/home/nmv1.1 5=/export/home/nmv1.1 5_big=/export/home/nmv1.1big win5=c:\nmv +6=/export/home/nmvi ; The compiler section specifies the name and compiler flags of the diff --git a/lib/tool/xv_subs.pm b/lib/tool/xv_subs.pm index 78592d9..124a798 100644 --- a/lib/tool/xv_subs.pm +++ b/lib/tool/xv_subs.pm @@ -56,6 +56,7 @@ end new # }}} new # {{{ xv_step_pre_fork_setup + start xv_step_pre_fork_setup { my $subtools = undef; @@ -65,19 +66,20 @@ start xv_step_pre_fork_setup $subtools = \@subtools; } - my $xv_step = tool::xv_step -> new( debug => $self -> {'debug'}, - models => [$self -> {'models'} -> [0]], - subtools => $subtools, - %{$self -> {'subtool_arguments'} -> {'xv_step'}}, - subtool_arguments => $self -> {'subtool_arguments'}); + my $xv_step = tool::xv_step -> new( models => [$self -> {'models'} -> [0]], + subtools => $subtools, + %{$self -> {'subtool_arguments'} -> {'xv_step'}}, + subtool_arguments => $self -> {'subtool_arguments'}); $xv_step -> create_data_sets; push( @{$self -> {'xv_steps'}}, $xv_step ); } end xv_step_pre_fork_setup + # }}} # {{{ xv_step_setup + start xv_step_setup { unless( $model_number == 1 ){ @@ -89,13 +91,12 @@ start xv_step_setup } my $first_xv_step = $self -> {'xv_steps'} -> [0]; - my $xv_step = tool::xv_step -> new( debug => $self -> {'debug'}, - models => [$self -> {'models'} -> [$model_number - 1]], - prediction_data => $first_xv_step -> prediction_data, - estimation_data => $first_xv_step -> estimation_data, - subtools => $subtools, - %{$self -> {'subtool_arguments'} -> {'xv_step'}}, - subtool_arguments => $self -> {'subtool_arguments'}); + my $xv_step = tool::xv_step -> new( models => [$self -> {'models'} -> [$model_number - 1]], + prediction_data => $first_xv_step -> prediction_data, + estimation_data => $first_xv_step -> estimation_data, + subtools => $subtools, + %{$self -> {'subtool_arguments'} -> {'xv_step'}}, + subtool_arguments => $self -> {'subtool_arguments'}); push( @{$self -> {'xv_steps'}}, $xv_step ); } @@ -107,6 +108,7 @@ end xv_step_setup # }}} # {{{ xv_step_post_subtool_analyze + start xv_step_post_subtool_analyze { my $subtools = undef; @@ -117,17 +119,17 @@ start xv_step_post_subtool_analyze } my $first_xv_step = $self -> {'xv_steps'} -> [0]; if( $self -> {'xv_steps'} -> [$model_number - 1] -> cont ){ - $self -> {'xv_steps'} -> [$model_number -1] = tool::xv_step -> new( debug => $self -> {'debug'}, - models => [$self -> {'models'} -> [$model_number - 1]], - prediction_data => $first_xv_step -> prediction_data, - estimation_data => $first_xv_step -> estimation_data, - subtools => $subtools, - %{$self -> {'subtool_arguments'} -> {'xv_step'}}, - subtool_arguments => $self -> {'subtool_arguments'} ); + $self -> {'xv_steps'} -> [$model_number -1] = tool::xv_step -> new( models => [$self -> {'models'} -> [$model_number - 1]], + prediction_data => $first_xv_step -> prediction_data, + estimation_data => $first_xv_step -> estimation_data, + subtools => $subtools, + %{$self -> {'subtool_arguments'} -> {'xv_step'}}, + subtool_arguments => $self -> {'subtool_arguments'} ); push( @{$self -> {'tools'}}, $self -> {'xv_steps'} -> [$model_number-1] ); } } end xv_step_post_subtool_analyze + # }}} start die -- 2.11.4.GIT