Description Usage Arguments Value See Also Examples
Get gene informaton from a ballgown object by genes or by genomic regions
1 2 | getGeneinfo(genes = NA, bg, chrom, start, end, samples = sampleNames(bg),
trans.select = NA)
|
genes |
a character vector specifying gene IDs in 'bg'. Any values other than NA override genomic region (chrom, start, stop) |
bg |
ballgown object |
chrom |
chromosome of a region |
start |
start postion |
end |
stop postion |
samples |
names of samples. The transcrpts in these samples are subjected to 'trans.select' |
trans.select |
logical expression-like string, indicating transcript rows to select from a matrix of transcript coverages: NA value keeps all transcripts. |
a data.frame in bed-like file format that can be used as input for
plotGenes
in the SuShi package
splicePlot
; plotGenes
in
Sushi package
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | data(rice.bg)
unique(geneIDs(rice.bg))
gene_id <- c('MSTRG.181', 'MSTRG.182', 'MSTRG.183')
geneinfo <- getGeneinfo(genes=gene_id,rice.bg)
trans <- table(geneinfo$name) # show how many exons each transcript has
trans
library(Sushi)
chrom = geneinfo$chrom[1]
chromstart = min(geneinfo$start) - 1e3
chromend = max(geneinfo$stop) + 1e3
color = rep(SushiColors(2)(length(trans)), trans)
par(mar=c(3,1,1,1))
plotGenes(geneinfo, chrom, chromstart, chromend, col = color, bheight = 0.2,
bentline = FALSE, plotgenetype = 'arrow', labeloffset = 0.5)
labelgenome(chrom, chromstart , chromend, side = 1, n = 5, scale = 'Kb')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.