Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,8 @@ public List<String> getSearchFields() {
add("variants");
add("variants.keyword");
add("variants.standardText");
add("variantHgvs");
add("variantHgvs.keyword");
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

These should be added to the variantSynonyms field and not add an extra field.

add("variantSynonyms");
add("variantSynonyms.keyword");
add("variantSynonyms.standardText");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,15 @@ public List<AlleleSearchResultDocument> convert(List<AlleleSummaryDocument> alle
}

Set<String> consequences = new HashSet<>();
Set<String> variantHgvs = new HashSet<>();
for (var variant : doc.getVariants()) {
if (variant.getCuratedVariantGenomicLocations() == null) {
continue;
}
for (var location : variant.getCuratedVariantGenomicLocations()) {
if (location.getHgvs() != null) {
variantHgvs.add(location.getHgvs());
}
if (location.getPredictedVariantConsequences() == null) {
continue;
}
Expand All @@ -149,6 +153,9 @@ public List<AlleleSearchResultDocument> convert(List<AlleleSummaryDocument> alle
if (!consequences.isEmpty()) {
searchDoc.setMolecularConsequence(consequences);
}
if (!variantHgvs.isEmpty()) {
searchDoc.setVariantHgvs(variantHgvs);
}
}

result.add(searchDoc);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ protected void buildSharedSearchableDocumentMappings() throws IOException {
new FieldBuilder(builder, "symbolText", "text").keyword().standardText().build(); // allele

//new FieldBuilder(builder, "variants", "text").keyword().standardText().build(); // allele
new FieldBuilder(builder, "variantHgvs", "text").keyword().build(); // allele - HGVS notation for searchability
new FieldBuilder(builder, "variantType", "text").keyword().build(); // variant search result
//new FieldBuilder(builder, "variantSynonyms", "text").keyword().standardText().build(); // allele

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public AlleleSearchResultDocument() {
private String alterationType;
private List<String> variantType;
private Set<String> molecularConsequence;
private Set<String> variantHgvs;
private Set<String> constructExpressedComponent;
private Set<String> constructRegulatoryRegion;
private Set<String> constructKnockdownComponent;
Expand Down
Loading