Skip to content
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

ACTIN-1057: Filter NaN likelihoods from CUPPA when converting in ORANGE #569

Merged
merged 2 commits into from
Jun 22, 2024

Conversation

kduyvesteyn
Copy link
Contributor

Have tested on data-vm and confirmed this ORANGE version creates a JSON file which can be ingested into ACTIN (no NaN exception anymore).

@@ -83,9 +79,13 @@ private static List<CuppaPrediction> extractSortedProbabilities(@NotNull CuppaPr
.altSjCohortClassifier(probabilitiesByClassifier.get(ClassifierName.ALT_SJ))
.build();

cuppaPredictionsOrangeFormat.add(prediction);
// If a classifier has no data for a specific cancer type we should remove it completely, see ACTIN-1057
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feels a bit unusual to refer to a ticket in code, unless its an open TODO that needs followup.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indeed I'd normally just include this sort of thing in the commit message. Future devs can annotate the code to see it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do note that I added a comment because the implementation choice may not be optimal. We could for instance also expose a wider CUPPA datamodel in ORANGE and leave to downstream how to handle NaN likelihoods, but considered that unnecessary at this point

expectedPredictionsByCancerType.put(expectedPredictionMelanoma.cancerType(), expectedPredictionMelanoma);
expectedPredictionsByCancerType.put(expectedPredictionSkinOther.cancerType(), expectedPredictionSkinOther);
expectedPredictionsByCancerType.put(expectedPredictionProstate.cancerType(), expectedPredictionProstate);
expectedPredictionsByCancerType.put("Bone/Soft tissue: Cartilaginous neoplasm", null);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is the null setup in the test data? ... oh ok, I see that it was always there but its actually missing values in the input file from CUPPA and not explicit NaN's.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct, that's what tricked us in the first place :)

@kduyvesteyn kduyvesteyn merged commit 65fbdf1 into master Jun 22, 2024
@kduyvesteyn kduyvesteyn deleted the ACTIN-1057 branch June 22, 2024 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants