Skip to content

Commit

Permalink
compress before renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
jemten committed Apr 25, 2023
1 parent 7a35a52 commit 47fb949
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions lib/MIP/Recipes/Analysis/Me_filter.pm
Original file line number Diff line number Diff line change
Expand Up @@ -325,18 +325,13 @@ sub analysis_me_filter {
);
say {$filehandle} $NEWLINE;

### Special case: replace all clinical mitochondrial variants with research mitochondrial variants
$select_mt_outfile_path =
$active_parameter_href->{sv_vcfparser_add_all_mt_var}
? $mt_outfile_path
: $select_mt_outfile_path;
say {$filehandle} q{## Compress and index vcfparser output};

my @files_to_compress_and_index = (
$mt_outfile_path, $non_mt_outfile_path,
$select_mt_outfile_path, $select_non_mt_outfile_path,
);

say {$filehandle} q{## Compress and index vcfparser output};
FILE_TO_COMPRESS_AND_INDEX:
foreach my $file_to_compress_and_index (@files_to_compress_and_index) {

Expand All @@ -360,6 +355,12 @@ sub analysis_me_filter {
say {$filehandle} $NEWLINE;
}

### Special case: replace all clinical mitochondrial variants with research mitochondrial variants
$select_mt_outfile_path =
$active_parameter_href->{sv_vcfparser_add_all_mt_var}
? $mt_outfile_path
: $select_mt_outfile_path;

## Concatenate MT variants with the rest
my @file_sets = (
{
Expand All @@ -374,6 +375,7 @@ sub analysis_me_filter {
);

say {$filehandle} q{## Concatenate, sort and index};

OUTFILE_SET:
foreach my $outfile_set (@file_sets) {

Expand Down

0 comments on commit 47fb949

Please sign in to comment.