syntenicDotplot: Syntenic dotplot

Description Usage Arguments Details Value Note Author(s) Examples

Description

Syntenic dotplot for Axt alignment object or GRangePairs.

Usage

1
2
3
  syntenicDotplot(x, firstSeqlengths=NULL, secondSeqlengths=NULL,
                  firstChrs=NULL, secondChrs=NULL,
                  col=c("blue", "red"), type=c("line", "dot"))

Arguments

x

Axt object: the whole genome pairwise alignment of two species under comparison or GRangePairs object.

firstSeqlengths,secondSeqlengths

integer(n): seqlengths for both the first (target) and second (query) genomes. When NULL, the seqlengths must exist in x.

firstChrs,secondChrs

character(n): the chromosomes to compare.

col

character(2): the colours for positive and negative strands.

type

“line” or “dot” plot type: When plotting massive number of ranges, “dot” should be used. Otherwise, “line” should be used.

Details

This syntenic dotplot is a type of scatter plot for Axt object, and line plot for GRangePairs object. In the case of possibly massive number of Axt alignments, the line plots will make it invisible at a large genome scale.

Each axis represents concatenated selected chromosomes laid end-to-end, and each dot in the scatter-plot represents a putative homologous match between the two genomes. These dotplots are used for whole genome comparisons within the same genome or across two genomes from different taxa in order to identify synteny.

Value

A ggplot object.

Note

For highly fragmented assemblies, the synteny is invisible on the dotplot.

Author(s)

Ge Tan

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
  library(GenomeInfoDb)
  library(BSgenome.Ggallus.UCSC.galGal3)
  library(BSgenome.Hsapiens.UCSC.hg19)
  ## dotplot for Axt object
  fn <- file.path(system.file("extdata", package="CNEr"),
                  "chr4.hg19.galGal3.net.axt.gz")
  axt <- readAxt(fn)
  firstSeqlengths <- seqlengths(BSgenome.Hsapiens.UCSC.hg19)
  secondSeqlengths <- seqlengths(BSgenome.Ggallus.UCSC.galGal3)
  firstChrs <- c("chr4")
  secondChrs <- c("chr4")
  syntenicDotplot(axt, firstSeqlengths, secondSeqlengths,
                  firstChrs=firstChrs, secondChrs=secondChrs,
                  type="dot")
  
  ## dotplot for GRangePairs object
  data(grangesPairsForDotplot)
  syntenicDotplot(grangesPairsForDotplot, type="line")

CNEr documentation built on Nov. 8, 2020, 5:36 p.m.