gapms 1.3.2__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.
- gapms-1.3.2/LICENSE +21 -0
- gapms-1.3.2/MANIFEST.in +10 -0
- gapms-1.3.2/PKG-INFO +92 -0
- gapms-1.3.2/README.md +72 -0
- gapms-1.3.2/THIRD_PARTY.md +21 -0
- gapms-1.3.2/docs/v1/ARCHITECTURE.md +64 -0
- gapms-1.3.2/docs/v1/CONSENSUS.md +162 -0
- gapms-1.3.2/docs/v1/GENESENSUS_0.6.0a3.md +254 -0
- gapms-1.3.2/docs/v1/IMPLEMENTATION_PLAN.md +21 -0
- gapms-1.3.2/docs/v1/OUTPUT_FORMATS.md +205 -0
- gapms-1.3.2/docs/v1/README.md +188 -0
- gapms-1.3.2/docs/v1/SCIENTIFIC_METHODS.md +228 -0
- gapms-1.3.2/docs/v1/VALIDATION.md +84 -0
- gapms-1.3.2/gapms.egg-info/PKG-INFO +92 -0
- gapms-1.3.2/gapms.egg-info/SOURCES.txt +82 -0
- gapms-1.3.2/gapms.egg-info/dependency_links.txt +1 -0
- gapms-1.3.2/gapms.egg-info/entry_points.txt +3 -0
- gapms-1.3.2/gapms.egg-info/requires.txt +11 -0
- gapms-1.3.2/gapms.egg-info/top_level.txt +1 -0
- gapms-1.3.2/gapms_v1/__init__.py +2 -0
- gapms-1.3.2/gapms_v1/__main__.py +2 -0
- gapms-1.3.2/gapms_v1/_genesensus/LICENSE +27 -0
- gapms-1.3.2/gapms_v1/_genesensus/VENDORED.json +53 -0
- gapms-1.3.2/gapms_v1/_genesensus/__init__.py +10 -0
- gapms-1.3.2/gapms_v1/_genesensus/__main__.py +4 -0
- gapms-1.3.2/gapms_v1/_genesensus/adaptive.py +157 -0
- gapms-1.3.2/gapms_v1/_genesensus/annotation.py +126 -0
- gapms-1.3.2/gapms_v1/_genesensus/available.py +64 -0
- gapms-1.3.2/gapms_v1/_genesensus/cli.py +149 -0
- gapms-1.3.2/gapms_v1/_genesensus/config.py +274 -0
- gapms-1.3.2/gapms_v1/_genesensus/corroborated.py +60 -0
- gapms-1.3.2/gapms_v1/_genesensus/diagnostics.py +19 -0
- gapms-1.3.2/gapms_v1/_genesensus/direct_molecular.py +29 -0
- gapms-1.3.2/gapms_v1/_genesensus/exchange.py +115 -0
- gapms-1.3.2/gapms_v1/_genesensus/exon_support.py +36 -0
- gapms-1.3.2/gapms_v1/_genesensus/genome.py +122 -0
- gapms-1.3.2/gapms_v1/_genesensus/graph.py +279 -0
- gapms-1.3.2/gapms_v1/_genesensus/graph_cache.py +175 -0
- gapms-1.3.2/gapms_v1/_genesensus/intervals.py +104 -0
- gapms-1.3.2/gapms_v1/_genesensus/isoform_guards.py +54 -0
- gapms-1.3.2/gapms_v1/_genesensus/isoforms.py +117 -0
- gapms-1.3.2/gapms_v1/_genesensus/joint.py +60 -0
- gapms-1.3.2/gapms_v1/_genesensus/loading.py +166 -0
- gapms-1.3.2/gapms_v1/_genesensus/local_molecular.py +112 -0
- gapms-1.3.2/gapms_v1/_genesensus/locus_select.py +137 -0
- gapms-1.3.2/gapms_v1/_genesensus/models.py +93 -0
- gapms-1.3.2/gapms_v1/_genesensus/molecular.py +222 -0
- gapms-1.3.2/gapms_v1/_genesensus/molecular_exchange.py +60 -0
- gapms-1.3.2/gapms_v1/_genesensus/molecular_state_utility.py +104 -0
- gapms-1.3.2/gapms_v1/_genesensus/molecular_strategy.py +83 -0
- gapms-1.3.2/gapms_v1/_genesensus/normalization.py +71 -0
- gapms-1.3.2/gapms_v1/_genesensus/orf_diagnostics.py +55 -0
- gapms-1.3.2/gapms_v1/_genesensus/peptide_context.py +167 -0
- gapms-1.3.2/gapms_v1/_genesensus/peptides.py +150 -0
- gapms-1.3.2/gapms_v1/_genesensus/pipeline.py +596 -0
- gapms-1.3.2/gapms_v1/_genesensus/provenance.py +54 -0
- gapms-1.3.2/gapms_v1/_genesensus/rna.py +175 -0
- gapms-1.3.2/gapms_v1/_genesensus/rna_geometry.py +114 -0
- gapms-1.3.2/gapms_v1/_genesensus/scoped.py +17 -0
- gapms-1.3.2/gapms_v1/_genesensus/scoring.py +46 -0
- gapms-1.3.2/gapms_v1/_genesensus/selection.py +336 -0
- gapms-1.3.2/gapms_v1/_genesensus/source_splice.py +19 -0
- gapms-1.3.2/gapms_v1/_genesensus/splice_prior.py +100 -0
- gapms-1.3.2/gapms_v1/_genesensus/state_utility.py +96 -0
- gapms-1.3.2/gapms_v1/_genesensus/support.py +189 -0
- gapms-1.3.2/gapms_v1/assessment.py +274 -0
- gapms-1.3.2/gapms_v1/classification.py +117 -0
- gapms-1.3.2/gapms_v1/cli.py +74 -0
- gapms-1.3.2/gapms_v1/common.py +67 -0
- gapms-1.3.2/gapms_v1/confidence_features.py +129 -0
- gapms-1.3.2/gapms_v1/consensus_engine.py +201 -0
- gapms-1.3.2/gapms_v1/mapping.py +144 -0
- gapms-1.3.2/gapms_v1/models.py +169 -0
- gapms-1.3.2/gapms_v1/orf_projection.py +249 -0
- gapms-1.3.2/gapms_v1/outputs.py +287 -0
- gapms-1.3.2/gapms_v1/peptides.py +54 -0
- gapms-1.3.2/gapms_v1/protein_mapper.py +125 -0
- gapms-1.3.2/gapms_v1/refinement.py +245 -0
- gapms-1.3.2/gapms_v1/report_figure.py +62 -0
- gapms-1.3.2/gapms_v1/rnaseq.py +91 -0
- gapms-1.3.2/gapms_v1/workflow.py +256 -0
- gapms-1.3.2/pyproject.toml +36 -0
- gapms-1.3.2/setup.cfg +4 -0
- gapms-1.3.2/setup.py +3 -0
gapms-1.3.2/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Qussai Abbas
|
|
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.
|
gapms-1.3.2/MANIFEST.in
ADDED
gapms-1.3.2/PKG-INFO
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: gapms
|
|
3
|
+
Version: 1.3.2
|
|
4
|
+
Summary: Gene model assessment and peptide-guided annotation refinement
|
|
5
|
+
Author-email: Qussai Abbas <qussai.abbas@tum.de>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/qussai96/GAP-MS
|
|
8
|
+
Requires-Python: >=3.10
|
|
9
|
+
Description-Content-Type: text/markdown
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
License-File: THIRD_PARTY.md
|
|
12
|
+
Requires-Dist: peplocus==0.5.6
|
|
13
|
+
Requires-Dist: pandas>=1.5
|
|
14
|
+
Requires-Dist: scipy>=1.10
|
|
15
|
+
Requires-Dist: scikit-learn>=1.2
|
|
16
|
+
Requires-Dist: matplotlib>=3.6
|
|
17
|
+
Requires-Dist: xgboost-cpu<4,>=2.1.4; platform_system == "Linux"
|
|
18
|
+
Requires-Dist: xgboost<4,>=2.1.4; platform_system != "Linux"
|
|
19
|
+
Dynamic: license-file
|
|
20
|
+
|
|
21
|
+
# GAP-MS
|
|
22
|
+
|
|
23
|
+
GAP-MS uses mass-spectrometry peptides to assess gene predictions, combine
|
|
24
|
+
annotations and identify peptide-supported changes for review.
|
|
25
|
+
|
|
26
|
+
## Install
|
|
27
|
+
|
|
28
|
+
Python 3.10 or newer:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
pip install gapms==1.3.2
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
For runs with a BAM file, also install the RNA reconstruction tools:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
conda install -c conda-forge -c bioconda stringtie transdecoder=5.5.0
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Alternatively, build an Apptainer image from this checkout. It includes these tools:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
apptainer build --fakeroot gapms-1.3.2.sif gapms.def
|
|
44
|
+
apptainer run gapms-1.3.2.sif -a assembly.fa -p peptides.tsv -g genes.gtf
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Version 1.3.2 must be uploaded to PyPI before the pip command above is available.
|
|
48
|
+
See [container instructions](packaging/CONTAINERS.md) for Docker Hub.
|
|
49
|
+
|
|
50
|
+
## Run
|
|
51
|
+
|
|
52
|
+
- **Assembly + peptides:** map peptides to the six-frame genome translation.
|
|
53
|
+
`gapms -a assembly.fa -p peptides.tsv`
|
|
54
|
+
- **Add BAM:** include RNA-supported splice paths and reconstruct peptide-supported ORF candidates.
|
|
55
|
+
`gapms -a assembly.fa -p peptides.tsv -b sorted.bam`
|
|
56
|
+
- **Add annotation:** map across annotated exons, score gene models and propose supported changes.
|
|
57
|
+
`gapms -a assembly.fa -p peptides.tsv -g genes.gtf`
|
|
58
|
+
- **Annotation + BAM:** combine gene-model assessment with RNA-supported reconstruction.
|
|
59
|
+
`gapms -a assembly.fa -p peptides.tsv -g genes.gtf -b sorted.bam`
|
|
60
|
+
- **Multiple annotations:** automatically build a peptide-guided consensus. BAM is optional here too.
|
|
61
|
+
`gapms -a assembly.fa -p peptides.tsv -g helixer.gtf -g another.gff3`
|
|
62
|
+
|
|
63
|
+
GTF and GFF3 are accepted. BAM files must be coordinate-sorted and use the
|
|
64
|
+
assembly's sequence names. FragPipe, Casanovo and plain peptide lists are supported.
|
|
65
|
+
Use `-o results` to choose an output directory (default: `./GAPMS_output`) and
|
|
66
|
+
`-t 16` to change the default of **8 threads**.
|
|
67
|
+
|
|
68
|
+
Analysis uses **trypsin-compatible exact matches** by default; add `--non-tryptic`
|
|
69
|
+
for other enzymes. Isoleucine and leucine are treated as equivalent. All-match and
|
|
70
|
+
tryptic-match BED tracks are always retained. Optional one-edit rescue is separate
|
|
71
|
+
from the exact evidence used to support gene models. See `gapms --help-all`.
|
|
72
|
+
|
|
73
|
+
## Results
|
|
74
|
+
|
|
75
|
+
Start with **report.html**; **report.log** records the run. Main outputs include
|
|
76
|
+
`peptides.bed`, `peptides.tryptic.bed`, `peptides.igv.bed`,
|
|
77
|
+
`unmapped_peptides.tsv`, and, when gene models are available,
|
|
78
|
+
`all_proteins_scores.tsv` and `supported_genes.gtf`. Multiple annotations also
|
|
79
|
+
produce `consensus.gff3` and `consensus_proteins.faa`.
|
|
80
|
+
|
|
81
|
+
`review/` contains supported novel/alternative proposals when available.
|
|
82
|
+
They require review and are not automatically applied. Existing annotated isoforms
|
|
83
|
+
are considered before proposing changes. Without an input annotation, RNA-derived
|
|
84
|
+
ORFs are candidates whose novelty cannot be assessed. Peptide support does not
|
|
85
|
+
validate every boundary of a gene model.
|
|
86
|
+
|
|
87
|
+
[Technical guide](docs/v1/README.md) ·
|
|
88
|
+
[Five-mode validation of 1.3.2](docs/v1/evaluation/five_modes_hop_20261113/REPORT.md)
|
|
89
|
+
|
|
90
|
+
## Cite
|
|
91
|
+
|
|
92
|
+
[GAP-MS manuscript on bioRxiv](https://www.biorxiv.org/content/10.64898/2026.03.17.712294v3)
|
gapms-1.3.2/README.md
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# GAP-MS
|
|
2
|
+
|
|
3
|
+
GAP-MS uses mass-spectrometry peptides to assess gene predictions, combine
|
|
4
|
+
annotations and identify peptide-supported changes for review.
|
|
5
|
+
|
|
6
|
+
## Install
|
|
7
|
+
|
|
8
|
+
Python 3.10 or newer:
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
pip install gapms==1.3.2
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
For runs with a BAM file, also install the RNA reconstruction tools:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
conda install -c conda-forge -c bioconda stringtie transdecoder=5.5.0
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Alternatively, build an Apptainer image from this checkout. It includes these tools:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
apptainer build --fakeroot gapms-1.3.2.sif gapms.def
|
|
24
|
+
apptainer run gapms-1.3.2.sif -a assembly.fa -p peptides.tsv -g genes.gtf
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Version 1.3.2 must be uploaded to PyPI before the pip command above is available.
|
|
28
|
+
See [container instructions](packaging/CONTAINERS.md) for Docker Hub.
|
|
29
|
+
|
|
30
|
+
## Run
|
|
31
|
+
|
|
32
|
+
- **Assembly + peptides:** map peptides to the six-frame genome translation.
|
|
33
|
+
`gapms -a assembly.fa -p peptides.tsv`
|
|
34
|
+
- **Add BAM:** include RNA-supported splice paths and reconstruct peptide-supported ORF candidates.
|
|
35
|
+
`gapms -a assembly.fa -p peptides.tsv -b sorted.bam`
|
|
36
|
+
- **Add annotation:** map across annotated exons, score gene models and propose supported changes.
|
|
37
|
+
`gapms -a assembly.fa -p peptides.tsv -g genes.gtf`
|
|
38
|
+
- **Annotation + BAM:** combine gene-model assessment with RNA-supported reconstruction.
|
|
39
|
+
`gapms -a assembly.fa -p peptides.tsv -g genes.gtf -b sorted.bam`
|
|
40
|
+
- **Multiple annotations:** automatically build a peptide-guided consensus. BAM is optional here too.
|
|
41
|
+
`gapms -a assembly.fa -p peptides.tsv -g helixer.gtf -g another.gff3`
|
|
42
|
+
|
|
43
|
+
GTF and GFF3 are accepted. BAM files must be coordinate-sorted and use the
|
|
44
|
+
assembly's sequence names. FragPipe, Casanovo and plain peptide lists are supported.
|
|
45
|
+
Use `-o results` to choose an output directory (default: `./GAPMS_output`) and
|
|
46
|
+
`-t 16` to change the default of **8 threads**.
|
|
47
|
+
|
|
48
|
+
Analysis uses **trypsin-compatible exact matches** by default; add `--non-tryptic`
|
|
49
|
+
for other enzymes. Isoleucine and leucine are treated as equivalent. All-match and
|
|
50
|
+
tryptic-match BED tracks are always retained. Optional one-edit rescue is separate
|
|
51
|
+
from the exact evidence used to support gene models. See `gapms --help-all`.
|
|
52
|
+
|
|
53
|
+
## Results
|
|
54
|
+
|
|
55
|
+
Start with **report.html**; **report.log** records the run. Main outputs include
|
|
56
|
+
`peptides.bed`, `peptides.tryptic.bed`, `peptides.igv.bed`,
|
|
57
|
+
`unmapped_peptides.tsv`, and, when gene models are available,
|
|
58
|
+
`all_proteins_scores.tsv` and `supported_genes.gtf`. Multiple annotations also
|
|
59
|
+
produce `consensus.gff3` and `consensus_proteins.faa`.
|
|
60
|
+
|
|
61
|
+
`review/` contains supported novel/alternative proposals when available.
|
|
62
|
+
They require review and are not automatically applied. Existing annotated isoforms
|
|
63
|
+
are considered before proposing changes. Without an input annotation, RNA-derived
|
|
64
|
+
ORFs are candidates whose novelty cannot be assessed. Peptide support does not
|
|
65
|
+
validate every boundary of a gene model.
|
|
66
|
+
|
|
67
|
+
[Technical guide](docs/v1/README.md) ·
|
|
68
|
+
[Five-mode validation of 1.3.2](docs/v1/evaluation/five_modes_hop_20261113/REPORT.md)
|
|
69
|
+
|
|
70
|
+
## Cite
|
|
71
|
+
|
|
72
|
+
[GAP-MS manuscript on bioRxiv](https://www.biorxiv.org/content/10.64898/2026.03.17.712294v3)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Third-party software
|
|
2
|
+
|
|
3
|
+
## PepLocus 0.5.6
|
|
4
|
+
|
|
5
|
+
PepLocus is an external MIT-licensed Python dependency, installed by pip.
|
|
6
|
+
The GAPMS 1.3 wheel does not vendor the older `gapms._peplocus` implementation.
|
|
7
|
+
Source and license: https://github.com/qussai96/PepLocus.
|
|
8
|
+
|
|
9
|
+
## GeneSensus 0.6.0a3
|
|
10
|
+
|
|
11
|
+
The consensus engine in `gapms_v1/_genesensus` is vendored from the author's
|
|
12
|
+
GeneSensus 0.6.0a3 release under BSD-3-Clause. Its license and per-file original
|
|
13
|
+
SHA-256 hashes are included there. Absolute imports in rna_geometry.py were
|
|
14
|
+
changed to relative imports for the private package namespace. The original
|
|
15
|
+
inference algorithms and default biological coefficients are retained.
|
|
16
|
+
|
|
17
|
+
## Retained GAPMS algorithms
|
|
18
|
+
|
|
19
|
+
The protein matcher, confidence feature/seed rules and TransDecoder coordinate
|
|
20
|
+
projection are retained from GAPMS under this project's MIT license. They are
|
|
21
|
+
included directly in the v1 package, without a dependency on the legacy release.
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Current architecture (1.3.0)
|
|
2
|
+
|
|
3
|
+
The pip distribution is `gapms`, with the `gapms` console command and a
|
|
4
|
+
`gapms-v1` compatibility alias. The package contains only `gapms_v1` and the
|
|
5
|
+
frozen GeneSensus engine. It depends explicitly on PepLocus 0.5.6; it neither
|
|
6
|
+
vendors an older mapper nor needs a GAPMS 0.3.0 wheel.
|
|
7
|
+
|
|
8
|
+
The reusable protein matcher, confidence features/seed rules and TransDecoder
|
|
9
|
+
coordinate projection are included directly in v1. All peptide mapping uses the
|
|
10
|
+
standalone PepLocus API. Annotation junctions and thresholded RNA junctions are
|
|
11
|
+
supplied separately; RNA alignments are scanned once. One protein automaton is
|
|
12
|
+
reused across source/ORF/consensus associations. All exact placements remain in
|
|
13
|
+
the union evidence store, with a separately counted tryptic-compatible subset.
|
|
14
|
+
Approximate rescue stays outside model and annotation-change evidence.
|
|
15
|
+
|
|
16
|
+
The public help lists biological inputs and threads. `--help-all` exposes
|
|
17
|
+
technical controls. Pip installs CPU-only XGBoost on Linux; StringTie and
|
|
18
|
+
TransDecoder remain explicit external requirements for RNA reconstruction.
|
|
19
|
+
|
|
20
|
+
Public report generation deduplicates identical event IDs. `outputs.refresh_report`
|
|
21
|
+
can rebuild completed reports without rerunning mapping or classification;
|
|
22
|
+
scientific tables and core provenance are preserved and publication provenance
|
|
23
|
+
is recorded separately.
|
|
24
|
+
|
|
25
|
+
## Historical development notes
|
|
26
|
+
|
|
27
|
+
# Architecture and baseline
|
|
28
|
+
|
|
29
|
+
The baseline is GAPMS 0.3.0, commit `40cabc4`. Its 105 tests passed before
|
|
30
|
+
implementation (three expected warnings for legacy projection without an
|
|
31
|
+
assembly). Development is isolated on `feature/gapms-1.0.0` in the GAP-MS-v1
|
|
32
|
+
worktree. The original `gapms/` implementation and pretrained model remain
|
|
33
|
+
unchanged. Main remains at the 0.3.0 release.
|
|
34
|
+
|
|
35
|
+
The new `gapms-v1` distribution contains only `gapms_v1` and depends on
|
|
36
|
+
`gapms==0.3.0`. It adds a separate console command. Install the local 0.3.0 wheel
|
|
37
|
+
first when the dependency is unavailable from an index. The legacy checkout on
|
|
38
|
+
main is independently installable. Do not install a different legacy dependency
|
|
39
|
+
version without repeating compatibility validation.
|
|
40
|
+
|
|
41
|
+
Modules have concrete responsibilities:
|
|
42
|
+
|
|
43
|
+
- `cli`: four biological input types and technical policy.
|
|
44
|
+
- `peptides`: validated sequences, identification metadata and quality status.
|
|
45
|
+
- `models`: source-aware CDS/exon structures, phase checks and translation.
|
|
46
|
+
- `rnaseq`: sorted-BAM validation, StringTie, read-only transcript extraction,
|
|
47
|
+
TransDecoder, and the existing genomic ORF projection adapter.
|
|
48
|
+
- `mapping`: a disk-backed union of genomic hits and verified CDS projections.
|
|
49
|
+
- `assessment`: model support, diagnostic evidence and conservative events.
|
|
50
|
+
- `workflow`: input provenance, stage orchestration, output and guarded resume.
|
|
51
|
+
- `common`: stable identifiers, deterministic TSVs and safe subprocess logging.
|
|
52
|
+
|
|
53
|
+
Reusable components are bundled PepLocus's chunked six-frame engine, splice-path
|
|
54
|
+
mapping, junction extraction, reference indexing, peptide normalization, and
|
|
55
|
+
translation; the reusable Aho–Corasick protein matcher; and the mature
|
|
56
|
+
TransDecoder-to-genome projection adapter. Full CDS paths supplement bounded
|
|
57
|
+
local junction searches. Original annotations are neither merged biologically
|
|
58
|
+
nor rewritten: source-specific model IDs coexist in the shared evidence space.
|
|
59
|
+
|
|
60
|
+
The evidence store reconciles identical peptide placements before counting
|
|
61
|
+
support. I/L-equivalent observed sequences constitute one evidence unit.
|
|
62
|
+
Multiplicity includes every exact locus found by the genome/path search and
|
|
63
|
+
full model projections, rather than just proteins within an individual branch.
|
|
64
|
+
The legacy XGBoost decision logic is not modified or applied to novel ORFs.
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
# Automatic consensus in GAPMS 1.2.1
|
|
2
|
+
|
|
3
|
+
Supplying two or more distinct `-g` files always produces a consensus. There is
|
|
4
|
+
no consensus switch. A single annotation retains the existing assessment and
|
|
5
|
+
local-refinement workflow; BAM is optional.
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
gapms-v1 -a genome.fa -p peptides.tsv -g helixer.gtf -g annevo.gtf -o results -t 8
|
|
9
|
+
gapms-v1 -a genome.fa -p peptides.tsv -g helixer.gtf -g annevo.gtf \
|
|
10
|
+
-b reads.bam --rna-library firststrand -o results_rna -t 8
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Which engine is used
|
|
14
|
+
|
|
15
|
+
GAPMS 1.2.0 independently implemented part of GeneSensus's method. It did not
|
|
16
|
+
reproduce its selection behavior. Version 1.2.1 replaces that implementation
|
|
17
|
+
with the actual frozen GeneSensus 0.6.0a3 engine, included privately in the wheel
|
|
18
|
+
under BSD-3-Clause. The only engine edits change two absolute imports to relative
|
|
19
|
+
imports. Original file hashes, the change description and license are shipped
|
|
20
|
+
in `gapms_v1/_genesensus/`; a regression test checks the original algorithm bytes.
|
|
21
|
+
|
|
22
|
+
The fixed policy is `state_molecular_guided`, `molecular_strategy=source_context`,
|
|
23
|
+
`peptide_strategy=graph_contrast`, with the engine's biological defaults.
|
|
24
|
+
The molecular policy name does not imply molecular data exist: GAPMS supplies
|
|
25
|
+
no protein-likeness scores, residue profiles or SpuriousORF classifications.
|
|
26
|
+
Those missing channels abstain. There is no RefSeq-based source ranking or
|
|
27
|
+
reference-assisted search. All supplied annotations are inference inputs.
|
|
28
|
+
|
|
29
|
+
The [frozen release method](GENESENSUS_0.6.0a3.md) describes the underlying
|
|
30
|
+
algorithm and its broader optional inputs. Only inputs exposed by GAPMS are
|
|
31
|
+
used here; that document's molecular examples are not implicit GAPMS settings.
|
|
32
|
+
Multi-annotation consensus currently requires genetic code 1.
|
|
33
|
+
|
|
34
|
+
## Inputs and mapping
|
|
35
|
+
|
|
36
|
+
GAPMS's annotation parser continues to accept its supported GTF/GFF variants,
|
|
37
|
+
including compressed files, orphan CDS rows and shared GFF3 Parent lists.
|
|
38
|
+
The adapter writes explicit per-source transcript parents, safe IDs, exons,
|
|
39
|
+
CDS coordinates and initial phases. It recomputes downstream phase fields from
|
|
40
|
+
the same initial phase used for peptide projection, preserving the coding path.
|
|
41
|
+
Existing phase issues are recorded, not hidden as a sequence-based repair.
|
|
42
|
+
An unspecified first phase retains GAPMS's existing zero-phase assumption,
|
|
43
|
+
which is reported in the source audit. Input gene families remain grouped and
|
|
44
|
+
source IDs remain distinct. Exon-only models remain in assessment but do not
|
|
45
|
+
become coding consensus candidates. Every supplied annotation must contain CDS.
|
|
46
|
+
|
|
47
|
+
Genome/splice mapping and source-protein association run first. The frozen
|
|
48
|
+
engine then builds structural and peptide-guided graph candidates. Their proteins
|
|
49
|
+
are searched with the same ProteinMatcher automaton already built for source
|
|
50
|
+
proteins. Every peptide projection is checked against the assembly before being
|
|
51
|
+
added to the shared mapping database. This automaton is distinct from the
|
|
52
|
+
assembly mapper and local-refinement searches.
|
|
53
|
+
|
|
54
|
+
All I/L-equivalent sequences are one evidence class. Each eligible sequence's
|
|
55
|
+
complete reported placement universe is passed to GeneSensus, including locations
|
|
56
|
+
outside the prediction set. Removing a competing gene model does not make a
|
|
57
|
+
peptide unique. Classes with only failed identification q-values are excluded
|
|
58
|
+
from consensus evidence; unknown confidence remains unknown. Standard mapping
|
|
59
|
+
outputs still retain their identification metadata. One-edit rescue is separate
|
|
60
|
+
and never enters exact consensus evidence.
|
|
61
|
+
|
|
62
|
+
New graph paths can reveal more placements. After local refinement, final
|
|
63
|
+
selection checks every graph candidate against the existing association search.
|
|
64
|
+
If additional placements change the evidence universe, selection reruns with
|
|
65
|
+
updated ambiguity. Successful runs stop only after this feedback stabilizes;
|
|
66
|
+
an eight-pass safety bound raises an error rather than publishing a completed
|
|
67
|
+
result with stale evidence. The number of passes and new placements are recorded.
|
|
68
|
+
This closes feedback for enumerated paths, not for every possible genomic isoform.
|
|
69
|
+
|
|
70
|
+
## Graph and selection rules
|
|
71
|
+
|
|
72
|
+
The frozen engine constructs bounded exon-segment/splice-junction graphs in
|
|
73
|
+
prediction regions. Structural paths are retained alongside peptide-guided paths;
|
|
74
|
+
guidance uses full observed peptide chains, not independent fragments that can
|
|
75
|
+
be freely recombined. Graph ORFs must translate as complete, canonical models.
|
|
76
|
+
Exon pairing and source-frame guards restrict new combinations. Optional RNA
|
|
77
|
+
provides observed exon/junction geometry rather than proof of full transcripts.
|
|
78
|
+
|
|
79
|
+
Defaults are beam 8, at most 2,000 nodes, 32 starts and 32 graph candidates per
|
|
80
|
+
search region. The existing `--consensus-*` options control those bounds.
|
|
81
|
+
Original source candidates are not pruned by the graph candidate limit.
|
|
82
|
+
Original partial predictions can be retained, including models crossing assembly
|
|
83
|
+
gaps. These are incomplete source hypotheses, not newly validated complete ORFs;
|
|
84
|
+
inspect `complete=False` in `candidates.tsv.gz` and `decisions.tsv`.
|
|
85
|
+
Search reports record bounds and skipped work; this is not exhaustive discovery.
|
|
86
|
+
|
|
87
|
+
Selection uses the engine's coding/noncoding state utilities, source agreement,
|
|
88
|
+
regional peptide evidence and optional RNA. The fixed noncoding coefficient is
|
|
89
|
+
0.75; the minimum source-candidate coding length is 150 nt and minimum intron
|
|
90
|
+
length is 20 nt. These are inherited defaults, not thresholds fitted to the nine
|
|
91
|
+
references. Missing peptides do not become a negative evidence channel.
|
|
92
|
+
|
|
93
|
+
Peptide coding coverage saturates locally; multiple overlapping sequences cannot
|
|
94
|
+
multiply a base's support indefinitely. A sequence with N placements contributes
|
|
95
|
+
1/N per placement. Split-peptide support is capped by observed coding coverage
|
|
96
|
+
and divided across its junctions, avoiding an intron-length bonus. Fractions
|
|
97
|
+
are evidence bookkeeping, not posterior probabilities.
|
|
98
|
+
|
|
99
|
+
Actual coding-conflict components are optimized exactly up to 28 candidates;
|
|
100
|
+
larger components use the frozen bounded solver with two greedy orders and
|
|
101
|
+
improving exchanges. Intronic nested models need not conflict. Coordinate-based
|
|
102
|
+
IDs resolve ties deterministically. The engine's fusion guard uses separated
|
|
103
|
+
multi-source anchors, replacing 1.2.0's broader single-source gene-name veto.
|
|
104
|
+
|
|
105
|
+
Conservative local repair can replace one retained model while preserving its
|
|
106
|
+
unique peptides and supported RNA geometry. Strong peptide evidence means one
|
|
107
|
+
unique split sequence of at least nine amino acids with at least three nt per
|
|
108
|
+
block, or two nonnested unique sequences of at least nine amino acids. These
|
|
109
|
+
are the frozen engine rules, not the stricter nine-nt block and unconditional
|
|
110
|
+
changed-junction/shared-phase rules introduced in GAPMS 1.2.0. Full native
|
|
111
|
+
selection and repair decisions remain available for inspection.
|
|
112
|
+
|
|
113
|
+
## RNA and secondary isoforms
|
|
114
|
+
|
|
115
|
+
BAM consensus evidence uses the frozen engine's defaults: MAPQ at least 20,
|
|
116
|
+
at least eight matched overhang bases, introns 20..500,000 nt, at least three
|
|
117
|
+
qualified templates for junction admission, and duplicate/secondary/supplementary
|
|
118
|
+
filtering. NH-aware filtering and mate/template deduplication are retained.
|
|
119
|
+
`--rna-library` specifies unstranded, firststrand or secondstrand. GAPMS assembly
|
|
120
|
+
mapping thresholds remain separate; a junction used for exploratory peptide
|
|
121
|
+
mapping is not automatically qualified consensus evidence.
|
|
122
|
+
|
|
123
|
+
RNA reconstruction still supplies separately reported peptide-supported ORF
|
|
124
|
+
candidates. These reconstructed ORFs do not become another independent gene
|
|
125
|
+
predictor vote in consensus.
|
|
126
|
+
|
|
127
|
+
The frozen `event_guarded` secondary-isoform layer preserves primary selection
|
|
128
|
+
and admits at most two supported source isoforms per primary. Its routes require
|
|
129
|
+
measured molecular corroboration or event-specific RNA. GAPMS does not currently
|
|
130
|
+
supply molecular scores, so additional isoforms require RNA; peptides alone do
|
|
131
|
+
not activate this secondary layer. This deliberately differs from 1.2.0's custom
|
|
132
|
+
peptide-only admission rule. Unselected original isoforms remain audited, and
|
|
133
|
+
GAPMS's annotation assessment still checks all supplied source isoforms before
|
|
134
|
+
proposing a novel or alternative event.
|
|
135
|
+
|
|
136
|
+
## Evaluation and limits
|
|
137
|
+
|
|
138
|
+
A matched comparison on nine crops used Helixer and Annevo with the same final
|
|
139
|
+
GAPMS 1.2.0 peptide BEDs, without BAM or molecular scores. Exact full-CDS F1
|
|
140
|
+
against RefSeq increased from 45.61% for the independent implementation to
|
|
141
|
+
48.22% for the frozen engine, averaged equally across crops. Annevo averaged
|
|
142
|
+
46.99%; the engine improved on the old implementation in all nine crops but
|
|
143
|
+
still fell below Annevo in melon, tomato and barley. This is a development
|
|
144
|
+
comparison, not blinded validation or a guarantee of improvement.
|
|
145
|
+
|
|
146
|
+
Corrected end-to-end runs were also completed for all nine crops and reproduced
|
|
147
|
+
the same 48.22% macro F1. Each matched the standalone engine
|
|
148
|
+
byte for byte on identical inference inputs. Standard, IGV and splice peptide
|
|
149
|
+
BEDs were byte-identical to the earlier cohort in all nine crops; selection
|
|
150
|
+
changed while the reported peptide placements remained the same.
|
|
151
|
+
|
|
152
|
+
Graph reconstruction can change peptide placements on other inputs. Biological output equivalence
|
|
153
|
+
is checked against the standalone frozen release on identical normalized
|
|
154
|
+
annotations and final peptide evidence. References enter only the independent
|
|
155
|
+
evaluator, after inference is complete. CDS/protein translations, parents,
|
|
156
|
+
phase fields, graph evidence and peptide projections are independently checked.
|
|
157
|
+
Both earlier adverse results and corrected results are retained locally.
|
|
158
|
+
|
|
159
|
+
More compatible peptides do not establish every start, stop, splice boundary
|
|
160
|
+
or whole transcript. RefSeq itself can contain omissions and errors. Bounded
|
|
161
|
+
mapping limits apparent uniqueness; no peptide absence establishes gene absence.
|
|
162
|
+
The final annotation is a reviewable integration of available evidence.
|