Skip to content

Commit 497e307

Browse files
committed
Directly invoke gunzip rather than the zless wrapper
Still need to enable all flags zless uses, especially -f and -q to transparently handle uncompressed files.
1 parent befbf46 commit 497e307

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

misc/roh-viz

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ sub process_data
154154
my ($opts) = @_;
155155

156156
print STDERR "Parsing $$opts{outdir}/roh.txt\n";
157-
open(my $in, '-|', 'zless', $$opts{roh_file}) or error("zless $$opts{roh_file}: $!");
157+
open(my $in, '-|', 'gunzip', '-cfq', $$opts{roh_file}) or error("gunzip $$opts{roh_file}: $!");
158158
while (my $line=<$in>)
159159
{
160160
chomp($line);
@@ -175,7 +175,7 @@ sub process_data
175175
push @{$$opts{roh}{$chr}{$smpl}},"$beg,$end,$nsnp,$qual";
176176
}
177177
}
178-
close($in) or error("close failed: zless $$opts{roh_file} (status=$?, error=$!)");
178+
close($in) or error("close failed: gunzip $$opts{roh_file} (status=$?, error=$!)");
179179

180180
my $bin_size = $$opts{bin_size};
181181
my %chr_len = ();

0 commit comments

Comments
 (0)