plOtMICS: Visualization of omics and sequencing data in R.
plOtMICS is an R package to visualize omics and sequencing data in R using simple but useful functions:
chromReads()
: draws aggplot2
-based horizontal barplot with the number and the percentage of reads mapped to each chromosome.barDEGs()
: draws aggplot2
-based horizontal barplot with the upregulated and downregulated genes coming from DESeq2.volcanoPlot()
: draws aggplot2
-based volcano plot with the DE data coming out from DESeq2.DEcompare()
: draws aggplot2
-based scatter plot comparing the Log2FCs of two different contrasts.barAnno()
: takes a list of modified outputs fromChIPseeker::annotatePeak()
, computes the proportion of peaks in distal or promoter regions and draws aggplot2
-based barplot with the correseponding proportion for each sample.getVennCounts()
: helper function that callsChIPpeakAnno::makeVennDiagram()
to intersect different sets of peaks and returns the Venn counts and a list of the peaks present in each set of peaks. Note that the intersection of peaks may have a smaller number than expected to prevent the intersection being bigger than one of the sets.upsetPeaks()
: callsgetVennCounts()
and draws an UpSet plot using the Venn counts and theUpSetR
package.ggUpsetPeaks()
: callsgetVennCounts()
and draws aggplot2
-based UpSet plot using the Venn counts.ggVennPeaks()
: callsgetVennCounts()
and draws a Venn diagram using the packageggvenn
.plotDendogram()
: helper function to draw a dendogram for the heatmaps inexpressionHeatmap()
andexpressionHeatmap2()
.expressionHeatmap()
: function that takes a data frame of expression data (including Geneid) and plots a heatmap of the selected genes. It can be any expression data, but it is better for expression values, counts, normalized counts in which the frist column is the Geneid and the other columns are each of the samples that are to be plotted.expressionHeatmap2()
: function that takes a list of data frames with the columns Geneid and log2FoldChange (it can be another type data, such as FPKMs, but its easier to maintain the name of log2FoldChange since it is how it output fromDESeq2
) and plots a heatmap with the selected genes. It is better for log2FoldChange heatmaps in which each element in the list is a data frame that outputs fromDESeq2
.chromRegions()
: function that takes the chromosome size information and a list of regions (e.g. BED files) to draw the positions of that regions in the genome.circleRegions()
: function that takes a list of chromosome size information and a list of regions (e.g. BED files) to draw the positions of that regions in the genome. Similar tochromRegions()
, but in a circular plot, allowing different assemblies, pairing regions, etc.expressionCor()
: function that computes the correlation of expression values between samples.compareCounts()
: function that draws a scatter plot of gene expression values between 2 samples.ggVennBed()
: draws a Venn diagram with the intersection of two BED files, obtained withbedtoolsr::bt.intersect()
.expressionHeatmapBar()
: draws a heatmap with expression values and combines it with a barplots of sense/antisense expression values.
To install plotmics
you have to run the following command in R:
# if not installed, install the devtools package from CRAN
if(!require(devtools)) { install.packages("devtools") }
# install plotmics from this Github repository
devtools::install_github("amitjavilaventura/plotmics")
This package has been developed by Adrià Mitjavila Ventura, with some contributions from dfernandezperez.
If you want to contribute to this package, make a post in the issues section in this repository or fork this repository adding your code and do a pull request.
If you use this package, please cite this repository and give it a star.
plotmics
versions have the structure of 1.2.3
. The first number (1
, major) implies the addition of a function and/or major changes in the packages; the second number (2
,minor) implies the addition of new features to a function and possible corrections; the third number (3
, micro) implies the correction of minor bugs or addition of minor features.
plotmics
version history is shown below:
-
v1.0.0
:- First version.
-
v1.1.0
:ggVennPeaks()
: Rescale output to remove blank space around the Venn diagram.expressionHeatmap()
andexpressionHeatmap2()
: Add possibility to scale (scale()
) data by rows or columns.
-
v1.1.1
:expressionHeatmap()
andexpressionHeatmap2()
: Add minor formatting options (remove the gene names, change sizes of texts and titles, change the color of the cell border, etc).ggVennPeaks()
: Add minor changes in order to make it easier to visualize more peaks sets.
-
v1.1.2
:chromReads()
: Change chromosome filtering method.volcanoPlot()
: Allow dataframes withoutDEG
column as input.volcanoPlot()
: Changescale = FALSE
forscale = "none"
.
-
v1.1.3
:expressionHeatmap()
andexpressionHeatmap2()
: Fix error in labelling.
-
v1.1.4
:expressionHeatmap()
andexpressionHeatmap2()
: Add possibility to color the NA values.barDEGs()
: Change title format in.
-
v2.0.0
(2021-09-22):- Add new function:
chromRegions()
.
- Add new function:
-
v2.1.0
(2021-09-26):chromRegions()
: Allow to take a list of regions as input.chromRegions()
: Allow to order the region sets.
-
v3.0.0
(2021-09-28):- Add new function:
circleRegions()
. chromRegions()
: Allow to color by different parameters.chromRegions()
: Allow to add extra info.chromRegions()
: Allow to remove or change size of text in the Y axis.
- Add new function:
-
v3.0.1
(2021-09-30):circleRegions()
: Fix a minor bug about plotting the chromosome labels.ggVennPeaks()
: Fix a minor bug that caused an intersection with one region more than expected.getVennCounts()
: Removepkgcond
from required packages.
-
v3.1.0
(2021-10-04):ggVennPeaks()
andgetVennCounts()
: Allow to consider strand information.
-
v3.1.1
(2021-10-07):barDEGs()
andvolcanoPlot()
: Change minor features.circleRegions()
: Exclude the chromosomes before looking if the chromosome names in regions are also in the chrom.sizes files.
-
v3.1.2
(2021-10-12):circleRegions()
: Write the chromosome labels after drawing all the lines and points, so the labels won't be under many layers.circleRegions()
: Fix error to allow different assemblies.barDEGs()
: Add the possibility to add title and subtitle, and also to count the total number of genes in each contrast.barAnno()
: Add the possibility to add percentage/counts.
-
v4.0.0
(2021-10-27):- Add new function:
expressionCor()
. ggVennPeaks()
: Add the possibility to annotate the number of true overlaps for each set of peaks.barDEGs()
: Add the possibility to do aprop.test()
and add the p-value to the plot.
- Add new function:
-
v5.0.0
(2021-11-29):- Add new function:
compareCounts()
. volcanoPlot()
: Add the possibility to draw grid lines.ggVennPeaks()
: Add the possibility to return the lists of overlapping peaks.
- Add new function:
-
v5.1.0
(2021-12-03):chromRegions()
: Add the possibility to color the cytogenetic bands.expressionHeatmap()
: Add the possibility to have more fields in the data frame so it will be possible to use facets and scale.volcanoPlot()
: Fix plotting ofdegLabels
.
-
v6.0.0
(2022-02-11):- Add new function:
ggVennBed()
- Add new function:
-
v6.0.1
(2022-03-09):volcanoPlot()
: change how DEG labels are written and colored, fromgeom_text()
toannotate()
.
-
v6.0.2
(2022-06-02):barDEGs()
: add the option to avoid using the columns log2FoldChange and padj to define the DEGs by turning the parameterslog2FC
andpval
toNULL
.
-
v6.0.3
(2022-06-15):expressionCor()
: add the option to separate the correlation plot into facets with theby_groups
parameter.expressionCor()
: allow to avoid the usage of a data frame with a Geneid column.
-
v7.0.0
(2022-06-29):- Add new function:
expressionHeatmapBar()
.
- Add new function:
-
v7.0.1
(devel):volcanoPlot()
: change arguments ofscale_color_manual()
, because it was dropping the unused levels in the legend.