Description Usage Arguments Details Author(s) See Also Examples
This method generates a plot showing the percentage of the genome covered at different read depths
1 2 3 4 | ## S4 method for signature 'CoverageBamFile'
genome.covplot.cumdepth(data,outfile,max_depth)
## S4 method for signature 'list'
genome.covplot.cumdepth(data,outfile,max_depth)
|
data |
Either an instance of |
outfile |
URL of the |
max_depth |
Maximum read depth to be displayed in the X-axis |
This method receives either a single CoverageBamFile
object or a list of CoverageBamFile
objects and generates a plot for which the X-axis is a range of cumulative read depths and the Y-axis is the percentage of the genome covered at a certain read depth. If a list of CoverageBamFile
objects is passed to the function then it will generate a different coloured line for each of the passed objects
Ernesto Lowy <ernestolowy@gmail.com>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | ##draw a cumulative coverage plot for a test case BAM file
#get a BAM test file
treatBAMfile<-system.file("extdata","treat.bam",package="CoverageView")
#create a CoverageBamFile object
trm<-CoverageBamFile(treatBAMfile)
#draw the plot
genome.covplot.cumdepth(trm,outfile="test.png")
#draw the plot setting the max_depth parameter (30X in this case)
genome.covplot.cumdepth(trm,outfile="test.png",max_depth=30)
##draw two overlapping cumulative coverage plots for two different BAM files
#get the first BAM file
treatBAMfile<-system.file("extdata","treat.bam",package="CoverageView")
#create the CoverageBamFile object
trm<-CoverageBamFile(treatBAMfile)
#get the second BAM test file
ctrlBAMfile<-system.file("extdata","ctrl.bam",package="CoverageView")
#create the CoverageBamFile object
ctl<-CoverageBamFile(ctrlBAMfile)
#create a list with the two files
input_d=list(trm,ctl)
#draw the plot
genome.covplot.cumdepth(input_d,outfile="test.png")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.