Draws a scatter plot of gene counts from two samples.

compareCounts(
  df,
  cols = colnames(df)[2:3],
  lims = c(0, max(df[, cols[1]] * 0.75)),
  diag = TRUE,
  title = NULL,
  subtitle = NULL,
  writeN = TRUE,
  highlightGenes = NULL,
  writeGeneLabels = TRUE,
  geneLabelSize = 3
)

Arguments

df

Dataframe with at least three columns: Geneid and one column for the counts of each sample.

cols

Character of length 2. The names of the columns where the counts to be plotted are. Default: colnames(df)2:3.

lims

Numerical of length 2. Lower and upper limits of the axes. The same limits are used for both axes. Default: c(0,max(df[,cols1]*0.75)).

diag

Logical of length 1. Whether to draw a dashed line in the diagonal or not. Default: TRUE.

title

Character of length 1. Title of the plot. Default: NULL.

subtitle

Character of length 1. Subtitle of the plot. Default: NULL

highlightGenes

Character of undefined length or NULL. The names of the genes (values of Geneid column) to highlight. Default: NULL.

writeGeneLabels

Logical of length 1. Whether to write the labels of the highlighted genes. Only if highlightGenes is not null. Default: TRUE.

geneLabelSize

Numerical of length 1. Size of the gene label. Default: 3.

writeN.

Logical of length 1. Whether to write the total number of genes in the top left corner of the plot. Default: TRUE.

Author

amitjavilaventura