syntenicDotplot-methods {CNEr} | R Documentation

## Syntenic dotplot

### Description

Syntenic dotplot for `Axt` alignment object or `GRangePairs`.

### Usage

      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

      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")

[Package CNEr version 1.30.0 Index]