Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Florian Wagner committed Aug 5, 2016
2 parents b0a967d + 393803e commit 22d942a
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 6 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,18 @@ Version 1.2.0 (2016-07-26)

- Updated changelog, fix version number in documentation

1.2.4 (2016-07-26)
1.2.4 (2016-08-04)
~~~~~~~~~~~~~~~~~~

- Fixed bug that made it impossible to run GO-PCA from the command line
(`go-pca.py`)

1.2.5 (2016-08-05)
~~~~~~~~~~~~~~~~~~

- Fixed a bug that prevented the Gene Ontology file from being loaded when
running GO-PCA from the command line (`go-pca.py`)

Version 1.1.3 (2016-02-23)
--------------------------

Expand Down
6 changes: 3 additions & 3 deletions gopca/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,9 +318,9 @@ def main(args=None):
if args.gene_ontology_file is not None:
p_logger = logging.getLogger(genometools.__name__)
p_logger.setLevel(logging.ERROR)
gene_ontology = GeneOntology()
gene_ontology.read_obo(args.gene_ontology_file,
part_of_cc_only=config.go_part_of_cc_only)
gene_ontology = GeneOntology.read_obo(
args.gene_ontology_file,
part_of_cc_only=config.go_part_of_cc_only)
p_logger.setLevel(logging.NOTSET)

M = GOPCA(config, E, gene_sets, gene_ontology)
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@
'scipy >= 0.14, < 1',
'scikit-learn >= 0.14, < 1',
'plotly >= 1.9.6, < 2',
'genometools >= 2.0rc6',
'genometools == 2.0rc6',
'xlmhg >= 2.0.6, < 3',
])

setup(
name='gopca',

version='1.2.4',
version='1.2.5',

description=description,
long_description=long_description,
Expand Down
42 changes: 42 additions & 0 deletions tests/03_cli/test_go_pca.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Copyright (c) 2016 Florian Wagner
#
# This file is part of GO-PCA.
#
# GO-PCA is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License, Version 3,
# as published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

from __future__ import (absolute_import, division,
print_function, unicode_literals)
# from builtins import *
from builtins import open
from builtins import str as text

import pytest

import subprocess as subproc

@pytest.fixture(scope='session')
def my_output_file(my_output_pypath):
return text(my_output_pypath.join('command-line_output.pickle'))

def test_script(my_expression_file,
my_fly_gene_set_file,
my_gene_ontology_file,
my_output_file):

p = subproc.Popen(
'go-pca.py -o %s -e %s -s %s -t %s -D 5'
% (my_output_file, my_expression_file, my_fly_gene_set_file,
my_gene_ontology_file),
shell=True, stdout=subproc.PIPE, stderr=subproc.PIPE)
stdout, stderr = p.communicate()
assert p.returncode == 0 # no errors
4 changes: 4 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ def my_data_pypath(tmpdir_factory):
pypath = tmpdir_factory.mktemp('gopca_data', numbered=False)
return pypath

@pytest.fixture(scope='session')
def my_output_pypath(tmpdir_factory):
pypath = tmpdir_factory.mktemp('gopca_output', numbered=False)
return pypath

@pytest.fixture(scope='session')
def my_expression_file(my_data_pypath):
Expand Down

0 comments on commit 22d942a

Please sign in to comment.