View source: R/extract.breakpoints.R
extract.breakpoints | R Documentation |
Extraction of breakpoint positions on the rearranged nucleotide skews.
extract.breakpoints(rearr.ori,
type = c("atfw", "atrev", "gcfw", "gcrev"),
nbreaks, gridsize = 100, it.max = 500)
rearr.ori |
A data frame obtained with the |
type |
The type of skew for which to extract the breakpoints; must
be a subset of |
nbreaks |
The number of breakpoints to extract for each type of
skew. Provide a vector of the same length as |
gridsize |
To make sure that the best breakpoints are found, and to
avoid finding only a local extremum of the likelihood and residual sum
of square functions, a grid search is performed. The search for
breakpoints is repeated |
it.max |
The maximum number of iterations to be performed when
searching for the breakpoints. This argument corresponds to the
|
This method uses the segmented
function in the segmented
package to extract the breakpoints positions in the rearranged
nucleotide skews obtained with the rearranged.oriloc
function.
To make sure that the best breakpoints are found, and to
avoid finding only a local extremum of the likelihood and residual sum
of square functions, a grid search is performed. The search for
breakpoints is repeated gridsize
times, with different starting
values for the breakpoints.
This function returns a list, with as many elements as the type
argument (for example $gcfw
will contain the results for the
rearranged GC-skew, for forward-encoded genes). Each element of this list is also a list, containing the
following information: in $breaks
the position of the breakpoints on the
rearranged chromosome; in $slopes.left
the slopes of the
segments on the left side of each breakpoint; in $slopes.right
the slopes of the
segments on the right side of each breakpoint; in $real.coord
,
the coordinates of the breakpoints on the real chromosome (before rearrangement).
A. Necşulea
citation("segmented")
Necşulea, A. and Lobry, J.R. (in prep) A novel method for assessing the effect of replication on DNA base composition asymmetry. Molecular Biology and Evolution,24:2169-2179.
oriloc
, draw.rearranged.oriloc
,
rearranged.oriloc
### Example for Chlamydia trachomatis ####
### Rearrange the chromosome and compute the nucleotide skews ###
## Not run: r.ori <- rearranged.oriloc(seq.fasta = system.file("sequences/ct.fasta.gz", package = "seqinr"),
g2.coord = system.file("sequences/ct.coord",package = "seqinr"))
## End(Not run)
### Extract the breakpoints for the rearranged nucleotide skews ###
## Not run: breaks <- extract.breakpoints(r.ori,type = c("gcfw", "gcrev"),
nbreaks = c(2, 2), gridsize = 50, it.max = 100)
## End(Not run)
### Draw the rearranged nucleotide skews and ###
### place the position of the breakpoints on the graphics ###
## Not run: draw.rearranged.oriloc(r.ori, breaks.gcfw = breaks$gcfw$breaks,
breaks.gcrev = breaks$gcrev$breaks)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.