(BITS-VIB) venn-tools
Standalone R scripts to plot Venn diagrams for 2, 3 or 4 groups from pre-computed counts.
These scripts are meant for vizalization of summary counts obtained from CLI applications (e.g. intersect counts between several 'algorithm-X' runs of variant lists obtained by different callers or datasets).
Unlike other such tools, the scripts take the counts passed by command-line arguments to plot the numbers in the corresponding Venn areas. The arguments allow some level of customization like generating white, grey, or colored backgrounds venn diagrams (run with -h for more details).
In order to use these scripts, you will need [R] and RScript installed on your computer (done by most package installers including yum and apt-get).
You will also need the following three [R] packages:
- gridBase http://cran.r-project.org/web/packages/gridBase/ required for colorfulVennPlot plotting.
- colorfulVennPlot http://cran.r-project.org/web/packages/colorfulVennPlot/ to actually plot the Venn diagrams.
- optparse http://cran.r-project.org/web/packages/optparse/ to handle command line arguments.
Installing the dependencies is documented on the top of the code. Please read the respective package documentations if you wish to improve these scripts.
Type the script name followed by -h or --help will list all available parameters
2DVenn.R -h
Usage: /opt/biotools/bin/2DVenn.R [options] Options: -a A.COUNT, --a.count=A.COUNT counts for A-only -b B.COUNT, --b.count=B.COUNT counts for B-only -i AB.COUNT, --ab.count=AB.COUNT counts for AB-intersect -A A.LABEL, --a.label=A.LABEL label for A -B B.LABEL, --b.label=B.LABEL label for B -t TITLE, --title=TITLE Graph Title -x FORMAT, --format=FORMAT file format for output 1:PNG, 2:PDF [default: 1] -o FILE, --file=FILE file name for output [default: 2Dvenn.png] -u FILL, --fill=FILL fill with 1:colors, 2:greys or 3:white [default: 3] -h, --help Show this help message and exit
The output of the three scripts with default parameters (empty venn plots)
2D | 3D | 4D | |
---|---|---|---|
color (-U 1) | |||
grey (-U 2) | |||
white (-U 3*) |
'*' default is set to white
enjoy!
Please send comments and feedback to [email protected]
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.