-
Notifications
You must be signed in to change notification settings - Fork 7
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
Exon curation #431
base: feat/string-mut-name
Are you sure you want to change the base?
Exon curation #431
Conversation
f30ca02
to
fb4d7c2
Compare
01522ec
to
c40dfb1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will come back to review again once the string name pr is merged.
consequence.setTerm(SVConsequence.SV_DUPLICATION.name()); | ||
break; | ||
case "deletion": | ||
consequence.setTerm(SVConsequence.SV_DELETION.name()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add break here just in case future changes forget to amend.
['Exon 14 Duplication', true], | ||
['Exon 4 Insertion', true], | ||
['Exon 4-8 Deletion', true], | ||
['Exon 4 InSERTion', true], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we normalize it to Exon 4 Insertion when user inputs InSERTion
?
List<ProteinExonDTO> overlap = new ArrayList<>(); | ||
List<String> problematicExonAlts = new ArrayList<>(); | ||
for (String exonAlterationString : Arrays.asList(alteration.getAlteration().split("\\s*\\+\\s*"))) { | ||
Integer exonNumber = Integer.parseInt(exonAlterationString.replaceAll("\\D*", "")); | ||
if (exonNumber > 0 && exonNumber < proteinExons.size() + 1) { | ||
overlap.add(proteinExons.get(exonNumber - 1)); | ||
} else { | ||
problematicExonAlts.add(exonAlterationString); | ||
} | ||
} | ||
if (problematicExonAlts.isEmpty()) { | ||
overlap.sort(Comparator.comparingInt(ProteinExonDTO::getExon)); | ||
Boolean isConsecutiveExonRange = | ||
overlap | ||
.stream() | ||
.map(ProteinExonDTO::getExon) | ||
.reduce((prev, curr) -> (curr - prev == 1) ? curr : Integer.MIN_VALUE) | ||
.orElse(Integer.MIN_VALUE) != | ||
Integer.MIN_VALUE; | ||
if (isConsecutiveExonRange && overlap.size() > 0) { | ||
alteration.setStart(overlap.get(0).getRange().getStart()); | ||
alteration.setEnd(overlap.get(overlap.size() - 1).getRange().getEnd()); | ||
} | ||
|
||
annotationDTO.setExons(overlap); | ||
} else { | ||
StringBuilder sb = new StringBuilder(); | ||
sb.append("The following exon(s) do not exist: "); | ||
sb.append(problematicExonAlts.stream().collect(Collectors.joining(", "))); | ||
alterationWithStatus.setMessage(sb.toString()); | ||
alterationWithStatus.setType(EntityStatusType.ERROR); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need some comments and examples of what we trying to do here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
72891b0
to
e190d10
Compare
@zhx828 This branch can be product reviewed.
|
@zhx828 Changes requested above have been addressed. If product looks good, then its also ready for a code review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- I think we still need to show how to curate
Any 3-4 exons
. I remember we used to have it? - This alteration box height is weird
- for the comment tooltip, can we add a delay before disappearing? This could avoid accidental leaving the tooltip and back. This happens more often when the tooltip is small and also has action in it
- Incorrect alteration status. To reproduce: 1. add alteration with wrong reference 2. it shows warning color 3. save alteration. 4 modify alteration again. At this point, I want to see the alteration highlighted in yellow, but it's green
</div> | ||
)} | ||
</div> | ||
<div className="px-2 py-2"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need the px-2
@zhx828 Updated based on feedback. Could you give some feedback on the following: |
Fixes https://github.com/oncokb/oncokb-pipeline/issues/411
Changes
Product Review 1 Requests:
Convert to tickets