Description Usage Arguments Details Value Note See Also Examples
This is a utility function that transforms a TxDb object into a custom
object valid as input for kpPlotGenes
.
1 | makeGenesDataFromTxDb(txdb, karyoplot=NULL, plot.transcripts=TRUE, plot.transcripts.structure=TRUE)
|
txdb |
(a TxDb object) The transcript database object from which the data will be extracted. |
karyoplot |
(karyoplot object) A valid karyoplot object created by a call to |
plot.transcripts |
(boolean) TRUE if transcripts are needed in addition to the genes. (defaults to TRUE) |
plot.transcripts.structure |
(boolean) TRUE if the coding and non-coding exons are needed in addition to the genes and transcripts. (defaults to TRUE) |
This function creates a valid data object for kpPlotGenes
starting from a TxDb object. The resulting object will contain only the
genes and transcripts ovelapping the plot region of the given Karyoplot
object.
Returns a list with at least one element called genes
, a
GRanges
with all genes overlapping karyoplot. If
plot.transcripts
is TRUE, the returned list will have
a transcript
element, a list of GRanges
objects, one per gene
(named with the gene ids),
with the transcripts of that gene. If plot.transcripts.structure
is
TRUE, two more elements are present: coding.exons
and
non.coding.exons
, each a list with one element per trascript
(named with the transcript id), and each element the coding or non-coding
exons of that transcript.
kpPlotGenes
accepts TxDb objects directly. This
function is only expected to be used when the user want to manipulate the
results somehow (i.e. removing some of the genes).
1 2 3 4 5 6 7 8 9 10 11 |
library(TxDb.Hsapiens.UCSC.hg19.knownGene)
zoom <- toGRanges("chr17", 32.6e6, 33.2e6)
kp <- plotKaryotype(genome="hg19", zoom=zoom)
genes.data <- makeGenesDataFromTxDb(TxDb.Hsapiens.UCSC.hg19.knownGene,
karyoplot=kp, plot.transcripts=TRUE,
plot.transcripts.structure=TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.