contigA 4 5 0 1
contigB 10 1 1 0
etc.
####
#!/usr/bin/perl
use strict;
use warnings;
no warnings qw /syntax/;
sub zup {
join "\n" => map {join " " => map {shift @$_} @_} @{$_ [0]}
}
my @array1 = qw /ab bc cd de/;
my @array2 = qw /cc dd ee gg/;
my @array3 = qw /12 34 56 78/;
print zup \(@array1, @array2, @array3);
print "\n";
####
use strict;
use warnings;
my $infile=$ARGV[0];
open (IN,$infile) or die "cannot open $infile";
my %count_Bact; my %count_undef; my %count_ProphVir; my %count_Euk;
while (my $line=) {
chomp $line;
next if ($line =~/^#/) ;
my ($geneid,$cons_flag)=split(/\t/,$line);
my @geneid_columns=split(/_/,$geneid);
my $contig=join("_",$geneid_columns[0],$geneid_columns[1],$geneid_columns[2],$geneid_columns[3]);
if ($cons_flag eq "Bact"){
$count_Bact{$contig} ++;
}
if ($cons_flag eq "undef"){
$count_undef{$contig} ++;
}
if ($cons_flag eq "Proph_Vir" || $cons_flag eq "Vir" || $cons_flag eq "Proph"){
$count_ProphVir{$contig} ++;
}
if ($cons_flag eq "Euk"){
$count_Euk{$Euk} ++ ;
}
}
close (IN);