exportToBed(object, what, qLow = NULL, qUp = NULL, colorByExpressionProfile = FALSE, oneFile = TRUE)
CAGEset
object
"CTSS"
to export individual CTSSs, "tagClusters"
to export tag clusters or "consensusClusters"
to export consensus clusters. See Details.
NULL
uses start position of the cluster. Ignored when what = "CTSS"
. See Details.
NULL
uses end position of the cluster. Ignored when what = "CTSS"
. See Details.
what = "tagClusters"
.
what = "CTSS"
, which by default produces only one track.
what = "CTSS"
, one BED file with single track of 1bp blocks representing all detected CTSSs (in all CAGE samples) is created. CTSSs can be colored according to their expression class (provided the expression profiling of CTSSs was done by calling getExpressionProfiles
function). Colors of expression classes match the colors in which they are shown in the plot returned by the plotExpressionProfiles
function. For colorByExpressionProfile = FALSE
, CTSSs included in the clusters are shown in black and CTSSs that were filtered out in gray.
When what = "tagClusters"
, one track per CAGE dataset is created, which can be exported to a single BED file (by setting oneFile = TRUE
) or separate BED files (by setting oneFile = FALSE
). In case qLow = NULL
and qUp = NULL
, TCs are represented as simple blocks showing only the full span of TC from the start to the end. Setting qLow
and/or qUp
parameters to a value of the desired quantile creates a gene-like representation with a line showing full span of the TC, filled block showing specified interquantile range and a thick 1bp block denoting position of the dominant (most frequently used) TSS. All TCs in one track (one CAGE dataset) are shown in the same color.
When what = "consensusClusters"
consensus clusters are exported to BED file. Since there is only one set of consensus clusters common to all CAGE datasets, only one track is created in case of a simple representation. This means that when qLow = NULL
and qUp = NULL
one track with blocks showing the full span of consensus cluster from the start to the end is created. However, the distribution of the CAGE signal within consensus cluster can be different in different CAGE samples, resulting in different positions of quantiles and dominant TSS. Thus, when qLow
and/or qUp
parameters are set to a value of the desired quantile, a separate track with a gene-like representation is created for every CAGE dataset. These tracks can be exported to a single BED file (by setting oneFile = TRUE
) or separate BED files (by setting oneFile = FALSE
). The gene-like representation is analogous to the one described above for the TCs. In all cases consensus clusters can be colored according to their expression class (provided the expression profiling of consensus clusters was done by calling getExpressionProfiles
function). Colors of expression classes match the colors in which they are shown in the plot returned by the plotExpressionProfiles
function. For colorByExpressionProfile = FALSE
all consensus clusters are shown in black.
load(system.file("data", "exampleCAGEset.RData", package="CAGEr"))
### exporting CTSSs colored by expression class
exportToBed(object = exampleCAGEset, what = "CTSS",
colorByExpressionProfile = TRUE)
### exporting tag clusters in gene-like representation
exportToBed(object = exampleCAGEset, what = "tagClusters",
qLow = 0.1, qUp = 0.9, oneFile = TRUE)
Run the code above in your browser using DataLab