View source: R/plotTagMatrix.R
plotPeakProf | R Documentation |
plot the profile of peaks
'
plotPeakProf_MultiWindows()
is almost the same as plotPeakProf2()
, having
the main difference of accepting two or more granges objects. Accepting more
granges objects can help compare the same peaks in different windows.
plotPeakProf(
tagMatrix = NULL,
peak,
upstream,
downstream,
conf,
by,
type,
windows_name = NULL,
weightCol = NULL,
TxDb = NULL,
xlab = "Genomic Region (5'->3')",
ylab = "Peak Count Frequency",
facet = "row",
free_y = TRUE,
verbose = TRUE,
nbin = NULL,
ignore_strand = FALSE,
...
)
tagMatrix |
tagMatrix or a list of tagMatrix |
peak |
peak file or GRanges object |
upstream |
upstream position |
downstream |
downstream position |
conf |
confidence interval |
by |
feature of interest |
type |
one of "start_site", "end_site", "body" |
windows_name |
the name for each window, which will also be showed in the picture as labels |
weightCol |
column name of weight |
TxDb |
TxDb object or self-made granges objects |
xlab |
xlab |
ylab |
ylab |
facet |
one of 'none', 'row' and 'column' |
free_y |
if TRUE, y will be scaled by AvgProf |
verbose |
print message or not |
nbin |
the amount of bines |
ignore_strand |
ignore the strand information or not |
... |
additional parameter |
TxDb
parameter can accept txdb object.
But many regions can not be obtained by txdb object. In this case,
Users can provide self-made granges served the same role
as txdb object and pass to TxDb
object.
by
the features of interest.
(1) if users use txdb
, by
can be one of 'gene', 'transcript', 'exon',
'intron' , '3UTR' , '5UTR', 'UTR'. These features can be obtained by functions from txdb object.
(2) if users use self-made granges object, by
can be everything. Because this by
will not pass to functions to get features, which is different from the case of using
txdb object. This by
is only used to made labels showed in picture.
type
means the property of the region. one of the "start site",
"end site" and "body".
upstream
and downstream
parameter have different usages:
(1) if type == 'body'
, upstream
and downstream
can use to extend
the flank of body region.
(2) if type == 'start_site'/'end_site'
, upstream
and downstream
refer to
the upstream and downstream of the start_site or the end_site.
weightCol
refers to column in peak file. This column acts as a weight value. Details
see https://github.com/YuLab-SMU/ChIPseeker/issues/15
nbin
refers to the number of bins. getTagMatrix()
provide a binning method
to get the tag matrix.
There are two ways input a list of window.
(1) Users can input a list of self-made granges objects
(2) Users can input a list of by
and only one type
. In this way,
plotPeakProf_MultiWindows()
can made a list of window from txdb object based on by
and type
.
Warning:
(1) All of these window should be the same type. It means users can only compare a list of "start site"/"end site"/"body region" with the same upstream and downstream.
(2) So it will be only one type
and several by
.
(3) Users can make window by txdb object or self-made granges object. Users can only
choose one of 'gene', 'transcript', 'exon', 'intron' , '3UTR' , '5UTR' or 'UTR' in the
way of using txdb object. User can input any by
in the way of using
self-made granges object.
(4) Users can mingle the by
designed for the two ways. plotPeakProf_MultiWindows
can
accpet the hybrid by
. But the above rules should be followed.
https://github.com/YuLab-SMU/ChIPseeker/issues/189
ggplot object
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.