Skip to content

Commit

Permalink
Fix regression - ability handle chr with no pindel mapped reads, intr…
Browse files Browse the repository at this point in the history
…oduced in 3.x tree

Also samtools can read the header from a gz sam file modified to make this more
normalised so that no issues would occur if the first file is the only one with reads.
  • Loading branch information
keiranmraine committed Feb 21, 2019
1 parent 9455fb8 commit e349128
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions perl/lib/Sanger/CGP/Pindel/OutputGen/BamUtil.pm
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ sub sam_to_sorted_bam {
$command .= sprintf ' zcat %s | ', $sam_files->[0];
}
else {
my $first_file = shift @{$sam_files};
my $header_from = $sam_files->[0];
$command .= "cd $base_dir; ";
$command .= sprintf q{ (zcat %s ; zgrep -v '^@' %s) | }, $first_file, join q{ }, @{$sam_files};
$command .= sprintf q{ (samtools view -H %s ; zcat %s | grep -v '^@' ) | }, $header_from, join q{ }, @{$sam_files};
}

$command .= which('bamsort');
Expand Down

0 comments on commit e349128

Please sign in to comment.