Contents
  1. SnapGene GTF Import Specification
  2. Gene Transcriptions
  3. About the Example File


1. SnapGene GTF Import Specification
====================================

Must have 9 columns, each separated by a tab (\t) character.
Otherwise, "Sorry, SnapGene doesn't understand the format of file myfile.gtf."

SnapGene skips blank lines.

Comments can appear at the end of a line. Anything after # will be treated as a comment.
Comment lines are skipped (lines starting with #).

Column 1: seqid
Sequence identifier
Must be the same for every feature line.

Column 2: source
Name of software program or service that generated the file.
If none or unknown, just place a dot (.).
SnapGene reads, but ignores, the value in this column.

Column 3: type
Genbank DNA type name.

SnapGene recognizes "5UTR", "3UTR", "exon", and "CDS".
Anything else imports as "misc_feature",
but see section "2. Gene Transcriptions" for exceptions.

Columns 4 and 5: start end
Start and end locations of the feature

  Start >= 1
  End   <= sequence length

For a circular sequence, features can wrap around.
Therefore, end can be larger than start so long as
end - start + 1 <= sequence length

Column 6: score
A dot (.) or a floating-point number.

Column 7: directionality (also known as strand)
Forward directional (+), reverse directional (-),
non-directional (.), or unknown directionality (?)

Column 8: phase
For a coding sequence (type equals "CDS"), specify 0, 1, or 2.
For a non-coding sequence, specify a dot (.).

  Phase  Directionality  Resulting Reading Frame
  0      forward (+)     +1
  1      forward (+)     +2
  2      forward (+)     +3
  0      reverse (-)     -1
  1      reverse (-)     -2
  2      reverse (-)     -3

Column 9: attributes
Must contain one or more attributes of the form:
  <attribute-name> <attribute-value>

Attributes are separated by a semicolon (;).

<attribute-name> may not contain space or tab characters.

If <attribute-value> is a text attribute, it must be surrounded by double quotes (").

  Good Examples:
    gene_id "mygene"; transcript_id "mytranscript";
    some_value 1;

  Bad Example (missing quotes):
    gene_id mygene; transcript_id mytranscript;

SnapGene determines the feature name by looking for the following attributes in turn:

  gene_name
  transcript_id
  gene_id
  siteModel

If none of these attributes is specified, the feature will simply be called "Feature".

Custom attribute keys:

  You can define your own attribute keys (and many third-party programs do).

  SnapGene will add /note qualifiers of the form:
    GTF key: value

End of column descriptions


2. Gene Transcriptions
======================
SnapGene examines all feature lines where the gene_id and transcript_id attributes are both present.

For each group of feature lines having the same values of both gene_id and transcript_id:

  An mRNA feature is created that contains one segment for each feature line having "exon" type.

  A CDS feature is created that contains one segment for each feature line having "CDS" type.
  The last segment is extended if there's a feature line having type "stop_codon".
  
  An intron feature is created if a feature line having type "intron_CNS" is present.

  Feature lines having "start_codon" type are ignored.
  The start codon's start/end should be emcompassed by the first CDS feature line
  (forward directional) or last CDS feature line (reverse directional).

3. About the Example File
=========================
Open gene_transcript.dna in SnapGene and then import gene_transcript.gtf.

gene_transcript:gtf: shows how to create a gene transcript

  Three features will be imported: a CDS feature and two mRNA features.

  Note that the feature line having "stop_codon" is used to extend the end
  of the CDS on the previous line.

  Also note the use of the gene_name attribute to provide custom names
  for these features.
