algnmt_plot | R Documentation |
Plot sequence alignments as ggplot object
algnmt_plot(
algnmt,
color_values = NULL,
tile.border.color = NA,
tile.border.on.NA = F,
text = F,
line = F,
line_args = list(linewidth = 0.1, color = "black"),
theme = ggplot2::theme_bw(),
theme_args = list(panel.grid = ggplot2::element_blank()),
pattern_lim_size = 0,
pattern_lim_pos = "inner",
pattern_names = F,
pattern_names_fun = ggrepel::geom_text_repel,
pairwiseAlignment = NULL,
subject_lim_lines = F,
subject_name = NULL,
pos_col = "position",
seq_col = "seq",
name_col = "seq.name",
start_end_col = "start_end",
y_group_col = NULL,
coord_fixed_ratio = NULL,
x_breaks = NULL,
algnmt_type = NULL,
add_length_suffix = F,
group_on_yaxis = F,
min_gap = 10,
ref = NULL,
pos_shift = NULL,
pos_shift_adjust_axis = T,
verbose = T
)
algnmt |
an alignment object returned from (i) igsc::MultiplePairwiseAlignmentsToOneSubject, (ii) DECIPHER::AlignSeqs or (iii) Biostrings::pairwiseAlignment; in case (i) this is a data.frame, in case (ii) this is a XStringSet, in case (iii) this is a PairwiseAlignmentsSingleSubject; alternatively provide a custom data frame which has at least to contain pos_col, seq_col, name_col (see other arguments) |
color_values |
a color scale for NTs or AAs (depending on type of algnmt); provide a named vector of colors where names are NTs or AAs; or choose a name from igsc:::scheme_NT or igsc:::scheme_AA; or choose one from names(purrr::flatten(Peptides:::AAdata)); or leave NULL for the default scheme |
tile.border.color |
a color to draw tile borders with; e.g. "black" or a hex code; leave NA to have no borders (quicker plotting and advised for long alignments) |
tile.border.on.NA |
logical whether to draw borders on NA positions |
text |
logical whether to draw text in tiles (NT or AA identifier); or numeric indicating text size for geom_text() advisable only for short alignments |
theme |
ggplot theme to use as basis |
pattern_lim_size |
numeric; plot annotation of pattern alignment limits; value indicates size; set to 0 to omit plotting; only applicable if pa is provided |
subject_lim_lines |
logical whether to plot vertical lines of subject alignment limits |
subject_name |
name of the subject sequence in algnmt; only needed if subject_lim_lines = TRUE |
pos_col |
name of position column in algnmt (applicable if algnmt is a data.frame) |
seq_col |
name of sequence column in algnmt (applicable if algnmt is a data.frame) |
name_col |
name of column which holds sequence names in algnmt (applicable if algnmt is a data.frame) |
coord_fixed_ratio |
numeric; fixed aspect ratio of plot; leave NULL to not force a ratio |
x_breaks |
numeric vector; manually provide breaks (ticks) on x-axis; set NULL to have breaks picked automatically |
algnmt_type |
'NT' or 'AA'; only required if algnmt is a data.frame and only if NT or AA cannot be guessed; leave NULL to have it guessed based on data |
ref |
a reference sequence to compare all other sequnces to; e.g. a consensus sequence |
verbose |
made with DECIPHER::ConsensusSequence; if provided matching residues are replaced by a dot (.) |
ggplot2 object of alignment
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.