Description Usage Arguments Details Value See Also Examples
The two principal methods are aconstructor, which usies the S3 object model and a plotting function. For details about how to use each, run help(pixelgram::pixelgram)
and help(pixelgram::plot.pixelgram)
.
pixelgram()
returns a pixelgram object for plotting.
1 2 3 4 5 6 7 | pixelgram(tre_file = NULL, tre = NULL, nts_file = NULL, nts = NULL,
aas_file = NULL, aas = NULL, alignment_format = "fasta", is_orf = F,
pngs2o = F, refseq_lut = NULL, refseq_name = "HXB2",
excise_refseq = T, master_name = "__first__", xform_master = F,
xform_type = 0, show_tree = T, raster_width = 1,
raster_margin = 0.025, x_lim = NULL, y_lim = NULL, invert_y = F,
main = NULL, sub = NULL)
|
tre_file |
File containing Newick-formatted tree. |
tre |
ape phylo object in memory |
nts_file |
File containing nucleotide sequence alignment. |
nts |
seqinr nucleotide alignment in memory. |
aas_file |
File containing protein sequence alignment. |
aas |
seqinr protein alignment in memory. |
alignment_format |
Format of alignment file/s; must be one of these: |
is_orf |
flag to indicate the nt alignment is +1 codon aligned |
pngs2o |
Switch to mark asparagines (N) in PNG motifs as O. |
refseq_lut |
Look-up-table for reference numbering of alignment positions |
refseq_name |
Reference sequence name in the alignment. (Do not confuse "reference" sequence, used for numbering, with "master" sequence, used for coloring.) |
excise_refseq |
Should the reference sequence be removed from the alignment before rendering? |
master_name |
Name of sequence to use when showing only polymorphisms, i.e. sites that do not match. Must be a name in the alignment or one of |
xform_master |
Should the master sequence be transformed when rendered in the pixel plot? |
xform_type |
Controls the way polymorphisms are shown in pixel plot; see Details. |
show_tree |
Show the tree? If not, only show the pixel plot. |
raster_width |
Proportionate width of the pixel plot, e.g. 1 indicates equal width. |
raster_margin |
Offset in raster portion of the layout, e.g. for heatmap. |
x_lim |
Range of x coordinates to use for plotting, set automatically. |
y_lim |
Range of y coordinates to use for plotting, set automatically. |
invert_y |
Should the y-axis be inverted? |
main |
Plot title, e.g. coded subject id. If given, it is plotted at the top of the pixelgram output. |
sub |
Plot subtitle, i.e. region sequenced. If specified, it appears with "site" below the pixel plot. |
For examples run vignette("pixelgram")
.
At minimum, a nucleotide sequence alignment must be provided. If no tree is given, ape::bionj
will make a neighbor-joining tree with simplified parameters. The alignment can be translated (in +1 reading frame) with the standard genetic code by setting is_orf=T
. For other translation options see seqinr::translate
.
The refseq_name
argument is used to specify standardized sequence numbering. By default it is HXB2, which will be excised from the alignment after creating a lookup-table to number positions in the alignmnent. If the exact string match to this argument is not found among sequence names in the alignment, it is searched as a regular expression, but the resulting hit is not excised from the alignment. (This is illustrated in the example vignette, in which HXB2 with a long name is not excised from the subtype reference alignment.) If excise_refseq=F
the reference sequence is left in the alignment and could also become the master sequence.
The master_name
argument is used when applying transformations to the pixel plot. These transformations follow the behavior of highlighter and pixel plot utilities at the LANL HIV database, i.e. only differences from the master sequence are shown in each column. The default is to use the first non-reference sequence in the alignment as the master. That is, the master sequence is set after having excised the reference sequence. In addition to names in the sequence alignment, alternative options for the master sequence include "__none__", "__first__" (the default), "__last__", and "__consensus__".
The option xform_type
is an integer from 0 to 3. The default (0) means no transformation is applied, yielding a pixel plot that matches the "default" color scheme in the online pixel utility. That is, positions in all rows are colored. Other transformations will change matches to each master site as background "transparent" colors or mutational changes using an extensible color scheme. For details about how the color scheme is defined, run help(pixmap_colors)
. Option 3 works for amino-acid alignments to show changes in charge and potentially N-linked glycosylation sites, relative to the master sequence, but is slow to compute. Setting the option xform_master=T
applies the transformation to the master sequence (following the Highlighter plot scheme, the default is F).
pixelgram object
External methods used to translate nts to aas and build a tree from nts:
seqinr{translate}
, ape{bionj}
, and ape{dist.dna}
Online examples that are precursors to this package: http://hiv.lanl.gov/content/sequence/pixel/pixel.html and http://hiv.lanl.gov/content/sequence/HIGHLIGHT/highlighter_top.html.
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.