#!/usr/bin/perl

if (-e "test.wig") { exit; }

$out = "no";
open(IN, "/ddn/gs1/home/grimmsa/pwade/former_wade/ruifang/NewMethod-ATAC-RNA-Nov2020/joint-ATACx8/nucleosome_heatmaps/danpos_Omni/pooled/files_BAM_Omni.artificial_mono.smooth.wig");
open(OUT, ">test.wig");
while (<IN>) {
  if ($_ =~ /^fixedStep/) { if ($_ =~ /\_/) { $out = "no"; } else { $out = "yes"; } }
  if ($out eq "yes") { print OUT "$_"; }
}
close(IN); close(OUT);
