######cuffdiff 输出结果提取
#!/usr/bin/perl
use strict;use warnings;
use FileHandle;
my($file)=@ARGV;
my $in=FileHandle->new("< $file");
my $header=<$in>;
my @header=split("\t", $header);
my @num;
for(my $i=0; $i<@header; $i++){
if($header[$i]=~/tracking_id/ or $header[$i]=~/FPKM/){
push @num, $i;
print "$header[$i]\t";
}
}
print "\n";
while(<$in>){
chomp;
my @arr=split("\t", $_);
foreach my $i (@num){
print "$arr[$i]\t";
}
print "\n";
}
网友评论