pipe.PlotSNP | R Documentation |
Plot aligned read base call distributions for one or more SNP sites from one or more samples, and optionally save them as PNG images.
pipe.PlotSNP(sampleIDs, seqID, position, geneID = NULL, groups = sampleIDs,
annotationFile = "Annotation.txt", optionsFile = "Options.txt", results.path = NULL,
tailWidth = NULL, plotFormat = c("", "png", "pdf"), plotFileName = NULL,
plot.path = "SNP_Plots", label = "", SNPtablePath = "~/SNPs/", mf = NULL,
start = NULL, stop = NULL, verbose = TRUE, ...)
sampleIDs |
A vector or one or more SampleIDs. |
seqID |
Character string of one chromosome name. |
position |
Integer vector of one or more chromosomal locations, in nucleotides. |
geneID |
Optional, give the GeneID of the one SNP site (just to save time). |
groups |
Character vector of group identifiers, of the same length as |
annotationFile |
The file of sample annotations. |
optionsFile |
The file of program options. |
results.path |
The folder of pipeline results, to find existing BAM files for extracting read pileup details. |
tailWidth |
Integer number of extra nucleotides of context, to include in the SNP plot image on both sides of the one center position of interest. There is a tradeoff between showing so much context that no SNPs are discernable, and showing so little context that the overall alignment quality in the area cannot be assured. Further, the plot function lays down so many extra supporting features that it is very hard to keep all content clear and distinct. Adjusting the tail width can help find the optimal tradeoff between clear details and adequate context. |
plotFormat |
Controls the plotting behaviour. Default is to write to the current graphics device. Optionally it can create PNG or PDF files on disk, using the name of the gene and nucleotide position as the default filename. |
plotFileName |
Optional character string of the filename to use for the created plot image file. |
plot.path |
Folder to write PNG or PDF image files to. |
label |
Optional vector of text, same length as |
SNPtablePath |
Pathname to optional tables of known SNP sites for this chromosome, for annotating the lower margin of the SNP plot with previously identified known SNP sites. (this functionality is only available for some organisms, and how it's implemented varies with the size of the genome...). |
mf |
An optional vector of length 2, as used by graphics parameters |
start |
|
stop |
Optional explicit boundaries, in nucleotide units, of the region around the center SNP site to plot.
Overrides |
... |
Other arguments to be passed to the low level SNP plot function. |
This function gives a simpler interface wrapper to the lower level SNP plot function, handling all details about SpeciesIDs, BAM files, etc.; as well as accomodating getting multiple SNP plot images into one single composite plot, as for comparing between samples.
If plotFormat
is not empty, then PNG or PDF files are written to disk. Otherwise creates a SNP
plot image in the current graphics device.
Showing SNP read pileup images for many samples at one time is quite slow, as it consumes lots of memory and time reading from multible BAM files. When the number of samples gets large, the available resolution per sample gets so small that making usable images becomes impossible.
Bob Morrison
pipe.PlotGene
for aligned read plot images that show the depth of read coverage over
entire genes, in one or more samples.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.