Skip to content

Commit

Permalink
Added fontsize option to venn module
Browse files Browse the repository at this point in the history
  • Loading branch information
asntech committed Mar 8, 2017
1 parent 0a1564d commit d47cccd
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 14 deletions.
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ If you have `git` installed, use this:
git clone https://bitbucket.org/CBGR/intervene.git
cd intervene
python setup.py install
python setup.py sdist install
Install development version from `GitHub`
-----------------------------------------
Expand All @@ -96,7 +96,7 @@ If you have `git` installed, use this:
git clone https://github.com/asntech/intervene.git
cd intervene
python setup.py install
python setup.py sdist install
How to use Intervene
====================
Expand Down
2 changes: 1 addition & 1 deletion docs/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ If you have `git` installed, use this:
git clone https://bitbucket.org/CBGR/intervene.git
cd intervene
python setup.py install
python setup.py sdist install
1 change: 1 addition & 0 deletions docs/modules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ This will save the results in the current working directory with a folder named
"-o, --output","Output folder path where results will be stored. Default is current working directory."
"--figtype","{pdf,svg,ps,tiff,png} Figure type for the plot. e.g. --figtype svg. Default is ``pdf``"
"--figsize","Figure size as width and height.e.g. --figsize 12 12."
"--fontsize","Font size for the plot labels. Default is ``14``"
"--dpi","Dots-per-inch (DPI) for the output. Default is: ``300``"
"--fill","{number,percentage} Report number or percentage of overlaps (Only if --type=list). Default is ``number``"
"--test","This will run the program on test data."
Expand Down
26 changes: 15 additions & 11 deletions intervene/intervene
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,11 @@ def main():
'e.g. --figtype svg. Default is "%(default)s"\n\n')
venn_parser.add_argument('--figsize', nargs=2, type=int, default=(12,12),
help='Figure size as width and height.'
'e.g. --figsize 12 12.\n\n')
'e.g. --figsize 12 12.\n\n')
venn_parser.add_argument('--fontsize', dest='fontsize', type=int, default=14,
help='Font size for the plot labels.'
'Default is: "%(default)s"\n\n')

venn_parser.add_argument('--dpi', type=int, default=300,
help='Dots-per-inch (DPI) for the output. '
'Default is: "%(default)s"\n\n')
Expand Down Expand Up @@ -408,12 +412,12 @@ def main():
#create an RScript
upset.create_r_script(labels, label_names, options)
else:
fig, ax = list_venn.venn2(labels, names=label_names, dpi=options.dpi, colors=options.colors, figsize=options.figsize)
fig, ax = list_venn.venn2(labels, names=label_names, dpi=options.dpi, colors=options.colors, figsize=options.figsize, fontsize=options.fontsize)

#else input considered as bed file
else:
labels = upset.genomic_upset(options.input)
fig, ax = list_venn.venn2(labels, names=label_names, dpi=options.dpi, colors=options.colors, figsize=options.figsize)
fig, ax = list_venn.venn2(labels, names=label_names, dpi=options.dpi, colors=options.colors, figsize=options.figsize, fontsize=options.fontsize)

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

else:
fig, ax = list_venn.venn3(labels, names=label_names, dpi=options.dpi, colors=options.colors, figsize=options.figsize)
fig, ax = list_venn.venn3(labels, names=label_names, dpi=options.dpi, colors=options.colors, figsize=options.figsize, fontsize=options.fontsize)
#else input considered as bed file
else:
labels = upset.genomic_upset(options.input)
fig, ax = list_venn.venn3(labels, names=label_names, dpi=options.dpi, colors=options.colors, figsize=options.figsize)
fig, ax = list_venn.venn3(labels, names=label_names, dpi=options.dpi, colors=options.colors, figsize=options.figsize, fontsize=options.fontsize)

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

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

else:
fig, ax = list_venn.venn4(labels, names=label_names, dpi=options.dpi, colors=options.colors, figsize=options.figsize)
fig, ax = list_venn.venn4(labels, names=label_names, dpi=options.dpi, colors=options.colors, figsize=options.figsize, fontsize=options.fontsize)

#else input considered as bed file
else:
labels = upset.genomic_upset(options.input)
fig, ax = list_venn.venn4(labels, names=label_names, dpi=options.dpi, colors=options.colors, figsize=options.figsize)
fig, ax = list_venn.venn4(labels, names=label_names, dpi=options.dpi, colors=options.colors, figsize=options.figsize, fontsize=options.fontsize)
#fig, ax = genomic_venn.venn4(input_files=options.input, options=options, names=label_names, plot_type=plot_type)


Expand Down Expand Up @@ -501,11 +505,11 @@ def main():
upset.create_r_script(labels, label_names, options)

else:
fig, ax = list_venn.venn5(labels, names=label_names, dpi=options.dpi, colors=options.colors, figsize=options.figsize)
fig, ax = list_venn.venn5(labels, names=label_names, dpi=options.dpi, colors=options.colors, figsize=options.figsize, fontsize=options.fontsize)
#else input considered as genomic regions file
else:
labels = upset.genomic_upset(options.input)
fig, ax = list_venn.venn5(labels, names=label_names, dpi=options.dpi, colors=options.colors, figsize=options.figsize)
fig, ax = list_venn.venn5(labels, names=label_names, dpi=options.dpi, colors=options.colors, figsize=options.figsize, fontsize=options.fontsize)
#fig, ax = genomic_venn.venn5(input_files=options.input, options=options, names=label_names, plot_type=plot_type)

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

#else input considered as bed file
else:
labels = upset.genomic_upset(options.input)
fig, ax = list_venn.venn6(labels, names=label_names, dpi=options.dpi, colors=options.colors, figsize=options.figsize)
fig, ax = list_venn.venn6(labels, names=label_names, dpi=options.dpi, colors=options.colors, figsize=options.figsize, fontsize=options.fontsize)
#fig, ax = genomic_venn.venn6(input_files=options.input,options=options, names=label_names, plot_type=plot_type)

else:
Expand Down

0 comments on commit d47cccd

Please sign in to comment.