How to properly annotate sequence variants and errors in a GenBank file format and how to keep track of successive versions of a GenBank file

EDIT

By thinking over the issue, I realized it was mixing two linked but separate questions:

• Q1. How to handle the situation when there are divergences between a GenBank file and an actual or theoretical molecule:

• Should the difference be indicated in the feature table? If so, with which feature key? And if not, how should it be indicated or what should be done?

• Further, when indicating a divergence using a feature key, which should be considered the reference: the file or the molecule?

• Q2. How to keep track of changes between versions of a GenBank file when corrections or updates are made?

I have thus re-titled the question accordingly, and by making further researches into the issues I found what seems to me the appropriate solutions (see my answer below).

ORIGINAL QUESTION

Background I am maintaining a database of sequence files describing a collection of bacterial strains and plasmids that we have in our lab.

I am confronted to two sorts of issues:

• some sequence files contain errors (see comments below for examples of errors)
• other sequence files describe theoretical sequences of molecules that themselves contain variations (mutations, insertion or deletions) that occurred during the molecular cloning process.

Objective I want to annotate the sequences to mark those errors and variations using the GenBank format. However, from the feature keys of the GenBank format described on the INSDC website, it is not clear to me which feature key should be used in each case, essentially this is either 'variation' or 'misc_description'.

Example To better explain the confusion, here below are what seems to me the most relevant feature keys, and my comment of the problem I have with them:

Feature key           variation
Definition            a related strain contains stable mutations from the same
gene (e.g., RFLPs, polymorphisms, etc.) which differ
from the presented sequence at this location (and
possibly others);
...
Comment               used to describe alleles, RFLP's,and other naturally
occurring mutations and  polymorphisms;
>>> variability arising as a result of genetic
manipulation (e.g. site directed mutagenesis) should
be described with the misc_difference feature;


According to the line marked >>> above, the feature key misc_difference should be used...

Feature Key           misc_difference
Definition            feature sequence is different from that presented in the
entry and cannot be described by any other difference
key (old_sequence, variation, or modified_base);
...
Comment               the misc_difference feature key should be used to
describe variability that arises as a result of
genetic manipulation (e.g. site directed mutagenesis);
>>> use /replace="" to annotate deletion, e.g.
misc_difference 412..433
/replace=""


But now, according to the example marked >>> above, it means the variation (here a deletion) is NOT in the considered entry...

Question So how are variations (mutation, insertion, deletion, errors) correctly described in Genbank given that are actually present in an entry ?

• This is a good question. One thing I'm puzzled by are 'some sequence files contain errors' if its an ambiguity that is simply dealt with using the degenerate code, e.g. R for A or G ambiguity, N for total ambiguity. If its formatting errors within the file, I'd personally remove them.
– M__
Mar 17 at 13:32
• @M__ Thank you for the comment. By "errors" I don't mean "ambiguities", I mean sequence files that are not accurate in the sense that the sequence they contain is different from the sequence carried by the molecule they are supposed to describe as checked by sequencing. One could then just correct or discard the files, but for some of them, for the sake of archiving and keeping track of the developments, I would like to be able to annotate those errors. Mar 17 at 13:49
• @M__ Following up your (temporary ?) answer below: * Examples of errors: (i) a feature is properly annotated, but the sequence given is incorrect, (ii) a feature is correctly mentioned, but the sequence span is incorrect (iii) the name of a feature is incorrect (wrong variant for example). * Examples of "variations": (i) during the cloning process a T mutated to a G (variation = 'mutation') (ii) during the cloning process some bases got inserted/deleted (variation = 'insertion' or 'deletion' or 'indel'). Let me know if more details can help. Mar 17 at 15:24
• @M__ That's true, I can see that... Yes, I think too that the most important aspects are mutations (variations), seconded by errors in the sequence data (over annotation errors). Thank you very much again for looking into this. Mar 17 at 19:00
• okay post-updated, official response below.
– M__
Mar 17 at 21:20

(mutations, insertion or deletions) that occurred during the molecular cloning process.

I asked NCBI directly and their response is:

For natural genetic variation use 'Variation' feature;

For 'artificial' genetic variation (lab-produced by genetic modification) then use 'misc_difference'.

In summary in all scenarios its singly the 'misc_differences' that are used (see Conclusion).

So in my scenario where I want to screen out targeted mutagenesis its the 'misc_difference', i.e. the second option of the two you present. This is also true in your second scenario because it is changes possibly unintentional, possibly random mutagenesis / or just unintentional errors during cloning. Finally, this is also true for SOME of the 'errors' you are reporting in comments:

• for the first i, ii and iii that appears to be just correcting stuff - administration, just cross-check with those submitting.
• for 'variations' the second i and ii in comments, that falls into the 'misc_difference', because a form of mutagenesis, albeit probably unintentional.

Conclusion The 'variation' feature description isn't clear given the description you reported against NCBI's official Helpdesk response. Its a fair question, its a clear answer, but doesn't explain why the description is confusing.

On 'errors' of mis-identification, e.g. correctly identified e.g. via local Blast or Blat, e.g. sequenced the wrong target, I would use an internal marker, e.g. returned to contributor for comment. Pass it back to the contributor and ask for their input and depending what they say simply mark the record in the 'Comments section' e.g. originally defined as XX. The contributor could have made all sorts of different errors, e.g. annotation - copied and pasted the wrong stuff - experimental anything and you need to give them a chance to respond. Uploading these records on an external database, i.e. Genbank, needs a joint agreement with all parties concerned because it is certainly valid information for someone.

Note, the official blurb here, doesn't appear informative:

Disrupted genes and gene fragments

Sometimes a genome will have adjacent or nearby genes that seem to be only part of a protein. In many cases these indicate a possible problem with the sequence and/or annotation. A related issue is the presence of internal stop codons in the conceptual translation of a CDS that looks like it should be a real CDS. These problems may be due to a variety of reasons, including mutations or sequencing or assembly artifacts. They can be annotated in a number of ways:

Annotate the gene with /pseudo to indicate that there is a problem with the gene. Note that this qualifier does NOT mean that the gene is a pseudogene. (see point 2, below, if it is known that the gene IS a pseudogene) If multiple gene fragments were present initially, then add a single gene feature which covers all of the potential coding regions and add the pseudo qualifier. If known, a note qualifier may be added indicating why this gene is disrupted, for example:

 1        200     gene
gene    phoA
gene_desc     alkaline phosphatase
locus_tag     OBB_0001
pseudo
note    nonfunctional due to frameshift


Overview

To properly address the questions, each possible case must be listed:

• Case 1: divergence between sequences (sequence in the file vs sequence of the molecule); two cases:

a- (wrong) sequence in the file vs (correct) sequence in the molecule

b- ("correct", theoretical) sequence in the file vs (actual, mutated) sequence in the molecule

• Case 2: divergence between a feature annotation in the file vs the correct ("true" or reference) biological feature; three cases:

a- wrong location of the feature

b- wrong feature name

c- variant sequence of the feature

Case 1a: The sequence in the GenBank file must be corrected and the version number of the file must be incremented (see Q2).

Case 1b: A new GenBank file consistent with the actual molecule must be created and the misc_difference feature key must be used to annotate the variations where relevant.

Cases 2a and 2b: Feature information in the GenBank file must be corrected and the Modification Date of the file must be updated (see Q2).

Case 2c: The misc_difference feature must be used to annotate the variation and the Modification Date of the file must be updated if necessary (see Q2).

Q1. How to handle the situation when there are divergences between a GenBank file and an actual or theoretical molecule?

The misc_difference feature key

First, let's analyse the situation with the misc_difference feature key. According to the INSDC documentation:

Feature Key           misc_difference

Definition            feature sequence is different from that presented
in the entry and cannot be described by any other
difference key (old_sequence, variation, or modified_base);

Optional qualifiers   /allele="text"
/clone="text"
/db_xref="<database>:<identifier>"
/experiment="[CATEGORY:]text"
/gene="text"
/gene_synonym="text"
/inference="[CATEGORY:]TYPE[(same species)][:EVIDENCE_BASIS]"
/locus_tag="text" (single token)
/map="text"
/note="text"
/old_locus_tag="text" (single token)
/phenotype="text"
/replace="text"
/standard_name="text"

Comment               the misc_difference feature key should be used to
describe variability that arises as a result of
genetic manipulation (e.g. site directed mutagenesis);
use /replace="" to annotate deletion, e.g.
misc_difference 412..433
/replace=""


From the Definition above, there is still some ambiguity as to what situation is described. Indeed, "feature sequence is different from that presented in the entry" can describe both of the following cases:

• the sequence in the file and/or in the molecule is not the one expected for the feature annotated

• the sequence in the molecule is not the one represented in the file

Note: In fact, as we will see below, there should be no divergence between the sequence in the file and the sequence of the molecule.

As for the Comment that says that "the misc_difference feature key should be used to describe variability that arises as a result of genetic manipulation (e.g. site directed mutagenesis)", it does not really clarify which of the two cases above is the one intended. Further, the example given in the Comment, which at first sight seems more enlightening, still carries some ambiguity. It says that to annotate a deletion, one should use:

misc_difference 412..433
/replace=""


All in all, it implies that the deletion is in the molecule (vs in the represented sequence), that it arose as a result of genetic manipulation and is therefore indicated in the file as explained above.

However, it is very counter-intuitive, and not very practical when searching sequences of variants among sequence files, to have a sequence file that is supposed to describe a molecule and in which the sequence is actually different from the sequence encountered in the molecule it is supposed to describe.

And indeed, this view goes against common observed recent practice where the misc_difference feature key is used to indicate how to go from the sequence represented in the sequence file to another version:

•      misc_difference 308..310
/gene="mucA"
/note="conflict: deletion"
/citation=[1]
/replace=""


The indicated deletion is not in the sequence but is a way to go from the sequence to a previously reported CDS sequence for the annotated gene.

Translation of the CDS sequence in the GenBank file:

MKVDIFESSGASRVHSIPFYLQRISAGFPSPAQGYEKQELNLHEYCVRHPSATYFLRVSGSSMEDGRIHDGDVLVVDRSLTASHGSIVVACIHNEFTVKRLLLRPRPCLMPMNKDFPVYYIDPDNESVEIWGVVTHSLIEHPVCLR*


Previously reported CDS (see: https://www.ncbi.nlm.nih.gov/nuccore/M13388; hyphen/dash in the sequence added by me to mark the difference)

MKVDIFESSGAS-VHSIPFYLQRISAGFPSPAQGYEKQELNLHEYCVRHPSATYFLRVSGSSMEDGRIHDGDVLVVDRSLTASHGSIVVACIHNEFTVKRLLLRPRPCLMPMNKDFPVYYIDPDNESVEIWGVVTHSLIEHPVCLR*

• Example 2

In each of the GenBank files below, the misc_difference feature key is used to indicate how to go from the (mutated) sequence in the GenBank file to the sequence of the "wild type".

• Escherichia coli uidA gene for beta-glucuronidase mutant E413G, clone M2

https://www.ncbi.nlm.nih.gov/nuccore/AM180563.1

 misc_difference 1238
/gene="uidA"
recorded"
/note="site directed mutagenesis"
/compare=S69414.1
/allele="wild type"
/phenotype="Active GUS"
/replace="a"

• Escherichia coli uidA gene for beta-glucuronidase mutant C464R, clone M4

https://www.ncbi.nlm.nih.gov/nuccore/AM180564.1

misc_difference 1390
/gene="uidA"
recorded"
/note="site directed mutagenesis"
/compare=S69414.1
/allele="wild type"
/phenotype="Active GUS"
/replace="t"


•  misc_difference 137414..137415

/note="TT compared with single T in original ISCfr1
sequence that would result in two partial transposase
proteins. Confirmed as correct in raw sequence data."


Here again the misc_difference feature key is used to describe how to pass from the represented sequence to a previous sequence version of the considered gene.

So the misc_difference feature key is appropriate when the sequence in the sequence file does match the sequence in the molecule but does not (any more) match another reference sequence (possibly referred to by another gene-related feature) because variations in the sequence have occurred due to some genetic manipulation or, as in Example 3, due to discrepancy with previous sequencing results.

Thus, the misc_difference feature key is appropriate in Cases 1b and 2c, and the /replace qualifier should be used to indicate how to get from the represented sequence to the other reference sequence for the designated feature (in Example 3 above, the /note qualifier is used instead to describe the difference).

Other cases

There are three other cases left:

• Case 1a: the features in the GenBank file are consistent with the molecule, but the sequence in the file is wrong
• Cases 2a and 2b: the sequence in the GenBank file is consistent with the molecule, but information about some features is wrong

Those three cases can all be classified as a GenBank file containing errors (in contrast with case 1b where the "error" is in the obtained molecule and with case 2c where the information in the GenBank file is merely incomplete). A GenBank file containing errors is just not appropriate, and the solution here is simply to correct the GenBank file to accurately describe the corresponding molecule.

All that remains is to answer to the second question about how to track changes...

Q2. How to keep track of changes between versions of a GenBank file when corrections or updates are made?

Versioning and time-stamping GenBank files

GenBank files have two fields that can be used to track their history: the Modification Date field and the VERSION field.

The VERSION field uses an accession.version format, where the accession number is fixed and the version number is incremented only when the sequence data is modified.

See:

Note that only modifications in the sequence result in a change in the version number. Changes in annotations only affect the timestamp (Modification Date) of the file.

See:

With this information we can now describe how to properly keep track of the successive versions of a GenBank file in each of the cases described in Q1.

Proper way to keep track of modifications in GenBank files

Case 1a: (wrong) sequence in the file vs (correct) sequence in the molecule

The sequence in the file must be corrected and the version number of the file must be incremented by one.

Moreover the respective file versions (the former and the newer) must refer to each other in the COMMENT field of their respective header.

See:

Case 1b: ("correct", theoretical) sequence in the file vs (actual, mutated) sequence in the molecule

A new GenBank file and new molecule name must be created to accurately describe the variant molecule. The misc_difference feature key along with the /replace qualifier must be used as described above where it is deemed appropriate.

The gene-related features affected should keep the same /gene qualifier, but an /allele qualifier might be used to indicate the presence of a difference and the /note and /phenotype qualifiers can be used to indicate the reference sequence to which the allele should be compared to and any possible phenotypic consequence of the variation.

The misc_difference feature key can be given the same gene-related qualifier information as the gene where the difference occurs (/gene, /allele, /note...)

In the special case of variants unintentionally obtained during genetic construction or genetic manipulation, an altered name for the molecule and GenBank file might be used to reflect the fact that the corresponding sequence is different from the theoretically expected sequence, and the misc_difference feature key should be used to indicate any difference that occurred during the construction compared to the initially targetted sequence.

Cases 2a, 2b or 2c: wrong or incomplete feature data

The feature annotation in the file must be corrected and the Modification Date field must be updated according to the correction date.

Sequence revision history

Examples of revision history of some GenBank files

Here below is reproduced the description and usage of some feature keys and qualifiers that might be relevant to, or linked with, the question of how to describe and annotate sequence variants.

I grouped those definitions there as it might help one to distinguish the different types of variations and divergences and to understand and chose the appropriate term to annotate sequence variants.

Selected feature keys

gene

Feature Key           gene

Definition            region of biological interest identified as a gene
and for which a name has been assigned;

Optional qualifiers   /allele="text"
/db_xref="<database>:<identifier>"
/experiment="[CATEGORY:]text"
/function="text"
/gene="text"
/gene_synonym="text"
/inference="[CATEGORY:]TYPE[(same species)][:EVIDENCE_BASIS]"
/locus_tag="text" (single token)
/map="text"
/note="text"
/old_locus_tag="text" (single token)
/operon="text"
/product="text"
/pseudo
/pseudogene="TYPE"
/phenotype="text"
/standard_name="text"
/trans_splicing

Comment               the gene feature describes the interval of DNA that
corresponds to a genetic trait or phenotype; the feature is,
by definition, not strictly bound to it's positions at the
ends;  it is meant to represent a region where the gene is
located.


misc_difference

Feature Key           misc_difference

Definition            feature sequence is different from that presented
in the entry and cannot be described by any other
difference key (old_sequence, variation, or modified_base);

Optional qualifiers   /allele="text"
/clone="text"
/db_xref="<database>:<identifier>"
/experiment="[CATEGORY:]text"
/gene="text"
/gene_synonym="text"
/inference="[CATEGORY:]TYPE[(same species)][:EVIDENCE_BASIS]"
/locus_tag="text" (single token)
/map="text"
/note="text"
/old_locus_tag="text" (single token)
/phenotype="text"
/replace="text"
/standard_name="text"

Comment               the misc_difference feature key should be used to
describe variability that arises as a result of
genetic manipulation (e.g. site directed mutagenesis);
use /replace="" to annotate deletion, e.g.
misc_difference 412..433
/replace=""


modified_base

Feature Key           modified_base

Definition            the indicated nucleotide is a modified nucleotide and
should be substituted for by the indicated molecule
(given in the mod_base qualifier value)

Mandatory qualifiers  /mod_base=<modified_base>

Optional qualifiers   /allele="text"
/db_xref="<database>:<identifier>"
/experiment="[CATEGORY:]text"
/frequency="text"
/gene="text"
/gene_synonym="text"
/inference="[CATEGORY:]TYPE[(same species)][:EVIDENCE_BASIS]"
/locus_tag="text" (single token)
/map="text"
/note="text"
/old_locus_tag="text" (single token)

Comment               value is limited to the restricted vocabulary for
modified base abbreviations;


old_sequence

Feature Key           old_sequence

Definition            the presented sequence revises a previous version of the
sequence at this location;

Mandatory qualifiers  /citation=[number]
Or
/compare=[accession-number.sequence-version]

Optional qualifiers   /allele="text"
/db_xref="<database>:<identifier>"
/experiment="[CATEGORY:]text"
/gene="text"
/gene_synonym="text"
/inference="[CATEGORY:]TYPE[(same species)][:EVIDENCE_BASIS]"
/locus_tag="text" (single token)
/map="text"
/note="text"
/old_locus_tag="text" (single token)
/replace="text"

Comment               /replace="" is used to annotate deletion, e.g.
old_sequence 12..15
/replace=""
NOTE: This feature key is not valid in entries/records
created from 15-Oct-2007.


variation

Feature Key           variation

Definition            a related strain contains stable mutations from the same
gene (e.g., RFLPs, polymorphisms, etc.) which differ
from the presented sequence at this location (and
possibly others);

Optional qualifiers   /allele="text"
/db_xref="<database>:<identifier>"
/experiment="[CATEGORY:]text"
/frequency="text"
/gene="text"
/gene_synonym="text"
/inference="[CATEGORY:]TYPE[(same species)][:EVIDENCE_BASIS]"
/locus_tag="text" (single token)
/map="text"
/note="text"
/old_locus_tag="text" (single token)
/phenotype="text"
/product="text"
/replace="text"
/standard_name="text"

Comment               used to describe alleles, RFLP's,and other naturally
occurring mutations and  polymorphisms; variability arising
as a result of genetic manipulation (e.g. site directed
mutagenesis) should be described with the misc_difference
feature; use /replace="" to annotate deletion, e.g.
variation   4..5
/replace=""


Selected qualifiers

/allele

  Qualifier       /allele=
Definition      name of the allele for the given gene
Value format    "text"
Comment         all gene-related features (exon, CDS etc) for a given
gene should share the same /allele qualifier value;
the /allele qualifier value must, by definition, be
different from the /gene qualifier value; when used with
the variation feature key, the allele qualifier value
should be that of the variant.


/clone

  Qualifier       /clone=
Definition      clone from which the sequence was obtained
Value format    "text"
Example         /clone="lambda-hIL7.3"
Comment         not more than one clone should be specified for a given source
feature;  to indicate that the sequence was obtained from
multiple clones, multiple source features should be given.


/compare

  Qualifier       /compare=
Definition      Reference details of an existing public INSD entry
to which a comparison is made
Value format    [accession-number.sequence-version]
Example         /compare=AJ634337.1
Comment         not to be used for new entries from 14-MAY-2021; This qualifier
may be used on the following features: misc_difference, unsure,
old_sequence and variation.
The feature "old_sequence" must have either a
/citation or a /compare qualifier. Multiple /compare
qualifiers with different contents are allowed within a
single feature.
This qualifier is not intended for large-scale annotation
of variations, such as SNPs.


/function

  Qualifier       /function=
Definition      function attributed to a sequence
Value format    "text"
Example         function="essential for recognition of cofactor"
Comment         /function is used when the gene name and/or product name do not
convey the function attributable to a sequence.


/gene

  Qualifier       /gene=
Definition      symbol of the gene corresponding to a sequence region
Value format    "text"
Example         /gene="ilvE"


/locus_tag

  Qualifier       /locus_tag=
Definition      a submitter-supplied, systematic, stable identifier for a gene
and its associated features, used for tracking purposes
Value Format    "text"(single token)
but not "<1-5 letters><5-9 digit integer>[.<integer>]"
Example         /locus_tag="ABC_0022"
/locus_tag="A1C_00001"
Comment         /locus_tag can be used with any feature that /gene can be used
with; identical /locus_tag values may be used within an
entry/record, but only if the identical /locus_tag values are
associated with the same gene; in all other circumstances the
/locus_tag value must be unique within that entry/record.
Multiple /locus_tag values are not allowed within one feature for
entries created after 15-OCT-2004.
If a /locus_tag needs to be re-assigned the /old_locus_tag
qualifier should be used to store the old value. The /locus_tag
value should not be in a format which resembles INSD accession
numbers, accession.version, or /protein_id identifiers.


/map

  Qualifier       /map=
Definition      genomic map position of feature
Value format    "text"
Example         /map="8q12-q13"


/note

  Qualifier       /note=
Definition      any comment or additional information
Value format    "text"
Example         /note="This qualifier is equivalent to a comment."


/operon

  Qualifier       /operon=
Definition      name of the group of contiguous genes transcribed into a
single transcript to which that feature belongs.
Value format    "text"
Example         /operon="lac"


/phenotype

  Qualifier       /phenotype=
Definition      phenotype conferred by the feature, where phenotype is defined as
a physical, biochemical or behavioural characteristic or set of
characteristics
Value format    "text"
Example         /phenotype="erythromycin resistance"


/product

  Qualifier       /product=
Definition      name of the product associated with the feature, e.g. the mRNA of
an mRNA feature, the polypeptide of a CDS, the mature peptide of
a mat_peptide, etc.
Value format    "text"
Example         /product="trypsinogen" (when qualifier appears in CDS feature)
/product="trypsin" (when qualifier appears in mat_peptide
feature)
/product="XYZ neural-specific transcript" (when qualifier appears
in mRNA feature)


/pseudo

  Qualifier       /pseudo
Definition      indicates that this feature is a non-functional version of the
element named by the feature key
Value format    none
Example         /pseudo
Comment         The qualifier /pseudo should be used to describe non-functional
genes that are not formally described as pseudogenes, e.g. CDS
has no translation due to other reasons than pseudogenisation
events.
Other reasons may include sequencing or assembly errors.
In order to annotate pseudogenes the qualifier /pseudogene= must
be used indicating the TYPE which can be taken from the INSDC
controlled vocabulary for pseudogenes.


/pseudogene

  Qualifier       /pseudogene=
Definition      indicates that this feature is a pseudogene of the element
named by the feature key
Value format    "TYPE"
where TYPE is one of the following:
processed, unprocessed, unitary, allelic, unknown

Example         /pseudogene="processed"
/pseudogene="unprocessed"
/pseudogene="unitary"
/pseudogene="allelic"
/pseudogene="unknown"

Comment         TYPE is a term taken from the INSDC controlled vocabulary for
pseudogenes (http://www.insdc.org/documents/pseudogene-
qualifier-vocabulary):

processed: the pseudogene has arisen by reverse transcription
of a mRNA into cDNA, followed by reintegration into the genome.
Therefore, it has lost any intron/exon structure, and it might
have a pseudo-polyA-tail.

unprocessed: the pseudogene has arisen from a copy of the
parent gene by duplication followed by accumulation of random
mutations.
The changes, compared to their functional homolog, include
insertions, deletions, premature stop codons, frameshifts and a
higher proportion of non-synonymous versus synonymous
substitutions.

unitary: the pseudogene has no parent. It is the original gene,
which is functional is some species but disrupted in some way
(indels, mutation, recombination) in another species or strain.

allelic: a (unitary) pseudogene that is stable in the
population but importantly it has a functional alternative
allele also in the population. i.e., one strain may have the
gene, another strain may have the pseudogene.
MHC haplotypes have allelic pseudogenes.

unknown: the submitter does not know the method of
pseudogenisation.


/standard_name

  Qualifier       /standard_name=
Definition      accepted standard name for this feature
Value format    "text"
Example         /standard_name="dotted"
Comment         use /standard_name to give full gene name, but use /gene to
give gene symbol (in the above example /gene="Dt").