-
Notifications
You must be signed in to change notification settings - Fork 0
Milab-6720: variantkey modality #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
5be7d5d
MILAB-6720: score imported receptor sets keyed on variantKey
erohinaelena 9d3255f
MILAB-6720: move CI to node 22
erohinaelena d37c4f3
MILAB-6720: bump block-tools to 2.14.3
erohinaelena 6021a5f
MILAB-6720: add the constant chain column with pt, not in the scorer
erohinaelena c59b0b8
fix: swapped chain labels on single-cell TCR datasets
erohinaelena 5a79022
MILAB-6720: keep CHAIN_LOCUS to real loci; unmapped chains travel by …
erohinaelena 3f0fbfe
MILAB-6720: collect the chain literals in the loop that builds the table
erohinaelena e411089
MILAB-6720: hoist the input-table resource budget to one constant
erohinaelena d9f22a2
MILAB-6720: assemble the scorer's input table in one pt pass
erohinaelena f963a97
Revert "MILAB-6720: assemble the scorer's input table in one pt pass"
erohinaelena f994049
MILAB-6720: assemble the scorer's input table in one pt pass
erohinaelena a392c5c
MILAB-6720: drop the now-dead TABLE_CPU / TABLE_MEM constants
erohinaelena 4018b1f
MILAB-6720: read the CDR3 alphabet from the columns, not from an assu…
erohinaelena 28fcff4
MILAB-6720: resolve the CDR3 alphabet in one place, dropping the "" s…
erohinaelena d7970a4
MILAB-6720: find the key axis by name in the model, not by position
erohinaelena b821558
MILAB-6720: accept the lint autofix on ENTITY_KEY_NAMES
erohinaelena 0220b26
remove extra check
erohinaelena File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| --- | ||
| '@platforma-open/milaboratories.generation-probability.workflow': minor | ||
| '@platforma-open/milaboratories.generation-probability.model': minor | ||
| '@platforma-open/milaboratories.generation-probability.block': minor | ||
| --- | ||
|
|
||
| Score imported receptor sets, and fix swapped chain labels on single-cell TCR data | ||
|
|
||
| **Imported receptor sets.** A set from Import VDJ Data was offered nowhere and scored nothing. | ||
| Four separate things stopped it, each failing differently. | ||
|
|
||
| The dataset dropdown filtered on the presence of a per-record `pl7.app/vdj/chain` column, which | ||
| an imported set does not have — so it never appeared as an option at all. Its locus is a property | ||
| of the whole set, recorded on the key axis, and that is now accepted as an alternative. | ||
|
|
||
| The CDR3 alphabet was read from `pl7.app/alphabet` on the key axis or from a `<key>/structure` | ||
| domain key. An imported set states it in neither — the structure key belongs to the | ||
| `scClonotypeKey` vocabulary its axis does not use — so the run died on "Cannot determine CDR3 | ||
| alphabet". Its sequence columns do carry the alphabet, so that is where it is now read from when | ||
| the axis says nothing. The axis stays authoritative when it does say something: a MiXCR set emits | ||
| both nucleotide and amino-acid CDR3 columns, and the axis is what says which of them defines the | ||
| clonotype. | ||
|
|
||
| Scoring needed a per-row locus column and quietly produced an empty result without one. The | ||
| scorer's input table is now assembled in a single pass that appends a constant locus column for a | ||
| unit whose locus is the same for every row, so the scoring script is unchanged and still simply | ||
| reads a locus per row. | ||
|
|
||
| Whether the two chains are scored separately followed the key axis being | ||
| `pl7.app/vdj/scClonotypeKey`. A paired imported set carries both chains in one frame under the | ||
| `pl7.app/vdj/scClonotypeChain` column domain on a `variantKey` axis, so it took the bulk path, | ||
| where the first CDR3 column found is scored and the other chain is silently dropped. That now | ||
| follows the column domain. | ||
|
|
||
| **A light chain from an imported set is reported as skipped, not scored.** OLGA needs IGK and IGL | ||
| as separate models and an imported set records only "IG Light", so the locus is genuinely unknown. | ||
| Rather than guess, the light unit keeps its chain name, gets no Pgen, and is named in the block's | ||
| existing skipped-chains banner. Heavy chains (IGH) and TCR alpha/beta (TRA, TRB) score normally. | ||
|
|
||
| **Swapped chain labels.** MiXCR fixes "A" as the more diverse chain — the one that recombines a D | ||
| segment — so a receptor's chain order is TCRBeta/TCRAlpha and TCRDelta/TCRGamma, not alphabetical. | ||
| The label table read A as Alpha and B as Beta, so on a single-cell TCR alpha/beta dataset the alpha | ||
| column was labelled "Generation probability (Beta)" and the beta column "(Alpha)". Gamma/delta was | ||
| swapped the same way. The Pgen values were always right — the locus came from the per-record chain | ||
| column, never from the A/B letter — but a mislabelled column reads as the wrong chain's result. | ||
| Labels are now derived from the chain that the A/B slot resolves to, through the single table that | ||
| also decides the locus, so a label cannot disagree with the model that produced the value beside it. | ||
|
|
||
| Bulk, single-cell IG, peptide and amplicon inputs are unaffected. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.