uprobe 0.1.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.
Files changed (67) hide show
  1. uprobe-0.1.0/LICENSE +21 -0
  2. uprobe-0.1.0/MANIFEST.in +3 -0
  3. uprobe-0.1.0/PKG-INFO +73 -0
  4. uprobe-0.1.0/README.md +298 -0
  5. uprobe-0.1.0/requirements-dev.txt +11 -0
  6. uprobe-0.1.0/requirements.txt +25 -0
  7. uprobe-0.1.0/setup.cfg +4 -0
  8. uprobe-0.1.0/setup.py +88 -0
  9. uprobe-0.1.0/tests/test_custom.py +53 -0
  10. uprobe-0.1.0/tests/test_probe.py +126 -0
  11. uprobe-0.1.0/tests/test_workflow.py +33 -0
  12. uprobe-0.1.0/uprobe/__init__.py +18 -0
  13. uprobe-0.1.0/uprobe/__main__.py +17 -0
  14. uprobe-0.1.0/uprobe/core/.readthedocs.yaml +53 -0
  15. uprobe-0.1.0/uprobe/core/__init__.py +26 -0
  16. uprobe-0.1.0/uprobe/core/agent/__init__.py +1 -0
  17. uprobe-0.1.0/uprobe/core/agent/repl_bootstrap.py +193 -0
  18. uprobe-0.1.0/uprobe/core/agent/session_manager.py +207 -0
  19. uprobe-0.1.0/uprobe/core/agent/templates/DEFAULT_PROTOCOL.yaml +55 -0
  20. uprobe-0.1.0/uprobe/core/api.py +364 -0
  21. uprobe-0.1.0/uprobe/core/attributes/__init__.py +132 -0
  22. uprobe-0.1.0/uprobe/core/attributes/_attributes.py +239 -0
  23. uprobe-0.1.0/uprobe/core/cli.py +802 -0
  24. uprobe-0.1.0/uprobe/core/gen/__init__.py +0 -0
  25. uprobe-0.1.0/uprobe/core/gen/barcodes.py +108 -0
  26. uprobe-0.1.0/uprobe/core/gen/fun.py +310 -0
  27. uprobe-0.1.0/uprobe/core/gen/probe.py +216 -0
  28. uprobe-0.1.0/uprobe/core/gen/utils.py +25 -0
  29. uprobe-0.1.0/uprobe/core/process/__init__.py +224 -0
  30. uprobe-0.1.0/uprobe/core/process/equal_space.py +48 -0
  31. uprobe-0.1.0/uprobe/core/process/otp.py +155 -0
  32. uprobe-0.1.0/uprobe/core/process/summary.py +150 -0
  33. uprobe-0.1.0/uprobe/core/report/__init__.py +9 -0
  34. uprobe-0.1.0/uprobe/core/report/html.py +854 -0
  35. uprobe-0.1.0/uprobe/core/report/plot.py +499 -0
  36. uprobe-0.1.0/uprobe/core/tools/__init__.py +94 -0
  37. uprobe-0.1.0/uprobe/core/tools/aligner.py +85 -0
  38. uprobe-0.1.0/uprobe/core/tools/kmerFilter.py +324 -0
  39. uprobe-0.1.0/uprobe/core/utils.py +165 -0
  40. uprobe-0.1.0/uprobe/http/__init__.py +1 -0
  41. uprobe-0.1.0/uprobe/http/__main__.py +4 -0
  42. uprobe-0.1.0/uprobe/http/routers/__init__.py +0 -0
  43. uprobe-0.1.0/uprobe/http/routers/agent.py +538 -0
  44. uprobe-0.1.0/uprobe/http/routers/auth.py +719 -0
  45. uprobe-0.1.0/uprobe/http/routers/custom_probes.py +98 -0
  46. uprobe-0.1.0/uprobe/http/routers/genome.py +322 -0
  47. uprobe-0.1.0/uprobe/http/routers/task.py +548 -0
  48. uprobe-0.1.0/uprobe/http/routers/user.py +56 -0
  49. uprobe-0.1.0/uprobe/http/routers/workflow.py +284 -0
  50. uprobe-0.1.0/uprobe/http/server.py +102 -0
  51. uprobe-0.1.0/uprobe/http/utils/__init__.py +0 -0
  52. uprobe-0.1.0/uprobe/http/utils/agent_store.py +386 -0
  53. uprobe-0.1.0/uprobe/http/utils/file.py +112 -0
  54. uprobe-0.1.0/uprobe/http/utils/logger.py +89 -0
  55. uprobe-0.1.0/uprobe/http/utils/paths.py +115 -0
  56. uprobe-0.1.0/uprobe/http/utils/probe.py +75 -0
  57. uprobe-0.1.0/uprobe/http/utils/process_pool.py +25 -0
  58. uprobe-0.1.0/uprobe/http/utils/task_queue.py +54 -0
  59. uprobe-0.1.0/uprobe/http/utils/uprobe_runner.py +65 -0
  60. uprobe-0.1.0/uprobe/http/utils/utils.py +12 -0
  61. uprobe-0.1.0/uprobe.egg-info/PKG-INFO +73 -0
  62. uprobe-0.1.0/uprobe.egg-info/SOURCES.txt +65 -0
  63. uprobe-0.1.0/uprobe.egg-info/dependency_links.txt +1 -0
  64. uprobe-0.1.0/uprobe.egg-info/entry_points.txt +3 -0
  65. uprobe-0.1.0/uprobe.egg-info/not-zip-safe +1 -0
  66. uprobe-0.1.0/uprobe.egg-info/requires.txt +37 -0
  67. uprobe-0.1.0/uprobe.egg-info/top_level.txt +1 -0
uprobe-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 U-FISH Team
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,3 @@
1
+ include requirements.txt
2
+ include requirements-dev.txt
3
+ recursive-include uprobe *.ini *.yaml *.json *.html *.css *.js
uprobe-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,73 @@
1
+ Metadata-Version: 2.4
2
+ Name: uprobe
3
+ Version: 0.1.0
4
+ Summary: Web server for U-Probe
5
+ Home-page: https://github.com/UFISH-Team/U-Probe
6
+ Author: Qian Zhang, Weize Xu
7
+ Author-email: jshn2022@163.com,
8
+ License: MIT
9
+ Keywords: FISH,Probe design
10
+ Classifier: Development Status :: 3 - Alpha
11
+ Classifier: Operating System :: OS Independent
12
+ Classifier: Programming Language :: Python
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.7
15
+ Classifier: Programming Language :: Python :: 3.8
16
+ Classifier: Programming Language :: Python :: 3.9
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: License :: OSI Approved :: MIT License
21
+ Classifier: Intended Audience :: Science/Research
22
+ Requires-Python: >=3.8, <4
23
+ License-File: LICENSE
24
+ Requires-Dist: numpy
25
+ Requires-Dist: pandas
26
+ Requires-Dist: viennarna
27
+ Requires-Dist: primer3-py
28
+ Requires-Dist: pathos
29
+ Requires-Dist: pyfaidx==0.5.9.5
30
+ Requires-Dist: fire
31
+ Requires-Dist: seqwalk
32
+ Requires-Dist: pyyaml
33
+ Requires-Dist: click
34
+ Requires-Dist: intervaltree
35
+ Requires-Dist: matplotlib
36
+ Requires-Dist: plotly
37
+ Requires-Dist: granian
38
+ Requires-Dist: uvloop
39
+ Requires-Dist: fire
40
+ Requires-Dist: pyyaml
41
+ Requires-Dist: python-jose
42
+ Requires-Dist: passlib==1.7.4
43
+ Requires-Dist: python-multipart
44
+ Requires-Dist: bcrypt==3.2.2
45
+ Requires-Dist: fastapi>=0.135.0
46
+ Requires-Dist: uvicorn
47
+ Requires-Dist: python-dotenv
48
+ Provides-Extra: dev
49
+ Requires-Dist: pip; extra == "dev"
50
+ Requires-Dist: setuptools; extra == "dev"
51
+ Requires-Dist: wheel; extra == "dev"
52
+ Requires-Dist: twine; extra == "dev"
53
+ Requires-Dist: ipdb; extra == "dev"
54
+ Requires-Dist: pytest; extra == "dev"
55
+ Requires-Dist: pytest-cov; extra == "dev"
56
+ Requires-Dist: pytest-asyncio; extra == "dev"
57
+ Requires-Dist: flake8; extra == "dev"
58
+ Requires-Dist: pyqt5<5.13; extra == "dev"
59
+ Requires-Dist: pyqtwebengine<5.13; extra == "dev"
60
+ Dynamic: author
61
+ Dynamic: author-email
62
+ Dynamic: classifier
63
+ Dynamic: description
64
+ Dynamic: home-page
65
+ Dynamic: keywords
66
+ Dynamic: license
67
+ Dynamic: license-file
68
+ Dynamic: provides-extra
69
+ Dynamic: requires-dist
70
+ Dynamic: requires-python
71
+ Dynamic: summary
72
+
73
+ See https://github.com/UFISH-Team/U-Probe
uprobe-0.1.0/README.md ADDED
@@ -0,0 +1,298 @@
1
+ <h1 align="center">
2
+ <img src="./assets/uprobe.svg" alt="uprobe logo" height="80" align="absmiddle"> Universal Agentic Probe Design Platform
3
+ </h1>
4
+ <br>
5
+
6
+ [![License](https://img.shields.io/github/license/UFISH-Team/U-Probe)](https://github.com/UFISH-Team/U-Probe/blob/main/LICENSE)
7
+ [![Python Version](https://img.shields.io/badge/python-3.7+-blue)](https://www.python.org/downloads/)
8
+ [![Documentation](https://img.shields.io/badge/docs-latest-blue.svg)](https://ufish-team.github.io/uprobe-official/)
9
+ [![Website](https://img.shields.io/badge/Website-Official-green.svg)](https://ufish-team.github.io/uprobe-official/)
10
+
11
+ **U-Probe** is a universal and agentic probe design platform tailored for imaging-based spatial-omics. It overcomes the architectural limitations of existing tools and lowers the expertise barrier by combining an innovative declarative configuration system with LLM-based AI agents.
12
+
13
+ Whether you are designing standard probes for established protocols or developing entirely novel architectures, U-Probe provides a comprehensive, automated workflow from target sequence extraction to rigorous thermodynamic filtering.
14
+
15
+ ## Features
16
+
17
+ - **Universal Probe Architecture**: Features a declarative configuration system and a directed acyclic graph (DAG)-based assembly engine. Easily design arbitrary and complex multi-part probe structures (e.g., DNA-FISH, smFISH, MERFISH, seqFISH, $\pi$-FISH, MiP-seq, RCA) without modifying any source code.
18
+ - **Agentic AI Workflow**: Integrates hierarchical LLM-based AI agents (via PantheonOS) for conversational design. Users can describe experimental goals in plain language or provide scRNA-seq data, and the agents will autonomously construct configurations, select parameters, and execute the design pipeline.
19
+ - **Comprehensive Quality Filtering**: Automatically computes and filters candidates based on GC content, melting temperature, secondary structure stability (via ViennaRNA), off-target mapping (via Bowtie2), and k-mer frequency (via Jellyfish).
20
+ - **End-to-End Automation**: Streamlines the entire process from target sequence extraction to advanced post-processing, including overlap removal and equal spacing for tiling designs.
21
+ - **Extensible API & Web UI**: Offers a clean Python API for programmatic integration, a command-line interface, and an interactive web server for visual workflow management and result analysis.
22
+
23
+ ## Installation
24
+
25
+ U-Probe can be easily installed via pip. We recommend using a virtual environment (like conda or venv).
26
+
27
+ ### Install via pip (Recommended)
28
+
29
+ ```bash
30
+ pip install uprobe
31
+ ```
32
+
33
+ ### Install from source (For development)
34
+
35
+ ```bash
36
+ git clone https://github.com/UFISH-Team/U-Probe.git
37
+ cd U-Probe
38
+ pip install -e .
39
+ ```
40
+
41
+ ### Using conda environment
42
+
43
+ ```bash
44
+ git clone https://github.com/UFISH-Team/U-Probe.git
45
+ cd U-Probe
46
+ conda env create -f environments.yaml
47
+ conda activate uprobe
48
+ pip install .
49
+ ```
50
+
51
+ ## Usage Guide
52
+
53
+ U-Probe provides flexible ways to use the tool: **Command Line Interface (CLI)**, **Python API**, and an **Interactive Web UI**.
54
+
55
+ Before starting, ensure you have prepared two YAML configuration files:
56
+ 1. **`genomes.yaml`**: Defines genome paths (FASTA, GTF, etc.).
57
+ 2. **`protocol.yaml`**: Defines probe design parameters.
58
+
59
+ ### 1. Command Line Interface (CLI)
60
+
61
+ The CLI is perfect for running tasks quickly in the terminal or shell scripts.
62
+
63
+ #### 🤖 AI Smart Assistant
64
+ U-Probe includes an interactive AI Agent powered by Pantheon. You can design probes through natural language conversation without writing YAML files manually.
65
+
66
+ ```bash
67
+ uprobe agent
68
+ ```
69
+
70
+ #### 🌐 Start Web Server
71
+ U-Probe now comes with a built-in web server and UI for an intuitive visual experience.
72
+
73
+ ```bash
74
+ # Start in development mode (default)
75
+ uprobe server --host 127.0.0.1 --port 8000
76
+
77
+ # Start in production mode with multiple workers
78
+ uprobe server --env production --host 0.0.0.0 --port 8000 --workers 4
79
+ ```
80
+
81
+ #### 🌟 Complete Workflow (Recommended)
82
+ To run the entire pipeline from genome index construction to final probe generation in one go:
83
+
84
+ ```bash
85
+ uprobe run -p protocol.yaml -g genomes.yaml -o ./results --threads 10
86
+ ```
87
+
88
+ #### 🔧 Step-by-Step Execution
89
+ For advanced users who need intermediate results or custom workflows, you can execute each step individually:
90
+
91
+ ```bash
92
+ # 1. Build genome index
93
+ uprobe build-index -p protocol.yaml -g genomes.yaml -t 10
94
+
95
+ # 2. Validate target genes against the GTF file
96
+ uprobe validate-targets -p protocol.yaml -g genomes.yaml
97
+
98
+ # 3. Extract target region sequences
99
+ uprobe generate-targets -p protocol.yaml -g genomes.yaml -o ./results
100
+
101
+ # 4. Construct initial probes from target sequences
102
+ uprobe construct-probes -p protocol.yaml -g genomes.yaml --targets ./results/target_sequences.csv -o ./results
103
+
104
+ # 5. Post-process probes (add attributes, filter, sort)
105
+ uprobe post-process -p protocol.yaml -g genomes.yaml --probes ./results/constructed_probes.csv -o ./results
106
+
107
+ # 6. Generate visual analysis report
108
+ uprobe generate-report -p protocol.yaml -g genomes.yaml --probes ./results/probes_*.csv -o ./results
109
+ ```
110
+
111
+ ### 2. Python API (Ideal for Backend Integration)
112
+
113
+ If you are developing a web backend or data analysis pipeline, we recommend directly using `UProbeAPI`. It returns Pandas DataFrames, making it easy to process further.
114
+
115
+ ```python
116
+ import uprobe
117
+ from pathlib import Path
118
+
119
+ # Initialize API
120
+ api = uprobe.UProbeAPI(
121
+ protocol_config=Path("protocol.yaml"),
122
+ genomes_config=Path("genomes.yaml"),
123
+ output_dir=Path("./results")
124
+ )
125
+
126
+ # --- Method 1: Complete Workflow ---
127
+ df_final = api.run_workflow(threads=10)
128
+
129
+ # --- Method 2: Step-by-Step Execution ---
130
+ api.build_genome_index(threads=10)
131
+ api.validate_targets()
132
+ df_targets = api.generate_target_seqs()
133
+ df_probes = api.construct_probes(df_targets)
134
+
135
+ import pandas as pd
136
+ df_combined = pd.concat([df_targets, df_probes], axis=1)
137
+ df_final = api.post_process_probes(df_combined)
138
+
139
+ # Generate HTML/PDF report
140
+ api.generate_report(df_final)
141
+ ```
142
+
143
+ ## Configuration Details
144
+
145
+ U-Probe relies on two main configuration files to run. Here is a breakdown of how to structure them.
146
+
147
+ ### 1. `genomes.yaml`
148
+ This file maps a genome name to its corresponding file paths. It tells U-Probe where to find the reference genome and annotation files, and which aligner indices to build.
149
+
150
+ ```yaml
151
+ # Example genomes.yaml
152
+ GRCh38:
153
+ fasta: "/path/to/GRCh38.fasta"
154
+ gtf: "/path/to/GRCh38.gtf"
155
+ align_index:
156
+ - bowtie2
157
+ - blast
158
+ jellyfish: false
159
+ ```
160
+
161
+ ### 2. `protocol.yaml`
162
+ This is the core configuration file that defines all parameters for a specific probe design run. It is highly customizable.
163
+
164
+ ```yaml
165
+ # Example protocol.yaml snippet
166
+ name: my_rna_probe_design
167
+ genome: GRCh38
168
+ targets:
169
+ - CD4
170
+
171
+ extracts:
172
+ target_region:
173
+ source: exon # genome / exon / CDS / UTR
174
+ length: 30
175
+ overlap: 15
176
+
177
+ # Define how genes map to specific barcodes
178
+ encoding:
179
+ CD4:
180
+ BC1: ACGAGCCTTCCA
181
+ BC2: CGGTAATGGACT
182
+
183
+ # Define the structure of your probes
184
+ probes:
185
+ probe_1:
186
+ template: "{part1}{part2}"
187
+ parts:
188
+ part1:
189
+ expr: "rc(target_region[0:20])"
190
+ part2:
191
+ template: "CC{barcode1}TGCGTCTATTT{barcode2}TAGTGGAGCCT"
192
+ parts:
193
+ barcode1:
194
+ expr: "encoding[target]['BC1']"
195
+ barcode2:
196
+ expr: "encoding[target]['BC2']"
197
+ probe_2:
198
+ template: "{part1}AGGCTCCACTA"
199
+ parts:
200
+ part1:
201
+ expr: "rc(target_region[-10:])"
202
+
203
+ attributes:
204
+ # target region attributes
205
+ target_gcContent:
206
+ target: target_region
207
+ type: gc_content
208
+ target_tm:
209
+ target: target_region
210
+ type: annealing_temperature
211
+
212
+ # Define filtering and sorting criteria
213
+ post_process:
214
+ filters:
215
+ target_tm:
216
+ condition: target_tm >= 37 & target_tm <= 47
217
+ sorts:
218
+ is_ascending:
219
+ - target_gc
220
+ is_descending:
221
+ - target_foldScore
222
+
223
+ remove_overlap:
224
+ location_interval: 0
225
+
226
+ # Define what attributes to include in the final report
227
+ summary:
228
+ report_name: rna_report # rna_report / dna_report
229
+ attributes:
230
+ - target_foldScore
231
+ - target_gc
232
+ ```
233
+
234
+ #### Key Sections in `protocol.yaml`:
235
+ - **`name` & `genome`**: Basic metadata. The `genome` must match a key in your `genomes.yaml`.
236
+ - **`targets`**: A list of target gene names or IDs you want to design probes for.
237
+ - **`extracts`**: Parameters for extracting target sequences. The `source` can be `genome`, `exon`, `CDS`, or `UTR`. You can also define the sliding window `length` and `overlap`.
238
+ - **`encoding`**: Mapping of specific genes to custom barcodes or identifiers (e.g., assigning `BC1` and `BC2` to `CD4`).
239
+ - **`probes`**: The core of the design, powered by a **Directed Acyclic Graph (DAG)** architecture. This allows for complex, modular probe construction where parts and probes can reference each other.
240
+ - **`template`**: Construct sequences using placeholders (e.g., `{part1}{part2}`).
241
+ - **`expr`**: Apply Python-like expressions. You can use built-in functions like `rc()` (reverse complement), slice sequences (`[0:20]`), or fetch from the `encoding` map (`encoding[target]['BC1']`).
242
+ - **DAG References**: Because of the DAG structure, subsequent probes or parts can dynamically reference the sequences of previously defined probes/parts in their expressions.
243
+ - **`attributes`**: Define the biochemical or physical properties you want to calculate for specific targets or probe parts. Available attribute types include:
244
+ - `gc_content`: Calculates the GC ratio of the sequence.
245
+ - `annealing_temperature`: Calculates the melting temperature (Tm) using Primer3.
246
+ - `fold_score`: Calculates the RNA folding minimum free energy (MFE) using ViennaRNA (lower is more stable).
247
+ - `self_match`: Calculates the potential for self-dimerization.
248
+ - `mapped_sites`: Aligns the sequence to the genome (via Bowtie2) and counts off-target mapped sites.
249
+ - `mapped_genes`: Counts the number of unique genes the sequence aligns to (via Bowtie2).
250
+ - `kmer_count`: Counts k-mer occurrences in the genome (via Jellyfish) to evaluate specificity.
251
+ - **`post_process`**: Define strict `filters` (e.g., Tm ranges) based on the calculated attributes, and `sorts` to rank the best probes (ascending or descending).
252
+ - **`remove_overlap`**: Control the spacing between probes on the target sequence. `location_interval: 0` ensures probes do not overlap.
253
+ - **`summary`**: Define the `report_name` (e.g., `rna_report` or `dna_report`) and the specific `attributes` you want to visualize and output in the final report.
254
+
255
+ For more detailed examples and advanced configurations, please refer to the [`tests/data/*.yaml`](https://github.com/UFISH-Team/U-Probe/tree/main/tests/data "Click to visit here") directory.
256
+
257
+ ## Community & Support
258
+
259
+ - 📖 **Documentation**: [uprobe.readthedocs.io](https://uprobe.readthedocs.io/)
260
+ - 💬 **GitHub Discussions**: [Ask questions and share ideas](https://github.com/UFISH-Team/U-Probe/discussions)
261
+ - 🐛 **Bug Reports**: [GitHub Issues](https://github.com/UFISH-Team/U-Probe/issues)
262
+ - 🚀 **Contributing**: See our [contributing guide](https://uprobe.readthedocs.io/en/latest/contributing.html)
263
+
264
+ ## Citation
265
+
266
+ If you use U-Probe in your research, please cite our paper (or software):
267
+
268
+ ```bibtex
269
+ @software{uprobe2026,
270
+ title={U-Probe: Universal Probe Design Tool},
271
+ author={Zhang, Qian and Xu, Weize and Cai, Huaiyuan},
272
+ year={2025},
273
+ url={https://github.com/UFISH-Team/U-Probe},
274
+ version={1.0.0}
275
+ }
276
+ ```
277
+ *(Note: Update the citation format with actual journal details once published.)*
278
+
279
+ ## License
280
+
281
+ U-Probe is released under the [MIT License](LICENSE). See the `LICENSE` file for details.
282
+
283
+ ## Acknowledgments
284
+
285
+ We thank the bioinformatics community for valuable feedback during development, and the authors of the following tools that U-Probe integrates:
286
+
287
+ - [PantheonOS](https://github.com/aristoteleo/PantheonOS) - The multi-agent framework powering our AI agent design
288
+ - [Bowtie2](http://bowtie-bio.sourceforge.net/bowtie2/) - Fast and memory-efficient sequence alignment
289
+ - [BLAST+](https://blast.ncbi.nlm.nih.gov/) - Sequence similarity search
290
+ - [MMseqs2](https://github.com/soedinglab/MMseqs2) - Ultra-fast and sensitive sequence search and clustering
291
+ - [Jellyfish](https://github.com/gmarcais/Jellyfish) - Fast k-mer counting
292
+ - [ViennaRNA](https://www.tbi.univie.ac.at/RNA/) - RNA secondary structure prediction
293
+ - [Primer3](https://primer3.org/) - Primer and probe design algorithms
294
+ - [FastAPI](https://fastapi.tiangolo.com/) & [Vue.js](https://vuejs.org/) - Powering our interactive Web UI
295
+
296
+
297
+
298
+
@@ -0,0 +1,11 @@
1
+ pip
2
+ setuptools
3
+ wheel
4
+ twine
5
+ ipdb
6
+ pytest
7
+ pytest-cov
8
+ pytest-asyncio
9
+ flake8
10
+ pyqt5 < 5.13
11
+ pyqtwebengine < 5.13
@@ -0,0 +1,25 @@
1
+ numpy
2
+ pandas
3
+ viennarna
4
+ primer3-py
5
+ pathos
6
+ pyfaidx==0.5.9.5
7
+ fire
8
+ seqwalk
9
+ pyyaml
10
+ click
11
+ intervaltree
12
+ matplotlib
13
+ plotly
14
+ granian
15
+ uvloop
16
+
17
+ fire
18
+ pyyaml
19
+ python-jose
20
+ passlib==1.7.4
21
+ python-multipart
22
+ bcrypt==3.2.2
23
+ fastapi>=0.135.0
24
+ uvicorn
25
+ python-dotenv
uprobe-0.1.0/setup.cfg ADDED
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
uprobe-0.1.0/setup.py ADDED
@@ -0,0 +1,88 @@
1
+ from setuptools import setup, find_packages
2
+ import re
3
+
4
+
5
+ classifiers = [
6
+ "Development Status :: 3 - Alpha",
7
+ "Operating System :: OS Independent",
8
+ "Programming Language :: Python",
9
+ "Programming Language :: Python :: 3",
10
+ "Programming Language :: Python :: 3.7",
11
+ "Programming Language :: Python :: 3.8",
12
+ "Programming Language :: Python :: 3.9",
13
+ "Programming Language :: Python :: 3.10",
14
+ "Programming Language :: Python :: 3.11",
15
+ "Programming Language :: Python :: 3.12",
16
+ "License :: OSI Approved :: MIT License",
17
+ "Intended Audience :: Science/Research",
18
+ ]
19
+
20
+
21
+ keywords = [
22
+ 'FISH', 'Probe design',
23
+ ]
24
+
25
+
26
+ URL = "https://github.com/UFISH-Team/U-Probe"
27
+
28
+
29
+ def get_version():
30
+ with open("uprobe/__init__.py") as f:
31
+ for line in f.readlines():
32
+ m = re.match(r"__version__\s*=\s*['\"]([^'\"]+)['\"]", line)
33
+ if m:
34
+ return m.group(1)
35
+ raise IOError("Version information can not found.")
36
+
37
+
38
+ def get_long_description():
39
+ return f"See {URL}"
40
+
41
+
42
+ def get_requirements_from_file(filename):
43
+ requirements = []
44
+ with open(filename) as f:
45
+ for line in f.readlines():
46
+ line = line.strip()
47
+ if len(line) == 0:
48
+ continue
49
+ if line and not line.startswith('#'):
50
+ requirements.append(line)
51
+ return requirements
52
+
53
+
54
+ def get_install_requires():
55
+ reqs = get_requirements_from_file('requirements.txt')
56
+ return reqs
57
+
58
+
59
+ packages_for_dev = get_requirements_from_file("requirements-dev.txt")
60
+ requires_dev = packages_for_dev
61
+
62
+
63
+ setup(
64
+ name='uprobe',
65
+ author='Qian Zhang, Weize Xu',
66
+ author_email='jshn2022@163.com, ',
67
+ version=get_version(),
68
+ license='MIT',
69
+ description='Web server for U-Probe',
70
+ long_description=get_long_description(),
71
+ keywords=keywords,
72
+ url=URL,
73
+ packages=find_packages(),
74
+ include_package_data=True,
75
+ zip_safe=False,
76
+ classifiers=classifiers,
77
+ install_requires=get_install_requires(),
78
+ extras_require={
79
+ 'dev': requires_dev,
80
+ },
81
+ python_requires='>=3.8, <4',
82
+ entry_points={
83
+ 'console_scripts': [
84
+ 'uprobe = uprobe.core.cli:main',
85
+ 'u-probe = uprobe.core.cli:main',
86
+ ],
87
+ },
88
+ )
@@ -0,0 +1,53 @@
1
+ import pytest
2
+ from pathlib import Path
3
+
4
+ from uprobe.gen.probe import construct_probes
5
+ from uprobe.workflow import parse_yaml, check_protocol_yaml
6
+ from uprobe.gen.probe import DAG
7
+
8
+ HERE = Path(__file__).parent
9
+
10
+ target_region="ATGAAGGCCTGCCGGTTATGAAGGCCTGCCGGTTATGAAG"
11
+ gene_id="gene1"
12
+ encoding_dict = {
13
+ "gene1": {
14
+ "BC2": "AAAATTTTTTTTAAGCA",
15
+ "BC3": "ATTTATTGCGATTTGGC"
16
+ },
17
+ "g42115": {
18
+ "BC2": "AAAATTTTTTTTAAGCA",
19
+ "BC3": "GGTTTTTTTTTTTTTTT"
20
+ }
21
+ }
22
+ context = {
23
+ "target_region": target_region,
24
+ "gene_id": gene_id,
25
+ "encoding": encoding_dict,
26
+ }
27
+
28
+ '''
29
+ def test_probe_dependencies():
30
+ config = parse_yaml(HERE / "data" / "probes.yaml")
31
+ #check_protocol_yaml(config)
32
+ workdir = HERE / "data" / "probe_custom_test"
33
+ workdir.mkdir(parents=True, exist_ok=True)
34
+
35
+ dag = DAG()
36
+ dag.from_config(config, workdir)
37
+ print("dag.nodes:",[node.name for node in dag.nodes])
38
+ probe_1 = dag.get_node_by_name("probe_1")
39
+ assert len(probe_1.deps) == 2
40
+ print("probe_1.deps names:",[dep.name for dep in probe_1.deps])
41
+ probe_1_part1 = dag.get_node_by_name("probe_1.part1")
42
+ print("probe_1.part1.deps names:", [dep.name for dep in probe_1_part1.deps] if probe_1_part1 else "Node not found")
43
+ print("probe_1.part1.external_deps:", probe_1_part1.external_deps if probe_1_part1 else "Node not found")
44
+ dag.run(context=context)
45
+ '''
46
+
47
+ def test_construct_probes():
48
+ config = parse_yaml(HERE / "data" / "probes.yaml")
49
+ workdir = HERE / "data" / "probe_custom"
50
+ workdir.mkdir(parents=True, exist_ok=True)
51
+ construct_probes(workdir, config, context)
52
+
53
+