Skip to content

Commit

Permalink
Merge pull request #17 from fossilfriend/master
Browse files Browse the repository at this point in the history
PyPI packaging + updated readme + bin directory with executable
  • Loading branch information
fossilfriend authored Dec 14, 2017
2 parents 2525c45 + 00660f2 commit 04cc882
Show file tree
Hide file tree
Showing 23 changed files with 2,405 additions and 3 deletions.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,13 @@ python setup.py install --user

#### Quick Start

iterativeWGCNA can be run without installing the iterativeWGCNA package by excuting the wrapper script `run_iterative_wgcna.py` in the iterativeWGCNA directory. At a minimum, the `-i` option (`--inputFile`) denoting the full path to the input file must be specified.
If installed via the `pip` or `easy_install`, iterativeWGCNA can be run using the `iterativeWGCNA` command. At minimum, the `-i` option (`--inputFile`) denoting the full path to the input file must be specified:

```sh
iterativeWGCNA -i <input_file_path>
```

iterativeWGCNA can also be run without installing the iterativeWGCNA package by executing the wrapper script `run_iterative_wgcna.py` in the iterativeWGCNA directory. At a minimum, the `-i` option (`--inputFile`) denoting the full path to the input file must be specified:

```sh
python run_iterative_wgcna.py -i <input_file_path>
Expand Down
17 changes: 17 additions & 0 deletions bin/iterativeWGCNA
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env python

'''Convenience wrapper for running iterativeWGCNA directly from source tree.'''

# Installation workaround - see README
# import readline

from iterativeWGCNA.cmlargs import parse_command_line_args
from iterativeWGCNA.iterativeWGCNA import IterativeWGCNA

if __name__ == '__main__':
cmlArgs = parse_command_line_args()
alg = IterativeWGCNA(cmlArgs)
alg.run()

__author__ = 'Emily Greenfest-Allen'
__copyright__ = 'Copyright 2016, University of Pennsylvania'
Empty file.
22 changes: 22 additions & 0 deletions build/lib/iterativeWGCNA/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env python2.7
"""
Perform iterative WGCNA analysis
python dependencies:
* rpy2
* matplotlib
R dependencies:
* WGCNA
"""

from .cmlargs import parse_command_line_args
from .iterativeWGCNA import IterativeWGCNA

if __name__ == '__main__':
args = parse_command_line_args()
alg = IterativeWGCNA(args)
alg.run()

__author__ = 'Emily Greenfest-Allen'
__copyright__ = 'Copyright 2016, University of Pennsylvania'
18 changes: 18 additions & 0 deletions build/lib/iterativeWGCNA/analysis.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
'''
functions in support of data analysis
'''

# TODO move to RManager or wgcnaManager

from .r.imports import wgcna, stats, base

def calculate_kME(expr, eigengene, calculateP):
'''
calculates eigengene connectivity
between an eigengene and expression data set
'''
if calculateP:
correlation = wgcna().corAndPvalue(base().t(expr), base().t(eigengene))
else:
correlation = base().as_data_frame(stats().cor(base().t(expr), base().t(eigengene)))
return correlation
Loading

0 comments on commit 04cc882

Please sign in to comment.