Skip to content

Commit

Permalink
Merge ea36613 into 0e268ce
Browse files Browse the repository at this point in the history
  • Loading branch information
jemten committed Sep 14, 2021
2 parents 0e268ce + ea36613 commit 617ec9b
Show file tree
Hide file tree
Showing 38 changed files with 1,058 additions and 96 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -9,6 +9,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- Updating to latest and greatest versions
- Mitochondrial deletion analysis
- GATK Haplotypecaller has been turned off in favour of Deepvariant
- Introduces possibility to store singularity images locally as a .sif file

### Tools

Expand Down
2 changes: 1 addition & 1 deletion definitions/analyse_parameters.yaml
Expand Up @@ -84,7 +84,7 @@ case_id:
- mip
data_type: SCALAR
type: mip
install_config_file:
container_config_file:
associated_recipe:
- mip
data_type: SCALAR
Expand Down
4 changes: 2 additions & 2 deletions definitions/download_parameters.yaml
Expand Up @@ -124,7 +124,7 @@ custom_default_parameters:
- mip
data_type: ARRAY
default:
- install_config_file
- container_config_file
- reference_dir
- temp_directory
type: mip
Expand Down Expand Up @@ -281,7 +281,7 @@ human_reference:
program_executables:
- samtools
type: recipe
install_config_file:
container_config_file:
associated_recipe:
- mip
data_type: SCALAR
Expand Down
2 changes: 1 addition & 1 deletion definitions/dragen_rd_dna_parameters.yaml
Expand Up @@ -8,7 +8,7 @@ custom_default_parameters:
- conda_path
- exome_target_bed
- infile_dirs
- install_config_file
- container_config_file
- pedigree_fam_file
- picardtools_path
- reference_dir
Expand Down
13 changes: 13 additions & 0 deletions definitions/install_parameters.yaml
Expand Up @@ -147,12 +147,25 @@ container:
data_type: HASH
mandatory: no
type: mip
container_directory_path:
associated_recipe:
- mip
data_type: SCALAR
mandatory: no
type: path
update_path: absolute_path
select_programs:
associated_recipe:
- mip
data_type: ARRAY
mandatory: no
type: mip
singularity_local_install:
associated_recipe:
- mip
data_type: SCALAR
mandatory: no
type: mip
skip_programs:
associated_recipe:
- mip
Expand Down
2 changes: 1 addition & 1 deletion definitions/rd_dna_panel_parameters.yaml
Expand Up @@ -10,7 +10,7 @@ custom_default_parameters:
- bwa_mem2_build_reference
- exome_target_bed
- infile_dirs
- install_config_file
- container_config_file
- pedigree_fam_file
- picardtools_path
- qccollect_store_metrics_outfile
Expand Down
2 changes: 1 addition & 1 deletion definitions/rd_dna_parameters.yaml
Expand Up @@ -10,7 +10,7 @@ custom_default_parameters:
- bwa_mem2_build_reference
- exome_target_bed
- infile_dirs
- install_config_file
- container_config_file
- pedigree_fam_file
- picardtools_path
- qccollect_store_metrics_outfile
Expand Down
2 changes: 1 addition & 1 deletion definitions/rd_dna_vcf_rerun_parameters.yaml
Expand Up @@ -8,7 +8,7 @@ custom_default_parameters:
- conda_path
- exome_target_bed
- infile_dirs
- install_config_file
- container_config_file
- pedigree_fam_file
- picardtools_path
- reference_dir
Expand Down
2 changes: 1 addition & 1 deletion definitions/rd_rna_parameters.yaml
Expand Up @@ -8,7 +8,7 @@ custom_default_parameters:
- conda_path
- fusion_select_file
- infile_dirs
- install_config_file
- container_config_file
- pedigree_fam_file
- picardtools_path
- qccollect_store_metrics_outfile
Expand Down
6 changes: 3 additions & 3 deletions lib/MIP/Active_parameter.pm
Expand Up @@ -50,9 +50,9 @@ BEGIN {
remove_sample_id_from_gender
set_conda_paths
set_default_analysis_type
set_default_container_config_file
set_default_human_genome
set_default_infile_dirs
set_default_install_config_file
set_default_parameter
set_default_pedigree_fam_file
set_default_program_test_file
Expand Down Expand Up @@ -2215,7 +2215,7 @@ sub set_include_y {
return;
}

sub set_default_install_config_file {
sub set_default_container_config_file {

## Function : Set default install config file to active parameters
## Returns :
Expand All @@ -2242,7 +2242,7 @@ sub set_default_install_config_file {
check( $tmpl, $arg_href, 1 ) or croak q{Could not parse arguments!};

## Build default for mip install config
my $path = catfile( $Bin, qw{ templates mip_install_config.yaml } );
my $path = catfile( $Bin, qw{ templates mip_container_config.yaml } );

$active_parameter_href->{$parameter_name} = $path;
return;
Expand Down
2 changes: 1 addition & 1 deletion lib/MIP/Cli/Mip/Analyse.pm
Expand Up @@ -155,7 +155,7 @@ q{Check analysis output and sets the analysis run status flag to finished in sam
);

option(
q{install_config_file} => (
q{container_config_file} => (
documentation => q{File with install configuration parameters in YAML format},
is => q{rw},
isa => Str,
Expand Down
10 changes: 9 additions & 1 deletion lib/MIP/Cli/Mip/Download.pm
Expand Up @@ -101,6 +101,14 @@ sub _build_usage {
)
);

option(
q{container_config_file} => (
documentation => q{File with install configuration parameters in YAML format},
is => q{rw},
isa => Str,
)
);

option(
q{core_ram_memory} => (
cmd_tags => [q{Default: 5}],
Expand Down Expand Up @@ -148,7 +156,7 @@ sub _build_usage {
);

option(
q{install_config_file} => (
q{container_config_file} => (
documentation => q{File with install configuration parameters in YAML format},
is => q{rw},
isa => Str,
Expand Down
21 changes: 21 additions & 0 deletions lib/MIP/Cli/Mip/Install.pm
Expand Up @@ -78,6 +78,16 @@ sub _build_usage {
)
);

option(
q{container_directory_path} => (
cmd_tags => [q{Default: "<conda_path>/<env>/bin"}],
documentation =>
q{Save singularity images to directory. Requires singularity_local_install option},
is => q{rw},
isa => Str,
)
);

option(
q{environment_name} => (
cmd_aliases => [qw{ envn }],
Expand Down Expand Up @@ -143,6 +153,17 @@ sub _build_usage {
),
);

option(
q{singularity_local_install} => (
cmd_tags => [q{Default: off}],
documentation =>
q{Save singularity images to sif and update run instructions for offline mip execution},
is => q{rw},
isa => Bool,
required => 0,
),
);

option(
q{skip_programs} => (
cmd_aliases => [qw{ skip }],
Expand Down
16 changes: 8 additions & 8 deletions lib/MIP/Config.pm
Expand Up @@ -94,32 +94,32 @@ sub check_cmd_config_vs_definition_file {
sub get_install_containers {

## Function : Get install containers from install config file
## Returns : $install_config{container}
## Arguments: $install_config_file => File with containers from install config
## Returns : $container_config
## Arguments: $container_config_file => File with containers from install config

my ($arg_href) = @_;

## Flatten argument(s)
my $install_config_file;
my $container_config_file;

my $tmpl = {
install_config_file => {
container_config_file => {
defined => 1,
required => 1,
store => \$install_config_file,
store => \$container_config_file,
strict_type => 1,
},
};

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

my %install_config = read_from_file(
my %container_config = read_from_file(
{
format => q{yaml},
path => $install_config_file,
path => $container_config_file,
}
);
return %{ $install_config{container} };
return %container_config;
}

sub parse_config {
Expand Down

0 comments on commit 617ec9b

Please sign in to comment.