plotFASTA: Plot the different nucleotides present in an alignment of...

Description Usage Arguments Examples

View source: R/plotFasta.R

Description

Function uses coloured polygons to illustrate which nucleotides are present in each sequence at each position

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
plotFASTA(
  nucleotideAlignment,
  pdfFileName = NULL,
  pdfWidth = 14,
  pdfHeight = 7,
  labelSpace = 1,
  lineForSequenceNames = 0,
  sequenceLabelCex = 0.5,
  xLabCex = 1,
  xTicksCex = 1,
  legendCex = 1,
  showNucleotide = FALSE,
  removeUninformative = FALSE
)

Arguments

nucleotideAlignment

A matrix or a list containing the DNA sequences, or an object of class "alignment", "phyDat", or "DNAbin"

pdfFileName

A character string providing the name of a PDF to send plot into. Default value is NULL (plot not sent to file)

pdfWidth

The width of the graphics region in inches. Default value is 14.

pdfHeight

The height of the graphics region in inches. Default value is 7.

labelSpace

Numeric multiplier to change the size of the space alotted to the sequence labels

lineForSequenceNames

The number of lines into the margin at which the sequence names will be plotted. Default value is 0.

sequenceLabelCex

Numeric multiplier to change the size of the sequence labels. Default value is 0.5.

xLabCex

Numeric multiplier to change size of X axis label. Default value is 1.

xTicksCex

Numeric multipler to change size of X axis tick labels. Default value is 1.

legendCex

Numeric multiplier to change size of legend (points and text). Default value is 1.

showNucleotide

Boolean flag to decide whether or not to plot nucleotide characters onto figure. Defaults to off.

removeUninformative

Boolean flag to decide whether to remove sites where all sequences have the same allele. Default is FALSE.

Examples

1
2
3
4
5
6
7
8
9
# Create an example dataset
nSequences <- 50
nSites <- 100
alignment <- matrix(sample(c("A", "C", "G", "T"), nSequences*nSites, replace=TRUE),
                    nrow=nSequences, ncol=nSites)
rownames(alignment) <- paste("Seq-", 1:nSequences)

# Plot the FASTA
plotFASTA(alignment, xTicksCex = 1.5, xLabCex=1.5, sequenceLabelCex=0.4)

JosephCrispell/plotteR documentation built on June 6, 2021, 7:24 p.m.