[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M73HW9NXREGVA4KPPFZ1RJT0":3,"skill-same:01M73HW9NXREGVA4KPPFZ1RJT0":48},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":29,"ownerHtmlUrl":30,"ownerBlogUrl":31,"ownerDescription":32,"updatedAt":33,"install":34,"resources":47},"01M73HW9NXREGVA4KPPFZ1RJT0","pride-database",null,"Search the PRIDE Archive v3 REST API for proteomics datasets: discover projects by keyword + faceted filters (organism, instrument, disease, software), fetch project metadata, list and download RAW\u002FPEAK\u002FRESULT\u002FFASTA files (with FTP\u002FAspera URLs), look up which projects mention a UniProt accession, and find similar projects. PRIDE v3 no longer exposes peptide\u002FPSM-level identification endpoints — for spectrum-level data download the project's RESULT files. Use uniprot-protein-database for protein sequences; interpro-database for domain architecture.","bg-szy\u002FTOP-SKILLS","bg-szy","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F106576190?v=4","01M73A4E8KPV67SFXRY8XZGNBX","ShuZhiyong","01M73A4E96MQ294MHM74TZBVQD",6,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fawesome-skills\u002Fpride-database\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: \"pride-database\"\ndescription: \"Search the PRIDE Archive v3 REST API for proteomics datasets: discover projects by keyword + faceted filters (organism, instrument, disease, software), fetch project metadata, list and download RAW\u002FPEAK\u002FRESULT\u002FFASTA files (with FTP\u002FAspera URLs), look up which projects mention a UniProt accession, and find similar projects. PRIDE v3 no longer exposes peptide\u002FPSM-level identification endpoints — for spectrum-level data download the project's RESULT files. Use uniprot-protein-database for protein sequences; interpro-database for domain architecture.\"\nlicense: \"Apache-2.0\"\n---\n\n# PRIDE Database\n\n## Overview\n\nThe PRIDE Archive (ProteomicsIDEntifications database) at EMBL-EBI is the world's largest public mass-spectrometry proteomics repository — 39,000+ projects and 3.4M+ deposited files as of 2026. Programmatic access is via a JSON REST API at `https:\u002F\u002Fwww.ebi.ac.uk\u002Fpride\u002Fws\u002Farchive\u002Fv3\u002F`. No authentication is required. The OpenAPI\u002FSwagger spec is at `https:\u002F\u002Fwww.ebi.ac.uk\u002Fpride\u002Fws\u002Farchive\u002Fv3\u002Fv3\u002Fapi-docs`. PRIDE v3 returns **plain JSON arrays** for list endpoints (no HAL+JSON `_embedded` envelope) and intentionally does not expose per-peptide or per-PSM identification endpoints — for spectrum-level identifications, download the project's `RESULT` files (mzIdentML, MaxQuant txt, etc.) and parse them locally.\n\n## When to Use\n\n- Finding published proteomics datasets by free-text keyword and facet filters (organism, tissue, disease, instrument, software, PTM) for meta-analysis or benchmarking\n- Downloading raw mass-spectrometry data (RAW, mzML, MGF) or pre-processed identifications (RESULT files) from a specific PRIDE project accession\n- Looking up which PRIDE projects mention a specific UniProt protein accession (project-level occurrence map only — no PSM\u002Fcoverage counts at the API surface)\n- Finding similar projects to one of interest for reanalysis or cross-study comparison\n- Fetching SDRF (Sample-Data Relationship Format) files for projects so you can model the sample-to-MS-run mapping programmatically\n- Discovering valid filter values via faceted search before constructing a structured query\n- For protein sequences, Swiss-Prot annotations, and ID mapping use `uniprot-protein-database`\n- For protein domain and family classification use `interpro-database` — PRIDE only reports project-level occurrence, not domain-level features\n- **PRIDE v3 has no `\u002Fpeptides`, `\u002Fpsms`, or `\u002Fproteins?proteinAccession=` endpoints** — if you need peptide- or PSM-level data, download the RESULT files from `\u002Fprojects\u002F{accession}\u002Ffiles` and parse them with `pyteomics` or a search-engine-specific reader\n\n## Prerequisites\n\n- **Python packages**: `requests`, `pandas`, `matplotlib`\n- **Data requirements**: a PRIDE project accession (`PXD######` format) or a search keyword, optionally a UniProt accession for protein-occurrence lookup\n- **Environment**: internet connection; no API key required\n- **Rate limits**: not formally published; keep bursts under ~5 requests\u002Fsecond and add `time.sleep(0.3)` in loops\n\n```bash\npip install requests pandas matplotlib\n```\n\n## Quick Start\n\n```python\nimport requests\n\nPRIDE = \"https:\u002F\u002Fwww.ebi.ac.uk\u002Fpride\u002Fws\u002Farchive\u002Fv3\"\n\n# 1) Free-text search for cancer proteomics projects\nprojects = requests.get(f\"{PRIDE}\u002Fsearch\u002Fprojects\",\n                        params={\"keyword\": \"prostate cancer\", \"pageSize\": 5},\n                        timeout=30).json()\nprint(f\"Top {len(projects)} projects:\")\nfor p in projects[:3]:\n    instr = \", \".join(p.get(\"instruments\", []))[:50]\n    print(f\"  {p['accession']}  {(p['title'] or '')[:70]}  [{instr}]\")\n\n# 2) Drill into one project\nacc = projects[0][\"accession\"]\nproj = requests.get(f\"{PRIDE}\u002Fprojects\u002F{acc}\", timeout=30).json()\nprint(f\"\\n{proj['accession']}: {proj['title'][:70]}\")\nprint(f\"  Submitted: {proj.get('submissionDate')}  DOI: {proj.get('doi')}\")\nprint(f\"  Organisms: {[o['name'] for o in proj.get('organisms', [])]}\")\nprint(f\"  Instruments: {[i['name'] for i in proj.get('instruments', [])]}\")\n\n# 3) List files and total size\nfiles = requests.get(f\"{PRIDE}\u002Fprojects\u002F{acc}\u002Ffiles\u002Fall\", timeout=60).json()\ntotal_mb = sum(f.get(\"fileSizeBytes\", 0) for f in files) \u002F 1e6\nprint(f\"\\n  {len(files)} files, {total_mb:.0f} MB total\")\n```\n\n## Core API\n\n### Module 1: Project Search — `\u002Fsearch\u002Fprojects`\n\nFree-text search with optional facet-based filtering, pagination, and sorting. Returns a plain JSON array of project records — there is no HAL+JSON `_embedded`\u002F`page` wrapper.\n\n```python\nimport requests, pandas as pd\n\nPRIDE = \"https:\u002F\u002Fwww.ebi.ac.uk\u002Fpride\u002Fws\u002Farchive\u002Fv3\"\n\ndef search_projects(keyword=None, organism=None, instrument=None,\n                    disease=None, software=None,\n                    page_size=25, page=0, sort_field=\"submission_date\",\n                    sort_direction=\"DESC\"):\n    \"\"\"Search PRIDE v3 for projects.\n    Filter syntax (for the `filter` arg) is `field==value, field==value` using `_facet` field names\n    that are discoverable via \u002Ffacet\u002Fprojects.\"\"\"\n    filters = []\n    if organism:   filters.append(f\"organisms_facet=={organism}\")\n    if instrument: filters.append(f\"instruments_facet=={instrument}\")\n    if disease:    filters.append(f\"diseases_facet=={disease}\")\n    if software:   filters.append(f\"softwares_facet=={software}\")\n\n    params = {\"pageSize\": page_size, \"page\": page,\n              \"sortFields\": sort_field, \"sortDirection\": sort_direction}\n    if keyword: params[\"keyword\"] = keyword\n    if filters: params[\"filter\"] = \",\".join(filters)\n\n    r = requests.get(f\"{PRIDE}\u002Fsearch\u002Fprojects\", params=params, timeout=30)\n    r.raise_for_status()\n    return r.json()   # plain list[dict]\n\nprojects = search_projects(keyword=\"cancer\", organism=\"Homo sapiens (human)\",\n                           instrument=\"Q Exactive\", page_size=5)\ndf = pd.DataFrame([{\n    \"accession\": p[\"accession\"],\n    \"title\": (p.get(\"title\") or \"\")[:70],\n    \"submission_date\": p.get(\"submissionDate\"),\n    \"diseases\": \", \".join(p.get(\"diseases\", []))[:60],\n    \"instruments\": \", \".join(p.get(\"instruments\", []))[:50],\n} for p in projects])\nprint(df.to_string(index=False))\n```\n\n```python\n# Paginate through all matches for a keyword. The API doesn't return total counts inline;\n# walk pages until the next one is empty.\ndef search_all_projects(keyword, page_size=100, max_pages=20):\n    all_records, page = [], 0\n    while page \u003C max_pages:\n        batch = search_projects(keyword=keyword, page_size=page_size, page=page)\n        if not batch:\n            break\n        all_records.extend(batch)\n        if len(batch) \u003C page_size:\n            break    # last page\n        page += 1\n    return all_records\n\nresults = search_all_projects(\"phosphoproteomics\", page_size=100, max_pages=3)\nprint(f\"Phosphoproteomics projects collected (max 300): {len(results)}\")\n```\n\n### Module 2: Faceted Filter Discovery — `\u002Ffacet\u002Fprojects`\n\nBefore constructing a filtered search, query the facet endpoint to see which instrument \u002F organism \u002F disease \u002F software values actually exist for a given keyword, along with their counts. The response is a dict of facet groups, each mapping `{value: count}`.\n\n```python\nimport requests, pandas as pd\n\nPRIDE = \"https:\u002F\u002Fwww.ebi.ac.uk\u002Fpride\u002Fws\u002Farchive\u002Fv3\"\n\ndef get_facets(keyword=None, facet_page_size=20):\n    \"\"\"Return facet counts for projects matching `keyword`. Keys are facet groups\n    (instruments, organisms, diseases, softwares, experimentTypes, ...); values are\n    dicts of {value: count}.\"\"\"\n    params = {\"facetPageSize\": facet_page_size}\n    if keyword: params[\"keyword\"] = keyword\n    r = requests.get(f\"{PRIDE}\u002Ffacet\u002Fprojects\", params=params, timeout=30)\n    r.raise_for_status()\n    return r.json()\n\nfacets = get_facets(keyword=\"cancer\", facet_page_size=10)\nprint(f\"Facet groups: {list(facets.keys())}\")\nprint(f\"\\nTop instruments for 'cancer':\")\nfor instr, n in sorted(facets.get(\"instruments\", {}).items(), key=lambda kv: -kv[1])[:8]:\n    print(f\"  {instr:\u003C35} {n}\")\nprint(f\"\\nTop diseases:\")\nfor d, n in sorted(facets.get(\"diseases\", {}).items(), key=lambda kv: -kv[1])[:6]:\n    print(f\"  {d:\u003C55} {n}\")\n```\n\n### Module 3: Project Detail — `\u002Fprojects\u002F{accession}`\n\nFull metadata for a single project: submitters, labPIs, instruments, organisms (CV-coded), diseases, experiment types, references, DOI, submission\u002Fpublication dates. Lists are `CvParam`-style objects with `accession`, `cvLabel`, `name`, optionally `value`.\n\n```python\nimport requests\n\nPRIDE = \"https:\u002F\u002Fwww.ebi.ac.uk\u002Fpride\u002Fws\u002Farchive\u002Fv3\"\n\ndef get_project(accession):\n    r = requests.get(f\"{PRIDE}\u002Fprojects\u002F{accession}\", timeout=30)\n    r.raise_for_status()\n    return r.json()\n\np = get_project(\"PXD004131\")\nprint(f\"Accession    : {p['accession']}\")\nprint(f\"Title        : {p['title'][:80]}\")\nprint(f\"Submission   : {p.get('submissionDate')}\")\nprint(f\"Publication  : {p.get('publicationDate')}\")\nprint(f\"DOI          : {p.get('doi')}\")\nprint(f\"License      : {p.get('license')}\")\nprint(f\"Type         : {p.get('submissionType')}\")\nprint(f\"Organisms    : {[o['name'] for o in p.get('organisms', [])]}\")\nprint(f\"Instruments  : {[i['name'] for i in p.get('instruments', [])]}\")\nprint(f\"Experiment   : {[e['name'] for e in p.get('experimentTypes', [])]}\")\nprint(f\"PIs          : {[pi.get('name') for pi in p.get('labPIs', [])]}\")\nprint(f\"References   : {[r.get('doi') for r in p.get('references', [])[:3]]}\")\n```\n\n### Module 4: Project Files — `\u002Fprojects\u002F{accession}\u002Ffiles` + `\u002Ffiles\u002Fall`\n\nList the files associated with a project. Use the paginated endpoint for large projects; `\u002Ffiles\u002Fall` returns every file in one shot. Each file record carries `fileCategory.value` (one of `RAW`, `PEAK`, `RESULT`, `FASTA`, `OTHER`), `fileSizeBytes` (note the `Bytes` suffix — not `fileSize`), and a list of `publicFileLocations` each labeled `FTP Protocol` or `Aspera Protocol`.\n\n```python\nimport requests, pandas as pd\n\nPRIDE = \"https:\u002F\u002Fwww.ebi.ac.uk\u002Fpride\u002Fws\u002Farchive\u002Fv3\"\n\ndef get_project_files(accession, file_type=None, page_size=100):\n    \"\"\"Walk paginated \u002Ffiles for a project. Optionally filter by category code\n    (RAW, PEAK, RESULT, FASTA, OTHER). Returns a DataFrame.\"\"\"\n    rows, page = [], 0\n    while True:\n        r = requests.get(f\"{PRIDE}\u002Fprojects\u002F{accession}\u002Ffiles\",\n                         params={\"pageSize\": page_size, \"page\": page},\n                         timeout=30)\n        r.raise_for_status()\n        batch = r.json()\n        if not batch:\n            break\n        for f in batch:\n            cat = f.get(\"fileCategory\") or {}\n            ftp = next((loc[\"value\"] for loc in f.get(\"publicFileLocations\", [])\n                        if loc.get(\"name\") == \"FTP Protocol\"), \"\")\n            asp = next((loc[\"value\"] for loc in f.get(\"publicFileLocations\", [])\n                        if loc.get(\"name\") == \"Aspera Protocol\"), \"\")\n            rows.append({\n                \"file_name\": f.get(\"fileName\"),\n                \"category\": cat.get(\"value\"),     # RAW\u002FPEAK\u002FRESULT\u002FFASTA\u002FOTHER\n                \"size_mb\": round((f.get(\"fileSizeBytes\") or 0) \u002F 1e6, 2),\n                \"ftp_url\": ftp,\n                \"aspera_url\": asp,\n                \"downloads\": f.get(\"totalDownloads\"),\n            })\n        if len(batch) \u003C page_size:\n            break\n        page += 1\n\n    df = pd.DataFrame(rows)\n    if file_type:\n        df = df[df[\"category\"] == file_type]\n    return df\n\nfiles_df = get_project_files(\"PXD004131\")\nprint(f\"Total files: {len(files_df)}\")\nprint(files_df.groupby(\"category\")[\"size_mb\"].agg([\"count\", \"sum\"]).round(1).to_string())\n\nraw_only = files_df[files_df[\"category\"] == \"RAW\"]\nprint(f\"\\nRAW files: {len(raw_only)}; combined {raw_only['size_mb'].sum():.0f} MB\")\nprint(raw_only[[\"file_name\", \"size_mb\", \"downloads\"]].head(5).to_string(index=False))\n```\n\n```python\n# \u002Ffiles\u002Fall returns every file in one response — convenient for small projects\nfiles = requests.get(f\"{PRIDE}\u002Fprojects\u002FPXD000001\u002Ffiles\u002Fall\", timeout=60).json()\nprint(f\"PXD000001 files (all): {len(files)}\")\nfor f in files[:4]:\n    print(f\"  [{f.get('fileCategory',{}).get('value','?'):\u003C6}] {f['fileName']}  \"\n          f\"{f.get('fileSizeBytes',0)\u002F1e6:.2f} MB\")\n```\n\n### Module 5: SDRF File — `\u002Ffiles\u002Fsdrf\u002F{projectAccession}`\n\nPRIDE projects that follow the modern submission standard include an SDRF (Sample-Data Relationship Format) TSV that maps each MS run to its biological sample, treatment, label, fraction, etc. Pull it once, parse it as a TSV.\n\n```python\nimport requests, pandas as pd, io\n\nPRIDE = \"https:\u002F\u002Fwww.ebi.ac.uk\u002Fpride\u002Fws\u002Farchive\u002Fv3\"\n\ndef get_sdrf(accession):\n    \"\"\"Fetch the SDRF sample-to-run mapping for a project (404 if not provided).\"\"\"\n    r = requests.get(f\"{PRIDE}\u002Ffiles\u002Fsdrf\u002F{accession}\", timeout=30)\n    if r.status_code == 404:\n        return None\n    r.raise_for_status()\n    return pd.read_csv(io.StringIO(r.text), sep=\"\\t\")\n\n# Many older projects have no SDRF — newer ones typically do\nsdrf = get_sdrf(\"PXD000001\")\nif sdrf is None or sdrf.empty:\n    print(\"No SDRF available for this project\")\nelse:\n    print(f\"SDRF rows: {len(sdrf)}  cols: {len(sdrf.columns)}\")\n    print(f\"First columns: {list(sdrf.columns)[:8]}\")\n```\n\n### Module 6: Protein → Project Mapping — `\u002Fproteins\u002F{accession}`\n\nPRIDE v3's protein endpoint returns *only* the list of project accessions that contain identifications for the given UniProt accession. It does **not** return PSM counts, peptide counts, or sequence coverage — those are not exposed at the API surface in v3. For depth metrics you must download a project's `RESULT` files and parse them locally.\n\n```python\nimport requests\n\nPRIDE = \"https:\u002F\u002Fwww.ebi.ac.uk\u002Fpride\u002Fws\u002Farchive\u002Fv3\"\n\ndef get_protein_projects(uniprot_acc):\n    \"\"\"Return the list of PRIDE project accessions that mention this UniProt accession.\n    No PSM\u002Fpeptide\u002Fcoverage counts are available at this endpoint.\"\"\"\n    r = requests.get(f\"{PRIDE}\u002Fproteins\u002F{uniprot_acc}\", timeout=30)\n    if r.status_code == 404:\n        return None\n    r.raise_for_status()\n    data = r.json()\n    return data.get(\"projects\", [])\n\ntp53 = get_protein_projects(\"P04637\")\nprint(f\"TP53 (P04637) is reported in {len(tp53)} PRIDE projects\")\nprint(f\"First 8: {tp53[:8]}\")\n\nunknown = get_protein_projects(\"Q99999\")\nprint(f\"\\nQ99999 (no real protein): \"\n      f\"{'no PRIDE evidence' if not unknown else f'{len(unknown)} projects'}\")\n```\n\n### Module 7: Discovery Helpers — Similar Projects, Autocomplete\n\n`\u002Fprojects\u002F{accession}\u002FsimilarProjects` returns projects with related metadata signatures (organism, instrument, experiment type, tags). `\u002Fsearch\u002Fautocomplete?keyword=...` returns project titles starting with the prefix — useful to suggest searches.\n\n```python\nimport requests, pandas as pd\n\nPRIDE = \"https:\u002F\u002Fwww.ebi.ac.uk\u002Fpride\u002Fws\u002Farchive\u002Fv3\"\n\n# Find similar projects to one of interest\nsimilar = requests.get(f\"{PRIDE}\u002Fprojects\u002FPXD004131\u002FsimilarProjects\",\n                       params={\"pageSize\": 5}, timeout=30).json()\nprint(f\"Similar to PXD004131: {len(similar)} projects\")\nfor p in similar[:5]:\n    print(f\"  {p['accession']}  {(p.get('title') or '')[:70]}\")\n\n# Autocomplete suggestions for a project-title prefix\nsuggestions = requests.get(f\"{PRIDE}\u002Fsearch\u002Fautocomplete\",\n                           params={\"keyword\": \"tp53\"}, timeout=30).json()\nprint(f\"\\nAutocomplete for 'tp53': {len(suggestions)} suggestions\")\nfor s in suggestions[:5]:\n    print(f\"  {s}\")\n```\n\n### Module 8: Repository-Wide Counts — `\u002Fprojects\u002Fcount`, `\u002Ffiles\u002Fcount`\n\nGet total counts across the repository — useful for status displays and sanity checks. Both endpoints return a plain integer body (no JSON object wrapper).\n\n```python\nimport requests\n\nPRIDE = \"https:\u002F\u002Fwww.ebi.ac.uk\u002Fpride\u002Fws\u002Farchive\u002Fv3\"\n\nn_projects = int(requests.get(f\"{PRIDE}\u002Fprojects\u002Fcount\", timeout=30).text)\nn_files    = int(requests.get(f\"{PRIDE}\u002Ffiles\u002Fcount\", timeout=30).text)\nprint(f\"PRIDE Archive current scale:\")\nprint(f\"  Projects: {n_projects:,}\")\nprint(f\"  Files:    {n_files:,}\")\n```\n\n## Key Concepts\n\n### Plain JSON Arrays, No HAL Envelope\n\nPRIDE v3 list endpoints return plain JSON arrays — for example `\u002Fsearch\u002Fprojects` returns `[{...}, {...}, ...]` directly. There is no `_embedded.compactprojects`, no `page.totalElements`\u002F`totalPages`, no `_links.next.href`. Older PRIDE v2 clients that parsed `data[\"_embedded\"][\"compactprojects\"]` will silently return empty against the current API. To paginate, walk `page=0, 1, 2, ...` until you get an empty array (or a partial page shorter than `pageSize`).\n\n### What v3 Removed\n\nThe endpoint families below no longer exist in v3 (and v2 is now an alias for v3 internally — error messages from `\u002Fv2\u002Fpeptides` literally report `path: \"\u002Fpride\u002Fws\u002Farchive\u002Fv3\u002Fpeptides\"`):\n\n| Removed endpoint | Status in v3 | Replacement |\n|---|---|---|\n| `GET \u002Fpeptides?projectAccessions=X` | 404 | None — download project's RESULT files and parse |\n| `GET \u002Fpsms?projectAccessions=X` | 404 | None — download RESULT files |\n| `GET \u002Fproteins?proteinAccession=X` (query-param style) | 404 | `GET \u002Fproteins\u002F{accession}` (path-param) |\n| HAL+JSON `_embedded`\u002F`page` wrapper | Gone | Plain JSON array |\n| `\u002Fprojects?keyword=...&organisms=...&tissues=...` filters | Silently ignored | `\u002Fsearch\u002Fprojects?keyword=...&filter=field==value` |\n\n### Filter Syntax on `\u002Fsearch\u002Fprojects`\n\nThe `filter` query parameter takes a comma-separated list of `field==value` constraints. Field names use the `_facet` suffix (the underlying Solr-style field). Discover valid field names and values via `\u002Ffacet\u002Fprojects` before constructing the filter:\n\n```python\n# Valid filter forms\n\"organisms_facet==Homo sapiens (human)\"\n\"instruments_facet==Q Exactive\"\n\"diseases_facet==Prostate adenocarcinoma\"\n\"softwares_facet==MaxQuant\"\n\n# Combine with commas\nfilter=\"organisms_facet==Homo sapiens (human),instruments_facet==Orbitrap Fusion Lumos\"\n```\n\n### File Categories\n\nEach file in a project carries a `fileCategory` CV-param. The `.value` is a category code; the `.name` is the human-readable label:\n\n| `value` code | Description | Common formats |\n|---|---|---|\n| `RAW` | Unprocessed instrument output | .raw (Thermo), .d (Bruker\u002FAgilent), .wiff (Sciex) |\n| `PEAK` | Centroided \u002F deconvoluted spectra | .mzML, .mzXML, .mgf |\n| `RESULT` | Identification results | .mzid, .mzTab, MaxQuant txt, PRIDE XML |\n| `FASTA` | Protein sequence database used in search | .fasta |\n| `OTHER` | Supplementary \u002F scripts \u002F tables | .txt, .xlsx, .csv |\n\nFor reanalysis pipelines, `RESULT` is the cheapest entry point — pre-identified peptides without re-searching spectra. `PEAK` lets you re-search with a different engine. `RAW` is only needed for full vendor-format reprocessing.\n\n### Accession Formats\n\nPRIDE project accessions follow ProteomeXchange format `PXD######`. These are stable across PRIDE, MassIVE, jPOST, and iProX. File accessions inside PRIDE are SHA-256-style hashes (e.g., `5bda360133398f66021c8889e01dce921cb51300c7269e1f2b0f20368ab20af6`) — opaque identifiers; use `fileName` for human-readable filenames.\n\n## Common Workflows\n\n### Workflow 1: Faceted Discovery — From Disease Keyword to Filtered Project List\n\n**Goal**: Start from a disease keyword, see which instruments and softwares are common in matching datasets via facet counts, then pull a filtered project list using one of the top values.\n\n```python\nimport requests, pandas as pd\n\nPRIDE = \"https:\u002F\u002Fwww.ebi.ac.uk\u002Fpride\u002Fws\u002Farchive\u002Fv3\"\ndisease_kw = \"colorectal cancer\"\n\n# 1) Inspect facet counts to learn which filter values dominate\nfacets = requests.get(f\"{PRIDE}\u002Ffacet\u002Fprojects\",\n                      params={\"keyword\": disease_kw, \"facetPageSize\": 10},\n                      timeout=30).json()\n\ntop_instr = sorted(facets.get(\"instruments\", {}).items(), key=lambda kv: -kv[1])[:5]\ntop_org = sorted(facets.get(\"organisms\", {}).items(), key=lambda kv: -kv[1])[:3]\nprint(f\"Top instruments for '{disease_kw}':\")\nfor k, v in top_instr: print(f\"  {k:\u003C35} {v}\")\nprint(f\"Top organisms:\")\nfor k, v in top_org: print(f\"  {k:\u003C35} {v}\")\n\n# 2) Build a filtered search using one top instrument\ntarget_instr = top_instr[0][0]\nprojects = requests.get(f\"{PRIDE}\u002Fsearch\u002Fprojects\",\n                        params={\"keyword\": disease_kw,\n                                \"filter\": f\"organisms_facet==Homo sapiens (human),instruments_facet=={target_instr}\",\n                                \"pageSize\": 50,\n                                \"sortFields\": \"submission_date\",\n                                \"sortDirection\": \"DESC\"},\n                        timeout=30).json()\n\ndf = pd.DataFrame([{\n    \"accession\": p[\"accession\"],\n    \"title\": (p.get(\"title\") or \"\")[:70],\n    \"submission_date\": p.get(\"submissionDate\"),\n    \"tissues\": \", \".join(p.get(\"organismsPart\", []))[:40],\n    \"submitter\": (p.get(\"submitters\") or [\"\"])[0] if p.get(\"submitters\") else \"\",\n} for p in projects])\nprint(f\"\\nFiltered projects: {len(df)}  (target instrument: {target_instr})\")\nprint(df.head(10).to_string(index=False))\ndf.to_csv(f\"{disease_kw.replace(' ', '_')}_{target_instr.replace(' ', '_')}_projects.csv\",\n          index=False)\n```\n\n### Workflow 2: File Download Manifest for One Project\n\n**Goal**: Pull the file list for a project, filter to the categories you actually want (`RAW` + `RESULT`), and emit an `aria2c`-ready URL list for parallel FTP download.\n\n```python\nimport requests, pandas as pd\nfrom pathlib import Path\n\nPRIDE = \"https:\u002F\u002Fwww.ebi.ac.uk\u002Fpride\u002Fws\u002Farchive\u002Fv3\"\naccession = \"PXD004131\"\nkeep_categories = {\"RAW\", \"RESULT\"}\noutput_dir = Path(f\"\u002Fdata\u002Fpride\u002F{accession}\")\n\nfiles = requests.get(f\"{PRIDE}\u002Fprojects\u002F{accession}\u002Ffiles\u002Fall\", timeout=120).json()\n\nmanifest = []\nfor f in files:\n    cat = (f.get(\"fileCategory\") or {}).get(\"value\")\n    if cat not in keep_categories:\n        continue\n    ftp = next((loc[\"value\"] for loc in f.get(\"publicFileLocations\", [])\n                if loc.get(\"name\") == \"FTP Protocol\"), None)\n    if not ftp:\n        continue\n    manifest.append({\n        \"file_name\": f[\"fileName\"],\n        \"category\": cat,\n        \"size_mb\": round((f.get(\"fileSizeBytes\") or 0) \u002F 1e6, 2),\n        \"ftp\": ftp,\n    })\n\nmdf = pd.DataFrame(manifest).sort_values([\"category\", \"file_name\"])\nprint(f\"{accession}: keeping {len(mdf)}\u002F{len(files)} files \"\n      f\"({mdf['size_mb'].sum():.0f} MB total)\")\nprint(mdf.groupby(\"category\")[[\"size_mb\"]].sum().round(0))\n\n# aria2c -i pride_dl.list -d \u002Fdata\u002Fpride\u002FPXD004131 -x 8 -j 4\nwith open(\"pride_dl.list\", \"w\") as fh:\n    fh.write(\"\\n\".join(mdf[\"ftp\"]))\nprint(f\"\\nWrote pride_dl.list with {len(mdf)} URLs (use aria2c -i)\")\n```\n\n### Workflow 3: Protein Cross-Project Occurrence\n\n**Goal**: For a candidate protein panel (e.g., from a differential-expression analysis), look up how many PRIDE projects mention each one and shortlist the most-evidenced proteins. Note: this is a project-count signal only — there are no PSM\u002Fpeptide counts at the API surface in v3, so a high project count is breadth, not depth.\n\n```python\nimport requests, time, pandas as pd, matplotlib.pyplot as plt\n\nPRIDE = \"https:\u002F\u002Fwww.ebi.ac.uk\u002Fpride\u002Fws\u002Farchive\u002Fv3\"\n\ncandidates = {\n    \"P04637\": \"TP53\", \"P38398\": \"BRCA1\", \"P31749\": \"AKT1\",\n    \"P40763\": \"STAT3\", \"O15530\": \"PDPK1\", \"P10275\": \"AR\",\n}\n\nrows = []\nfor acc, sym in candidates.items():\n    r = requests.get(f\"{PRIDE}\u002Fproteins\u002F{acc}\", timeout=30)\n    projs = r.json().get(\"projects\", []) if r.status_code == 200 else []\n    rows.append({\"uniprot\": acc, \"symbol\": sym, \"n_projects\": len(projs)})\n    time.sleep(0.3)\n\ndf = pd.DataFrame(rows).sort_values(\"n_projects\", ascending=False)\nprint(df.to_string(index=False))\n\nfig, ax = plt.subplots(figsize=(8, 3.5))\nbars = ax.bar(df[\"symbol\"], df[\"n_projects\"], color=\"#3182BD\")\nax.bar_label(bars, fmt=\"%d\", fontsize=9, padding=2)\nax.set_ylabel(\"# PRIDE projects mentioning the protein\")\nax.set_title(\"PRIDE project-level occurrence — candidate panel\")\nplt.tight_layout()\nplt.savefig(\"pride_protein_occurrence.png\", dpi=150, bbox_inches=\"tight\")\nprint(\"Saved pride_protein_occurrence.png\")\n```\n\n## Key Parameters\n\n| Parameter | Endpoint | Default | Range \u002F Options | Effect |\n|---|---|---|---|---|\n| `keyword` | `\u002Fsearch\u002Fprojects`, `\u002Ffacet\u002Fprojects`, `\u002Fsearch\u002Fautocomplete` | — | free-text string | Full-text search across title, description, tags |\n| `filter` | `\u002Fsearch\u002Fprojects` | — | `field_facet==value, field_facet==value` | Server-side filter using facet field names |\n| `pageSize` | `\u002Fsearch\u002Fprojects`, `\u002Fprojects`, `\u002Fprojects\u002F{acc}\u002Ffiles`, `\u002Fprojects\u002F{acc}\u002FsimilarProjects` | 100 | positive integer | Results per page |\n| `page` | same as above | 0 | 0-indexed integer | Page number (no metadata returned — walk pages until empty) |\n| `sortFields` | `\u002Fsearch\u002Fprojects` | `submission_date` | comma-separated field names | Sort key(s) |\n| `sortDirection` | `\u002Fsearch\u002Fprojects` | `DESC` | `ASC` or `DESC` | Sort order |\n| `facetPageSize` | `\u002Ffacet\u002Fprojects` | 20 | positive integer | Values returned per facet group |\n| `dateGap` | `\u002Fsearch\u002Fprojects`, `\u002Ffacet\u002Fprojects` | — | e.g. `+1MONTH`, `+1YEAR` | Date-range aggregation granularity |\n| (path) `accession` | `\u002Fprojects\u002F{acc}`, `\u002Fprojects\u002F{acc}\u002Ffiles`, `\u002Fprojects\u002F{acc}\u002FsimilarProjects`, `\u002Fproteins\u002F{acc}` | required | PXD######  or UniProt acc | Identifies the resource |\n\n## Best Practices\n\n1. **Use `\u002Fsearch\u002Fprojects` for searching, not `\u002Fprojects`.** Plain `\u002Fprojects` is a paginated listing endpoint and silently ignores keyword \u002F organism \u002F disease filters. Filtering only works through `\u002Fsearch\u002Fprojects` with the `filter=field_facet==value` syntax.\n\n2. **Discover filter values via `\u002Ffacet\u002Fprojects` before filtering.** Facet field values must match exactly (e.g., `organisms_facet==Homo sapiens (human)`, parentheses and all). The facet endpoint tells you which values exist and how many projects each has — saves a lot of trial-and-error.\n\n3. **Don't try to query peptide- or PSM-level data over the API.** Those endpoints were removed in v3. Download the project's RESULT files and parse them locally with `pyteomics`, `pyOpenMS`, or a search-engine reader (MaxQuant, ProteomeDiscoverer, etc.).\n\n4. **Prefer FTP URLs for bulk file downloads.** Each file record carries both `FTP Protocol` and `Aspera Protocol` URLs. FTP is more universally supported; pair it with `aria2c -x 8 -j 4` for parallel chunks. Use Aspera only if you have an Aspera client and need >100 Mbit transfer speeds.\n\n5. **Watch the field name `fileSizeBytes`.** The current v3 field is `fileSizeBytes`, not `fileSize` (old v2 docs may say `fileSize`). Sizes are in bytes — divide by `1e6` for MB, `1e9` for GB.\n\n6. **Filter file downloads by `fileCategory.value`.** A project can have hundreds of files spanning RAW (GB-scale) and OTHER (KB-scale). Always filter to the categories you actually need before queueing downloads — otherwise you'll easily download tens of gigabytes of vendor RAW files when you only wanted the identification tables.\n\n7. **Pagination has no metadata — walk until empty.** Unlike old PRIDE v2, the v3 API doesn't return `totalElements`\u002F`totalPages`. Iterate `page=0, 1, 2, ...` and stop when a page returns an empty array, or when its length is less than `pageSize`.\n\n## Common Recipes\n\n### Recipe: Quick Project File Summary\n\n```python\nimport requests\n\nPRIDE = \"https:\u002F\u002Fwww.ebi.ac.uk\u002Fpride\u002Fws\u002Farchive\u002Fv3\"\n\ndef project_file_summary(accession):\n    files = requests.get(f\"{PRIDE}\u002Fprojects\u002F{accession}\u002Ffiles\u002Fall\", timeout=60).json()\n    by_cat = {}\n    for f in files:\n        cat = (f.get(\"fileCategory\") or {}).get(\"value\", \"OTHER\")\n        by_cat.setdefault(cat, [0, 0])\n        by_cat[cat][0] += 1\n        by_cat[cat][1] += (f.get(\"fileSizeBytes\") or 0) \u002F 1e6\n    print(f\"\\n{accession} file summary:\")\n    for cat, (n, mb) in sorted(by_cat.items()):\n        print(f\"  {cat:\u003C8} {n:>4} file(s)   {mb:>10.1f} MB\")\n    total_mb = sum(mb for _, mb in by_cat.values())\n    total_n  = sum(n  for n, _  in by_cat.values())\n    print(f\"  {'TOTAL':\u003C8} {total_n:>4} file(s)   {total_mb:>10.1f} MB\")\n\nproject_file_summary(\"PXD000001\")\n```\n\n### Recipe: Check If a Protein Has Any PRIDE Evidence\n\n```python\nimport requests\n\nPRIDE = \"https:\u002F\u002Fwww.ebi.ac.uk\u002Fpride\u002Fws\u002Farchive\u002Fv3\"\n\ndef pride_evidence(uniprot_acc):\n    \"\"\"Return (has_evidence, n_projects). PRIDE v3 only exposes project list, no PSM counts.\"\"\"\n    r = requests.get(f\"{PRIDE}\u002Fproteins\u002F{uniprot_acc}\", timeout=30)\n    if r.status_code != 200:\n        return False, 0\n    projs = r.json().get(\"projects\", [])\n    return bool(projs), len(projs)\n\nfor acc in [\"P04637\", \"Q99999\"]:\n    has, n = pride_evidence(acc)\n    print(f\"{acc}: evidence={has}  projects={n}\")\n```\n\n### Recipe: Recent Submissions for a Keyword (sorted by date)\n\n```python\nimport requests, pandas as pd\n\nPRIDE = \"https:\u002F\u002Fwww.ebi.ac.uk\u002Fpride\u002Fws\u002Farchive\u002Fv3\"\n\nr = requests.get(f\"{PRIDE}\u002Fsearch\u002Fprojects\",\n                 params={\"keyword\": \"single-cell proteomics\",\n                         \"sortFields\": \"submission_date\",\n                         \"sortDirection\": \"DESC\",\n                         \"pageSize\": 15},\n                 timeout=30)\nrecent = r.json()\ndf = pd.DataFrame([{\n    \"submission_date\": p.get(\"submissionDate\"),\n    \"accession\": p[\"accession\"],\n    \"title\": (p.get(\"title\") or \"\")[:80],\n} for p in recent]).sort_values(\"submission_date\", ascending=False)\nprint(df.to_string(index=False))\n```\n\n### Recipe: Suggest-as-You-Type via Autocomplete\n\n```python\nimport requests\n\nPRIDE = \"https:\u002F\u002Fwww.ebi.ac.uk\u002Fpride\u002Fws\u002Farchive\u002Fv3\"\n\nfor prefix in [\"alzheimer\", \"single cell\", \"brca\"]:\n    s = requests.get(f\"{PRIDE}\u002Fsearch\u002Fautocomplete\",\n                     params={\"keyword\": prefix}, timeout=30).json()\n    print(f\"\\n'{prefix}' → {len(s)} suggestions:\")\n    for sug in s[:3]:\n        print(f\"  · {sug[:80]}\")\n```\n\n## Troubleshooting\n\n| Problem | Cause | Solution |\n|---|---|---|\n| Parsing returns empty list even when `r.json()` has data | Code is doing `data[\"_embedded\"][\"compactprojects\"]` — old HAL+JSON wrapper that v3 no longer returns | Parse the response directly as a list: `projects = r.json()` |\n| `HTTP 404` on `\u002Fpeptides`, `\u002Fpsms`, or `\u002Fproteins?proteinAccession=X` | These endpoints were removed in v3 | For peptide\u002FPSM data, download the project's RESULT files and parse locally. For protein lookup, use `\u002Fproteins\u002F{accession}` (path param) |\n| `\u002Fprojects?keyword=cancer` returns the same 100 results as `\u002Fprojects` with no keyword | The `\u002Fprojects` endpoint only accepts `pageSize` \u002F `page` — keyword and other filters are silently ignored | Use `\u002Fsearch\u002Fprojects?keyword=...&filter=...` instead |\n| `\u002Fprojects\u002F{acc}\u002Ffiles` shows file size 0 | Reading `fileSize` instead of `fileSizeBytes` | The v3 field is `fileSizeBytes` (bytes); compute MB via `fileSizeBytes \u002F 1e6` |\n| Filter has no effect | Facet value doesn't exactly match a real value | Call `\u002Ffacet\u002Fprojects?keyword=...` first to enumerate valid values (`Homo sapiens (human)`, not `Homo sapiens`) |\n| `pageSize` beyond the actual result set returns an empty array | Normal pagination behavior | Stop iterating when the returned array length is \u003C `pageSize`, or when it is empty |\n| `findAllOrganismsCount` returns HTTP 406 Not Acceptable | The endpoint requires a non-JSON Accept header | Skip this endpoint — facet counts via `\u002Ffacet\u002Fprojects` cover the same need |\n| `HTTP 429` or `ConnectionError` on bursts | Shared EBI infrastructure | Add `time.sleep(0.3)` in loops; retry on 5xx with exponential backoff |\n\n## Related Skills\n\n- `uniprot-protein-database` — UniProt sequences, Swiss-Prot annotations, ID mapping; pair with PRIDE protein lookups to enrich each UniProt accession with sequence and functional information\n- `interpro-database` — Protein domain architecture (Pfam, SMART, PANTHER) for proteins reported in PRIDE\n- `pdb-database` — Resolved 3D structures for proteins with PRIDE evidence\n- `pyteomics` (off-skill Python library) — Parse mzIdentML \u002F mzML \u002F mzTab files downloaded from `\u002Fprojects\u002F{accession}\u002Ffiles`; the path for spectrum- and PSM-level analysis now that the REST API no longer exposes those\n\n## References\n\n- [PRIDE Archive v3 REST API root](https:\u002F\u002Fwww.ebi.ac.uk\u002Fpride\u002Fws\u002Farchive\u002Fv3\u002F) — base URL\n- [PRIDE v3 OpenAPI\u002FSwagger spec](https:\u002F\u002Fwww.ebi.ac.uk\u002Fpride\u002Fws\u002Farchive\u002Fv3\u002Fv3\u002Fapi-docs) — authoritative endpoint inventory\n- [PRIDE Archive web portal](https:\u002F\u002Fwww.ebi.ac.uk\u002Fpride\u002F) — interactive dataset browser\n- [Perez-Riverol et al., *Nucleic Acids Research* 2022](https:\u002F\u002Fdoi.org\u002F10.1093\u002Fnar\u002Fgkab1038) — PRIDE 2022 update describing repository and architecture\n- [ProteomeXchange Consortium](http:\u002F\u002Fwww.proteomexchange.org\u002F) — standard accession system shared across PRIDE, MassIVE, jPOST, iProX\n- [SDRF-Proteomics specification](https:\u002F\u002Fgithub.com\u002Fbigbio\u002Fproteomics-sample-metadata) — format used by `\u002Ffiles\u002Fsdrf\u002F{projectAccession}`\n","# PRIDE Database\n\n## Overview\n\nThe PRIDE Archive (ProteomicsIDEntifications database) at EMBL-EBI is the world's largest public mass-spectrometry proteomics repository — 39,000+ projects and 3.4M+ deposited files as of 2026. Programmatic access is via a JSON REST API at `https:\u002F\u002Fwww.ebi.ac.uk\u002Fpride\u002Fws\u002Farchive\u002Fv3\u002F`. No authentication is required. The OpenAPI\u002FSwagger spec is at `https:\u002F\u002Fwww.ebi.ac.uk\u002Fpride\u002Fws\u002Farchive\u002Fv3\u002Fv3\u002Fapi-docs`. PRIDE v3 returns **plain JSON arrays** for list endpoints (no HAL+JSON `_embedded` envelope) and intentionally does not expose per-peptide or per-PSM identification endpoints — for spectrum-level identifications, download the project's `RESULT` files (mzIdentML, MaxQuant txt, etc.) and parse them locally.\n\n## When to Use\n\n- Finding published proteomics datasets by free-text keyword and facet filters (organism, tissue, disease, instrument, software, PTM) for meta-analysis or benchmarking\n- Downloading raw mass-spectrometry data (RAW, mzML, MGF) or pre-processed identifications (RESULT files) from a specific PRIDE project accession\n- Looking up which PRIDE projects mention a specific UniProt protein accession (project-level occurrence map only — no PSM\u002Fcoverage counts at the API surface)\n- Finding similar projects to one of interest for reanalysis or cross-study comparison\n- Fetching SDRF (Sample-Data Relationship Format) files for projects so you can model the sample-to-MS-run mapping programmatically\n- Discovering valid filter values via faceted search before constructing a structured query\n- For protein sequences, Swiss-Prot annotations, and ID mapping use `uniprot-protein-database`\n- For protein domain and family classification use `interpro-database` — PRIDE only reports project-level occurrence, not domain-level features\n- **PRIDE v3 has no `\u002Fpeptides`, `\u002Fpsms`, or `\u002Fproteins?proteinAccession=` endpoints** — if you need peptide- or PSM-level data, download the RESULT files from `\u002Fprojects\u002F{accession}\u002Ffiles` and parse them with `pyteomics` or a search-engine-specific reader\n\n## Prerequisites\n\n- **Python packages**: `requests`, `pandas`, `matplotlib`\n- **Data requirements**: a PRIDE project accession (`PXD######` format) or a search keyword, optionally a UniProt accession for protein-occurrence lookup\n- **Environment**: internet connection; no API key required\n- **Rate limits**: not formally published; keep bursts under ~5 requests\u002Fsecond and add `time.sleep(0.3)` in loops\n\n```bash\npip install requests pandas matplotlib\n```\n\n## Quick Start\n\n```python\nimport requests\n\nPRIDE = \"https:\u002F\u002Fwww.ebi.ac.uk\u002Fpride\u002Fws\u002Farchive\u002Fv3\"\n\n# 1) Free-text search for cancer proteomics projects\nprojects = requests.get(f\"{PRIDE}\u002Fsearch\u002Fprojects\",\n                        params={\"keyword\": \"prostate cancer\", \"pageSize\": 5},\n                        timeout=30).json()\nprint(f\"Top {len(projects)} projects:\")\nfor p in projects[:3]:\n    instr = \", \".join(p.get(\"instruments\", []))[:50]\n    print(f\"  {p['accession']}  {(p['title'] or '')[:70]}  [{instr}]\")\n\n# 2) Drill into one project\nacc = projects[0][\"accession\"]\nproj = requests.get(f\"{PRIDE}\u002Fprojects\u002F{acc}\", timeout=30).json()\nprint(f\"\\n{proj['accession']}: {proj['title'][:70]}\")\nprint(f\"  Submitted: {proj.get('submissionDate')}  DOI: {proj.get('doi')}\")\nprint(f\"  Organisms: {[o['name'] for o in proj.get('organisms', [])]}\")\nprint(f\"  Instruments: {[i['name'] for i in proj.get('instruments', [])]}\")\n\n# 3) List files and total size\nfiles = requests.get(f\"{PRIDE}\u002Fprojects\u002F{acc}\u002Ffiles\u002Fall\", timeout=60).json()\ntotal_mb = sum(f.get(\"fileSizeBytes\", 0) for f in files) \u002F 1e6\nprint(f\"\\n  {len(files)} files, {total_mb:.0f} MB total\")\n```\n\n## Core API\n\n### Module 1: Project Search — `\u002Fsearch\u002Fprojects`\n\nFree-text search with optional facet-based filtering, pagination, and sorting. Returns a plain JSON array of project records — there is no HAL+JSON `_embedded`\u002F`page` wrapper.\n\n```python\nimport requests, pandas as pd\n\nPRIDE = \"https:\u002F\u002Fwww.ebi.ac.uk\u002Fpride\u002Fws\u002Farchive\u002Fv3\"\n\ndef search_projects(keyword=None, organism=None, instrument=None,\n                    disease=None, software=None,\n                    page_size=25, page=0, sort_field=\"submission_date\",\n                    sort_direction=\"DESC\"):\n    \"\"\"Search PRIDE v3 for projects.\n    Filter syntax (for the `filter` arg) is `field==value, field==value` using `_facet` field names\n    that are discoverable via \u002Ffacet\u002Fprojects.\"\"\"\n    filters = []\n    if organism:   filters.append(f\"organisms_facet=={organism}\")\n    if instrument: filters.append(f\"instruments_facet=={instrument}\")\n    if disease:    filters.append(f\"diseases_facet=={disease}\")\n    if software:   filters.append(f\"softwares_facet=={software}\")\n\n    params = {\"pageSize\": page_size, \"page\": page,\n              \"sortFields\": sort_field, \"sortDirection\": sort_direction}\n    if keyword: params[\"keyword\"] = keyword\n    if filters: params[\"filter\"] = \",\".join(filters)\n\n    r = requests.get(f\"{PRIDE}\u002Fsearch\u002Fprojects\", params=params, timeout=30)\n    r.raise_for_status()\n    return r.json()   # plain list[dict]\n\nprojects = search_projects(keyword=\"cancer\", organism=\"Homo sapiens (human)\",\n                           instrument=\"Q Exactive\", page_size=5)\ndf = pd.DataFrame([{\n    \"accession\": p[\"accession\"],\n    \"title\": (p.get(\"title\") or \"\")[:70],\n    \"submission_date\": p.get(\"submissionDate\"),\n    \"diseases\": \", \".join(p.get(\"diseases\", []))[:60],\n    \"instruments\": \", \".join(p.get(\"instruments\", []))[:50],\n} for p in projects])\nprint(df.to_string(index=False))\n```\n\n```python\n# Paginate through all matches for a keyword. The API doesn't return total counts inline;\n# walk pages until the next one is empty.\ndef search_all_projects(keyword, page_size=100, max_pages=20):\n    all_records, page = [], 0\n    while page \u003C max_pages:\n        batch = search_projects(keyword=keyword, page_size=page_size, page=page)\n        if not batch:\n            break\n        all_records.extend(batch)\n        if len(batch) \u003C page_size:\n            break    # last page\n        page += 1\n    return all_records\n\nresults = search_all_projects(\"phosphoproteomics\", page_size=100, max_pages=3)\nprint(f\"Phosphoproteomics projects collected (max 300): {len(results)}\")\n```\n\n### Module 2: Faceted Filter Discovery — `\u002Ffacet\u002Fprojects`\n\nBefore constructing a filtered search, query the facet endpoint to see which instrument \u002F organism \u002F disease \u002F software values actually exist for a given keyword, along with their counts. The response is a dict of facet groups, each mapping `{value: count}`.\n\n```python\nimport requests, pandas as pd\n\nPRIDE = \"https:\u002F\u002Fwww.ebi.ac.uk\u002Fpride\u002Fws\u002Farchive\u002Fv3\"\n\ndef get_facets(keyword=None, facet_page_size=20):\n    \"\"\"Return facet counts for projects matching `keyword`. Keys are facet groups\n    (instruments, organisms, diseases, softwares, experimentTypes, ...); values are\n    dicts of {value: count}.\"\"\"\n    params = {\"facetPageSize\": facet_page_size}\n    if keyword: params[\"keyword\"] = keyword\n    r = requests.get(f\"{PRIDE}\u002Ffacet\u002Fprojects\", params=params, timeout=30)\n    r.raise_for_status()\n    return r.json()\n\nfacets = get_facets(keyword=\"cancer\", facet_page_size=10)\nprint(f\"Facet groups: {list(facets.keys())}\")\nprint(f\"\\nTop instruments for 'cancer':\")\nfor instr, n in sorted(facets.get(\"instruments\", {}).items(), key=lambda kv: -kv[1])[:8]:\n    print(f\"  {instr:\u003C35} {n}\")\nprint(f\"\\nTop diseases:\")\nfor d, n in sorted(facets.get(\"diseases\", {}).items(), key=lambda kv: -kv[1])[:6]:\n    print(f\"  {d:\u003C55} {n}\")\n```\n\n### Module 3: Project Detail — `\u002Fprojects\u002F{accession}`\n\nFull metadata for a single project: submitters, labPIs, instruments, organisms (CV-coded), diseases, experiment types, references, DOI, submission\u002Fpublication dates. Lists are `CvParam`-style objects with `accession`, `cvLabel`, `name`, optionally `value`.\n\n```python\nimport requests\n\nPRIDE = \"https:\u002F\u002Fwww.ebi.ac.uk\u002Fpride\u002Fws\u002Farchive\u002Fv3\"\n\ndef get_project(accession):\n    r = requests.get(f\"{PRIDE}\u002Fprojects\u002F{accession}\", timeout=30)\n    r.raise_for_status()\n    return r.json()\n\np = get_project(\"PXD004131\")\nprint(f\"Accession    : {p['accession']}\")\nprint(f\"Title        : {p['title'][:80]}\")\nprint(f\"Submission   : {p.get('submissionDate')}\")\nprint(f\"Publication  : {p.get('publicationDate')}\")\nprint(f\"DOI          : {p.get('doi')}\")\nprint(f\"License      : {p.get('license')}\")\nprint(f\"Type         : {p.get('submissionType')}\")\nprint(f\"Organisms    : {[o['name'] for o in p.get('organisms', [])]}\")\nprint(f\"Instruments  : {[i['name'] for i in p.get('instruments', [])]}\")\nprint(f\"Experiment   : {[e['name'] for e in p.get('experimentTypes', [])]}\")\nprint(f\"PIs          : {[pi.get('name') for pi in p.get('labPIs', [])]}\")\nprint(f\"References   : {[r.get('doi') for r in p.get('references', [])[:3]]}\")\n```\n\n### Module 4: Project Files — `\u002Fprojects\u002F{accession}\u002Ffiles` + `\u002Ffiles\u002Fall`\n\nList the files associated with a project. Use the paginated endpoint for large projects; `\u002Ffiles\u002Fall` returns every file in one shot. Each file record carries `fileCategory.value` (one of `RAW`, `PEAK`, `RESULT`, `FASTA`, `OTHER`), `fileSizeBytes` (note the `Bytes` suffix — not `fileSize`), and a list of `publicFileLocations` each labeled `FTP Protocol` or `Aspera Protocol`.\n\n```python\nimport requests, pandas as pd\n\nPRIDE = \"https:\u002F\u002Fwww.ebi.ac.uk\u002Fpride\u002Fws\u002Farchive\u002Fv3\"\n\ndef get_project_files(accession, file_type=None, page_size=100):\n    \"\"\"Walk paginated \u002Ffiles for a project. Optionally filter by category code\n    (RAW, PEAK, RESULT, FASTA, OTHER). Returns a DataFrame.\"\"\"\n    rows, page = [], 0\n    while True:\n        r = requests.get(f\"{PRIDE}\u002Fprojects\u002F{accession}\u002Ffiles\",\n                         params={\"pageSize\": page_size, \"page\": page},\n                         timeout=30)\n        r.raise_for_status()\n        batch = r.json()\n        if not batch:\n            break\n        for f in batch:\n            cat = f.get(\"fileCategory\") or {}\n            ftp = next((loc[\"value\"] for loc in f.get(\"publicFileLocations\", [])\n                        if loc.get(\"name\") == \"FTP Protocol\"), \"\")\n            asp = next((loc[\"value\"] for loc in f.get(\"publicFileLocations\", [])\n                        if loc.get(\"name\") == \"Aspera Protocol\"), \"\")\n            rows.append({\n                \"file_name\": f.get(\"fileName\"),\n                \"category\": cat.get(\"value\"),     # RAW\u002FPEAK\u002FRESULT\u002FFASTA\u002FOTHER\n                \"size_mb\": round((f.get(\"fileSizeBytes\") or 0) \u002F 1e6, 2),\n                \"ftp_url\": ftp,\n                \"aspera_url\": asp,\n                \"downloads\": f.get(\"totalDownloads\"),\n            })\n        if len(batch) \u003C page_size:\n            break\n        page += 1\n\n    df = pd.DataFrame(rows)\n    if file_type:\n        df = df[df[\"category\"] == file_type]\n    return df\n\nfiles_df = get_project_files(\"PXD004131\")\nprint(f\"Total files: {len(files_df)}\")\nprint(files_df.groupby(\"category\")[\"size_mb\"].agg([\"count\", \"sum\"]).round(1).to_string())\n\nraw_only = files_df[files_df[\"category\"] == \"RAW\"]\nprint(f\"\\nRAW files: {len(raw_only)}; combined {raw_only['size_mb'].sum():.0f} MB\")\nprint(raw_only[[\"file_name\", \"size_mb\", \"downloads\"]].head(5).to_string(index=False))\n```\n\n```python\n# \u002Ffiles\u002Fall returns every file in one response — convenient for small projects\nfiles = requests.get(f\"{PRIDE}\u002Fprojects\u002FPXD000001\u002Ffiles\u002Fall\", timeout=60).json()\nprint(f\"PXD000001 files (all): {len(files)}\")\nfor f in files[:4]:\n    print(f\"  [{f.get('fileCategory',{}).get('value','?'):\u003C6}] {f['fileName']}  \"\n          f\"{f.get('fileSizeBytes',0)\u002F1e6:.2f} MB\")\n```\n\n### Module 5: SDRF File — `\u002Ffiles\u002Fsdrf\u002F{projectAccession}`\n\nPRIDE projects that follow the modern submission standard include an SDRF (Sample-Data Relationship Format) TSV that maps each MS run to its biological sample, treatment, label, fraction, etc. Pull it once, parse it as a TSV.\n\n```python\nimport requests, pandas as pd, io\n\nPRIDE = \"https:\u002F\u002Fwww.ebi.ac.uk\u002Fpride\u002Fws\u002Farchive\u002Fv3\"\n\ndef get_sdrf(accession):\n    \"\"\"Fetch the SDRF sample-to-run mapping for a project (404 if not provided).\"\"\"\n    r = requests.get(f\"{PRIDE}\u002Ffiles\u002Fsdrf\u002F{accession}\", timeout=30)\n    if r.status_code == 404:\n        return None\n    r.raise_for_status()\n    return pd.read_csv(io.StringIO(r.text), sep=\"\\t\")\n\n# Many older projects have no SDRF — newer ones typically do\nsdrf = get_sdrf(\"PXD000001\")\nif sdrf is None or sdrf.empty:\n    print(\"No SDRF available for this project\")\nelse:\n    print(f\"SDRF rows: {len(sdrf)}  cols: {len(sdrf.columns)}\")\n    print(f\"First columns: {list(sdrf.columns)[:8]}\")\n```\n\n### Module 6: Protein → Project Mapping — `\u002Fproteins\u002F{accession}`\n\nPRIDE v3's protein endpoint returns *only* the list of project accessions that contain identifications for the given UniProt accession. It does **not** return PSM counts, peptide counts, or sequence coverage — those are not exposed at the API surface in v3. For depth metrics you must download a project's `RESULT` files and parse them locally.\n\n```python\nimport requests\n\nPRIDE = \"https:\u002F\u002Fwww.ebi.ac.uk\u002Fpride\u002Fws\u002Farchive\u002Fv3\"\n\ndef get_protein_projects(uniprot_acc):\n    \"\"\"Return the list of PRIDE project accessions that mention this UniProt accession.\n    No PSM\u002Fpeptide\u002Fcoverage counts are available at this endpoint.\"\"\"\n    r = requests.get(f\"{PRIDE}\u002Fproteins\u002F{uniprot_acc}\", timeout=30)\n    if r.status_code == 404:\n        return None\n    r.raise_for_status()\n    data = r.json()\n    return data.get(\"projects\", [])\n\ntp53 = get_protein_projects(\"P04637\")\nprint(f\"TP53 (P04637) is reported in {len(tp53)} PRIDE projects\")\nprint(f\"First 8: {tp53[:8]}\")\n\nunknown = get_protein_projects(\"Q99999\")\nprint(f\"\\nQ99999 (no real protein): \"\n      f\"{'no PRIDE evidence' if not unknown else f'{len(unknown)} projects'}\")\n```\n\n### Module 7: Discovery Helpers — Similar Projects, Autocomplete\n\n`\u002Fprojects\u002F{accession}\u002FsimilarProjects` returns projects with related metadata signatures (organism, instrument, experiment type, tags). `\u002Fsearch\u002Fautocomplete?keyword=...` returns project titles starting with the prefix — useful to suggest searches.\n\n```python\nimport requests, pandas as pd\n\nPRIDE = \"https:\u002F\u002Fwww.ebi.ac.uk\u002Fpride\u002Fws\u002Farchive\u002Fv3\"\n\n# Find similar projects to one of interest\nsimilar = requests.get(f\"{PRIDE}\u002Fprojects\u002FPXD004131\u002FsimilarProjects\",\n                       params={\"pageSize\": 5}, timeout=30).json()\nprint(f\"Similar to PXD004131: {len(similar)} projects\")\nfor p in similar[:5]:\n    print(f\"  {p['accession']}  {(p.get('title') or '')[:70]}\")\n\n# Autocomplete suggestions for a project-title prefix\nsuggestions = requests.get(f\"{PRIDE}\u002Fsearch\u002Fautocomplete\",\n                           params={\"keyword\": \"tp53\"}, timeout=30).json()\nprint(f\"\\nAutocomplete for 'tp53': {len(suggestions)} suggestions\")\nfor s in suggestions[:5]:\n    print(f\"  {s}\")\n```\n\n### Module 8: Repository-Wide Counts — `\u002Fprojects\u002Fcount`, `\u002Ffiles\u002Fcount`\n\nGet total counts across the repository — useful for status displays and sanity checks. Both endpoints return a plain integer body (no JSON object wrapper).\n\n```python\nimport requests\n\nPRIDE = \"https:\u002F\u002Fwww.ebi.ac.uk\u002Fpride\u002Fws\u002Farchive\u002Fv3\"\n\nn_projects = int(requests.get(f\"{PRIDE}\u002Fprojects\u002Fcount\", timeout=30).text)\nn_files    = int(requests.get(f\"{PRIDE}\u002Ffiles\u002Fcount\", timeout=30).text)\nprint(f\"PRIDE Archive current scale:\")\nprint(f\"  Projects: {n_projects:,}\")\nprint(f\"  Files:    {n_files:,}\")\n```\n\n## Key Concepts\n\n### Plain JSON Arrays, No HAL Envelope\n\nPRIDE v3 list endpoints return plain JSON arrays — for example `\u002Fsearch\u002Fprojects` returns `[{...}, {...}, ...]` directly. There is no `_embedded.compactprojects`, no `page.totalElements`\u002F`totalPages`, no `_links.next.href`. Older PRIDE v2 clients that parsed `data[\"_embedded\"][\"compactprojects\"]` will silently return empty against the current API. To paginate, walk `page=0, 1, 2, ...` until you get an empty array (or a partial page shorter than `pageSize`).\n\n### What v3 Removed\n\nThe endpoint families below no longer exist in v3 (and v2 is now an alias for v3 internally — error messages from `\u002Fv2\u002Fpeptides` literally report `path: \"\u002Fpride\u002Fws\u002Farchive\u002Fv3\u002Fpeptides\"`):\n\n| Removed endpoint | Status in v3 | Replacement |\n|---|---|---|\n| `GET \u002Fpeptides?projectAccessions=X` | 404 | None — download project's RESULT files and parse |\n| `GET \u002Fpsms?projectAccessions=X` | 404 | None — download RESULT files |\n| `GET \u002Fproteins?proteinAccession=X` (query-param style) | 404 | `GET \u002Fproteins\u002F{accession}` (path-param) |\n| HAL+JSON `_embedded`\u002F`page` wrapper | Gone | Plain JSON array |\n| `\u002Fprojects?keyword=...&organisms=...&tissues=...` filters | Silently ignored | `\u002Fsearch\u002Fprojects?keyword=...&filter=field==value` |\n\n### Filter Syntax on `\u002Fsearch\u002Fprojects`\n\nThe `filter` query parameter takes a comma-separated list of `field==value` constraints. Field names use the `_facet` suffix (the underlying Solr-style field). Discover valid field names and values via `\u002Ffacet\u002Fprojects` before constructing the filter:\n\n```python\n# Valid filter forms\n\"organisms_facet==Homo sapiens (human)\"\n\"instruments_facet==Q Exactive\"\n\"diseases_facet==Prostate adenocarcinoma\"\n\"softwares_facet==MaxQuant\"\n\n# Combine with commas\nfilter=\"organisms_facet==Homo sapiens (human),instruments_facet==Orbitrap Fusion Lumos\"\n```\n\n### File Categories\n\nEach file in a project carries a `fileCategory` CV-param. The `.value` is a category code; the `.name` is the human-readable label:\n\n| `value` code | Description | Common formats |\n|---|---|---|\n| `RAW` | Unprocessed instrument output | .raw (Thermo), .d (Bruker\u002FAgilent), .wiff (Sciex) |\n| `PEAK` | Centroided \u002F deconvoluted spectra | .mzML, .mzXML, .mgf |\n| `RESULT` | Identification results | .mzid, .mzTab, MaxQuant txt, PRIDE XML |\n| `FASTA` | Protein sequence database used in search | .fasta |\n| `OTHER` | Supplementary \u002F scripts \u002F tables | .txt, .xlsx, .csv |\n\nFor reanalysis pipelines, `RESULT` is the cheapest entry point — pre-identified peptides without re-searching spectra. `PEAK` lets you re-search with a different engine. `RAW` is only needed for full vendor-format reprocessing.\n\n### Accession Formats\n\nPRIDE project accessions follow ProteomeXchange format `PXD######`. These are stable across PRIDE, MassIVE, jPOST, and iProX. File accessions inside PRIDE are SHA-256-style hashes (e.g., `5bda360133398f66021c8889e01dce921cb51300c7269e1f2b0f20368ab20af6`) — opaque identifiers; use `fileName` for human-readable filenames.\n\n## Common Workflows\n\n### Workflow 1: Faceted Discovery — From Disease Keyword to Filtered Project List\n\n**Goal**: Start from a disease keyword, see which instruments and softwares are common in matching datasets via facet counts, then pull a filtered project list using one of the top values.\n\n```python\nimport requests, pandas as pd\n\nPRIDE = \"https:\u002F\u002Fwww.ebi.ac.uk\u002Fpride\u002Fws\u002Farchive\u002Fv3\"\ndisease_kw = \"colorectal cancer\"\n\n# 1) Inspect facet counts to learn which filter values dominate\nfacets = requests.get(f\"{PRIDE}\u002Ffacet\u002Fprojects\",\n                      params={\"keyword\": disease_kw, \"facetPageSize\": 10},\n                      timeout=30).json()\n\ntop_instr = sorted(facets.get(\"instruments\", {}).items(), key=lambda kv: -kv[1])[:5]\ntop_org = sorted(facets.get(\"organisms\", {}).items(), key=lambda kv: -kv[1])[:3]\nprint(f\"Top instruments for '{disease_kw}':\")\nfor k, v in top_instr: print(f\"  {k:\u003C35} {v}\")\nprint(f\"Top organisms:\")\nfor k, v in top_org: print(f\"  {k:\u003C35} {v}\")\n\n# 2) Build a filtered search using one top instrument\ntarget_instr = top_instr[0][0]\nprojects = requests.get(f\"{PRIDE}\u002Fsearch\u002Fprojects\",\n                        params={\"keyword\": disease_kw,\n                                \"filter\": f\"organisms_facet==Homo sapiens (human),instruments_facet=={target_instr}\",\n                                \"pageSize\": 50,\n                                \"sortFields\": \"submission_date\",\n                                \"sortDirection\": \"DESC\"},\n                        timeout=30).json()\n\ndf = pd.DataFrame([{\n    \"accession\": p[\"accession\"],\n    \"title\": (p.get(\"title\") or \"\")[:70],\n    \"submission_date\": p.get(\"submissionDate\"),\n    \"tissues\": \", \".join(p.get(\"organismsPart\", []))[:40],\n    \"submitter\": (p.get(\"submitters\") or [\"\"])[0] if p.get(\"submitters\") else \"\",\n} for p in projects])\nprint(f\"\\nFiltered projects: {len(df)}  (target instrument: {target_instr})\")\nprint(df.head(10).to_string(index=False))\ndf.to_csv(f\"{disease_kw.replace(' ', '_')}_{target_instr.replace(' ', '_')}_projects.csv\",\n          index=False)\n```\n\n### Workflow 2: File Download Manifest for One Project\n\n**Goal**: Pull the file list for a project, filter to the categories you actually want (`RAW` + `RESULT`), and emit an `aria2c`-ready URL list for parallel FTP download.\n\n```python\nimport requests, pandas as pd\nfrom pathlib import Path\n\nPRIDE = \"https:\u002F\u002Fwww.ebi.ac.uk\u002Fpride\u002Fws\u002Farchive\u002Fv3\"\naccession = \"PXD004131\"\nkeep_categories = {\"RAW\", \"RESULT\"}\noutput_dir = Path(f\"\u002Fdata\u002Fpride\u002F{accession}\")\n\nfiles = requests.get(f\"{PRIDE}\u002Fprojects\u002F{accession}\u002Ffiles\u002Fall\", timeout=120).json()\n\nmanifest = []\nfor f in files:\n    cat = (f.get(\"fileCategory\") or {}).get(\"value\")\n    if cat not in keep_categories:\n        continue\n    ftp = next((loc[\"value\"] for loc in f.get(\"publicFileLocations\", [])\n                if loc.get(\"name\") == \"FTP Protocol\"), None)\n    if not ftp:\n        continue\n    manifest.append({\n        \"file_name\": f[\"fileName\"],\n        \"category\": cat,\n        \"size_mb\": round((f.get(\"fileSizeBytes\") or 0) \u002F 1e6, 2),\n        \"ftp\": ftp,\n    })\n\nmdf = pd.DataFrame(manifest).sort_values([\"category\", \"file_name\"])\nprint(f\"{accession}: keeping {len(mdf)}\u002F{len(files)} files \"\n      f\"({mdf['size_mb'].sum():.0f} MB total)\")\nprint(mdf.groupby(\"category\")[[\"size_mb\"]].sum().round(0))\n\n# aria2c -i pride_dl.list -d \u002Fdata\u002Fpride\u002FPXD004131 -x 8 -j 4\nwith open(\"pride_dl.list\", \"w\") as fh:\n    fh.write(\"\\n\".join(mdf[\"ftp\"]))\nprint(f\"\\nWrote pride_dl.list with {len(mdf)} URLs (use aria2c -i)\")\n```\n\n### Workflow 3: Protein Cross-Project Occurrence\n\n**Goal**: For a candidate protein panel (e.g., from a differential-expression analysis), look up how many PRIDE projects mention each one and shortlist the most-evidenced proteins. Note: this is a project-count signal only — there are no PSM\u002Fpeptide counts at the API surface in v3, so a high project count is breadth, not depth.\n\n```python\nimport requests, time, pandas as pd, matplotlib.pyplot as plt\n\nPRIDE = \"https:\u002F\u002Fwww.ebi.ac.uk\u002Fpride\u002Fws\u002Farchive\u002Fv3\"\n\ncandidates = {\n    \"P04637\": \"TP53\", \"P38398\": \"BRCA1\", \"P31749\": \"AKT1\",\n    \"P40763\": \"STAT3\", \"O15530\": \"PDPK1\", \"P10275\": \"AR\",\n}\n\nrows = []\nfor acc, sym in candidates.items():\n    r = requests.get(f\"{PRIDE}\u002Fproteins\u002F{acc}\", timeout=30)\n    projs = r.json().get(\"projects\", []) if r.status_code == 200 else []\n    rows.append({\"uniprot\": acc, \"symbol\": sym, \"n_projects\": len(projs)})\n    time.sleep(0.3)\n\ndf = pd.DataFrame(rows).sort_values(\"n_projects\", ascending=False)\nprint(df.to_string(index=False))\n\nfig, ax = plt.subplots(figsize=(8, 3.5))\nbars = ax.bar(df[\"symbol\"], df[\"n_projects\"], color=\"#3182BD\")\nax.bar_label(bars, fmt=\"%d\", fontsize=9, padding=2)\nax.set_ylabel(\"# PRIDE projects mentioning the protein\")\nax.set_title(\"PRIDE project-level occurrence — candidate panel\")\nplt.tight_layout()\nplt.savefig(\"pride_protein_occurrence.png\", dpi=150, bbox_inches=\"tight\")\nprint(\"Saved pride_protein_occurrence.png\")\n```\n\n## Key Parameters\n\n| Parameter | Endpoint | Default | Range \u002F Options | Effect |\n|---|---|---|---|---|\n| `keyword` | `\u002Fsearch\u002Fprojects`, `\u002Ffacet\u002Fprojects`, `\u002Fsearch\u002Fautocomplete` | — | free-text string | Full-text search across title, description, tags |\n| `filter` | `\u002Fsearch\u002Fprojects` | — | `field_facet==value, field_facet==value` | Server-side filter using facet field names |\n| `pageSize` | `\u002Fsearch\u002Fprojects`, `\u002Fprojects`, `\u002Fprojects\u002F{acc}\u002Ffiles`, `\u002Fprojects\u002F{acc}\u002FsimilarProjects` | 100 | positive integer | Results per page |\n| `page` | same as above | 0 | 0-indexed integer | Page number (no metadata returned — walk pages until empty) |\n| `sortFields` | `\u002Fsearch\u002Fprojects` | `submission_date` | comma-separated field names | Sort key(s) |\n| `sortDirection` | `\u002Fsearch\u002Fprojects` | `DESC` | `ASC` or `DESC` | Sort order |\n| `facetPageSize` | `\u002Ffacet\u002Fprojects` | 20 | positive integer | Values returned per facet group |\n| `dateGap` | `\u002Fsearch\u002Fprojects`, `\u002Ffacet\u002Fprojects` | — | e.g. `+1MONTH`, `+1YEAR` | Date-range aggregation granularity |\n| (path) `accession` | `\u002Fprojects\u002F{acc}`, `\u002Fprojects\u002F{acc}\u002Ffiles`, `\u002Fprojects\u002F{acc}\u002FsimilarProjects`, `\u002Fproteins\u002F{acc}` | required | PXD######  or UniProt acc | Identifies the resource |\n\n## Best Practices\n\n1. **Use `\u002Fsearch\u002Fprojects` for searching, not `\u002Fprojects`.** Plain `\u002Fprojects` is a paginated listing endpoint and silently ignores keyword \u002F organism \u002F disease filters. Filtering only works through `\u002Fsearch\u002Fprojects` with the `filter=field_facet==value` syntax.\n\n2. **Discover filter values via `\u002Ffacet\u002Fprojects` before filtering.** Facet field values must match exactly (e.g., `organisms_facet==Homo sapiens (human)`, parentheses and all). The facet endpoint tells you which values exist and how many projects each has — saves a lot of trial-and-error.\n\n3. **Don't try to query peptide- or PSM-level data over the API.** Those endpoints were removed in v3. Download the project's RESULT files and parse them locally with `pyteomics`, `pyOpenMS`, or a search-engine reader (MaxQuant, ProteomeDiscoverer, etc.).\n\n4. **Prefer FTP URLs for bulk file downloads.** Each file record carries both `FTP Protocol` and `Aspera Protocol` URLs. FTP is more universally supported; pair it with `aria2c -x 8 -j 4` for parallel chunks. Use Aspera only if you have an Aspera client and need >100 Mbit transfer speeds.\n\n5. **Watch the field name `fileSizeBytes`.** The current v3 field is `fileSizeBytes`, not `fileSize` (old v2 docs may say `fileSize`). Sizes are in bytes — divide by `1e6` for MB, `1e9` for GB.\n\n6. **Filter file downloads by `fileCategory.value`.** A project can have hundreds of files spanning RAW (GB-scale) and OTHER (KB-scale). Always filter to the categories you actually need before queueing downloads — otherwise you'll easily download tens of gigabytes of vendor RAW files when you only wanted the identification tables.\n\n7. **Pagination has no metadata — walk until empty.** Unlike old PRIDE v2, the v3 API doesn't return `totalElements`\u002F`totalPages`. Iterate `page=0, 1, 2, ...` and stop when a page returns an empty array, or when its length is less than `pageSize`.\n\n## Common Recipes\n\n### Recipe: Quick Project File Summary\n\n```python\nimport requests\n\nPRIDE = \"https:\u002F\u002Fwww.ebi.ac.uk\u002Fpride\u002Fws\u002Farchive\u002Fv3\"\n\ndef project_file_summary(accession):\n    files = requests.get(f\"{PRIDE}\u002Fprojects\u002F{accession}\u002Ffiles\u002Fall\", timeout=60).json()\n    by_cat = {}\n    for f in files:\n        cat = (f.get(\"fileCategory\") or {}).get(\"value\", \"OTHER\")\n        by_cat.setdefault(cat, [0, 0])\n        by_cat[cat][0] += 1\n        by_cat[cat][1] += (f.get(\"fileSizeBytes\") or 0) \u002F 1e6\n    print(f\"\\n{accession} file summary:\")\n    for cat, (n, mb) in sorted(by_cat.items()):\n        print(f\"  {cat:\u003C8} {n:>4} file(s)   {mb:>10.1f} MB\")\n    total_mb = sum(mb for _, mb in by_cat.values())\n    total_n  = sum(n  for n, _  in by_cat.values())\n    print(f\"  {'TOTAL':\u003C8} {total_n:>4} file(s)   {total_mb:>10.1f} MB\")\n\nproject_file_summary(\"PXD000001\")\n```\n\n### Recipe: Check If a Protein Has Any PRIDE Evidence\n\n```python\nimport requests\n\nPRIDE = \"https:\u002F\u002Fwww.ebi.ac.uk\u002Fpride\u002Fws\u002Farchive\u002Fv3\"\n\ndef pride_evidence(uniprot_acc):\n    \"\"\"Return (has_evidence, n_projects). PRIDE v3 only exposes project list, no PSM counts.\"\"\"\n    r = requests.get(f\"{PRIDE}\u002Fproteins\u002F{uniprot_acc}\", timeout=30)\n    if r.status_code != 200:\n        return False, 0\n    projs = r.json().get(\"projects\", [])\n    return bool(projs), len(projs)\n\nfor acc in [\"P04637\", \"Q99999\"]:\n    has, n = pride_evidence(acc)\n    print(f\"{acc}: evidence={has}  projects={n}\")\n```\n\n### Recipe: Recent Submissions for a Keyword (sorted by date)\n\n```python\nimport requests, pandas as pd\n\nPRIDE = \"https:\u002F\u002Fwww.ebi.ac.uk\u002Fpride\u002Fws\u002Farchive\u002Fv3\"\n\nr = requests.get(f\"{PRIDE}\u002Fsearch\u002Fprojects\",\n                 params={\"keyword\": \"single-cell proteomics\",\n                         \"sortFields\": \"submission_date\",\n                         \"sortDirection\": \"DESC\",\n                         \"pageSize\": 15},\n                 timeout=30)\nrecent = r.json()\ndf = pd.DataFrame([{\n    \"submission_date\": p.get(\"submissionDate\"),\n    \"accession\": p[\"accession\"],\n    \"title\": (p.get(\"title\") or \"\")[:80],\n} for p in recent]).sort_values(\"submission_date\", ascending=False)\nprint(df.to_string(index=False))\n```\n\n### Recipe: Suggest-as-You-Type via Autocomplete\n\n```python\nimport requests\n\nPRIDE = \"https:\u002F\u002Fwww.ebi.ac.uk\u002Fpride\u002Fws\u002Farchive\u002Fv3\"\n\nfor prefix in [\"alzheimer\", \"single cell\", \"brca\"]:\n    s = requests.get(f\"{PRIDE}\u002Fsearch\u002Fautocomplete\",\n                     params={\"keyword\": prefix}, timeout=30).json()\n    print(f\"\\n'{prefix}' → {len(s)} suggestions:\")\n    for sug in s[:3]:\n        print(f\"  · {sug[:80]}\")\n```\n\n## Troubleshooting\n\n| Problem | Cause | Solution |\n|---|---|---|\n| Parsing returns empty list even when `r.json()` has data | Code is doing `data[\"_embedded\"][\"compactprojects\"]` — old HAL+JSON wrapper that v3 no longer returns | Parse the response directly as a list: `projects = r.json()` |\n| `HTTP 404` on `\u002Fpeptides`, `\u002Fpsms`, or `\u002Fproteins?proteinAccession=X` | These endpoints were removed in v3 | For peptide\u002FPSM data, download the project's RESULT files and parse locally. For protein lookup, use `\u002Fproteins\u002F{accession}` (path param) |\n| `\u002Fprojects?keyword=cancer` returns the same 100 results as `\u002Fprojects` with no keyword | The `\u002Fprojects` endpoint only accepts `pageSize` \u002F `page` — keyword and other filters are silently ignored | Use `\u002Fsearch\u002Fprojects?keyword=...&filter=...` instead |\n| `\u002Fprojects\u002F{acc}\u002Ffiles` shows file size 0 | Reading `fileSize` instead of `fileSizeBytes` | The v3 field is `fileSizeBytes` (bytes); compute MB via `fileSizeBytes \u002F 1e6` |\n| Filter has no effect | Facet value doesn't exactly match a real value | Call `\u002Ffacet\u002Fprojects?keyword=...` first to enumerate valid values (`Homo sapiens (human)`, not `Homo sapiens`) |\n| `pageSize` beyond the actual result set returns an empty array | Normal pagination behavior | Stop iterating when the returned array length is \u003C `pageSize`, or when it is empty |\n| `findAllOrganismsCount` returns HTTP 406 Not Acceptable | The endpoint requires a non-JSON Accept header | Skip this endpoint — facet counts via `\u002Ffacet\u002Fprojects` cover the same need |\n| `HTTP 429` or `ConnectionError` on bursts | Shared EBI infrastructure | Add `time.sleep(0.3)` in loops; retry on 5xx with exponential backoff |\n\n## Related Skills\n\n- `uniprot-protein-database` — UniProt sequences, Swiss-Prot annotations, ID mapping; pair with PRIDE protein lookups to enrich each UniProt accession with sequence and functional information\n- `interpro-database` — Protein domain architecture (Pfam, SMART, PANTHER) for proteins reported in PRIDE\n- `pdb-database` — Resolved 3D structures for proteins with PRIDE evidence\n- `pyteomics` (off-skill Python library) — Parse mzIdentML \u002F mzML \u002F mzTab files downloaded from `\u002Fprojects\u002F{accession}\u002Ffiles`; the path for spectrum- and PSM-level analysis now that the REST API no longer exposes those\n\n## References\n\n- [PRIDE Archive v3 REST API root](https:\u002F\u002Fwww.ebi.ac.uk\u002Fpride\u002Fws\u002Farchive\u002Fv3\u002F) — base URL\n- [PRIDE v3 OpenAPI\u002FSwagger spec](https:\u002F\u002Fwww.ebi.ac.uk\u002Fpride\u002Fws\u002Farchive\u002Fv3\u002Fv3\u002Fapi-docs) — authoritative endpoint inventory\n- [PRIDE Archive web portal](https:\u002F\u002Fwww.ebi.ac.uk\u002Fpride\u002F) — interactive dataset browser\n- [Perez-Riverol et al., *Nucleic Acids Research* 2022](https:\u002F\u002Fdoi.org\u002F10.1093\u002Fnar\u002Fgkab1038) — PRIDE 2022 update describing repository and architecture\n- [ProteomeXchange Consortium](http:\u002F\u002Fwww.proteomexchange.org\u002F) — standard accession system shared across PRIDE, MassIVE, jPOST, iProX\n- [SDRF-Proteomics specification](https:\u002F\u002Fgithub.com\u002Fbigbio\u002Fproteomics-sample-metadata) — format used by `\u002Ffiles\u002Fsdrf\u002F{projectAccession}`\n",{"name":5,"license":15,"description":7},"master","63f17866001c5ca854bf2fa0b678ce277133de5b","skills\u002Fawesome-skills\u002Fpride-database",0,"https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS","https:\u002F\u002Fbg-szy.github.io\u002FTOP-SKILLS\u002F","https:\u002F\u002Fgithub.com\u002Fbg-szy","https:\u002F\u002Fwww.ecust.edu.cn\u002F","a student of East China University of Science and Technology","2026-11-15 03:38:02",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add bg-szy\u002FTOP-SKILLS --skill pride-database",{"tool":40,"command":41},"bunx","bunx skills add bg-szy\u002FTOP-SKILLS --skill pride-database",{"tool":43,"command":44},"pnpm","pnpm dlx skills add bg-szy\u002FTOP-SKILLS --skill pride-database","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fawesome-skills\u002Fpride-database\u002FSKILL.md",true,[],[49,58,65,72,79,86],{"skillNo":50,"name":51,"nameZh":6,"description":52,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":53,"licenseFileUrl":6,"sourceHtmlUrl":54,"categories":55,"keywords":56,"publishedAt":57},"01M7DXW9N826PKXK174PVW3038","serpmaven","Scrape Google search results (SERP) to JSON with SERP Maven (serpmaven) - a real Chrome browser on a residential proxy with sticky sessions. Run it as a CLI, a Python library, a local HTTP search API (`serve`), an MCP server or a Docker image; set the proxy login, workers, pages and cost tracking. Use when the user wants Google results, rank tracking, a self-hosted SERP API, or live Google search for an AI agent.","MIT","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Fserpmaven\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":53,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":57},"01M7DXVHSTWDV65475QEQ915M7","revnu-landing-page-audit","Find out why a landing page isn't turning visitors into signups, demos or sales. Audits one page against what the ad, post or search that sends people there promised, then checks the first screen, proof, call to action, friction and mobile. Returns at most 7 prioritized fixes, plus what is fine and what could not be checked; rewrites specific lines and fixes the page in the repo when asked. Never promises a conversion lift. Works without a Revnu account. Use when the user says or asks: \"audit my landing page\", \"why isn't this page converting\", \"review my homepage\", \"my ads get clicks but no signups\", \"people bounce from the pricing page\", \"CRO review\", \"improve conversion rate\", \"is my hero section clear\", \"roast my landing page\", \"rewrite my headline\", \"what's wrong with this page\", \"landing page feedback\", \"make the signup page convert better\". Not for SEO or AI-search audits, page speed engineering on its own, or building a new page from scratch.","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Frevnu-landing-page-audit\u002FSKILL.md",[],[],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":53,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":57},"01M7DXV8X2D7B3VTD4HHYYHTGR","revnu-growth-context","Write down once who buys, what they're stuck on, what it costs, what proof you have and what you've already tried, so every growth task starts from facts instead of a questionnaire. Creates or updates .agents\u002Frevnu-growth.md from the repo, the live site and the user, and imports an existing product-marketing.md. Use when the user says \"set up our marketing context\", \"who is our ideal customer\", \"write our ICP\", \"describe the product for marketing\", \"positioning doc\", \"what's our brand voice\", \"remember this about our customers\", \"log what we tried\", \"what have we learned from marketing\", \"we changed pricing, update the context\", \"update our growth notes\", \"summarize the business for the agent\", \"import my product-marketing.md\", \"start a growth doc\", or before a first marketing, SEO, outreach or launch task when no context file exists. Works without a Revnu account.","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Frevnu-growth-context\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":53,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":57},"01M7DXV0DGJ1G0A60PAHC6J3C5","revnu-get-listed","Get onto the third-party pages AI answers and search cite when buyers ask for the best tool in your category: \"best X\" roundups, directories, review sites, GitHub awesome lists, community threads and comparison pages. Finds which ones are cited, ranks them by fit and effort, and drafts each submission, PR or pitch by the target's own rules. Use when the user says \"get us listed\", \"which directories should we submit to\", \"how do we get into best-of lists\", \"why does ChatGPT recommend competitors and not us\", \"get mentioned in AI answers\", \"submit to awesome lists\", \"get on G2\", \"where are our competitors listed\", \"pitch listicle authors\", \"find backlink opportunities\", \"launch directories\", \"get into roundups\", \"Product Hunt alternatives\", \"where should we be listed\", \"get cited by Perplexity\". Never submits, pays or posts without a yes. Works without a Revnu account.","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Frevnu-get-listed\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":53,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":57},"01M7DXTSPMGT9D6DSS0HP9BSTA","revnu-ai-readiness-audit","Audit whether your website gives ChatGPT, Perplexity, Claude, Gemini and Google's AI Overviews something worth quoting, and fix the pages that don't. Use when the user says or asks \"is my site ready for AI search\", \"audit my site for AI answers\", \"AEO audit\", \"GEO audit\", \"why doesn't ChatGPT quote our pricing\", \"make our pages citable by AI\", \"do I need llms.txt\", \"does schema help with ChatGPT\", \"check our structured data\", \"is our content visible without JavaScript\", \"AI SEO audit\", \"optimize our homepage for AI answers\", \"LLM SEO check\", \"why does AI get our product wrong\", \"fix our site for AI Overviews\". Checks fetchability and indexability, answers in the raw HTML, entity facts, schema (including JS-injected markup), headings, dates and llms.txt, then gives at most 10 prioritised fixes and edits the repo when asked. Works without a Revnu account.","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Frevnu-ai-readiness-audit\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":53,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":57},"01M7DXSZHCVTRS620GC3S97JZV","proxy-troubleshooting","Diagnose residential proxy failures, with NodeMaven's gateway as the reference - 407 with correct credentials, 406, 410, 500, a connection that hangs, ERR_TUNNEL_CONNECTION_FAILED in a browser, Playwright or Puppeteer ignoring proxy credentials, a sticky session that changes IP, geo-targeting that is silently ignored, passwords with special characters, and unexpected traffic from headless Chrome. Use when a proxy connection fails, returns the wrong location, or costs more traffic than expected.","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Fproxy-troubleshooting\u002FSKILL.md",[],[]]