Skip to content

Commit c434375

Browse files
Aziz KhanAziz Khan
Aziz Khan
authored and
Aziz Khan
committed
version 0.6.1
1 parent 855cc29 commit c434375

File tree

12 files changed

+281
-276
lines changed

12 files changed

+281
-276
lines changed

docs/changelog.rst

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
=========
2+
Changelog
3+
=========
4+
5+
Version 0.6.1
6+
-------------
7+
Released date: December 16, 2017
8+
9+
In this release, we have fixed various bugs and introduced new features:
10+
11+
* Users now can provide all the `BedTools` options by setting `--bedtools-options` argument in `venn`, `upset` and `pairwise` module. Thanks to Issue #3
12+
* Now users can save all the overlapping genomic regions as BED and name lists as text file as by setting `--save-overlaps`. Thanks to those who suggested this feature.
13+
* We added `--bordercolors` to change the Venn border colors.
14+
15+
16+
Version 0.6.0
17+
-------------
18+
Released date: December 11, 2017
19+
20+
* Fixed the pairwise module's `--names` argument. Thanks to @adomingues for reporting the bug.
21+
22+
23+
Version 0.5.9
24+
-------------
25+
Released date: December 08, 2017
26+
27+
* Fixed the bug with two lists, issue #1 reported by @dayanne-castro
28+
* Fixed upset module memory issue for large number of sets

docs/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@
5959
# built documents.
6060
#
6161
# The short X.Y version.
62-
version = '0.5.8'
62+
version = '0.6.1'
6363
# The full version, including alpha/beta/rc tags.
64-
release = 'v0.5.8'
64+
release = 'v0.6.1'
6565

6666
# The language for content autogenerated by Sphinx. Refer to documentation
6767
# for a list of supported languages.

docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@ Welcome to Intervene - a tool for intersection and visualization of multiple gen
4242
shinyapp
4343
support
4444
cite
45-
45+
changelog

docs/modules.rst

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ Intervene modules
33
=================
44
Intervene provides three types of plots to visualize intersections of genomic regions and list sets. These are pairwise heatmap of N genomic region sets, classic Venn diagrams of genomic regions and list sets of up to 6-way and UpSet plots.
55

6+
.. note:: By default the intersection genomic regions is computed using default parameters of `BedTools`. Intervene version > v0.6.0 now allows users to provide all the arguments available in BedTools' commands by using **--bedtools-options**.
67

78
Venn diagram module
89
===================
@@ -42,12 +43,15 @@ This will save the results in the current working directory with a folder named
4243
:widths: 10, 80
4344

4445
"-h, --help","To show the help message and exit"
45-
"-i","Input genomic regions in (BED/GTF/GFF) format or lists of genes/SNPs IDs. For files in a directory use *.<extension>. e.g. *.bed"
46+
"-i, --input","Input genomic regions in (BED/GTF/GFF) format or lists of genes/SNPs IDs. For files in a directory use *.<extension>. e.g. *.bed"
4647
"--type","{genomic,list}. Type of input sets. Genomic regions or lists of genes/SNPs. Default is ``genomic``"
4748
"--names","Comma-separated list of names as labels for input files. If it is not set file names will be used as labels. For example: --names=A,B,C,D,E,F"
48-
"--filenames","Use file names as labels instead. Default is ``False``"
49-
"--colors","Comma-separated list of matplotlib-valid colors. E.g., --colors=r,b,k"
49+
"--filenames","Use file names as labels instead. Default is ``False``"
50+
"--bedtools-options","List any of the arguments available for bedtool’s intersect command. Type bedtools intersect --help to view all the options. For example: --bedtools-options f=0.8,r,etc"
51+
"--colors","Comma-separated list of matplotlib-valid colors for fill. E.g., --colors=r,b,k"
52+
"--bordercolors","Comma-separated list of matplotlib-valid colors for borders. E.g., --bordercolors=r,b,k"
5053
"-o, --output","Output folder path where results will be stored. Default is current working directory."
54+
"--save-overlaps","Save overlapping regions/names for all the combinations as bed/txt files. Default is ``False``"
5155
"--figtype","{pdf,svg,ps,tiff,png} Figure type for the plot. e.g. --figtype svg. Default is ``pdf``"
5256
"--figsize","Figure size as width and height.e.g. --figsize 12 12."
5357
"--fontsize","Font size for the plot labels. Default is ``14``"
@@ -98,7 +102,9 @@ This will save the results in the current working directory with a folder named
98102
"--type","Type of input sets. Genomic regions or lists of genes sets {genomic,list}. Default is ``genomic``"
99103
"--names","Comma-separated list of names as labels for input files. If it is not set file names will be used as labels. For example: --names=A,B,C,D,E,F"
100104
"--filenames","Use file names as labels instead. Default is ``True``"
105+
"--bedtools-options","List any of the arguments available for bedtool’s intersect command. Type bedtools intersect --help to view all the options. For example: --bedtools-options f=0.8,r,etc"
101106
"-o, --output","Output folder path where plots will store. Default is current working directory."
107+
"--save-overlaps","Save overlapping regions/names for all the combinations as bed/txt files. Default is ``False``"
102108
"--order", "The order of intersections of sets {freq,degree}. e.g. --order degree. Default is ``freq`` "
103109
"--ninter", "Number of top intersections to plot. Default is ``30``"
104110
"--showzero", "Show empty overlap combinations. Default is ``False``"
@@ -113,7 +119,7 @@ This will save the results in the current working directory with a folder named
113119
"--scriptonly", "Set to generate Rscript only, if R/UpSetR package is not installed. Default is ``False``"
114120
"--showshiny", "Print the combinations of intersections to input to Shiny App. Default is ``False``"
115121
116-
122+
117123
Pairwise intersection module
118124
============================
119125
Once you have installed Intervene, you can type:
@@ -152,7 +158,7 @@ This will save the results in the current working directory with a folder named
152158
:widths: 10, 80
153159

154160
"-h, --help","show this help message and exit"
155-
"-i","Input genomic regions in (BED/GTF/GFF) format. For files in a directory use *.<extension>. e.g. *.bed"
161+
"-i, --input","Input genomic regions in (BED/GTF/GFF) format. For files in a directory use *.<extension>. e.g. *.bed"
156162
"--type","{genomic,list}. Type of input sets. Genomic regions or lists of genes/SNPs. Default is ``genomic``"
157163
"--compute","Compute count/fraction of overlaps or statistical relationships. {``count``, ``frac``, ``jaccard``, ``fisher``, ``reldist``}"
158164
" ","--compute=count - calculates the number of overlaps."
@@ -161,6 +167,7 @@ This will save the results in the current working directory with a folder named
161167
" ","--compute=reldist - calculate the distribution of relative distances. `Read more details here <http://bedtools.readthedocs.io/en/latest/content/tools/reldist.html>`_"
162168
" ","--compute=fisher - calculate Fisher`s statistic. `Read more details here <http://bedtools.readthedocs.io/en/latest/content/tools/fisher.html>`_"
163169
" ","Note: For jaccard and reldist regions should be pre-shorted or set --sort``"
170+
"--bedtools-options","List any of the arguments available for bedtool’s subcommands: interset, jaccard, fisher, reldist. Type `bedtools <subcommand> --help` to view all the options. For example: --bedtools-options f=0.8,r,etc"
164171
"--corr","Compute the correlation. By default set to False"
165172
"--corrtype","Select the type of correlation from ``pearson``, ``kendall`` or ``spearman``."
166173
" ","--corrtype=pearson: computes the Pearson correlation. (Default)"

intervene/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '0.6.0'
1+
__version__ = '0.6.1'

intervene/helpers.py

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,28 @@ def venn_order(input_files):
3535

3636
return len(input_files)
3737

38+
def map_bedtools_options(bedtools_options):
39+
'''
40+
Create a dict of bedtools intersect options
41+
'''
42+
43+
kwargs = {}
44+
45+
try:
46+
for args in bedtools_options.split(','):
47+
args = args.split('=')
48+
if len(args) > 1:
49+
if args[1] in ['true','True']:
50+
kwargs[args[0]]= True
51+
else:
52+
kwargs[args[0]]= args[1]
53+
else:
54+
kwargs[args[0]]= True
55+
except:
56+
pass
57+
58+
return kwargs
59+
3860
def get_filenames(input_files):
3961
"""
4062
Checks the venn-type
@@ -183,6 +205,23 @@ def default_colors():
183205

184206
return default_colors
185207

208+
def default_border_colors():
209+
"""
210+
Get a list of RGBA colors
211+
"""
212+
213+
default_colors = [
214+
# r, g, b, a
215+
[0, 0, 0, 1],
216+
[0, 0, 0, 1],
217+
[0, 0, 0, 1],
218+
[0, 0, 0, 1],
219+
[0, 0, 0, 1],
220+
[0, 0, 0, 1],
221+
]
222+
223+
return default_colors
224+
186225
def get_colors(color_list):
187226
"""
188227
Get color combinations for Venn diagram. This converts color names to RGBA

0 commit comments

Comments
 (0)