Skip to content

Commit

Permalink
feat(remove): parse_program_executables
Browse files Browse the repository at this point in the history
  • Loading branch information
henrikstranneheim committed Nov 9, 2020
1 parent 158fdb9 commit 0988017
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 150 deletions.
59 changes: 0 additions & 59 deletions lib/MIP/Active_parameter.pm
Expand Up @@ -46,7 +46,6 @@ BEGIN {
get_package_env_attributes
get_user_supplied_pedigree_parameter
parse_infiles
parse_program_executables
parse_recipe_resources
parse_vep_plugin
remove_sample_id_from_gender
Expand Down Expand Up @@ -1097,64 +1096,6 @@ sub parse_infiles {
return 1;
}

sub parse_program_executables {

## Function : Checking commands in your path and executable
## Returns :
## Arguments: $active_parameter_href => Active parameters for this analysis hash {REF}
## : $parameter_href => Parameter hash {REF}

my ($arg_href) = @_;

## Flatten argument(s)
my $active_parameter_href;
my $parameter_href;

my $tmpl = {
active_parameter_href => {
default => {},
defined => 1,
required => 1,
store => \$active_parameter_href,
strict_type => 1,
},
parameter_href => {
default => {},
defined => 1,
required => 1,
store => \$parameter_href,
strict_type => 1,
},
};

check( $tmpl, $arg_href, 1 ) or croak q{Could not parse arguments!};

PARAMETER:
foreach my $parameter_name ( keys %{$active_parameter_href} ) {

## Only check path(s) for parameters with "type" key
next PARAMETER
if ( not exists $parameter_href->{$parameter_name}{type} );

## Only check path(s) for parameters with type value eq "recipe"
next PARAMETER
if ( not $parameter_href->{$parameter_name}{type} eq q{recipe} );

## Only check path(s) for active recipes
next PARAMETER if ( not $active_parameter_href->{$parameter_name} );

## Alias
my $program_executables_ref =
\@{ $parameter_href->{$parameter_name}{program_executables} };

PROGRAM:
foreach my $program ( @{$program_executables_ref} ) {

}
}
return;
}

sub parse_recipe_resources {

## Function : Check core number and memory requested against environment provisioned
Expand Down
9 changes: 0 additions & 9 deletions lib/MIP/Main/Analyse.pm
Expand Up @@ -32,7 +32,6 @@ use MIP::Active_parameter qw{
check_load_env_packages
check_recipe_mode
get_not_allowed_temp_dirs
parse_program_executables
parse_recipe_resources
set_gender_sample_ids
set_parameter_reference_dir_path
Expand Down Expand Up @@ -343,14 +342,6 @@ sub mip_analyse {
## Check core number requested against environment provisioned
parse_recipe_resources( { active_parameter_href => $active_parameter_href, } );

## Check programs in path, is executable, and set binary_path
parse_program_executables(
{
active_parameter_href => $active_parameter_href,
parameter_href => $parameter_href,
}
);

## Check that the case_id and the sample_id(s) exists and are unique. Check if id sample_id contains "_".
check_sample_ids(
{
Expand Down
82 changes: 0 additions & 82 deletions t/parse_program_executables.t

This file was deleted.

0 comments on commit 0988017

Please sign in to comment.