Skip to content

Commit d47cccd

Browse files
committed
Added fontsize option to venn module
1 parent 0a1564d commit d47cccd

File tree

4 files changed

+19
-14
lines changed

4 files changed

+19
-14
lines changed

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ If you have `git` installed, use this:
8686
8787
git clone https://bitbucket.org/CBGR/intervene.git
8888
cd intervene
89-
python setup.py install
89+
python setup.py sdist install
9090
9191
Install development version from `GitHub`
9292
-----------------------------------------
@@ -96,7 +96,7 @@ If you have `git` installed, use this:
9696
9797
git clone https://github.com/asntech/intervene.git
9898
cd intervene
99-
python setup.py install
99+
python setup.py sdist install
100100
101101
How to use Intervene
102102
====================

docs/install.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ If you have `git` installed, use this:
8282
8383
git clone https://bitbucket.org/CBGR/intervene.git
8484
cd intervene
85-
python setup.py install
85+
python setup.py sdist install
8686
8787
8888

docs/modules.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ This will save the results in the current working directory with a folder named
5050
"-o, --output","Output folder path where results will be stored. Default is current working directory."
5151
"--figtype","{pdf,svg,ps,tiff,png} Figure type for the plot. e.g. --figtype svg. Default is ``pdf``"
5252
"--figsize","Figure size as width and height.e.g. --figsize 12 12."
53+
"--fontsize","Font size for the plot labels. Default is ``14``"
5354
"--dpi","Dots-per-inch (DPI) for the output. Default is: ``300``"
5455
"--fill","{number,percentage} Report number or percentage of overlaps (Only if --type=list). Default is ``number``"
5556
"--test","This will run the program on test data."

intervene/intervene

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,11 @@ def main():
6464
'e.g. --figtype svg. Default is "%(default)s"\n\n')
6565
venn_parser.add_argument('--figsize', nargs=2, type=int, default=(12,12),
6666
help='Figure size as width and height.'
67-
'e.g. --figsize 12 12.\n\n')
67+
'e.g. --figsize 12 12.\n\n')
68+
venn_parser.add_argument('--fontsize', dest='fontsize', type=int, default=14,
69+
help='Font size for the plot labels.'
70+
'Default is: "%(default)s"\n\n')
71+
6872
venn_parser.add_argument('--dpi', type=int, default=300,
6973
help='Dots-per-inch (DPI) for the output. '
7074
'Default is: "%(default)s"\n\n')
@@ -408,12 +412,12 @@ def main():
408412
#create an RScript
409413
upset.create_r_script(labels, label_names, options)
410414
else:
411-
fig, ax = list_venn.venn2(labels, names=label_names, dpi=options.dpi, colors=options.colors, figsize=options.figsize)
415+
fig, ax = list_venn.venn2(labels, names=label_names, dpi=options.dpi, colors=options.colors, figsize=options.figsize, fontsize=options.fontsize)
412416

413417
#else input considered as bed file
414418
else:
415419
labels = upset.genomic_upset(options.input)
416-
fig, ax = list_venn.venn2(labels, names=label_names, dpi=options.dpi, colors=options.colors, figsize=options.figsize)
420+
fig, ax = list_venn.venn2(labels, names=label_names, dpi=options.dpi, colors=options.colors, figsize=options.figsize, fontsize=options.fontsize)
417421

418422
#fig, ax = genomic_venn.venn2(input_files=options.input,
419423
# options=options, names=label_names, plot_type=plot_type)
@@ -438,11 +442,11 @@ def main():
438442
upset.create_r_script(labels, label_names, options)
439443

440444
else:
441-
fig, ax = list_venn.venn3(labels, names=label_names, dpi=options.dpi, colors=options.colors, figsize=options.figsize)
445+
fig, ax = list_venn.venn3(labels, names=label_names, dpi=options.dpi, colors=options.colors, figsize=options.figsize, fontsize=options.fontsize)
442446
#else input considered as bed file
443447
else:
444448
labels = upset.genomic_upset(options.input)
445-
fig, ax = list_venn.venn3(labels, names=label_names, dpi=options.dpi, colors=options.colors, figsize=options.figsize)
449+
fig, ax = list_venn.venn3(labels, names=label_names, dpi=options.dpi, colors=options.colors, figsize=options.figsize, fontsize=options.fontsize)
446450

447451
#fig, ax = genomic_venn.venn3(input_files=options.input, options=options, names=label_names, plot_type=plot_type)
448452

@@ -468,12 +472,12 @@ def main():
468472
upset.create_r_script(labels, label_names, options)
469473

470474
else:
471-
fig, ax = list_venn.venn4(labels, names=label_names, dpi=options.dpi, colors=options.colors, figsize=options.figsize)
475+
fig, ax = list_venn.venn4(labels, names=label_names, dpi=options.dpi, colors=options.colors, figsize=options.figsize, fontsize=options.fontsize)
472476

473477
#else input considered as bed file
474478
else:
475479
labels = upset.genomic_upset(options.input)
476-
fig, ax = list_venn.venn4(labels, names=label_names, dpi=options.dpi, colors=options.colors, figsize=options.figsize)
480+
fig, ax = list_venn.venn4(labels, names=label_names, dpi=options.dpi, colors=options.colors, figsize=options.figsize, fontsize=options.fontsize)
477481
#fig, ax = genomic_venn.venn4(input_files=options.input, options=options, names=label_names, plot_type=plot_type)
478482

479483

@@ -501,11 +505,11 @@ def main():
501505
upset.create_r_script(labels, label_names, options)
502506

503507
else:
504-
fig, ax = list_venn.venn5(labels, names=label_names, dpi=options.dpi, colors=options.colors, figsize=options.figsize)
508+
fig, ax = list_venn.venn5(labels, names=label_names, dpi=options.dpi, colors=options.colors, figsize=options.figsize, fontsize=options.fontsize)
505509
#else input considered as genomic regions file
506510
else:
507511
labels = upset.genomic_upset(options.input)
508-
fig, ax = list_venn.venn5(labels, names=label_names, dpi=options.dpi, colors=options.colors, figsize=options.figsize)
512+
fig, ax = list_venn.venn5(labels, names=label_names, dpi=options.dpi, colors=options.colors, figsize=options.figsize, fontsize=options.fontsize)
509513
#fig, ax = genomic_venn.venn5(input_files=options.input, options=options, names=label_names, plot_type=plot_type)
510514

511515
elif helpers.venn_order(options.input) == 6:
@@ -532,12 +536,12 @@ def main():
532536
#create an RScript
533537
upset.create_r_script(labels, label_names, options)
534538
else:
535-
fig, ax = list_venn.venn6(labels, names=label_names, dpi=options.dpi, colors=options.colors, figsize=options.figsize)
539+
fig, ax = list_venn.venn6(labels, names=label_names, dpi=options.dpi, colors=options.colors, figsize=options.figsize, fontsize=options.fontsize)
536540

537541
#else input considered as bed file
538542
else:
539543
labels = upset.genomic_upset(options.input)
540-
fig, ax = list_venn.venn6(labels, names=label_names, dpi=options.dpi, colors=options.colors, figsize=options.figsize)
544+
fig, ax = list_venn.venn6(labels, names=label_names, dpi=options.dpi, colors=options.colors, figsize=options.figsize, fontsize=options.fontsize)
541545
#fig, ax = genomic_venn.venn6(input_files=options.input,options=options, names=label_names, plot_type=plot_type)
542546

543547
else:

0 commit comments

Comments
 (0)