Skip to content

Commit

Permalink
fix(svdb and gatk): Modified svdb and gatk recipe
Browse files Browse the repository at this point in the history
- Allow emptry string out tag vcf keys with svdb
- Fixed contig specific genomicsdb to prevent collisions
  • Loading branch information
henrikstranneheim committed Apr 30, 2019
1 parent 14f0c54 commit e7e76be
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 11 deletions.
2 changes: 1 addition & 1 deletion definitions/rd_dna_parameters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ recipe_time:
snpeff: 10
sv_annotate: 2
sv_combinevariantcallsets: 2
sv_rankvariant: 2
sv_rankvariant: 10
sv_reformat: 1
sv_varianteffectpredictor: 10
sv_vcfparser: 2
Expand Down
11 changes: 7 additions & 4 deletions lib/MIP/Recipes/Analysis/Gatk_genotypegvcfs.pm
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ BEGIN {
use base qw{ Exporter };

# Set the version for version checking
our $VERSION = 1.14;
our $VERSION = 1.15;

# Functions and variables which can be optionally exported
our @EXPORT_OK = qw{ analysis_gatk_genotypegvcfs };
Expand Down Expand Up @@ -244,6 +244,7 @@ sub analysis_gatk_genotypegvcfs {
my @sample_vcf_path_lines;
my $sample_name_map_path;

SAMPLE_ID:
while ( my ( $sample_id_index, $sample_id ) =
each @{ $active_parameter_href->{sample_ids} } )
{
Expand Down Expand Up @@ -291,10 +292,12 @@ sub analysis_gatk_genotypegvcfs {
);

}
my $genomicsdb_file_path =
$outfile_path_prefix . $UNDERSCORE . q{DB} . $UNDERSCORE . $contig;
gatk_genomicsdbimport(
{
FILEHANDLE => $FILEHANDLE,
genomicsdb_workspace_path => $outfile_path_prefix . $UNDERSCORE . q{DB},
genomicsdb_workspace_path => $genomicsdb_file_path,
intervals_ref => [$contig],
infile_paths_ref => \@genotype_infile_paths,
java_use_large_pages => $active_parameter_href->{java_use_large_pages},
Expand All @@ -317,8 +320,8 @@ sub analysis_gatk_genotypegvcfs {
FILEHANDLE => $FILEHANDLE,
include_nonvariant_sites =>
$active_parameter_href->{gatk_genotypegvcfs_all_sites},
infile_path => q{gendb://} . $outfile_path_prefix . $UNDERSCORE . q{DB},
intervals_ref => [$contig],
infile_path => q{gendb://} . $genomicsdb_file_path,
intervals_ref => [$contig],
java_use_large_pages => $active_parameter_href->{java_use_large_pages},
memory_allocation => q{Xmx} . $JAVA_MEMORY_ALLOCATION . q{g},
outfile_path => $outfile_path{$contig},
Expand Down
11 changes: 6 additions & 5 deletions lib/MIP/Recipes/Analysis/Sv_annotate.pm
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ BEGIN {
use base qw{ Exporter };

# Set the version for version checking
our $VERSION = 1.10;
our $VERSION = 1.11;

# Functions and variables which can be optionally exported
our @EXPORT_OK = qw{ analysis_sv_annotate };
Expand Down Expand Up @@ -279,10 +279,11 @@ sub analysis_sv_annotate {
## Get parameters
# Split query_db_tag to decide svdb input query fields
# FORMAT: filename|OUT_FREQUENCY_INFO_KEY|OUT_ALLELE_COUNT_INFO_KEY|IN_FREQUENCY_INFO_KEY|IN_ALLELE_COUNT_INFO_KEY
my (
$query_db_tag, $out_frequency_tag, $out_allele_count_tag,
$in_frequency_tag, $in_allele_count_tag
) = split /[|]/sxm, $query_db_tag_info;
my ( $query_db_tag, $out_frequency_tag_suffix, $out_allele_count_tag_suffix,
$in_frequency_tag, $in_allele_count_tag )
= split /[|]/sxm, $query_db_tag_info;
my $out_frequency_tag = $out_frequency_tag_suffix ||= $EMPTY_STR;
my $out_allele_count_tag = $out_allele_count_tag_suffix ||= $EMPTY_STR;

svdb_query(
{
Expand Down
2 changes: 1 addition & 1 deletion mip-check
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ do
fi

## Run perltidy
if [[ "$(perltidy --maximum-line-length=90 --iterations=2 -b -bext='/' $infile -gt 0 ]]; then
if [[ "$(perltidy --maximum-line-length=90 --iterations=2 -b -bext='/' $infile)" -gt 0 ]]; then
echo >&2 "There was an error when running perltidy on $infile; please see the error file for more info"
exit 1
fi
Expand Down

0 comments on commit e7e76be

Please sign in to comment.