Skip to content
This repository has been archived by the owner before Nov 9, 2022. It is now read-only.

cosmoscalibur/venn.compute

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
R
 
 
man
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Venn Compute

This R package is intended to compute specific elements in intersections of Venn diagram instead of plot.

  • Custom reader of files to create list of character arrays (such requiered for this package and VennDiagram).
  • Compute specific elements in intersections of Venn diagram in memory or write to files.
  • Plot with VennDiagram.

How to install

You can install from GitHub as:

devtools::install_github("cosmoscalibur/venn.compute")

If an error about TAR executable is showed (common in Linux with Anaconda), you need to setup your TAR path.

Sys.setenv(TAR = "/bin/tar")

How to use

First, load the package.

library(venn.compute)

Read files

This is a custom reader to include multiple files and associate its custom names, returned a named list of character arrays (each element is an element line of the file).

sets <- read.lists_from_files(c(file.path("tests", "primes.txt"),
                                file.path("tests", "even.txt"),
                                file.path("tests", "fibo.txt")),
                              c("primes", "even", "fibo"))

Compute intersections and specific elements

Now you can compute specific elements of Venn diagram intersections.

venn.compute_specific(sets)

If you need to write sets in files, add an output path. Files are written using convention of join sets name with underscore.

venn.compute_specific(sets, output_dir = file.path("tests", "output"))

Plot Venn diagram

Finally, if you want to save plot, invoke this function with the same arguments as before.

venn.compute_plot(sets, output_dir = file.path("tests", "output"))

About

Compute Venn diagram element intersections

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages