sniffcell-lite 0.9.6__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.
- sniffcell_lite-0.9.6/LICENSE +21 -0
- sniffcell_lite-0.9.6/PKG-INFO +115 -0
- sniffcell_lite-0.9.6/README.md +93 -0
- sniffcell_lite-0.9.6/pyproject.toml +6 -0
- sniffcell_lite-0.9.6/setup.cfg +45 -0
- sniffcell_lite-0.9.6/src/sniffcell/__init__.py +1 -0
- sniffcell_lite-0.9.6/src/sniffcell/anno/__init__.py +0 -0
- sniffcell_lite-0.9.6/src/sniffcell/anno/anno.py +642 -0
- sniffcell_lite-0.9.6/src/sniffcell/anno/breakpoint_exclusion.py +37 -0
- sniffcell_lite-0.9.6/src/sniffcell/anno/methyl_matrix.py +152 -0
- sniffcell_lite-0.9.6/src/sniffcell/anno/variant_assignment.py +1067 -0
- sniffcell_lite-0.9.6/src/sniffcell/data/__init__.py +1 -0
- sniffcell_lite-0.9.6/src/sniffcell/data/tissue_atlas.json +427 -0
- sniffcell_lite-0.9.6/src/sniffcell/find/__init__.py +0 -0
- sniffcell_lite-0.9.6/src/sniffcell/find/ctdmr.py +415 -0
- sniffcell_lite-0.9.6/src/sniffcell/find/find.py +194 -0
- sniffcell_lite-0.9.6/src/sniffcell/main.py +24 -0
- sniffcell_lite-0.9.6/src/sniffcell/parse_args.py +51 -0
- sniffcell_lite-0.9.6/src/sniffcell/tissue_atlas.py +108 -0
- sniffcell_lite-0.9.6/src/sniffcell_lite.egg-info/PKG-INFO +115 -0
- sniffcell_lite-0.9.6/src/sniffcell_lite.egg-info/SOURCES.txt +25 -0
- sniffcell_lite-0.9.6/src/sniffcell_lite.egg-info/dependency_links.txt +1 -0
- sniffcell_lite-0.9.6/src/sniffcell_lite.egg-info/entry_points.txt +2 -0
- sniffcell_lite-0.9.6/src/sniffcell_lite.egg-info/requires.txt +5 -0
- sniffcell_lite-0.9.6/src/sniffcell_lite.egg-info/top_level.txt +1 -0
- sniffcell_lite-0.9.6/tests/test_hierarchy_find_and_anno.py +235 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Yilei Fu
|
|
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,115 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: sniffcell-lite
|
|
3
|
+
Version: 0.9.6
|
|
4
|
+
Summary: SniffCell Lite annotates variants using targeted long-read methylation evidence and ctDMR signals.
|
|
5
|
+
Home-page: https://github.com/Fu-Yilei/SniffCell
|
|
6
|
+
Author: Yilei Fu
|
|
7
|
+
Author-email: yilei.fu@bcm.edu
|
|
8
|
+
License: MIT
|
|
9
|
+
Project-URL: Bug Tracker, https://github.com/Fu-Yilei/SniffCell/issues
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
12
|
+
Classifier: Operating System :: OS Independent
|
|
13
|
+
Requires-Python: >=3.10
|
|
14
|
+
Description-Content-Type: text/markdown
|
|
15
|
+
License-File: LICENSE
|
|
16
|
+
Requires-Dist: pysam>=0.21.0
|
|
17
|
+
Requires-Dist: numpy>=2.2.0
|
|
18
|
+
Requires-Dist: pandas>=2.3.0
|
|
19
|
+
Requires-Dist: scipy
|
|
20
|
+
Requires-Dist: tqdm
|
|
21
|
+
Dynamic: license-file
|
|
22
|
+
|
|
23
|
+
# SniffCell Lite
|
|
24
|
+
|
|
25
|
+
SniffCell Lite keeps only two commands:
|
|
26
|
+
|
|
27
|
+
- `sniffcell-lite find`: call ctDMR catalogs from a methylation atlas.
|
|
28
|
+
- `sniffcell-lite anno`: annotate variants from supporting reads, a BAM, a reference FASTA, and a ctDMR catalog.
|
|
29
|
+
|
|
30
|
+
This branch intentionally keeps only the lite `find` and `anno` workflow.
|
|
31
|
+
|
|
32
|
+
## Install
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
pip install .
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Find
|
|
39
|
+
|
|
40
|
+
`find` keeps the original atlas-driven flavor. The bundled tissue atlas supports tissue code or tissue name lookup through `-ck`.
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
sniffcell-lite find \
|
|
44
|
+
-n atlas/all_celltypes_blocks.npy \
|
|
45
|
+
-i atlas/all_celltypes_blocks.index.gz \
|
|
46
|
+
-m atlas/all_celltypes.txt \
|
|
47
|
+
-ck "Colon, Ascending" \
|
|
48
|
+
-o colon_ascending.ctdmr.tsv
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Equivalent code form:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
sniffcell-lite find -ck 3E -o colon_ascending.ctdmr.tsv
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
The default cell-type JSON is the packaged `sniffcell/data/tissue_atlas.json`. You can still pass a custom atlas with `-cf`.
|
|
58
|
+
|
|
59
|
+
## Anno
|
|
60
|
+
|
|
61
|
+
Single-variant mode requires a BAM and reference FASTA. SniffCell Lite maps the variant-supporting reads in the BAM, selects ctDMRs from the catalog that overlap those supporting-read alignment spans, computes methylation from the BAM only for those reads at those ctDMRs, and assigns the variant from the targeted read-level methylation calls. ctDMR evidence is not capped to a fixed distance from the variant.
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
sniffcell-lite anno \
|
|
65
|
+
-i sample.bam \
|
|
66
|
+
-r ref.fa \
|
|
67
|
+
--variant-name variant_001 \
|
|
68
|
+
--variant-location chr1:100000-101000 \
|
|
69
|
+
--supporting-reads readA,readB,readC \
|
|
70
|
+
--catalog colon_ascending.ctdmr.tsv \
|
|
71
|
+
-o anno_out
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Batch mode uses a TSV or CSV with these columns:
|
|
75
|
+
|
|
76
|
+
```text
|
|
77
|
+
variant_name variant_location supporting_reads catalog bam reference
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Run:
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
sniffcell-lite anno --batch variants.tsv -o anno_out
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
`supporting_reads` accepts comma, pipe, semicolon, whitespace-delimited text, JSON list text, or `@path/to/read_names.txt`.
|
|
87
|
+
|
|
88
|
+
If every batch row uses the same reference, pass it once instead of adding a `reference` column:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
sniffcell-lite anno --batch variants.tsv -r ref.fa -o anno_out
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## Outputs
|
|
95
|
+
|
|
96
|
+
`sniffcell-lite find` writes:
|
|
97
|
+
|
|
98
|
+
- `*.tsv`: ctDMR catalog
|
|
99
|
+
- `*.tsv.igv.bed`: IGV BED companion
|
|
100
|
+
- `*.tsv.catalog.json`: catalog manifest when tissue metadata was used
|
|
101
|
+
|
|
102
|
+
`sniffcell-lite anno` writes:
|
|
103
|
+
|
|
104
|
+
- `variant_assignment.tsv`
|
|
105
|
+
- `variant_assignment_readable.tsv`
|
|
106
|
+
- `variant_assignment_readable_long.tsv`
|
|
107
|
+
- `reads_classification.tsv`
|
|
108
|
+
- `support_read_mappings.tsv`
|
|
109
|
+
- `anno_compact_manifest.json` or `anno_batch_manifest.json`
|
|
110
|
+
|
|
111
|
+
## Tests
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
pytest -q
|
|
115
|
+
```
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# SniffCell Lite
|
|
2
|
+
|
|
3
|
+
SniffCell Lite keeps only two commands:
|
|
4
|
+
|
|
5
|
+
- `sniffcell-lite find`: call ctDMR catalogs from a methylation atlas.
|
|
6
|
+
- `sniffcell-lite anno`: annotate variants from supporting reads, a BAM, a reference FASTA, and a ctDMR catalog.
|
|
7
|
+
|
|
8
|
+
This branch intentionally keeps only the lite `find` and `anno` workflow.
|
|
9
|
+
|
|
10
|
+
## Install
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
pip install .
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Find
|
|
17
|
+
|
|
18
|
+
`find` keeps the original atlas-driven flavor. The bundled tissue atlas supports tissue code or tissue name lookup through `-ck`.
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
sniffcell-lite find \
|
|
22
|
+
-n atlas/all_celltypes_blocks.npy \
|
|
23
|
+
-i atlas/all_celltypes_blocks.index.gz \
|
|
24
|
+
-m atlas/all_celltypes.txt \
|
|
25
|
+
-ck "Colon, Ascending" \
|
|
26
|
+
-o colon_ascending.ctdmr.tsv
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Equivalent code form:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
sniffcell-lite find -ck 3E -o colon_ascending.ctdmr.tsv
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
The default cell-type JSON is the packaged `sniffcell/data/tissue_atlas.json`. You can still pass a custom atlas with `-cf`.
|
|
36
|
+
|
|
37
|
+
## Anno
|
|
38
|
+
|
|
39
|
+
Single-variant mode requires a BAM and reference FASTA. SniffCell Lite maps the variant-supporting reads in the BAM, selects ctDMRs from the catalog that overlap those supporting-read alignment spans, computes methylation from the BAM only for those reads at those ctDMRs, and assigns the variant from the targeted read-level methylation calls. ctDMR evidence is not capped to a fixed distance from the variant.
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
sniffcell-lite anno \
|
|
43
|
+
-i sample.bam \
|
|
44
|
+
-r ref.fa \
|
|
45
|
+
--variant-name variant_001 \
|
|
46
|
+
--variant-location chr1:100000-101000 \
|
|
47
|
+
--supporting-reads readA,readB,readC \
|
|
48
|
+
--catalog colon_ascending.ctdmr.tsv \
|
|
49
|
+
-o anno_out
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Batch mode uses a TSV or CSV with these columns:
|
|
53
|
+
|
|
54
|
+
```text
|
|
55
|
+
variant_name variant_location supporting_reads catalog bam reference
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Run:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
sniffcell-lite anno --batch variants.tsv -o anno_out
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
`supporting_reads` accepts comma, pipe, semicolon, whitespace-delimited text, JSON list text, or `@path/to/read_names.txt`.
|
|
65
|
+
|
|
66
|
+
If every batch row uses the same reference, pass it once instead of adding a `reference` column:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
sniffcell-lite anno --batch variants.tsv -r ref.fa -o anno_out
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Outputs
|
|
73
|
+
|
|
74
|
+
`sniffcell-lite find` writes:
|
|
75
|
+
|
|
76
|
+
- `*.tsv`: ctDMR catalog
|
|
77
|
+
- `*.tsv.igv.bed`: IGV BED companion
|
|
78
|
+
- `*.tsv.catalog.json`: catalog manifest when tissue metadata was used
|
|
79
|
+
|
|
80
|
+
`sniffcell-lite anno` writes:
|
|
81
|
+
|
|
82
|
+
- `variant_assignment.tsv`
|
|
83
|
+
- `variant_assignment_readable.tsv`
|
|
84
|
+
- `variant_assignment_readable_long.tsv`
|
|
85
|
+
- `reads_classification.tsv`
|
|
86
|
+
- `support_read_mappings.tsv`
|
|
87
|
+
- `anno_compact_manifest.json` or `anno_batch_manifest.json`
|
|
88
|
+
|
|
89
|
+
## Tests
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
pytest -q
|
|
93
|
+
```
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
[metadata]
|
|
2
|
+
name = sniffcell-lite
|
|
3
|
+
version = 0.9.6
|
|
4
|
+
author = Yilei Fu
|
|
5
|
+
author_email = yilei.fu@bcm.edu
|
|
6
|
+
description = SniffCell Lite annotates variants using targeted long-read methylation evidence and ctDMR signals.
|
|
7
|
+
long_description = file: README.md
|
|
8
|
+
long_description_content_type = text/markdown
|
|
9
|
+
url = https://github.com/Fu-Yilei/SniffCell
|
|
10
|
+
license = MIT
|
|
11
|
+
project_urls =
|
|
12
|
+
Bug Tracker = https://github.com/Fu-Yilei/SniffCell/issues
|
|
13
|
+
classifiers =
|
|
14
|
+
Programming Language :: Python :: 3
|
|
15
|
+
License :: OSI Approved :: MIT License
|
|
16
|
+
Operating System :: OS Independent
|
|
17
|
+
|
|
18
|
+
[options]
|
|
19
|
+
package_dir =
|
|
20
|
+
= src
|
|
21
|
+
packages = find:
|
|
22
|
+
python_requires = >=3.10
|
|
23
|
+
install_requires =
|
|
24
|
+
pysam>=0.21.0
|
|
25
|
+
numpy>=2.2.0
|
|
26
|
+
pandas>=2.3.0
|
|
27
|
+
scipy
|
|
28
|
+
tqdm
|
|
29
|
+
include_package_data = True
|
|
30
|
+
|
|
31
|
+
[options.package_data]
|
|
32
|
+
sniffcell =
|
|
33
|
+
data/*.json
|
|
34
|
+
|
|
35
|
+
[options.packages.find]
|
|
36
|
+
where = src
|
|
37
|
+
|
|
38
|
+
[options.entry_points]
|
|
39
|
+
console_scripts =
|
|
40
|
+
sniffcell-lite = sniffcell.main:main
|
|
41
|
+
|
|
42
|
+
[egg_info]
|
|
43
|
+
tag_build =
|
|
44
|
+
tag_date = 0
|
|
45
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "v0.9.6"
|
|
File without changes
|