Skip to content

Commit

Permalink
add association bkg trait column to curation
Browse files Browse the repository at this point in the history
  • Loading branch information
ala-ebi committed Jul 2, 2021
1 parent 866bdf5 commit 1d0190b
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ public class SnpAssociationTableView {

private String efoTraits;

private String backgroundEfoTraits;

private Float orPerCopyNum;

private Float orPerCopyRecip;
Expand Down Expand Up @@ -93,6 +95,7 @@ public SnpAssociationTableView(Long associationId,
String betaUnit,
String description,
String efoTraits,
String backgroundEfoTraits,
String lastMappingDate,
String lastMappingPerformedBy,
String multiSnpHaplotype,
Expand Down Expand Up @@ -120,6 +123,7 @@ public SnpAssociationTableView(Long associationId,
this.betaUnit = betaUnit;
this.description = description;
this.efoTraits = efoTraits;
this.backgroundEfoTraits = backgroundEfoTraits;
this.lastMappingDate = lastMappingDate;
this.lastMappingPerformedBy = lastMappingPerformedBy;
this.multiSnpHaplotype = multiSnpHaplotype;
Expand Down Expand Up @@ -213,6 +217,14 @@ public void setEfoTraits(String efoTraits) {
this.efoTraits = efoTraits;
}

public String getBackgroundEfoTraits() {
return backgroundEfoTraits;
}

public void setBackgroundEfoTraits(String backgroundEfoTraits) {
this.backgroundEfoTraits = backgroundEfoTraits;
}

public String getLastMappingDate() {
return lastMappingDate;
}
Expand Down Expand Up @@ -376,4 +388,4 @@ public AssociationExtension getAssociationExtension() {
public void setAssociationExtension(AssociationExtension associationExtension) {
this.associationExtension = associationExtension;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,13 @@ public SnpAssociationTableView createSnpAssociationTableView(Association associa
associationEfoTraits = String.join(", ", efoTraits);
snpAssociationTableView.setEfoTraits(associationEfoTraits);

Collection<String> backgroundEfoTraits = new ArrayList<>();
for (EfoTrait efoTrait: association.getBkgEfoTraits()) {
backgroundEfoTraits.add(efoTrait.getTrait());
}
String associationBackgroundEfoTraits = String.join(",", backgroundEfoTraits);
snpAssociationTableView.setBackgroundEfoTraits(associationBackgroundEfoTraits);

// Set OR values
snpAssociationTableView.setOrPerCopyNum(association.getOrPerCopyNum());
snpAssociationTableView.setOrPerCopyRecip(association.getOrPerCopyRecip());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@
<th style="font-size: small">p-Value (mantissa x 10 exponent)</th>
<th style="font-size: small">p-Value Description</th>
<th style="font-size: small">EFO trait</th>
<th style="font-size: small">Background EFO trait</th>
<th style="font-size: small">OR</th>
<th style="font-size: small">OR reciprocal</th>
<th style="font-size: small">Beta</th>
Expand Down Expand Up @@ -485,6 +486,13 @@
th:text="'Warning: EFO trait not assigned'"></span>
</td>

<td>
<p th:text="${snpAssociationTableView.backgroundEfoTraits} ?: ''"></p>
<span style="font-style: italic; color:red; font-size: small"
th:if="*{#strings.isEmpty(snpAssociationTableView.backgroundEfoTraits)}"
th:text="'Warning: EFO trait not assigned'"></span>
</td>

<td th:text="${snpAssociationTableView.orPerCopyNum} ?: ''"></td>
<td>
<p th:text="${snpAssociationTableView.orPerCopyRecip} ?: ''"></p>
Expand Down Expand Up @@ -616,4 +624,4 @@
</script>

</body>
</html>
</html>

0 comments on commit 1d0190b

Please sign in to comment.