lib: minor style improvements
@@ -591,15 +591,18 @@ public class VariantAnnotationCalculator {
for (ConsequenceType consequenceType : consequenceTypeList) {
List<String> selectedHgvs = new ArrayList<>();
for (String hgvs : variantAnnotation.getHgvs()) {
+ // Add Transcript ID
if (hgvs.startsWith(consequenceType.getTranscriptId())) {
- // ENST
selectedHgvs.add(hgvs);
- } else if (consequenceType.getProteinVariantAnnotation() != null
+ } else {
+ // Add Protein ID
+ if (consequenceType.getProteinVariantAnnotation() != null
+ && consequenceType.getProteinVariantAnnotation().getProteinId() != null
&& hgvs.startsWith(consequenceType.getProteinVariantAnnotation().getProteinId())) {
- // ENSP
selectedHgvs.add(hgvs);
}
}
+ }
if (CollectionUtils.isNotEmpty(selectedHgvs)) {
consequenceType.setHgvs(selectedHgvs);
}
