Learn R Programming

geneviewer

geneviewer is an R package for plotting gene clusters and transcripts. It imports data from GenBank, FASTA, and GFF files, performs BlastP and MUMmer alignments, and displays results on gene arrow maps. The package offers extensive customization options, including legends, labels, annotations, scales, colors, tooltips, and more. To explore all features visit the package website.

Installation

geneviewer is still in the development stage which might lead to breaking changes and thus not yet released on CRAN. You can install the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("nvelden/geneviewer")

Usage

The below example demonstrates using geneviewer to plot a gene cluster on a genomic sequence, using the start and end positions of each gene. The genes are grouped by class and labels are added using the GC_labels function.

library(geneviewer)

# Data
gene_cluster <- data.frame(
  name = c("ophB1", "ophC", "ophA", "ophD", "ophB2", "ophP", "ophE"),
  start = c(2522, 5286, 9536, 12616, 13183, 19346, 20170),
  end = c(4276, 4718, 10904, 11859, 15046, 16016, 21484),
  class = c("Monooxygenase", "NTF2-like", "Methyltransferase", 
  "O-acyltransferase", "Monooxygenase", "Prolyloligopeptidase", 
  "F-box/RNHI-like")
)

# Chart
GC_chart(gene_cluster, group = "class", height = "100px") %>%
  GC_labels("name")

Examples

For additional examples and the corresponding code to create the plots, please visit the Examples section.

Issues

If you encounter any issues or have feature requests, please open an Issue.

Copy Link

Version

Install

install.packages('geneviewer')

Monthly Downloads

213

Version

0.1.10

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Niels van der Velden

Last Published

January 10th, 2025

Functions in geneviewer (0.1.10)

GC_transcript

Modify Transcript Characteristics within a Chart
GC_tooltip

Set Tooltip for a Gene Chart
genbank_to_fasta

Convert GenBank to FASTA Format
geneviewer-shiny

Shiny bindings for geneviewer
GC_grid

Update Grid Display of a GC Chart Cluster
erythromycin_BlastP

Erythromycin BlastP results
GC_title

Add Title to a GC_chart
erythromycin_cluster

Erythromycin Gene Cluster Data
gbk_features_to_df

Convert GenBank Features to Data Frame
reexports

Objects exported from other packages
read_gbk

Read Data from GenBank Files
GC_trackMouse

Track Mouse Movement in a GC_chart
read_gff

Read GFF Files
human_hox_genes

Human HOX Gene Cluster Data
mummer_alignment

Perform Sequence Alignment Using MUMmer
read_fasta

Read Protein Sequences from FASTA Files
read_bed

Read BED Files
get_introns

Calculate Intron Positions Based on Exons
GC_scaleBar

Update Scale Bar of a GC Chart Cluster
hs_dystrophin_transcripts

Human Dystrophin Transcripts Data
ophA_clusters

ophA Gene Cluster from Omphalotus olearius
protein_blast

Perform Protein BLAST Analysis Within Specified Clusters
GC_cluster

Modify Cluster Settings
GC_clusterLabel

Set or Update Cluster Labels for a GC Chart
GC_annotation

Add Annotations to a GC_chart
GC_color

Update Color Scheme in Gene Chart
GC_align

Align gene clusters
BRCA1_splice_variants

BRCA1 Splice Variants
GC_coordinates

Modify Coordinates in a GC Chart
GC_chart

Create a GC Chart Visualization
GC_clusterTitle

Update cluster Title of a GC Chart Cluster
GC_clusterFooter

Add a Footer to Each Cluster in a GC Chart
GC_normalize

Normalize Gene Clusters in a Genomic Chart
GC_links

Add Links to GC Chart
GC_scale

Update Scale of a GC Chart Cluster
GC_genes

Modify Gene Characteristics within a Chart
GC_sequence

Update Sequence Display of a GC Chart Cluster
GC_legend

Set Legend for a Gene Chart
GC_labels

Add Labels to Each Cluster in a GC Chart