D3GB from Fasta and GFF files in R

This tutorial shows how to create a D3GB genome browser from GFF and Fasta files with the R package. This will create a complete genome browser of Saccharomyces cerevisiae. Install the D3GB package and write the following code in R:

library(D3GB)

# Download fasta file
fasta <- tempfile()
download.file('ftp://ftp.ensembl.org/pub/release-84/fasta/saccharomyces_cerevisiae/dna/Saccharomyces_cerevisiae.R64-1-1.dna.toplevel.fa.gz',fasta)

# Genome browser generation.
# It creates a genome browser ready to be viewed in Firefox.
# For a server version, ready to be shared with Apache as a Website, set the parameter server=True
gb <- genomebrowser(getAssemblyFromFasta(fasta), dir = "saccharomyces_genomebrowser")

genome_addSequence(gb,fasta)

# Download gff file and add to the genome browser
gff <- tempfile()
download.file('ftp://ftp.ensembl.org/pub/release-84/gff3/saccharomyces_cerevisiae/Saccharomyces_cerevisiae.R64-1-1.84.gff3.gz',gff)

genome_addGFF(gb,gff)


view result