genoPlotR-package {genoPlotR}R Documentation

Plot Publication-Grade Gene and Genome Maps

Description

Draws gene or genome maps and comparisons between these, in a publication-grade manner. Starting from simple, common files, it will draw postscript or PDF files that can be sent as such to journals.

Details

Package: genoPlotR
Type: Package
Title: Plot Publication-Grade Gene and Genome Maps
Version: 0.8.11
Date: 2021-01-05
Author: Lionel Guy <lionel.guy@imbim.uu.se>
URL: http://genoplotr.r-forge.r-project.org/
Depends: R (>= 2.10.0), ade4, grid
Imports: methods
Maintainer: Lionel Guy <lionel.guy@imbim.uu.se>
Description: Draws gene or genome maps and comparisons between these, in a publication-grade manner. Starting from simple, common files, it will draw postscript or PDF files that can be sent as such to journals.
License: GPL (>= 2)
LazyLoad: yes

Index of help topics:

annotation              Annotation class and class functions
apply_color_scheme      Apply a color scheme
artemisColors           Artemis Colors
auto_annotate           Auto-annotate dna_segs
barto                   Comparison of 4 Bartonella genomes
c.dna_seg               Concatenate dna_seg objects
chrY_subseg             Comparisons of subsegments of the Y chromosome
                        in human and chimp
comparison              Comparison class and class functions
dna_seg                 DNA segment (dna_seg) class and class functions
gene_types              Gene types
genoPlotR-package       Plot Publication-Grade Gene and Genome Maps
human_nt                Human-readable nucleotide scale
mauve_bbone             Mauve backbone of 4 Bartonella genomes
middle                  Middles of a dna_seg
plot_gene_map           Plot gene and genome maps
range.dna_seg           Range calculation
read_functions          Reading functions
reverse                 Reverse objects
seg_plot                seg_plot class and class functions
three_genes             Three genes data set
trim                    Trimming data frames or more complex objects
                        with >= 2 numeric columns

The only plotting function is plot_gene_map, which produces link[grid]{grid} graphics. Data is composed mainly of DNA segments (dna_seg) objects, which represent collections of genes or segments of genomes, and of comparison objects, which are the pairwise comparisons between the dna_segs. Data can be read from files (see read_functions) or from R objects like data.frames or lists, with dna_seg and comparison conversion functions.

Author(s)

Lionel Guy <lionel.guy@imbim.uu.se>

Maintainer: Lionel Guy <lionel.guy@imbim.uu.se>

References

Guy, L., Roat Kultima, J, and Andersson, S.G.E. (2010). genoPlotR: comparative gene and genome visualization in R. Bioinformatics 26(18):2334-2335.

See Also

plot_gene_map for plotting. dna_seg and comparison for the base objects and conversion functions. read_dna_seg_from_tab, read_dna_seg_from_ptt, read_comparison_from_tab and read_comparison_from_blast to read from files.

Examples

## simple example
## dna segments
## data.frame with several genes
names1 <- c("feat1", "feat2", "feat3")
starts1 <- c(2, 1000, 1050)
ends1 <- c(600, 800, 1345)
strands1 <- c("-", -1, 1)
cols1 <- c("blue", "grey", "red")
df1 <- data.frame(name=names1, start=starts1, end=ends1,
                  strand=strands1, col=cols1)
dna_seg1 <- dna_seg(df1)
is.dna_seg(dna_seg1)

## with only one gene, or two, and merging
gene2a <- dna_seg(list(name="feat1", start=50, end=900, strand="-", col="blue"))
genes2b <- dna_seg(data.frame(name=c("feat2", "feat3"), start=c(800, 1200),
                              end=c(1100, 1322), strand=c("+", 1),
                              col=c("grey", "red")))
dna_seg2 <- c.dna_seg(gene2a, genes2b)
is.dna_seg(dna_seg2)

## reading from file
dna_seg3_file <- system.file('extdata/dna_seg3.tab', package = 'genoPlotR')
dna_seg3 <- read_dna_seg_from_tab(dna_seg3_file)
is.dna_seg(dna_seg3)

## comparison
## from a data.frame
comparison1 <- as.comparison(data.frame(start1=starts1, end1=ends1,
                                        start2=dna_seg2$start,
                                        end2=dna_seg2$end))
is.comparison(comparison1)

## from a file
comparison2_file <- system.file('extdata/comparison2.tab',
                                package = 'genoPlotR')
comparison2 <- read_comparison_from_tab(comparison2_file,
                                        color_scheme="red_blue")
is.comparison(comparison1)

## plot
plot_gene_map(dna_segs=list(dna_seg1, dna_seg2, dna_seg3),
              comparisons=list(comparison1, comparison2)) 

[Package genoPlotR version 0.8.11 Index]