pridepy


Namepridepy JSON
Version 0.0.5 PyPI version JSON
download
home_pagehttps://github.com/PRIDE-Archive/pridepy
SummaryPython Client library for PRIDE Rest API
upload_time2024-10-16 10:59:05
maintainerNone
docs_urlNone
authorPRIDE Team
requires_pythonNone
licenseNone
keywords pride python client rest api
VCS
bugtrack_url
requirements requests ratelimit click pytest setuptools plotly boto3 botocore tqdm urllib3 httpx
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # pridepy: A Python package to download and search data from PRIDE database

[![Python package](https://github.com/PRIDE-Archive/pridepy/actions/workflows/python-package.yml/badge.svg)](https://github.com/PRIDE-Archive/pridepy/actions/workflows/python-package.yml)
[![PyPI version](https://badge.fury.io/py/pridepy.svg)](https://badge.fury.io/py/pridepy)
![PyPI - Downloads](https://img.shields.io/pypi/dm/pridepy)

Python Client library for PRIDE Rest API

# Installation

## From PyPI

To install, simply use `pip`:

```bash
$ pip install --upgrade pridepy
```

## From Source

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

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

Install with setup.py: 

```bash
$ 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_)

```bash
$ pridepy download-all-public-raw-files -a PXD012353 -o /Users/yourname/Downloads/foldername/ -p aspera
```

Download single file by name:
```bash
$ 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](https://www.globus.org/data-transfer).

Search projects with keywords and filters
```bash
$ pridepy search-projects-by-keywords-and-filters --keyword accession:PXD012353
```

Search files with filters
```bash
$ pridepy get-files-by-filter --filter fileCategory.value==RAW
```

Stream metadata of all projects as json and write it to a file
```bash
$ 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
```bash
$ 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:

```bash
$ 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](paper/paper.md). We can build it as PDF using pandoc.

```bash
$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](https://zenodo.org/badge/DOI/10.5281/zenodo.4475414.svg)](https://doi.org/10.5281/zenodo.4475414)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/PRIDE-Archive/pridepy",
    "name": "pridepy",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "PRIDE python client REST API",
    "author": "PRIDE Team",
    "author_email": "pride-support@ebi.ac.uk",
    "download_url": "https://files.pythonhosted.org/packages/c6/69/2f94d70cf30d3f20ea21107e6fb3b709b9236407224f3e6f066844b5cc27/pridepy-0.0.5.tar.gz",
    "platform": null,
    "description": "# pridepy: A Python package to download and search data from PRIDE database\n\n[![Python package](https://github.com/PRIDE-Archive/pridepy/actions/workflows/python-package.yml/badge.svg)](https://github.com/PRIDE-Archive/pridepy/actions/workflows/python-package.yml)\n[![PyPI version](https://badge.fury.io/py/pridepy.svg)](https://badge.fury.io/py/pridepy)\n![PyPI - Downloads](https://img.shields.io/pypi/dm/pridepy)\n\nPython Client library for PRIDE Rest API\n\n# Installation\n\n## From PyPI\n\nTo install, simply use `pip`:\n\n```bash\n$ pip install --upgrade pridepy\n```\n\n## From Source\n\nFirst, clone the repository on your local machine and then install the package using `pip`:\n\n```bash\n$ git clone https://github.com/PRIDE-Archive/pridepy\n$ cd pridepy\n$ pip install .\n```\n\nInstall with setup.py: \n\n```bash\n$ git clone https://github.com/PRIDE-Archive/pridepy\n$ cd pridepy\n$ python setup.py sdist bdist_wheel \n$ pip install dist/pridepy-{version}.tar.gz\n```\n\n# Examples\n\nDownload all the raw files from a dataset(eg: PXD012353).\nWarning: Raw files are generally large in size, so it may take some time to download depending on the number of files and file sizes.\n\n`-p`: in download specifies protocol (ftp default): \n   - **ftp**: FTP protocol\n   - **aspera**: using the aspera protocol\n   - **globus**: PRIDE globus endpoint (_the data is downloaded through https_)\n\n```bash\n$ pridepy download-all-public-raw-files -a PXD012353 -o /Users/yourname/Downloads/foldername/ -p aspera\n```\n\nDownload single file by name:\n```bash\n$ pridepy download-file-by-name -a PXD022105 -o /Users/yourname/Downloads/foldername/ -f checksum.txt -p globus\n```\n\n>**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](https://www.globus.org/data-transfer).\n\nSearch projects with keywords and filters\n```bash\n$ pridepy search-projects-by-keywords-and-filters --keyword accession:PXD012353\n```\n\nSearch files with filters\n```bash\n$ pridepy get-files-by-filter --filter fileCategory.value==RAW\n```\n\nStream metadata of all projects as json and write it to a file\n```bash\n$ pridepy stream-projects-metadata -o all_pride_projects.json\n```\n\nStream metadata of all files as json and write it to a file. Project accession can be specified as an optional parameter\n```bash\n$ pridepy stream-files-metadata -o all_pride_files.json\nOR\n$ pridepy stream-files-metadata -o PXD005011_files.json -a PXD005011\n```\n\nUse the below command to view a list of commands available:\n\n```bash\n$ pridepy --help\nUsage: pridepy [OPTIONS] COMMAND [ARGS]...\n\nOptions:\n  --help  Show this message and exit.\n\nCommands:\n  download-all-public-raw-files   Download all public raw files...\n  download-file-by-name           Download a single file from a...\n  get-files-by-filter             get paged files :return:\n  get-files-by-project-accession  get files by project accession...\n  get-private-files               Get private files by project...\n  get-projects                    get paged projects :return:\n  get-projects-by-accession       get projects by accession... \n  stream-files-metadata           Stream all files metadata in...\n  stream-projects-metadata        Stream all projects metadata...\n    \n```\n# NOTE\n\nPlease make sure you are using Python3, not Python 2.7 version.\n\n# White paper\n\nA white paper is available at [here](paper/paper.md). We can build it as PDF using pandoc.\n\n```bash\n$docker run --rm --platform linux/amd64 -v /Users/yperez/work/pridepy/paper/:/data -w /data openjournals/inara:latest paper.md -p -o pdf\n```\n\n# Citation\n\nSelvakumar 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). \n\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.4475414.svg)](https://doi.org/10.5281/zenodo.4475414)\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Python Client library for PRIDE Rest API",
    "version": "0.0.5",
    "project_urls": {
        "Homepage": "https://github.com/PRIDE-Archive/pridepy"
    },
    "split_keywords": [
        "pride",
        "python",
        "client",
        "rest",
        "api"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "479628f1e1f24272d1134cd2b4b88a1641d41013cdc973f7362cfe2f90a02a9c",
                "md5": "48a80f0da4d876cc37638aa689c91082",
                "sha256": "ba91aef7a55b90c6361a62b3f751ec80187a4c46bd090793b020a847edb60ae4"
            },
            "downloads": -1,
            "filename": "pridepy-0.0.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "48a80f0da4d876cc37638aa689c91082",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 38444945,
            "upload_time": "2024-10-16T10:59:02",
            "upload_time_iso_8601": "2024-10-16T10:59:02.358352Z",
            "url": "https://files.pythonhosted.org/packages/47/96/28f1e1f24272d1134cd2b4b88a1641d41013cdc973f7362cfe2f90a02a9c/pridepy-0.0.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c6692f94d70cf30d3f20ea21107e6fb3b709b9236407224f3e6f066844b5cc27",
                "md5": "687d1265ebca8c5f871733b0814341e7",
                "sha256": "548b4a848ffe7bef7e0dd7b15a4c844d0db1cf30563ae5ff5e484313b0a9441d"
            },
            "downloads": -1,
            "filename": "pridepy-0.0.5.tar.gz",
            "has_sig": false,
            "md5_digest": "687d1265ebca8c5f871733b0814341e7",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 38299894,
            "upload_time": "2024-10-16T10:59:05",
            "upload_time_iso_8601": "2024-10-16T10:59:05.723414Z",
            "url": "https://files.pythonhosted.org/packages/c6/69/2f94d70cf30d3f20ea21107e6fb3b709b9236407224f3e6f066844b5cc27/pridepy-0.0.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-16 10:59:05",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "PRIDE-Archive",
    "github_project": "pridepy",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "requests",
            "specs": []
        },
        {
            "name": "ratelimit",
            "specs": []
        },
        {
            "name": "click",
            "specs": []
        },
        {
            "name": "pytest",
            "specs": []
        },
        {
            "name": "setuptools",
            "specs": []
        },
        {
            "name": "plotly",
            "specs": []
        },
        {
            "name": "boto3",
            "specs": []
        },
        {
            "name": "botocore",
            "specs": []
        },
        {
            "name": "tqdm",
            "specs": []
        },
        {
            "name": "urllib3",
            "specs": []
        },
        {
            "name": "httpx",
            "specs": []
        }
    ],
    "lcname": "pridepy"
}
        
Elapsed time: 0.32636s