#!/usr/bin/perl -w
use strict;
open FA,"<$ARGV[0]";
print "GCpercent\tavgDepth\n";
$/=">";<FA>;
while(<FA>){
	$_ =~ s/>//g;
	my ($ID,$seq)=(split /\n/,$_,2)[0,1];
	my ($id,$size,$cov,$cir)=(split /\s+/,$ID,4)[0,1,2,3];
	$cov =~ s/cov=//g;
	$size =~ s/size=//g;
	my $gc=$seq=~tr/GCgc/GCgc/;
	my $GCpercent = 100*$gc/$size;
	print "$GCpercent\t$cov\n";
}
$/="\n";
close FA;

