Skip to main content

Python Client library for PRIDE Rest API

Project description

pridepy: A Python package to download and search data from PRIDE database

Python package PyPI version PyPI - Downloads

Python Client library for PRIDE Rest API

Installation

From PyPI

To install, simply use pip:

$ pip install --upgrade pridepy

From Source

First, clone the repository on your local machine and then install the package using pip:

$ git clone https://github.com/PRIDE-Archive/pridepy
$ cd pridepy
$ pip install .

Install with setup.py:

$ git clone https://github.com/PRIDE-Archive/pridepy
$ cd pridepy
$ python setup.py sdist bdist_wheel 
$ pip install dist/pridepy-{version}.tar.gz

Examples

Download all the raw files from a dataset(eg: PXD012353). Warning: Raw files are generally large in size, so it may take some time to download depending on the number of files and file sizes.

-p: in download specifies protocol (ftp default):

  • ftp: FTP protocol
  • aspera: using the aspera protocol
  • globus: PRIDE globus endpoint (the data is downloaded through https)
$ pridepy download-all-public-raw-files -a PXD012353 -o /Users/yourname/Downloads/foldername/ -p aspera

Download single file by name:

$ pridepy download-file-by-name -a PXD022105 -o /Users/yourname/Downloads/foldername/ -f checksum.txt -p globus

NOTE: Currently we use Globus URLs (when -p globus is used) via HTTPS, not the Globus protocol. For more information about Globus, see Globus documentation.

Search projects with keywords and filters

$ pridepy search-projects-by-keywords-and-filters --keyword accession:PXD012353

Search files with filters

$ pridepy get-files-by-filter --filter fileCategory.value==RAW

Stream metadata of all projects as json and write it to a file

$ pridepy stream-projects-metadata -o all_pride_projects.json

Stream metadata of all files as json and write it to a file. Project accession can be specified as an optional parameter

$ pridepy stream-files-metadata -o all_pride_files.json
OR
$ pridepy stream-files-metadata -o PXD005011_files.json -a PXD005011

Use the below command to view a list of commands available:

$ pridepy --help
Usage: pridepy [OPTIONS] COMMAND [ARGS]...

Options:
  --help  Show this message and exit.

Commands:
  download-all-public-raw-files   Download all public raw files...
  download-file-by-name           Download a single file from a...
  get-files-by-filter             get paged files :return:
  get-files-by-project-accession  get files by project accession...
  get-private-files               Get private files by project...
  get-projects                    get paged projects :return:
  get-projects-by-accession       get projects by accession... 
  stream-files-metadata           Stream all files metadata in...
  stream-projects-metadata        Stream all projects metadata...
    

NOTE

Please make sure you are using Python3, not Python 2.7 version.

White paper

A white paper is available at here. We can build it as PDF using pandoc.

$docker run --rm --platform linux/amd64 -v /Users/yperez/work/pridepy/paper/:/data -w /data openjournals/inara:latest paper.md -p -o pdf

Citation

Selvakumar Kamatchinathan, Suresh Hewapathirana, Chakradhar Bandla, Yasset Perez-Riverol. (2021, January 28). pridepy: A Python package to download and search data from PRIDE database (Version v0.0.3).

DOI

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pridepy-0.0.5.tar.gz (38.3 MB view details)

Uploaded Source

Built Distribution

pridepy-0.0.5-py3-none-any.whl (38.4 MB view details)

Uploaded Python 3

File details

Details for the file pridepy-0.0.5.tar.gz.

File metadata

  • Download URL: pridepy-0.0.5.tar.gz
  • Upload date:
  • Size: 38.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for pridepy-0.0.5.tar.gz
Algorithm Hash digest
SHA256 548b4a848ffe7bef7e0dd7b15a4c844d0db1cf30563ae5ff5e484313b0a9441d
MD5 687d1265ebca8c5f871733b0814341e7
BLAKE2b-256 c6692f94d70cf30d3f20ea21107e6fb3b709b9236407224f3e6f066844b5cc27

See more details on using hashes here.

File details

Details for the file pridepy-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: pridepy-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 38.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for pridepy-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 ba91aef7a55b90c6361a62b3f751ec80187a4c46bd090793b020a847edb60ae4
MD5 48a80f0da4d876cc37638aa689c91082
BLAKE2b-256 479628f1e1f24272d1134cd2b4b88a1641d41013cdc973f7362cfe2f90a02a9c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page