acore.io package#

download_PRIDE_data(pxd_id, file_name, to='.', user='', password='', date_field='publicationDate', overwrite: bool = False) → dict[source]#

This function downloads a project file from the PRIDE repository. To see more of the pride API, have a look at https://www.ebi.ac.uk/pride/ws/archive/v3/webjars/swagger-ui/index.html or EBI’s commandline tool pridepy PRIDE-Archive/pridepy

Parameters:
  • pxd_id (str) – PRIDE project identifier (id. PXD013599).

  • file_name (str) – name of the file to dowload

  • to (str) – local directory where the file should be downloaded

  • user (str) – username to access biomedical database server if required.

  • password (str) – password to access biomedical database server if required.

  • date_field (str) – projects deposited in PRIDE are search based on date, either submissionData or publicationDate (default)

  • overwrite (bool) – if False (default), skip the download if the file already exists in the target directory. The project metadata is returned regardless.

download_file(url: str, local_filename: str) → None[source]#

Download a file from the internet.

unrar(filepath, to)[source]#

Decompress RAR file

Uses the system unrar x command, as extraction through rarfile can fail for some archives (rarfile falls back to other tools such as bsdtar if unrar is not on PATH). Falls back to rarfile if unrar is not found.

Parameters:
  • filepath (str) – path to rar file

  • to (str) – where to extract all files

Subpackages#

Submodules#