Skip to content

Commit

Permalink
feat(reporter): add new "non-match" type of message
Browse files Browse the repository at this point in the history
- initially this applies to RYR1 non-matches but could be applied to other genes in the future
  • Loading branch information
whaleyr committed Dec 20, 2023
1 parent 9e15ded commit f5df05a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,19 @@ public MessageHelper() throws IOException {
*/
public void addMatchingMessagesTo(GeneReport report) {
if (!report.isReportable()) {
// purposely don't apply any messages if the gene is not called
if (!report.isNoData()) {
// if not reportable but does have data apply only "non-match" rules
m_geneMap.get(report.getGene()).stream()
.filter(m -> m.getExceptionType().equalsIgnoreCase(MessageAnnotation.TYPE_NONMATCH) && matchesGeneReport(m, report))
.forEach(report::addMessage);
}
return;
}
if (report.getCallSource() != CallSource.MATCHER) {
return;
}
m_geneMap.get(report.getGene()).stream()
.filter(m -> !m.getExceptionType().equalsIgnoreCase(MessageAnnotation.TYPE_NONMATCH))
.filter(m -> matchesGeneReport(m, report))
.forEach(report::addMessage);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public class MessageAnnotation implements Comparable<MessageAnnotation> {
private static final String TYPE_FOOTNOTE = "footnote";
public static final String TYPE_NOTE = "note";
public static final String TYPE_REPORT_AS_GENOTYPE = "report-as-genotype";
public static final String TYPE_NONMATCH = "non-match";
public static Predicate<MessageAnnotation> isFootnote = m -> m.getExceptionType().equals(TYPE_FOOTNOTE);
public static Predicate<MessageAnnotation> isExtraPositionNote = m -> m.getExceptionType().equals(TYPE_EXTRA_POSITION);
public static Predicate<MessageAnnotation> isMessage = m -> !m.getExceptionType().equals(TYPE_FOOTNOTE) &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1538,8 +1538,8 @@
"succinylcholine"
]
},
"exception_type": "note",
"message": "If the RYR1 genotype is “not called”, please refer to the RYR1 gene table in section 3 for the variants included in the input VCF file. In case one or more variant(s) with “Malignant Hyperthermia associated” function are present, please refer to the guideline publication PMID:30499100 since halogenated volatile anesthetics or depolarizing muscle relaxants succinylcholine are relatively contraindicated in persons with Malignant Hyperthermia Susceptibility. "
"exception_type": "non-match",
"message": "If the RYR1 genotype is “not called” and the drug section reports RYR1:Unknown/Unknown, please refer to the RYR1 gene table in section III for the variants included in the input VCF file. In case one or more variant(s) with “Malignant Hyperthermia associated” function are present, please refer to the guideline publication PMID:30499100 since halogenated volatile anesthetics or depolarizing muscle relaxants succinylcholine are relatively contraindicated in persons with Malignant Hyperthermia Susceptibility. "
},
{
"rule_name": "pcat-dpyd-hapB3-exonic-only",
Expand Down

0 comments on commit f5df05a

Please sign in to comment.