Title: | Interactive Genome Browser |
---|---|
Description: | Creates interactive genome browser. It joins the data analysis power of 'R' and the visualization libraries of 'JavaScript' in one package. Barrios, D. & Prieto, C. (2017) <doi:10.1089/cmb.2016.0213>. |
Authors: | Carlos Prieto [aut, cph, cre] , David Barrios [aut] |
Maintainer: | Carlos Prieto <[email protected]> |
License: | GPL-2 | GPL-3 |
Version: | 2.0 |
Built: | 2024-11-27 06:28:18 UTC |
Source: | CRAN |
genomebrowser
or genomemap
.createAssembly
create assemblies for their use as parameter of genomebrowser
or genomemap
.
createAssembly(name, size)
createAssembly(name, size)
name |
a vector with the chomosome or scaffold names. |
size |
a vector with the chomosome or scaffold sizes. |
a data frame in BED format to be used as an assembly in genomebrowser
or genomemap
.
David Barrios and Carlos Prieto. Bioinformatics, University of Salamanca. See http://d3gb.usal.es/
The ‘D3GB’ Website: http://d3gb.usal.es
# A Micromonospora scaffolds' names and sizes scaffolds <- c("NZ_HF570105.1", "NZ_HF570106.1", "NZ_HF570107.1", "NZ_HF570108.1") sizes <- c(583, 1327, 241394, 7082520) # Create an assembly createAssembly(scaffolds, sizes)
# A Micromonospora scaffolds' names and sizes scaffolds <- c("NZ_HF570105.1", "NZ_HF570106.1", "NZ_HF570107.1", "NZ_HF570108.1") sizes <- c(583, 1327, 241394, 7082520) # Create an assembly createAssembly(scaffolds, sizes)
Create interactive genome browsers with 'R'.
David Barrios and Carlos Prieto. Bioinformatics, University of Salamanca. See http://d3gb.usal.es/
gbk2genomebrowser
creates an interactive genome browser from a GenBank file.
gbk2genomebrowser(gbkfile)
gbk2genomebrowser(gbkfile)
gbkfile |
a "character" string representing the input GenBank file to be represented in the genome browser. |
Object of class genomebrowser
.
David Barrios and Carlos Prieto. Bioinformatics, University of Salamanca. See http://d3gb.usal.es/
# Download GenBank file gbff <- tempfile() download.file(paste0("https://ftp.ncbi.nlm.nih.gov/genomes/all/GCF/000/297/395/", "GCF_000297395.2_ASM29739v2/GCF_000297395.2_ASM29739v2_genomic.gbff.gz"),gbff) # Genome browser generation. gb <- gbk2genomebrowser(gbff) plot(gb)
# Download GenBank file gbff <- tempfile() download.file(paste0("https://ftp.ncbi.nlm.nih.gov/genomes/all/GCF/000/297/395/", "GCF_000297395.2_ASM29739v2/GCF_000297395.2_ASM29739v2_genomic.gbff.gz"),gbff) # Genome browser generation. gb <- gbk2genomebrowser(gbff) plot(gb)
genomebrowser
.genome_addGFF
add track in a gff file to genomebrowser
.
genome_addGFF(gb, gfffile)
genome_addGFF(gb, gfffile)
gb |
a genome browser object produced by the function |
gfffile |
a "character" string representing the input gff file to be represented in the genome browser. |
No return value, called for side effects
David Barrios and Carlos Prieto. Bioinformatics, University of Salamanca. See http://d3gb.usal.es/
The ‘D3GB’ Website: http://d3gb.usal.es
genomebrowser
, genome_addSequence
, genome_addTrack
, genome_addVCF
.
# Download fasta file fasta <- tempfile() download.file(paste0("https://ftp.ncbi.nlm.nih.gov/genomes/all/GCF/000/297/395/", "GCF_000297395.2_ASM29739v2/GCF_000297395.2_ASM29739v2_genomic.fna.gz"),fasta) # Genome browser generation. gb <- genomebrowser(getAssemblyFromFasta(fasta)) genome_addSequence(gb,fasta) # Download gff file and add to the genome browser gff <- tempfile() download.file(paste0("https://ftp.ncbi.nlm.nih.gov/genomes/all/GCF/000/297/395/", "GCF_000297395.2_ASM29739v2/GCF_000297395.2_ASM29739v2_genomic.gff.gz"),gff) genome_addGFF(gb,gff) plot(gb)
# Download fasta file fasta <- tempfile() download.file(paste0("https://ftp.ncbi.nlm.nih.gov/genomes/all/GCF/000/297/395/", "GCF_000297395.2_ASM29739v2/GCF_000297395.2_ASM29739v2_genomic.fna.gz"),fasta) # Genome browser generation. gb <- genomebrowser(getAssemblyFromFasta(fasta)) genome_addSequence(gb,fasta) # Download gff file and add to the genome browser gff <- tempfile() download.file(paste0("https://ftp.ncbi.nlm.nih.gov/genomes/all/GCF/000/297/395/", "GCF_000297395.2_ASM29739v2/GCF_000297395.2_ASM29739v2_genomic.gff.gz"),gff) genome_addGFF(gb,gff) plot(gb)
genomebrowser
.genome_addSequence
add FASTA sequences to genomeviewer
.
genome_addSequence(gb, fastafile)
genome_addSequence(gb, fastafile)
gb |
a genome browser object produced by the function |
fastafile |
a "character" string representing the input Fasta file to be added in the genome browser. |
No return value, called for side effects
David Barrios and Carlos Prieto. Bioinformatics, University of Salamanca. See http://d3gb.usal.es/
The ‘D3GB’ Website: http://d3gb.usal.es
genomebrowser
, genome_addGFF
, genome_addTrack
, genome_addVCF
.
# Download fasta file fasta <- tempfile() download.file(paste0("https://ftp.ncbi.nlm.nih.gov/genomes/all/GCF/000/297/395/", "GCF_000297395.2_ASM29739v2/GCF_000297395.2_ASM29739v2_genomic.fna.gz"),fasta) # Genome browser generation. gb <- genomebrowser(getAssemblyFromFasta(fasta)) genome_addSequence(gb,fasta) plot(gb)
# Download fasta file fasta <- tempfile() download.file(paste0("https://ftp.ncbi.nlm.nih.gov/genomes/all/GCF/000/297/395/", "GCF_000297395.2_ASM29739v2/GCF_000297395.2_ASM29739v2_genomic.fna.gz"),fasta) # Genome browser generation. gb <- genomebrowser(getAssemblyFromFasta(fasta)) genome_addSequence(gb,fasta) plot(gb)
genomebrowser
.genome_addTrack
add tracks to genomebrowser
.
genome_addTrack(gb, track, trackname = NULL, type = "gene", color = "#000", scale = NA)
genome_addTrack(gb, track, trackname = NULL, type = "gene", color = "#000", scale = NA)
gb |
a genome browser object produced by the function |
track |
a "character" string giving the input BED file or a data frame with track information to be represented in the genome browser. |
trackname |
a "character" string giving a name for the track. |
type |
a "character" string with the type of track should be drawn. Possible types are: "gene", "exons", "domain", "value" or "score". |
color |
a "character" string giving the color of the track. |
scale |
a vector with two values which specifies the minimun and maximun limits in the representation of the "score" or "value" tracks. By default maximun and minimun scores are taken as the limits. |
No return value, called for side effects
David Barrios and Carlos Prieto. Bioinformatics, University of Salamanca. See http://d3gb.usal.es/
genomebrowser
.genome_addVCF
add VCF tracks to genomebrowser
.
genome_addVCF(gb, vcffile, trackname = NULL, show = NULL)
genome_addVCF(gb, vcffile, trackname = NULL, show = NULL)
gb |
a genome browser object produced by the function |
vcffile |
a "character" string representing the input VCF file to be represented in the genome browser. |
trackname |
a "character" string giving a name for the track. |
show |
a "character" vector giving the info features to display. |
No return value, called for side effects
David Barrios and Carlos Prieto. Bioinformatics, University of Salamanca. See http://d3gb.usal.es/
genome_createLocalMode
creates an interactive genome browser to open directly in your browser.
genome_createLocalMode(gb, dir="GenomeBrowser")
genome_createLocalMode(gb, dir="GenomeBrowser")
gb |
a genome browser object produced by the function |
dir |
a "character" string representing the directory where the graph will be saved. |
The function creates a folder in the working directory of your computer with an HTML document (index.html) which contains the graph. This file can be directly opened with your browser.
David Barrios and Carlos Prieto. Bioinformatics, University of Salamanca. See http://d3gb.usal.es/
The ‘D3GB’ Website: http://d3gb.usal.es
genomebrowser
, createAssembly
, getAssemblyFromFasta
, GRCh37.bands
, GRCh38.bands
, genome_addGFF
, genome_addSequence
, genome_addTrack
, genome_addVCF
.
# Genome browser generation. gb <- genomebrowser(GRCh38.bands) # It creates a genome browser ready to be viewed in your browser. genome_createLocalMode(gb,dir=tempfile())
# Genome browser generation. gb <- genomebrowser(GRCh38.bands) # It creates a genome browser ready to be viewed in your browser. genome_createLocalMode(gb,dir=tempfile())
genome_createServerMode
creates an interactive genome browser to be shared as a website.
genome_createServerMode(gb, dir="GenomeBrowser")
genome_createServerMode(gb, dir="GenomeBrowser")
gb |
a genome browser object produced by the function |
dir |
a "character" string representing the directory where the graph will be saved. |
The function creates a website. Resulting folder should be added to the Apache applications directory. In this way the genome browser will be working as a web site.
David Barrios and Carlos Prieto. Bioinformatics, University of Salamanca. See http://d3gb.usal.es/
The ‘D3GB’ Website: http://d3gb.usal.es
genomebrowser
, createAssembly
, getAssemblyFromFasta
, GRCh37.bands
, GRCh38.bands
, genome_addGFF
, genome_addSequence
, genome_addTrack
, genome_addVCF
.
# Genome browser generation. gb <- genomebrowser(GRCh38.bands) # It creates a website. You can add it to your Apache server. genome_createServerMode(gb,dir=tempfile())
# Genome browser generation. gb <- genomebrowser(GRCh38.bands) # It creates a website. You can add it to your Apache server. genome_createServerMode(gb,dir=tempfile())
genomebrowser
creates an interactive genome browser.
genomebrowser(assembly, tracks = NULL, types = NA, colors = NA, mapTrack = NULL)
genomebrowser(assembly, tracks = NULL, types = NA, colors = NA, mapTrack = NULL)
tracks |
a list of data frames with track information that will be viewed in the genome browser. These data frames should have a BED format with the following columns: chromosome/scaffold, start, end, name, score, strand. |
types |
a "character" vector with type of tracks that will be represented. It should be one of: "gene", "exons", "domain", "value" or "score". |
colors |
a "character" vector with color used for the track representation. |
mapTrack |
a data frame with values to represent on the genome map in BED format: chromosome, start, end, name, value. |
assembly |
a genome assembly data frame. D3GB provides human assemblies (NCBI36, GRCh37, GRCh38), human assemblies with cytobands (GRCh37.bands or GRCh38.bands), or methods for creating your own assembly from a FASTA file |
Object of class genomebrowser
.
David Barrios and Carlos Prieto. Bioinformatics, University of Salamanca. See http://d3gb.usal.es/
The ‘D3GB’ Website: http://d3gb.usal.es
createAssembly
, getAssemblyFromFasta
, GRCh37.bands
, GRCh38.bands
, genome_addGFF
, genome_addSequence
, genome_addTrack
, genome_addVCF
.
# Genome browser generation. gb <- genomebrowser(GRCh38.bands) # Now you can add sequences, tracks, gff or vcf
# Genome browser generation. gb <- genomebrowser(GRCh38.bands) # Now you can add sequences, tracks, gff or vcf
genomemap
creates an interactive genome map.
genomemap(assembly, mapTrack = NULL)
genomemap(assembly, mapTrack = NULL)
assembly |
a genome assembly data frame. D3GB provides human assemblies (NCBI36, GRCh37, GRCh38), human assemblies with cytobands (GRCh37.bands or GRCh38.bands), or methods for creating your own assembly from a FASTA file |
mapTrack |
a data frame with values to represent on the genome map in BED format: chromosome, start, end, name, value. |
Object of class genomebrowser
.
David Barrios and Carlos Prieto. Bioinformatics, University of Salamanca. See http://d3gb.usal.es/
The ‘D3GB’ Website: http://d3gb.usal.es
createAssembly
, getAssemblyFromFasta
, GRCh37.bands
, GRCh38.bands
.
gm <- genomemap(GRCh38.bands)
gm <- genomemap(GRCh38.bands)
genomebrowser
or genomemap
.getAssemblyFromFasta
create assemblies from a FASTA file for their use as parameter of genomebrowser
or genomemap
.
getAssemblyFromFasta(fasta)
getAssemblyFromFasta(fasta)
fasta |
a "character" string representing the input Fasta file to be added in the genome browser. |
a data frame in BED format ready to use as an assembly in genomebrowser
or genomemap
.
FASTA format is a text-based format for representing either nucleotide sequences or peptide sequences, in which nucleotides or amino acids are represented using single-letter codes.
David Barrios and Carlos Prieto. Bioinformatics, University of Salamanca. See http://d3gb.usal.es/
The ‘D3GB’ Website: http://d3gb.usal.es
# Download fasta file fasta <- tempfile() download.file(paste0("https://ftp.ncbi.nlm.nih.gov/genomes/all/GCF/000/297/395/", "GCF_000297395.2_ASM29739v2/GCF_000297395.2_ASM29739v2_genomic.fna.gz"),fasta) # Assembly generation getAssemblyFromFasta(fasta)
# Download fasta file fasta <- tempfile() download.file(paste0("https://ftp.ncbi.nlm.nih.gov/genomes/all/GCF/000/297/395/", "GCF_000297395.2_ASM29739v2/GCF_000297395.2_ASM29739v2_genomic.fna.gz"),fasta) # Assembly generation getAssemblyFromFasta(fasta)
Length of human chromosomes based on GRCh37 assembly.
A Data Frame containing length of chromosomes of GRCh37 assembly.
See https://www.ncbi.nlm.nih.gov/assembly/GCF_000001405.13/.
A Data Frame containing cytobands of GRCh37 assembly.
A Data Frame containing cytobands of GRCh37 assembly.
See https://grch37.ensembl.org/Homo_sapiens/Location/Genome.
Length of human chromosomes based on GRCh38 assembly.
A Data Frame containing length of chromosomes of GRCh38 assembly.
See https://www.ncbi.nlm.nih.gov/assembly/883148/.
A Data Frame containing cytobands of GRCh38 assembly.
A Data Frame containing cytobands of GRCh38 assembly.
See https://www.ensembl.org/Homo_sapiens/Location/Genome.
Length of human chromosomes based on NCBI36 assembly.
A Data Frame containing length of chromosomes of NCBI36 assembly.
See https://www.ncbi.nlm.nih.gov/assembly/GCF_000001405.12/.
segmentation
performs a segmentation of track data in bed format in order to enable its effective representation.
segmentation(track, cell)
segmentation(track, cell)
track |
a Data Frame with genomic features (in BED format). |
cell |
a numeric value with the size of each segment. |
a segmented Data Frame in BED format.
Input file is provided in BED format which is an universal format for genomic features.
David Barrios and Carlos Prieto. Bioinformatics, University of Salamanca. See http://d3gb.usal.es/
The ‘D3GB’ Website: http://d3gb.usal.es
genomebrowser
, genomemap
, genome_addTrack
.