Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/viRome_functions.R View source: R/barplot.bam.R
This function counts the occurrence of reads of a given size range mapping to the positive and negative strands of a reference sequence.
Generally, users of viRome may be interested in how many 21-22bp (viRNA) and 24-29bp (piRNA) reads align to the reference genome, on both the positive and negative strand.
1 2 |
vdf |
A |
minlen |
The minimum length of aligned read to consider |
maxlen |
The maximum length of aligned read to consider |
poscol |
The colour of the "positive" bars. Defaults to "red" |
negcol |
The colour of the "negative" bars. Defaults to "green" |
main |
Title for the plot |
xlab |
Labels for the x-axis |
ylab |
Labels for the y-axis |
legend |
Vector of text for the positive and negative strand in the legend |
legendx |
The x location for the legend |
legendy |
The y location for the legend |
plot |
Whether or not to draw a plot. Set this to "FALSE" to suppress plotting. |
down |
Whether or not the plot for the negative strand should be plotted downwards. Defaults to FALSE. |
sym.axes |
If down is TRUE, this determines whether the x-axis is symmetrical around zero. Defaults to TRUE |
... |
Further parameters to pass to the |
A barplot is plotted, and the summarised data returned as a data.frame. Set plot=FALSE to suppress plotting.
A barplot is plotted, and the data returned as a data.frame
lgth |
The length of the aligned read |
pos |
Count of alignments on the positive strand |
neg |
Count of alignments on the negative strand |
Mick Watson
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## Not run: infile <- system.file("data/SRR389184_vs_SINV_sorted.bam", package="viRome")
## Not run: bam <- read.bam(bamfile=infile, chr="SINV", start=1, end=11703, removeN=TRUE)
## Not run: bamc <- clip.bam(bam)
## Not run: bi <- barplot.bam(vdf=bamc, minlen=1, maxlen=37)
## Not run: bi
## Not run: bp <- barplot.bam(bamc)
## Not run: bp <- barplot.bam(bamc, down=TRUE)
## Not run: bp <- barplot.bam(bamc, space=c(0,0))
## Not run: bp <- barplot.bam(bamc, down=TRUE, space=c(0,0))
## Not run: bp <- barplot.bam(bamc, down=TRUE, space=c(0,0), minlen=17, maxlen=36, legendx=17)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.