Learn R Programming

DECIPHER (version 1.16.0)

Synteny: Synteny blocks and hits

Description

Syntenic blocks are DNA segments composed of conserved hits occurring in the same order on two sequences. The two sequences are typically chromosomes of different species that are hypothesized to contain homology. Class "Synteny" provides objects and functions for storing and viewing syntenic blocks and hits that are shared between sequences.

Usage

"pairs"(x, bounds = TRUE, boxBlocks = FALSE, labels = abbreviate(rownames(x), 9), gap = 0.5, line.main = 3, cex.labels = NULL, font.labels = 1, ...)
"plot"(x, labels = abbreviate(rownames(x), 9), ...)
"print"(x, quote = FALSE, right = TRUE, ...)

Arguments

x
An object of class ``Synteny''.
bounds
Logical specifying whether to plot sequence boundaries as horizontal or vertical lines.
boxBlocks
Logical indicating whether to draw a rectangle around hits belonging to the same block of synteny.
labels
Character vector providing names corresponding to each ``identifier'' for labels on the diagonal.
gap
Distance between subplots, in margin lines.
line.main
If main is specified, line.main provides the line argument to mtext.
cex.labels
Magnification of labels on the diagonal.
font.labels
Font of labels on the diagonal.
quote
Logical indicating whether to print the output surrounded by quotes.
right
Logical specifying whether to right align strings.
...
Other graphical parameters for pairs or plot, including: main, cex.main, font.main, and oma. Other arguments for print, including print.gap and max.

Details

Objects of class Synteny are stored as square matrices of list elements with dimnames giving the ``identifier'' of the corresponding sequences. The synteny matrix can be separated into three parts: along, above, and below the diagonal. Each list element along the diagonal contains an integer vector with the width of the sequence(s) belonging to that ``identifier''. List elements above the diagonal (column j > row i) each contain a matrix with ``hits'' corresponding to matches between sequences i and j. List elements below the diagonal each contain a matrix with ``blocks'' of synteny between sequences j and i.

The pairs method creates a scatterplot matrix from a Synteny object. Dot plots above the diagonal show hits between identifier i and j, where forward hits are colored in black, and hits to the reverse strand of identifier j are colored in red. Plots below the diagonal show blocks of synteny colored by their score, from green (highest scoring) to blue to magenta (lowest scoring). The plot method displays a block view of the sequence groups in the same order as the input object (x). The endpoints of each block are connected by a pair of lines, which can cross if one block corresponds to the opposite strand of the other sequence.

See Also

AlignSynteny, FindSynteny

Examples

Run this code
# a small example:
dbConn <- dbConnect(SQLite(), ":memory:")
s1 <- DNAStringSet("ACTAGACCCAGACCGATAAACGGACTGGACAAG")
s3 <- reverseComplement(s1)
s2 <- c(s1, s3)
Seqs2DB(c(c(s1, s2), s3),
        "XStringSet",
        dbConn,
        c("s1", "s2", "s2", "s3"))
syn <- FindSynteny(dbConn, minScore=1)
syn # Note:  > 100% hits because of sequence reuse across blocks
pairs(syn, boxBlocks=TRUE)
plot(syn)
dbDisconnect(dbConn)

# a larger example:
db <- system.file("extdata", "Influenza.sqlite", package="DECIPHER")
synteny <- FindSynteny(db, minScore=50)
class(synteny) # 'Synteny'
synteny

# accessing parts
i <- 1
j <- 2
synteny[i, i][[1]] # width of sequences in i
synteny[j, j][[1]] # width of sequences in j
head(synteny[i, j][[1]]) # hits between i & j
synteny[j, i][[1]] # blocks between i & j

# plotting
pairs(synteny) # dot plots
plot(synteny) # block view

Run the code above in your browser using DataLab