Skip to main content

sirna-data-grabber

A standalone siRNA knockdown-efficacy dataset: the raw data files, full provenance/license documentation, and a small reusable Python package (sirna_data) for loading it -- and, since pip install sirna-data-grabber alone can't ship most of this non-commercial data, a bundled sirna-data-fetch command that re-fetches it from its original sources. Any project that wants this dataset can depend on this repo (or just the PyPI package) rather than vendoring a copy of the data or the loading code.

License

The code in this repo (sirna_data, tests/) is MIT licensed — see LICENSE. Use it, modify it, ship it commercially, whatever you want.

The data in data/raw/ is NOT covered by that license. It's redistributed under each original source's own terms, and most of those sources are non-commercial only (CC BY-NC / CC BY-NC-ND). Loading the data with this permissively-licensed code does not lift those restrictions — you still have to comply with them separately. See NOTICE.md for the per-source summary and data/DATA_SOURCES.md for full terms before using the data itself, especially commercially.

What's here

LICENSE                    MIT license -- covers the code only, not data/raw/
NOTICE.md                  per-source data license summary (see License section above)
data/
  raw/                       fetched CSVs + FASTA transcripts (the actual dataset)
  DATA_SOURCES.md            full provenance + license terms for every source
  DATA_SOURCE_LEDGER.md      audit: what's trainable, what's not, and why
  CMSIRNADB_FULL_RETRIEVAL.md   detail on the CMsiRNAdb full-database retrieval
  DEMETER2_README.txt        upstream release notes for DepMap DEMETER2 (investigated, not included -- see FUNCTIONAL_GENOMICS_SCREENS.md)
  FUNCTIONAL_GENOMICS_SCREENS.md   notes on functional-genomics screen sources considered
  POTENTIAL_DATA_SOURCES.md  landscape of sources investigated
  sirecords_overlap_analysis.md    siRecords overlap/dedup analysis
  data_source_ledger.csv     machine-readable companion to DATA_SOURCE_LEDGER.md
  *.png                      figures referenced by the docs above
src/sirna_data/
  raw_loader.py               load + merge every source into SiRNARecord rows
  ncbi_fetch.py                fetch a gene's RefSeq mRNA transcript by symbol
  __init__.py                  public API
  fetch/                       sirna-data-fetch CLI + per-source fetchers (see Install below)
    cli.py                       `sirna-data-fetch` entry point ([project.scripts])
    sirna_efficacy.py            siRNAEfficacyDB + NCBI -> sirna_efficacy.csv, mrna_transcripts.fasta
    monopoli.py                  Monopoli et al. 2023 supplementary data -> monopoli_*
    shabalina.py                 Shabalina et al. 2006 supplementary data -> shabalina_*
    cmsirnadb.py                 CMsiRNAdb + NCBI -> cmsirnadb_full_raw.tsv, cmsirnadb*_transcripts.fasta
tests/
  test_raw_loader.py          unit tests for raw_loader.py (fixtures, no real data needed)
  test_ncbi_fetch.py          unit tests for ncbi_fetch.py (mocked HTTP calls)
  conftest.py                 shared pytest fixtures

Start with data/DATA_SOURCES.md for what's in the dataset and where it came from; data/DATA_SOURCE_LEDGER.md for the bottom-line audit (6,577 trainable records across 87 genes, 4 sources — 16,178 records / 97 genes if the optional CMsiRNAdb full-database retrieval is also included). Primary source is siRNAEfficacyDB (Zhang et al. 2024, CC BY-NC); see the docs for the rest and their individual license terms before reusing this data outside this project.

Install

python3 -m venv .venv && source .venv/bin/activate
pip install -e .

This installs the sirna_data package in editable mode, so it resolves data/raw/ relative to this checkout automatically. If you copy the data/ folder somewhere else, point at it explicitly instead:

export SIRNA_DATA_DIR=/path/to/data/raw

Re-fetching the raw data from scratch (not required if data/raw/ already has the files) uses the sirna-data-fetch command, installed automatically with the package -- no extras needed:

sirna-data-fetch --dest data/raw

This also means a plain pip install sirna-data-grabber from PyPI (with no git checkout at all) can reconstruct the full dataset itself:

pip install sirna-data-grabber
sirna-data-fetch --dest ./my_data
export SIRNA_DATA_DIR=./my_data

sirna-data-fetch --only sirna_efficacy monopoli fetches a subset instead of all four sources; see sirna-data-fetch --help.

Usage

from sirna_data import load_records, fetch_mrna_by_gene

records = load_records()  # list[SiRNARecord]
print(len(records), "records across", len({r.gene for r in records}), "genes")

r = records[0]
r.guide_seq       # siRNA antisense strand
r.mrna_window      # local mRNA context around the real target site
r.label            # experimental %knockdown / %inhibition
r.source           # provenance, e.g. "siRNAEfficacyDB"

# Look up any gene's RefSeq transcript live from NCBI:
transcript = fetch_mrna_by_gene("TP53")
transcript.accession, transcript.sequence

load_records() takes include_monopoli / include_shabalina / include_cmsirnadb / include_cmsirnadb_full flags to exclude any supplementary source and use only the primary siRNAEfficacyDB set.

Using this from another project

Install as a sibling checkout in editable mode:

pip install -e ../sirna-data-grabber

That gives you import sirna_data with no other coupling — this repo only depends on pandas and requests, and knows nothing about any particular downstream model or feature-engineering pipeline.

Tests

pip install -e ".[test]"
pytest

Tests run entirely against small in-memory/tmp-dir fixtures (see tests/conftest.py) and mocked HTTP calls, so they don't touch the real dataset or the network.

Linting and type checking

pip install -e ".[lint]"
ruff check .
mypy

Both run in CI on every pull request (.github/workflows/tests.yml), alongside the test matrix.

Download files

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

Source Distribution

sirna_data_grabber-0.1.0.tar.gz (28.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sirna_data_grabber-0.1.0-py3-none-any.whl (28.3 kB view details)

Uploaded Python 3

File details

Details for the file sirna_data_grabber-0.1.0.tar.gz.

File metadata

  • Download URL: sirna_data_grabber-0.1.0.tar.gz
  • Upload date:
  • Size: 28.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for sirna_data_grabber-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ebc040ca8be84424ec154790b0e6c5c0f6d1a0d1c37c751e7511e6d191acd35b
MD5 daddf22de5de8f8d4850ab64752c9c7e
BLAKE2b-256 a0d4f7c621d8df5924caae2bda595e21c354375e2e149eb3a8eb533fa697e212

See more details on using hashes here.

Provenance

The following attestation bundles were made for sirna_data_grabber-0.1.0.tar.gz:

Publisher: publish.yml on BrandonWalk/sirna-data-grabber

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sirna_data_grabber-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for sirna_data_grabber-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ea443b65ffd4039a28cdee35e1167a11b1d084b401ee5bfd375146ab5f8dac2c
MD5 fa32811c34e3ece7da22364547c0aa62
BLAKE2b-256 0e0b0766ad620e49548b50f225f9aea111317be584bde17d2844dad3b013bf69

See more details on using hashes here.

Provenance

The following attestation bundles were made for sirna_data_grabber-0.1.0-py3-none-any.whl:

Publisher: publish.yml on BrandonWalk/sirna-data-grabber

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.7.0

2 files

0.6.0

2 files

0.5.0

2 files

0.4.0

2 files

0.3.0

2 files

0.2.3

2 files

0.2.2

2 files

0.2.0

2 files

0.1.3

2 files

This release

0.1.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page