Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions bin/prokka
Original file line number Diff line number Diff line change
Expand Up @@ -422,9 +422,16 @@ while (my $seq = $fin->next_seq) {
}
$ncontig++;
# http://www.ncbi.nlm.nih.gov/genomes/static/Annotation_pipeline_README.txt
# leave contigs names as-is unless they are in --compliant mode or want --centre set
if ($centre) {
$seq->id( sprintf "gnl|$centre|${contigprefix}contig%06d", $ncontig );
# leave contig names as-is unless they are in --compliant mode or want --centre set
if ($centre) {
# try to append the original (often shorter than contigXXXXXX) name to $contigprefix even when using --centre/--compliant
if (exists $seq{$seq->id}) {
msg("This contig ID is not unique, and will be replaced with an auto-generated one: ".$seq->id);
$seq->id( sprintf "gnl|$centre|${contigprefix}contig%06d", $ncontig );
}
else {
$seq->id( sprintf "gnl|$centre|${contigprefix}%s", $seq->id );
}
}
if (length($seq->id) > $MAXCONTIGIDLEN) {
msg("Contig ID must <= $MAXCONTIGIDLEN chars long: ".$seq->id);
Expand Down