#!/usr/bin/perl use strict; use warnings; die "usage:perl $0 input output\n" unless @ARGV==2; open IN,"$ARGV[0]"; open OUT,">$ARGV[1]"; my $head=; chomp $head; my @head=split("\t",$head); print OUT join("\t",(@head[0..4],"copy",@head[5..9])),"\n"; while(){ chomp; my @line=split(/\t/,$_); my $cn=sprintf("%.2f",2**(1+$line[4])); if($cn<=1 or $cn>=3.5){ print OUT join("\t",(@line[0..4],$cn,@line[5..9])),"\n"; } }