recount3 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- recount3-1.0.0/LICENSE +24 -0
- recount3-1.0.0/PKG-INFO +260 -0
- recount3-1.0.0/README.rst +208 -0
- recount3-1.0.0/pyproject.toml +126 -0
- recount3-1.0.0/setup.cfg +4 -0
- recount3-1.0.0/src/recount3/__init__.py +185 -0
- recount3-1.0.0/src/recount3/__main__.py +44 -0
- recount3-1.0.0/src/recount3/_bigwig.py +256 -0
- recount3-1.0.0/src/recount3/_descriptions.py +572 -0
- recount3-1.0.0/src/recount3/_utils.py +1106 -0
- recount3-1.0.0/src/recount3/bundle.py +2654 -0
- recount3-1.0.0/src/recount3/cli.py +1827 -0
- recount3-1.0.0/src/recount3/config.py +276 -0
- recount3-1.0.0/src/recount3/errors.py +82 -0
- recount3-1.0.0/src/recount3/py.typed +3 -0
- recount3-1.0.0/src/recount3/resource.py +663 -0
- recount3-1.0.0/src/recount3/se.py +1133 -0
- recount3-1.0.0/src/recount3/search.py +1337 -0
- recount3-1.0.0/src/recount3/types.py +81 -0
- recount3-1.0.0/src/recount3/version.py +36 -0
- recount3-1.0.0/src/recount3.egg-info/PKG-INFO +260 -0
- recount3-1.0.0/src/recount3.egg-info/SOURCES.txt +38 -0
- recount3-1.0.0/src/recount3.egg-info/dependency_links.txt +1 -0
- recount3-1.0.0/src/recount3.egg-info/entry_points.txt +2 -0
- recount3-1.0.0/src/recount3.egg-info/requires.txt +28 -0
- recount3-1.0.0/src/recount3.egg-info/top_level.txt +1 -0
- recount3-1.0.0/tests/test___init__.py +124 -0
- recount3-1.0.0/tests/test___main__.py +67 -0
- recount3-1.0.0/tests/test__bigwig.py +378 -0
- recount3-1.0.0/tests/test__descriptions.py +477 -0
- recount3-1.0.0/tests/test__utils.py +1648 -0
- recount3-1.0.0/tests/test_bundle.py +3010 -0
- recount3-1.0.0/tests/test_cli.py +1986 -0
- recount3-1.0.0/tests/test_config.py +816 -0
- recount3-1.0.0/tests/test_errors.py +107 -0
- recount3-1.0.0/tests/test_resource.py +1492 -0
- recount3-1.0.0/tests/test_se.py +1163 -0
- recount3-1.0.0/tests/test_search.py +1498 -0
- recount3-1.0.0/tests/test_types.py +90 -0
- recount3-1.0.0/tests/test_version.py +53 -0
recount3-1.0.0/LICENSE
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
The Clear BSD License with Extra Clause
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026, Alexander A. Alsalihi, Robert M. Flight, Hunter N.B. Moseley
|
|
4
|
+
All rights reserved.
|
|
5
|
+
|
|
6
|
+
Redistribution and use in source and binary forms, with or without modification,
|
|
7
|
+
are permitted provided that the following conditions are met:
|
|
8
|
+
|
|
9
|
+
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
10
|
+
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
11
|
+
* All advertising materials mentioning features or use of this software must display the following acknowledgement: This product includes software developed by the copyright holder.
|
|
12
|
+
* Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
|
13
|
+
* If the source code is used in a published work, then proper citation of the source code must be included with the published work.
|
|
14
|
+
|
|
15
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND
|
|
16
|
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
17
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
18
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE
|
|
19
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
20
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
21
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
22
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
23
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
24
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
recount3-1.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: recount3
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: CLI and API for searching, manifesting, and downloading recount3 resources.
|
|
5
|
+
Author: Alexander A. Alsalihi, Robert M. Flight, Hunter N.B. Moseley
|
|
6
|
+
Maintainer: Moseley Bioinformatics Lab
|
|
7
|
+
License-Expression: BSD-3-Clause-Clear
|
|
8
|
+
Project-URL: Homepage, https://github.com/MoseleyBioinformaticsLab/recount3
|
|
9
|
+
Project-URL: Repository, https://github.com/MoseleyBioinformaticsLab/recount3
|
|
10
|
+
Project-URL: Issues, https://github.com/MoseleyBioinformaticsLab/recount3/issues
|
|
11
|
+
Project-URL: Documentation, https://moseleybioinformaticslab.github.io/recount3/
|
|
12
|
+
Keywords: bioinformatics,genomics,recount3,RNA-seq,CLI,data-pipelines,manifests
|
|
13
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
14
|
+
Classifier: Intended Audience :: Science/Research
|
|
15
|
+
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
|
|
16
|
+
Classifier: Programming Language :: Python
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
24
|
+
Classifier: Typing :: Typed
|
|
25
|
+
Requires-Python: >=3.10
|
|
26
|
+
Description-Content-Type: text/x-rst
|
|
27
|
+
License-File: LICENSE
|
|
28
|
+
Requires-Dist: numpy<3.0,>=2.0
|
|
29
|
+
Requires-Dist: pandas<3.0,>=2.2
|
|
30
|
+
Requires-Dist: scipy<2.0,>=1.13
|
|
31
|
+
Provides-Extra: bigwig
|
|
32
|
+
Requires-Dist: pybigwig>=0.3.18; extra == "bigwig"
|
|
33
|
+
Provides-Extra: biocpy
|
|
34
|
+
Requires-Dist: biocframe>=0.7; extra == "biocpy"
|
|
35
|
+
Requires-Dist: genomicranges>=0.8; extra == "biocpy"
|
|
36
|
+
Requires-Dist: summarizedexperiment>=0.6; extra == "biocpy"
|
|
37
|
+
Provides-Extra: docs
|
|
38
|
+
Requires-Dist: sphinx>=7; extra == "docs"
|
|
39
|
+
Requires-Dist: sphinx-rtd-theme>=2; extra == "docs"
|
|
40
|
+
Provides-Extra: dev
|
|
41
|
+
Requires-Dist: pytest<9,>=8; extra == "dev"
|
|
42
|
+
Requires-Dist: pytest-cov<6,>=5; extra == "dev"
|
|
43
|
+
Requires-Dist: pytest-mock<4,>=3.12; extra == "dev"
|
|
44
|
+
Requires-Dist: pytest-xdist<4,>=3; extra == "dev"
|
|
45
|
+
Requires-Dist: pylint<4,>=3.2; extra == "dev"
|
|
46
|
+
Requires-Dist: build>=1.2; extra == "dev"
|
|
47
|
+
Requires-Dist: twine>=5; extra == "dev"
|
|
48
|
+
Requires-Dist: commitizen>=3.29; extra == "dev"
|
|
49
|
+
Provides-Extra: all
|
|
50
|
+
Requires-Dist: recount3[bigwig,biocpy,dev,docs]; extra == "all"
|
|
51
|
+
Dynamic: license-file
|
|
52
|
+
|
|
53
|
+
recount3
|
|
54
|
+
========
|
|
55
|
+
|
|
56
|
+
.. image:: https://img.shields.io/pypi/l/recount3.svg
|
|
57
|
+
:target: https://github.com/MoseleyBioinformaticsLab/recount3/blob/main/LICENSE
|
|
58
|
+
:alt: Clear BSD License with extra clauses
|
|
59
|
+
|
|
60
|
+
.. image:: https://img.shields.io/pypi/v/recount3.svg
|
|
61
|
+
:target: https://pypi.org/project/recount3
|
|
62
|
+
:alt: Current library version
|
|
63
|
+
|
|
64
|
+
.. image:: https://img.shields.io/pypi/pyversions/recount3.svg
|
|
65
|
+
:target: https://pypi.org/project/recount3
|
|
66
|
+
:alt: Supported Python versions
|
|
67
|
+
|
|
68
|
+
.. image:: https://img.shields.io/github/stars/MoseleyBioinformaticsLab/recount3.svg?style=social&label=Star
|
|
69
|
+
:target: https://github.com/MoseleyBioinformaticsLab/recount3
|
|
70
|
+
:alt: GitHub project
|
|
71
|
+
|
|
72
|
+
|
|
|
73
|
+
|
|
74
|
+
The ``recount3`` package is a Python library and command-line tool for
|
|
75
|
+
interacting with the `recount3`_ data repository, a uniformly processed
|
|
76
|
+
collection of RNA-seq studies covering human and mouse samples from SRA,
|
|
77
|
+
GTEx, and TCGA.
|
|
78
|
+
|
|
79
|
+
The package provides a typed API for discovering, downloading, and assembling
|
|
80
|
+
recount3 resources into analysis-ready objects. A companion CLI implements a
|
|
81
|
+
discover -> manifest -> materialize workflow suitable for use in scripts and
|
|
82
|
+
pipelines.
|
|
83
|
+
|
|
84
|
+
The ``recount3`` package can be used in two ways:
|
|
85
|
+
|
|
86
|
+
* As a Python library for searching, downloading, and assembling
|
|
87
|
+
recount3 gene/exon/junction count matrices, sample metadata, genome
|
|
88
|
+
annotations, and BigWig coverage files into
|
|
89
|
+
``SummarizedExperiment`` / ``RangedSummarizedExperiment`` objects via
|
|
90
|
+
the BiocPy stack.
|
|
91
|
+
* As a command-line tool (``recount3``) to search the mirror, produce
|
|
92
|
+
JSONL manifests, and materialize resources to disk or into a ``.zip``
|
|
93
|
+
archive.
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
Links
|
|
97
|
+
~~~~~
|
|
98
|
+
|
|
99
|
+
* recount3 @ GitHub_
|
|
100
|
+
* recount3 @ PyPI_
|
|
101
|
+
* Documentation @ Pages_
|
|
102
|
+
* Questions & bug reports @ Issues_
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
Installation
|
|
106
|
+
~~~~~~~~~~~~
|
|
107
|
+
|
|
108
|
+
The core package requires Python 3.10 or newer and depends on NumPy, pandas,
|
|
109
|
+
and SciPy. Optional extras unlock BiocPy integration and BigWig support.
|
|
110
|
+
|
|
111
|
+
Install on Linux, Mac OS X
|
|
112
|
+
--------------------------
|
|
113
|
+
|
|
114
|
+
.. code:: bash
|
|
115
|
+
|
|
116
|
+
python3 -m pip install recount3
|
|
117
|
+
|
|
118
|
+
Install on Windows
|
|
119
|
+
------------------
|
|
120
|
+
|
|
121
|
+
.. code:: bash
|
|
122
|
+
|
|
123
|
+
py -3 -m pip install recount3
|
|
124
|
+
|
|
125
|
+
Optional extras
|
|
126
|
+
---------------
|
|
127
|
+
|
|
128
|
+
Install with BiocPy support (``SummarizedExperiment``, ``RangedSummarizedExperiment``,
|
|
129
|
+
``GenomicRanges``):
|
|
130
|
+
|
|
131
|
+
.. code:: bash
|
|
132
|
+
|
|
133
|
+
python3 -m pip install "recount3[biocpy]"
|
|
134
|
+
|
|
135
|
+
Install with BigWig support (``pybigwig``):
|
|
136
|
+
|
|
137
|
+
.. code:: bash
|
|
138
|
+
|
|
139
|
+
python3 -m pip install "recount3[bigwig]"
|
|
140
|
+
|
|
141
|
+
Install all optional extras:
|
|
142
|
+
|
|
143
|
+
.. code:: bash
|
|
144
|
+
|
|
145
|
+
python3 -m pip install "recount3[biocpy,bigwig]"
|
|
146
|
+
|
|
147
|
+
Upgrade on Linux, Mac OS X
|
|
148
|
+
---------------------------
|
|
149
|
+
|
|
150
|
+
.. code:: bash
|
|
151
|
+
|
|
152
|
+
python3 -m pip install recount3 --upgrade
|
|
153
|
+
|
|
154
|
+
Upgrade on Windows
|
|
155
|
+
------------------
|
|
156
|
+
|
|
157
|
+
.. code:: bash
|
|
158
|
+
|
|
159
|
+
py -3 -m pip install recount3 --upgrade
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
Quickstart
|
|
163
|
+
~~~~~~~~~~
|
|
164
|
+
|
|
165
|
+
Python API
|
|
166
|
+
----------
|
|
167
|
+
|
|
168
|
+
Discover all resources for a project, stack the gene-level count matrices
|
|
169
|
+
across samples, and build a ``RangedSummarizedExperiment``:
|
|
170
|
+
|
|
171
|
+
.. code:: python
|
|
172
|
+
|
|
173
|
+
>>> from recount3 import R3ResourceBundle
|
|
174
|
+
>>>
|
|
175
|
+
>>> # Discover every resource for a human SRA project.
|
|
176
|
+
>>> bundle = R3ResourceBundle.discover(
|
|
177
|
+
... organism="human",
|
|
178
|
+
... data_source="sra",
|
|
179
|
+
... project="SRP009615",
|
|
180
|
+
... )
|
|
181
|
+
>>>
|
|
182
|
+
>>> # Stack raw gene-count matrices across all samples.
|
|
183
|
+
>>> counts = bundle.only_counts().stack_count_matrices(genomic_unit="gene")
|
|
184
|
+
>>>
|
|
185
|
+
>>> # Build a RangedSummarizedExperiment (requires recount3[biocpy]).
|
|
186
|
+
>>> rse = bundle.to_ranged_summarized_experiment(genomic_unit="gene")
|
|
187
|
+
|
|
188
|
+
Command-line tool
|
|
189
|
+
-----------------
|
|
190
|
+
|
|
191
|
+
Discover resources, save a JSONL manifest, and download in parallel:
|
|
192
|
+
|
|
193
|
+
.. code:: bash
|
|
194
|
+
|
|
195
|
+
# Search for gene-level count files and write a manifest.
|
|
196
|
+
recount3 search gene-exon \
|
|
197
|
+
organism=human data_source=sra genomic_unit=gene project=SRP009615 \
|
|
198
|
+
--format=jsonl > manifest.jsonl
|
|
199
|
+
|
|
200
|
+
# Materialize all resources from the manifest (8 parallel jobs).
|
|
201
|
+
recount3 download --from=manifest.jsonl --dest=./downloads --jobs=8
|
|
202
|
+
|
|
203
|
+
Stream search output directly into download without an intermediate file:
|
|
204
|
+
|
|
205
|
+
.. code:: bash
|
|
206
|
+
|
|
207
|
+
recount3 search annotations \
|
|
208
|
+
organism=human genomic_unit=gene annotation_extension=G026 \
|
|
209
|
+
--format=jsonl | \
|
|
210
|
+
recount3 download --from=- --dest=./annotations
|
|
211
|
+
|
|
212
|
+
.. note:: Read the full documentation on Pages_ for the complete API reference,
|
|
213
|
+
CLI guide, and worked examples.
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
Dependencies
|
|
217
|
+
~~~~~~~~~~~~
|
|
218
|
+
|
|
219
|
+
Core (installed automatically):
|
|
220
|
+
|
|
221
|
+
.. code:: text
|
|
222
|
+
|
|
223
|
+
numpy>=2.0
|
|
224
|
+
pandas>=2.2
|
|
225
|
+
scipy>=1.13
|
|
226
|
+
|
|
227
|
+
Optional: BiocPy integration (``recount3[biocpy]``):
|
|
228
|
+
|
|
229
|
+
.. code:: text
|
|
230
|
+
|
|
231
|
+
biocframe>=0.7
|
|
232
|
+
genomicranges>=0.8
|
|
233
|
+
summarizedexperiment>=0.6
|
|
234
|
+
|
|
235
|
+
Optional: BigWig support (``recount3[bigwig]``):
|
|
236
|
+
|
|
237
|
+
.. code:: text
|
|
238
|
+
|
|
239
|
+
pybigwig>=0.3.18
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
Questions, Feature Requests, and Bug Reports
|
|
243
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
244
|
+
|
|
245
|
+
Please submit questions, feature requests, and bug reports on Issues_.
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
License
|
|
249
|
+
~~~~~~~
|
|
250
|
+
|
|
251
|
+
This package is distributed under the BSD_ license.
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
.. _recount3: https://rna.recount.bio
|
|
255
|
+
.. _BiocPy: https://github.com/BiocPy
|
|
256
|
+
.. _GitHub: https://github.com/MoseleyBioinformaticsLab/recount3
|
|
257
|
+
.. _PyPI: https://pypi.org/project/recount3
|
|
258
|
+
.. _Pages: https://moseleybioinformaticslab.github.io/recount3/
|
|
259
|
+
.. _Issues: https://github.com/MoseleyBioinformaticsLab/recount3/issues
|
|
260
|
+
.. _BSD: https://github.com/MoseleyBioinformaticsLab/recount3/blob/main/LICENSE
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
recount3
|
|
2
|
+
========
|
|
3
|
+
|
|
4
|
+
.. image:: https://img.shields.io/pypi/l/recount3.svg
|
|
5
|
+
:target: https://github.com/MoseleyBioinformaticsLab/recount3/blob/main/LICENSE
|
|
6
|
+
:alt: Clear BSD License with extra clauses
|
|
7
|
+
|
|
8
|
+
.. image:: https://img.shields.io/pypi/v/recount3.svg
|
|
9
|
+
:target: https://pypi.org/project/recount3
|
|
10
|
+
:alt: Current library version
|
|
11
|
+
|
|
12
|
+
.. image:: https://img.shields.io/pypi/pyversions/recount3.svg
|
|
13
|
+
:target: https://pypi.org/project/recount3
|
|
14
|
+
:alt: Supported Python versions
|
|
15
|
+
|
|
16
|
+
.. image:: https://img.shields.io/github/stars/MoseleyBioinformaticsLab/recount3.svg?style=social&label=Star
|
|
17
|
+
:target: https://github.com/MoseleyBioinformaticsLab/recount3
|
|
18
|
+
:alt: GitHub project
|
|
19
|
+
|
|
20
|
+
|
|
|
21
|
+
|
|
22
|
+
The ``recount3`` package is a Python library and command-line tool for
|
|
23
|
+
interacting with the `recount3`_ data repository, a uniformly processed
|
|
24
|
+
collection of RNA-seq studies covering human and mouse samples from SRA,
|
|
25
|
+
GTEx, and TCGA.
|
|
26
|
+
|
|
27
|
+
The package provides a typed API for discovering, downloading, and assembling
|
|
28
|
+
recount3 resources into analysis-ready objects. A companion CLI implements a
|
|
29
|
+
discover -> manifest -> materialize workflow suitable for use in scripts and
|
|
30
|
+
pipelines.
|
|
31
|
+
|
|
32
|
+
The ``recount3`` package can be used in two ways:
|
|
33
|
+
|
|
34
|
+
* As a Python library for searching, downloading, and assembling
|
|
35
|
+
recount3 gene/exon/junction count matrices, sample metadata, genome
|
|
36
|
+
annotations, and BigWig coverage files into
|
|
37
|
+
``SummarizedExperiment`` / ``RangedSummarizedExperiment`` objects via
|
|
38
|
+
the BiocPy stack.
|
|
39
|
+
* As a command-line tool (``recount3``) to search the mirror, produce
|
|
40
|
+
JSONL manifests, and materialize resources to disk or into a ``.zip``
|
|
41
|
+
archive.
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
Links
|
|
45
|
+
~~~~~
|
|
46
|
+
|
|
47
|
+
* recount3 @ GitHub_
|
|
48
|
+
* recount3 @ PyPI_
|
|
49
|
+
* Documentation @ Pages_
|
|
50
|
+
* Questions & bug reports @ Issues_
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
Installation
|
|
54
|
+
~~~~~~~~~~~~
|
|
55
|
+
|
|
56
|
+
The core package requires Python 3.10 or newer and depends on NumPy, pandas,
|
|
57
|
+
and SciPy. Optional extras unlock BiocPy integration and BigWig support.
|
|
58
|
+
|
|
59
|
+
Install on Linux, Mac OS X
|
|
60
|
+
--------------------------
|
|
61
|
+
|
|
62
|
+
.. code:: bash
|
|
63
|
+
|
|
64
|
+
python3 -m pip install recount3
|
|
65
|
+
|
|
66
|
+
Install on Windows
|
|
67
|
+
------------------
|
|
68
|
+
|
|
69
|
+
.. code:: bash
|
|
70
|
+
|
|
71
|
+
py -3 -m pip install recount3
|
|
72
|
+
|
|
73
|
+
Optional extras
|
|
74
|
+
---------------
|
|
75
|
+
|
|
76
|
+
Install with BiocPy support (``SummarizedExperiment``, ``RangedSummarizedExperiment``,
|
|
77
|
+
``GenomicRanges``):
|
|
78
|
+
|
|
79
|
+
.. code:: bash
|
|
80
|
+
|
|
81
|
+
python3 -m pip install "recount3[biocpy]"
|
|
82
|
+
|
|
83
|
+
Install with BigWig support (``pybigwig``):
|
|
84
|
+
|
|
85
|
+
.. code:: bash
|
|
86
|
+
|
|
87
|
+
python3 -m pip install "recount3[bigwig]"
|
|
88
|
+
|
|
89
|
+
Install all optional extras:
|
|
90
|
+
|
|
91
|
+
.. code:: bash
|
|
92
|
+
|
|
93
|
+
python3 -m pip install "recount3[biocpy,bigwig]"
|
|
94
|
+
|
|
95
|
+
Upgrade on Linux, Mac OS X
|
|
96
|
+
---------------------------
|
|
97
|
+
|
|
98
|
+
.. code:: bash
|
|
99
|
+
|
|
100
|
+
python3 -m pip install recount3 --upgrade
|
|
101
|
+
|
|
102
|
+
Upgrade on Windows
|
|
103
|
+
------------------
|
|
104
|
+
|
|
105
|
+
.. code:: bash
|
|
106
|
+
|
|
107
|
+
py -3 -m pip install recount3 --upgrade
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
Quickstart
|
|
111
|
+
~~~~~~~~~~
|
|
112
|
+
|
|
113
|
+
Python API
|
|
114
|
+
----------
|
|
115
|
+
|
|
116
|
+
Discover all resources for a project, stack the gene-level count matrices
|
|
117
|
+
across samples, and build a ``RangedSummarizedExperiment``:
|
|
118
|
+
|
|
119
|
+
.. code:: python
|
|
120
|
+
|
|
121
|
+
>>> from recount3 import R3ResourceBundle
|
|
122
|
+
>>>
|
|
123
|
+
>>> # Discover every resource for a human SRA project.
|
|
124
|
+
>>> bundle = R3ResourceBundle.discover(
|
|
125
|
+
... organism="human",
|
|
126
|
+
... data_source="sra",
|
|
127
|
+
... project="SRP009615",
|
|
128
|
+
... )
|
|
129
|
+
>>>
|
|
130
|
+
>>> # Stack raw gene-count matrices across all samples.
|
|
131
|
+
>>> counts = bundle.only_counts().stack_count_matrices(genomic_unit="gene")
|
|
132
|
+
>>>
|
|
133
|
+
>>> # Build a RangedSummarizedExperiment (requires recount3[biocpy]).
|
|
134
|
+
>>> rse = bundle.to_ranged_summarized_experiment(genomic_unit="gene")
|
|
135
|
+
|
|
136
|
+
Command-line tool
|
|
137
|
+
-----------------
|
|
138
|
+
|
|
139
|
+
Discover resources, save a JSONL manifest, and download in parallel:
|
|
140
|
+
|
|
141
|
+
.. code:: bash
|
|
142
|
+
|
|
143
|
+
# Search for gene-level count files and write a manifest.
|
|
144
|
+
recount3 search gene-exon \
|
|
145
|
+
organism=human data_source=sra genomic_unit=gene project=SRP009615 \
|
|
146
|
+
--format=jsonl > manifest.jsonl
|
|
147
|
+
|
|
148
|
+
# Materialize all resources from the manifest (8 parallel jobs).
|
|
149
|
+
recount3 download --from=manifest.jsonl --dest=./downloads --jobs=8
|
|
150
|
+
|
|
151
|
+
Stream search output directly into download without an intermediate file:
|
|
152
|
+
|
|
153
|
+
.. code:: bash
|
|
154
|
+
|
|
155
|
+
recount3 search annotations \
|
|
156
|
+
organism=human genomic_unit=gene annotation_extension=G026 \
|
|
157
|
+
--format=jsonl | \
|
|
158
|
+
recount3 download --from=- --dest=./annotations
|
|
159
|
+
|
|
160
|
+
.. note:: Read the full documentation on Pages_ for the complete API reference,
|
|
161
|
+
CLI guide, and worked examples.
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
Dependencies
|
|
165
|
+
~~~~~~~~~~~~
|
|
166
|
+
|
|
167
|
+
Core (installed automatically):
|
|
168
|
+
|
|
169
|
+
.. code:: text
|
|
170
|
+
|
|
171
|
+
numpy>=2.0
|
|
172
|
+
pandas>=2.2
|
|
173
|
+
scipy>=1.13
|
|
174
|
+
|
|
175
|
+
Optional: BiocPy integration (``recount3[biocpy]``):
|
|
176
|
+
|
|
177
|
+
.. code:: text
|
|
178
|
+
|
|
179
|
+
biocframe>=0.7
|
|
180
|
+
genomicranges>=0.8
|
|
181
|
+
summarizedexperiment>=0.6
|
|
182
|
+
|
|
183
|
+
Optional: BigWig support (``recount3[bigwig]``):
|
|
184
|
+
|
|
185
|
+
.. code:: text
|
|
186
|
+
|
|
187
|
+
pybigwig>=0.3.18
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
Questions, Feature Requests, and Bug Reports
|
|
191
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
192
|
+
|
|
193
|
+
Please submit questions, feature requests, and bug reports on Issues_.
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
License
|
|
197
|
+
~~~~~~~
|
|
198
|
+
|
|
199
|
+
This package is distributed under the BSD_ license.
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
.. _recount3: https://rna.recount.bio
|
|
203
|
+
.. _BiocPy: https://github.com/BiocPy
|
|
204
|
+
.. _GitHub: https://github.com/MoseleyBioinformaticsLab/recount3
|
|
205
|
+
.. _PyPI: https://pypi.org/project/recount3
|
|
206
|
+
.. _Pages: https://moseleybioinformaticslab.github.io/recount3/
|
|
207
|
+
.. _Issues: https://github.com/MoseleyBioinformaticsLab/recount3/issues
|
|
208
|
+
.. _BSD: https://github.com/MoseleyBioinformaticsLab/recount3/blob/main/LICENSE
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "recount3"
|
|
7
|
+
dynamic = ["version"]
|
|
8
|
+
description = "CLI and API for searching, manifesting, and downloading recount3 resources."
|
|
9
|
+
dependencies = [
|
|
10
|
+
"numpy>=2.0,<3.0",
|
|
11
|
+
"pandas>=2.2,<3.0",
|
|
12
|
+
"scipy>=1.13,<2.0",
|
|
13
|
+
]
|
|
14
|
+
readme = { file = "README.rst", content-type = "text/x-rst" }
|
|
15
|
+
requires-python = ">=3.10"
|
|
16
|
+
license = "BSD-3-Clause-Clear"
|
|
17
|
+
license-files = ["LICENSE"]
|
|
18
|
+
authors = [
|
|
19
|
+
{ name = "Alexander A. Alsalihi" },
|
|
20
|
+
{ name = "Robert M. Flight" },
|
|
21
|
+
{ name = "Hunter N.B. Moseley" }
|
|
22
|
+
]
|
|
23
|
+
maintainers = [
|
|
24
|
+
{ name = "Moseley Bioinformatics Lab" }
|
|
25
|
+
]
|
|
26
|
+
keywords = [
|
|
27
|
+
"bioinformatics",
|
|
28
|
+
"genomics",
|
|
29
|
+
"recount3",
|
|
30
|
+
"RNA-seq",
|
|
31
|
+
"CLI",
|
|
32
|
+
"data-pipelines",
|
|
33
|
+
"manifests",
|
|
34
|
+
]
|
|
35
|
+
classifiers = [
|
|
36
|
+
"Development Status :: 5 - Production/Stable",
|
|
37
|
+
"Intended Audience :: Science/Research",
|
|
38
|
+
"Topic :: Scientific/Engineering :: Bio-Informatics",
|
|
39
|
+
"Programming Language :: Python",
|
|
40
|
+
"Programming Language :: Python :: 3",
|
|
41
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
42
|
+
"Programming Language :: Python :: 3.10",
|
|
43
|
+
"Programming Language :: Python :: 3.11",
|
|
44
|
+
"Programming Language :: Python :: 3.12",
|
|
45
|
+
"Programming Language :: Python :: 3.13",
|
|
46
|
+
"Programming Language :: Python :: 3.14",
|
|
47
|
+
"Typing :: Typed",
|
|
48
|
+
]
|
|
49
|
+
|
|
50
|
+
# Console entry point: `recount3`
|
|
51
|
+
[project.scripts]
|
|
52
|
+
recount3 = "recount3.cli:main"
|
|
53
|
+
|
|
54
|
+
[project.urls]
|
|
55
|
+
Homepage = "https://github.com/MoseleyBioinformaticsLab/recount3"
|
|
56
|
+
Repository = "https://github.com/MoseleyBioinformaticsLab/recount3"
|
|
57
|
+
Issues = "https://github.com/MoseleyBioinformaticsLab/recount3/issues"
|
|
58
|
+
Documentation = "https://moseleybioinformaticslab.github.io/recount3/"
|
|
59
|
+
|
|
60
|
+
[tool.setuptools]
|
|
61
|
+
package-dir = {"" = "src"}
|
|
62
|
+
include-package-data = true
|
|
63
|
+
|
|
64
|
+
[tool.setuptools.packages.find]
|
|
65
|
+
where = ["src"]
|
|
66
|
+
include = ["recount3*"]
|
|
67
|
+
|
|
68
|
+
[tool.setuptools.package-data]
|
|
69
|
+
recount3 = ["py.typed"]
|
|
70
|
+
|
|
71
|
+
[tool.setuptools.dynamic]
|
|
72
|
+
version = { attr = "recount3.version.__version__" }
|
|
73
|
+
|
|
74
|
+
[project.optional-dependencies]
|
|
75
|
+
bigwig = [
|
|
76
|
+
"pybigwig>=0.3.18",
|
|
77
|
+
]
|
|
78
|
+
biocpy = [
|
|
79
|
+
"biocframe>=0.7",
|
|
80
|
+
"genomicranges>=0.8",
|
|
81
|
+
"summarizedexperiment>=0.6",
|
|
82
|
+
]
|
|
83
|
+
docs = [
|
|
84
|
+
"sphinx>=7",
|
|
85
|
+
"sphinx-rtd-theme>=2",
|
|
86
|
+
]
|
|
87
|
+
dev = [
|
|
88
|
+
"pytest>=8,<9",
|
|
89
|
+
"pytest-cov>=5,<6",
|
|
90
|
+
"pytest-mock>=3.12,<4",
|
|
91
|
+
"pytest-xdist>=3,<4",
|
|
92
|
+
"pylint>=3.2,<4",
|
|
93
|
+
"build>=1.2",
|
|
94
|
+
"twine>=5",
|
|
95
|
+
"commitizen>=3.29",
|
|
96
|
+
]
|
|
97
|
+
|
|
98
|
+
all = [
|
|
99
|
+
"recount3[bigwig,biocpy,docs,dev]"
|
|
100
|
+
]
|
|
101
|
+
|
|
102
|
+
[tool.pytest.ini_options]
|
|
103
|
+
minversion = "8.0"
|
|
104
|
+
addopts = "-ra"
|
|
105
|
+
testpaths = ["tests"]
|
|
106
|
+
pythonpath = ["src"]
|
|
107
|
+
|
|
108
|
+
[tool.coverage.run]
|
|
109
|
+
branch = true
|
|
110
|
+
source = ["src"]
|
|
111
|
+
|
|
112
|
+
[tool.coverage.report]
|
|
113
|
+
show_missing = true
|
|
114
|
+
skip_covered = true
|
|
115
|
+
exclude_lines = [
|
|
116
|
+
"pragma: no cover",
|
|
117
|
+
"if __name__ == .__main__.:",
|
|
118
|
+
]
|
|
119
|
+
|
|
120
|
+
[tool.commitizen]
|
|
121
|
+
name = "cz_conventional_commits"
|
|
122
|
+
version = "1.0.0"
|
|
123
|
+
version_files = ["src/recount3/version.py:__version__"]
|
|
124
|
+
tag_format = "v$version"
|
|
125
|
+
changelog_file = "CHANGELOG.rst"
|
|
126
|
+
update_changelog_on_bump = true
|
recount3-1.0.0/setup.cfg
ADDED