Skip to content

Commit

Permalink
Adapt changes in wp
Browse files Browse the repository at this point in the history
  • Loading branch information
ddomingof committed Oct 3, 2018
1 parent e2118ca commit 87f8897
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/pathme/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def download():
log.setLevel(logging.INFO)

cached_file = os.path.join(WIKIPATHWAYS_FILES, get_file_name_from_url(RDF_WIKIPATHWAYS))
make_downloader(RDF_WIKIPATHWAYS, cached_file, WIKIPATHWAYS, unzip_file)
make_downloader(RDF_WIKIPATHWAYS, cached_file, WIKIPATHWAYS_FILES, unzip_file)
log.info('WikiPathways was downloaded')


Expand Down Expand Up @@ -208,7 +208,7 @@ def download():
log.setLevel(logging.INFO)

cached_file = os.path.join(REACTOME_FILES, get_file_name_from_url(RDF_REACTOME))
make_downloader(RDF_REACTOME, cached_file, REACTOME, untar_file)
make_downloader(RDF_REACTOME, cached_file, REACTOME_FILES, untar_file)
log.info('Reactome was downloaded')


Expand Down
6 changes: 3 additions & 3 deletions src/pathme/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,11 +288,11 @@ def statistics_to_df(all_pathways_statistics):
"""Downloader"""


def make_downloader(url, path, database, decompress_file):
def make_downloader(url, path, export_path, decompress_file):
"""Make a function that downloads the data for you, or uses a cached version at the given path.
:param str url: The URL of some data
:param str database: database name / folder to be created in resources
:param str export_path: folder where decompressed file will be exported
:param method decompress_file: method to decompress file
:return: A function that downloads the data and returns the path of the data
:rtype: (bool -> str)
Expand All @@ -316,7 +316,7 @@ def download_data(force_download=False):
data = download_data()

log.info('unzipping file %s, da')
decompress_file(data, os.path.join(DATA_DIR, database))
decompress_file(data, export_path)


def summarize_helper(graphs):
Expand Down

0 comments on commit 87f8897

Please sign in to comment.