How to plot genomic.fna fasta file in R using Gviz?

I downloaded the genome of Staph aureus as DNA sequence from NCBI. I would like to visualize it using Gviz. Is Gviz the right tool to visualize genomes? What are the necessary steps from the sequence file to an object that can be used in Gviz? I searched the user guide and the reference manual. It is stated that it is possible to use fasta file, but not how to use them.

We will generate lots of genomes that we will have to annotate and compare. S aureus is not S aureus. There is a spectrum of phenotypes, they all have a different genomes. And we will also not be limited to SA. The question here is not how to annotate the genome, but rather the steps necessary to visualize something and get going. It is my first steps with genomic data, I don't even know what makes sense.

Here is the head of the file:

>NC_007795.1 Staphylococcus aureus subsp. aureus NCTC 8325 chromosome, complete genome
CGATTAAAGATAGAAATACACGATGCGAGCAATCAAATTTCATAACATCACCATGAGTTTGGTCCGAAGCATGAGTGTTT
ACAATGTTCGAACACCTTATACAGTTCTTATACATACTTTATAAATTATTTCCCAAACTGTTTTGATACACTCACTAACA
GATACTCTATAGAAGGAAAAGTTATCCACTTATGCACATTTATAGTTTTCAGAATTGTGGATAATTAGAAATTACACACA
AAGTTATACTATTTTTAGCAACATATTCACAGGTATTTGACATATAGAGAACTGAAAAAGTATAATTGTGTGGATAAGTC
GTCCAACTCATGATTTTATAAGGATTTATTTATTGATTTTTACATAAAAATACTGTGCATAACTAATAAGCAAGATAAAG
TTATCCACCGATTGTTATTAACTTGTGGATAATTATTAACATGGTGTGTTTAGAAGTTATCCACGGCTGTTATTTTTGTG
TATAACTTAAAAATTTAAGAAAGATGGAGTAAATTTATGTCGGAAAAAGAAATTTGGGAAAAAGTGCTTGAAATTGCTCA
AGAAAAATTATCAGCTGTAAGTTACTCAACTTTCCTAAAAGATACTGAGCTTTACACGATTAAAGATGGTGAAGCTATCG
TATTATCGAGTATTCCTTTTAATGCAAATTGGTTAAATCAACAATATGCTGAAATTATCCAAGCAATCTTATTTGATGTT

• what do you want to visualize? the proteins, the GC content, some other features etc.? – Chris_Rands Jan 11 at 13:30
• Ultimately, I would like to annotate protein coding regions and compare them to other genomes. – Sören Jan 11 at 13:40
• What have you tried to do? Which code have you tried and what errors and message you got? – llrs Jan 11 at 13:57
• I would like to visualize annotated genes and compare a set of genomes. – Sören Jan 11 at 17:48
• This question seems too broad. Could you expand what do you want to compare in a set of genomes, or what type of annotation do you want to see (coding regions or proteins or ORF?)? Also please decide if your question is about seeing annotations OR compare a set of genomes (to compare genomes one would usually calculate some metrics in each genome and compare them). Remember you can edit the question. – llrs Jan 14 at 9:01

I am not familiar with Gviz, but I am familiar with a variety of tools for visualizing genome features. At the scale of entire microbial genomes, the primary sequence itself is an overwhelming amount of information and can't really be visualized in a meaningful way by itself. I mean, you could color the nucleotides, but few patterns in DNA can be discerned by an unassisted human eye.

What we're typically interested in are features encoded in the genome sequence: protein-coding genes, non-coding RNAs, transposable elements, regulatory elements, binding sites, epigenetic modifications, and so on. A particular scientist is usually only interested in a subset of these features, based on what particular questions they are investigating. In your comment you say you "would like to annotate protein coding regions and compare them to other genomes", so it seems like we're on the same page here.

Visualization tools often display the genome linearly (even, for example, if it's a circular bacterial chromosome), zoomed out so that the nucleotide sequence isn't visible, and overlayed with boxes, arrows, or other glyphs representing the genes or other features of interest. Here are some examples:

In each of these cases, the visualization software is not doing the work to determine the positions of the genes and other genome features. This was done independently using tools designed for this task, storing the information in an annotation file in GFF3, GTF, or BED format. The visualization tools need both the genome sequence (in Fasta format) and one or more annotation files (in GFF3, GTF, or BED format) to make meaningful visualizations.

• I am touching on genomics in a project. So I am quite new to the field and don't really know what is possible, feasible. Thanks a lot for your answer. I am working with bacterial genomes. – Sören Jan 11 at 15:33
• I use prokka to annotate the genome. – Sören Jan 11 at 16:32
• Prokka should create a GFF3 file, which you can use with the Fasta file to visualize your genome. But of course, you're not the first person to annotate S. aureus, so you may also consider downloading a reference annotation for the species from NCBI RefSeq. – Daniel Standage Jan 11 at 17:12
• We will generate lots of genomes that we will have to annotate though. S aureus is not S aureus. There is a spectrum of phenotypes, they all have a different genome. And we will also not be limited to SA. The question here is not how to annotate the genome, but rather the steps necessary to visualize something. – Sören Jan 11 at 17:45
• Great. That type of background is very useful to include in the original question, so that the community knows how to focus their answers. I hope this helped! – Daniel Standage Jan 11 at 17:54