Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
asntech committed Feb 10, 2017
1 parent 00be457 commit cac057e
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 10 deletions.
8 changes: 6 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,17 @@ Installation
Intervene requires the following Python modules and R packages:

* Python (=> 2.7 ): https://www.python.org/
* BedTools (Latest version): https://github.com/arq5x/bedtools2
* pybedtools (>= 0.7.9): https://daler.github.io/pybedtools/
* Pandas (>= 0.16.0): http://pandas.pydata.org/
* R (>= 3.0): https://www.r-project.org/
* R packages including UpSetR, corrplot

Install BEDTools
-----------------
We are using pybedtools, which is Python wraper of BEDTools. So, BEDTools is should be installed before using Intervene.It's recomended to have a latest version, but if you have an older version already install. Please read the instructions at https://github.com/arq5x/bedtools2 to install BEDTolls, and make sure the bedtools is on your path and you are able to call it from any directory.


Install required Python modules
-------------------------------
If you already have a working installation of Python, the easiest way to install required Python modules is by using ``pip``. If you're setting up Python for the first time, we recommend to install it using Anaconda Python distribution http://continuum.io/downloads. These come with several helpful scientific and data processing libraries. These are available for platforms including Windows, Mac OSX and Linux.
Expand All @@ -38,7 +44,6 @@ or using conda
Read more details about ''pybedtools'' installation: https://daler.github.io/pybedtools/main.html


**Install Pandas**

Install it from PyPi
Expand All @@ -53,7 +58,6 @@ Or install with conda
conda install pandas
**Install argparser**

.. code-block:: bash
Expand Down
7 changes: 5 additions & 2 deletions docs/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,16 @@ Intervene requires the following Python modules and R packages:


* Python (=> 2.7 ): https://www.python.org/
* BedTools (Latest version): https://github.com/arq5x/bedtools2
* pybedtools (>= 0.7.9): https://daler.github.io/pybedtools/
* Pandas (>= 0.16.0): http://pandas.pydata.org/
* R (>= 3.0): https://www.r-project.org/
* R packages including UpSetR, corrplot

Install BEDTools
-----------------
We are using pybedtools, which is Python wraper of BEDTools. So, BEDTools is should be installed before using Intervene.It's recomended to have a latest version, but if you have an older version already install. Please read the instructions at https://github.com/arq5x/bedtools2 to install BEDTolls, and make sure the bedtools is on your path and you are able to call it from any directory.

Install required Python modules
-------------------------------

Expand All @@ -33,7 +38,6 @@ or using conda
Read more details about ''pybedtools'' installation: https://daler.github.io/pybedtools/main.html


**Install Pandas**

Install it from PyPi
Expand All @@ -48,7 +52,6 @@ Or install with conda
conda install pandas
**Install argparser**

.. code-block:: bash
Expand Down
2 changes: 1 addition & 1 deletion intervene/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.39'
__version__ = '0.4.0'
8 changes: 3 additions & 5 deletions intervene/modules/upset/upset.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ def create_r_script(labels, names, options):
"""
It create an Rscript for UpSetR plot for the genomic regions.
"""
#temp_f = tempfile.NamedTemporaryFile(delete=False)
#temp_f = open(tempfile.mktemp(), "w")
Expand All @@ -26,18 +25,17 @@ def create_r_script(labels, names, options):
output_name = options.output+'/'+'intervene_'+options.type+'_UpSet_plot.'+options.figtype

temp_f.write('#!/usr/bin/env Rscript'+"\n")
temp_f.write('if (suppressMessages(!require("UpSetR"))) suppressMessages(install.packages("UpSetR", repos="http://cran.us.r-project.org"))\n')
temp_f.write('library("UpSetR")\n')


if options.figtype == 'pdf':
temp_f.write(options.figtype+'("'+output_name+'", width='+str(options.figsize[0])+', height='+str(options.figsize[1])+')'+'\n')
temp_f.write(options.figtype+'("'+output_name+'", width='+str(options.figsize[0])+', height='+str(options.figsize[1])+', onefile=FALSE)'+'\n')

elif options.figtype == 'ps':
temp_f.write('postscript("'+output_name+'", width='+str(options.figsize[0])+', height='+str(options.figsize[1])+')'+'\n')

else:
temp_f.write(options.figtype+'("'+output_name+'", width='+str(options.dpi*options.figsize[0])+', height='+str(options.dpi*options.figsize[1])+', res='+str(options.dpi)+')\n')

temp_f.write("expressionInput <- c(")

last = 1
Expand Down

0 comments on commit cac057e

Please sign in to comment.