#!/usr/bin/perl -w 

$genome='Smik';


open(IF,"$genome/$genome.ultrascaf");
while($a=<IF>){
if($a=~ /^>/){
@b=split(/[_ ]/,$a);
$head = $b[1];
print ">chr$head\n";
}
else{print $a;}
}
close(IF);

$contig = "";
for($i=0;$i<2000;$i++){$contig .= "N";}

open(IF,"$genome/$genome.unplaced");
print ">chrUn\n";
print "$contig\n";
while($a=<IF>){
if($a=~ /^>/){
@b=split(/[_ ]/,$a);
$head = $b[1];
#print ">chr$head\n";
print "$contig\n";
}
else{print $a;}
}
close(IF);

print "$contig\n";




