Description Usage Arguments Methods Author(s) See Also Examples
basePlot
plots the frequency or proportion of bases by
position in the read.
Specific bases (such as "N") can be plot alone with this function too.
1 2 3 |
x |
an S4 object that inherits from |
geom |
Either "line", "bar", or "dodge" indicating the geom to use when plotting the bases. "line" will plot base proportion of frequency with lines. "bar" and "dodge" will use bars; "bar" defaults to filling the bars with different colors to distinguish bases, "dodge" lays the bars side by side. |
type |
Either "frequency" or "proportion" indicating whether to use count data or the proportion per base. |
bases |
a character vector indicating which bases to include. By
default, all bases in DNA_BASES_N. Another good option would be
IUPAC_CODE_MAP, which is included in the |
colorvalues |
a character vectors of colors to use; the names of the elements must map to the bases. |
signature(x = "FASTQSummary")
basePlot
will plot the base frequencies or proportions for a
single object that inherits from SequenceSummary
.
signature(x = "list")
basePlot
will plot the base frequencies or proportions for each of the
SequenceSummary
items in the list and display them in a series of
panels.
Vince Buffalo <vsbuffalo@ucdavis.edu>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | ## Load a FASTQ file, with sequence hashing.
s.fastq <- readSeqFile(system.file('extdata', 'test.fastq', package='qrqc'))
## Plot bases
basePlot(s.fastq)
## Plot bases with filled bars
basePlot(s.fastq, geom="bar")
## Plot bases with dodged bars
basePlot(s.fastq, geom="dodge")
## Plot bases with dodged bars
basePlot(s.fastq, geom="bar", bases=c("G", "T"))
## Plot multiple base plots
s.trimmed.fastq <- readSeqFile(system.file('extdata',
'test-trimmed.fastq', package='qrqc'))
basePlot(list("not trimmed"=s.fastq, "trimmed"=s.trimmed.fastq))
## Graphical features can be added
basePlot(s.trimmed.fastq, type="proportion") +
geom_hline(yintercept=0.25, color="purple")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.