Skip to content

Commit

Permalink
changes on cbioportal download system.
Browse files Browse the repository at this point in the history
  • Loading branch information
ypriverol committed Apr 19, 2024
1 parent 5064b82 commit e46bffe
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions pypgatk/cgenomes/cbioportal_downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ def __init__(self, config_data, pipeline_arguments):
self._list_studies = []
self._multithreading = True

self._cbioportal_base_url = 'https://www.cbioportal.org/webservice.do'
self._cancer_studies_command = 'cmd=getCancerStudies'
self._cbioportal_base_url = 'https://www.cbioportal.org/api'
self._cancer_studies_command = 'studies'

self._cbioportal_download_url = 'https://cbioportal-datahub.s3.amazonaws.com'

Expand Down Expand Up @@ -111,13 +111,13 @@ def get_cancer_studies(self):
"""
server = self._cbioportal_base_url
endpoint = self._cancer_studies_command
self._cbioportal_studies = call_api_raw(server + "?" + endpoint).text
self._cbioportal_studies = call_api_raw(server + "/" + endpoint).text
return self._cbioportal_studies

def download_study(self, download_study, url_file_name=None):
"""
This function will download a study from cBioPortal using the study ID
:param download_study: Study to be download, if the study is empty or None, all the studies will be
:param download_study: Study to be downloaded, if the study is empty or None, all the studies will be
downloaded.
:param url_file_name: file tsv containing the urls to be downloaded.
:return: None
Expand Down
4 changes: 2 additions & 2 deletions pypgatk/config/cbioportal_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ cbioportal_data_downloader:
output_directory: database_cbioportal
list_studies: []
cbioportal_api:
base_url: https://www.cbioportal.org/webservice.do
cancer_studies: cmd=getCancerStudies
base_url: https://www.cbioportal.org/api
cancer_studies: studies
cbioportal_download_url: https://cbioportal-datahub.s3.amazonaws.com
logger:
formatters:
Expand Down

0 comments on commit e46bffe

Please sign in to comment.