Learn R Programming

TarSeqQC (version 1.2.0)

plotRegion: Plot read profiles for a particular genomic region.

Description

plotRegion plots the read profiles for a selected region. If SNPs is set as 'TRUE', colored bars will appear indicating the ocurrence of SNPs at each genomic position.

Usage

plotRegion(object, region, seqname, SNPs = TRUE, xlab = "", title = "", size = 0.5, BPPARAM = bpparam())
"plotRegion"(object, region, seqname, SNPs = TRUE, xlab = "", title = "", size = 0.5, BPPARAM = bpparam())

Arguments

object
TargetExperiment object.
region
Numeric of length two indicating the selected genomic region.
seqname
Character indicating the chromosome of the genomic region.
SNPs
Logical flag indicating if SNPs should be plotted.
xlab
Character containing the axis x label.
title
Character containing the plot title.
size
Numeric indicating the size of line plots.
BPPARAM
An optional BiocParallelParam instance defining the parallel back-end to be used during evaluation.

Value

ggplot2 graphics.include TargetExperiment-FeatPerform.R

See Also

plotFeature

Examples

Run this code
if(interactive()){
## loading TargetExperiment object
data(ampliPanel, package="TarSeqQC")
## Defining bam file, bed file and fasta file names and paths
setBamFile(ampliPanel)<-system.file("extdata", "mybam.bam",
    package="TarSeqQC", mustWork=TRUE)
setFastaFile(ampliPanel)<-system.file("extdata", "myfasta.fa",
    package="TarSeqQC", mustWork=TRUE)

# getting and exploring a sequenced region of a particular gene
getRegion(ampliPanel, level="gene", ID="gene7", collapse=FALSE)
# plot a particular genomic region
g<-plotRegion(ampliPanel,region=c(4500,6800), seqname="chr10", SNPs=TRUE,
xlab="", title="gene7 amplicons",size=0.5)
# x11(type="cairo")
g
}

Run the code above in your browser using DataLab