<commit_before><commit_msg>a script to fix the header on prokka genbank files<commit_after>#!/usr/bin/env perl

use strict;
use warnings;
use Bio::Perl;
use File::Basename qw/fileparse basename dirname/;

exit main();

sub main{
  die usage() if(!@ARGV);
  
  my($infile)=@ARGV;
  my $in=Bio::SeqIO->new(-file=>$infile,-verbose=>-1);
  my $out=Bio::SeqIO->new(-format=>"genbank");
  my $i=0;
  while(my $seq=$in->next_seq){
    my $id=sprintf("contig%06d",++$i);
    $seq->id($id);
    $out->write_seq($seq);
  }
  return 0;
}

sub usage{
  local $0=basename $0;
  "$0: Fixes headers in genbank files
  Usage: $0 in.gbk > out.gbk
  "
}
{'fraction_non_alphanumeric': 0.1968503937007874, 'fraction_numerical': 0.014173228346456693, 'mean_word_length': 4.170731707317073, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4467665', 'n_tokens_mistral': 271, 'n_tokens_neox': 266, 'n_words': 59}