Skip to content

Commit 899a186

Browse files
committed
For detailed projection sampleids are provided for the comparison page
1 parent 0fe329f commit 899a186

File tree

2 files changed

+25
-7
lines changed

2 files changed

+25
-7
lines changed

src/main/java/org/cbioportal/legacy/model/GenomicDataCount.java

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
package org.cbioportal.legacy.model;
22

33
import java.io.Serializable;
4+
import java.util.Arrays;
5+
import java.util.List;
46
import java.util.Objects;
57

68
public class GenomicDataCount implements Serializable {
@@ -9,6 +11,7 @@ public class GenomicDataCount implements Serializable {
911
private String value;
1012
private Integer count;
1113
private Integer uniqueCount;
14+
private List<String> sampleIds;
1215

1316
public GenomicDataCount() {}
1417

@@ -25,6 +28,14 @@ public GenomicDataCount(String label, String value, Integer count, Integer uniqu
2528
this.uniqueCount = uniqueCount;
2629
}
2730

31+
public GenomicDataCount(String label, String value, Integer count, Integer uniqueCount, List<String> sampleIds) {
32+
this.label = label;
33+
this.value = value;
34+
this.count = count;
35+
this.uniqueCount = uniqueCount;
36+
this.sampleIds = sampleIds;
37+
}
38+
2839
public String getLabel() {
2940
return label;
3041
}
@@ -48,8 +59,18 @@ public Integer getCount() {
4859
public void setCount(Integer count) {
4960
this.count = count;
5061
}
62+
63+
public List<String> getSampleIds() {
64+
return sampleIds;
65+
}
66+
67+
public void setSampleIds(String sampleIdsStr) {
68+
if (sampleIdsStr != null && !sampleIdsStr.isEmpty()) {
69+
this.sampleIds = Arrays.asList(sampleIdsStr.split(","));
70+
}
71+
}
5172

52-
public Integer getUniqueCount() {
73+
public Integer getUniqueCount() {
5374
return uniqueCount;
5475
}
5576

@@ -67,9 +88,4 @@ public boolean equals(Object o) {
6788
&& Objects.equals(count, that.count)
6889
&& Objects.equals(uniqueCount, that.uniqueCount);
6990
}
70-
71-
@Override
72-
public int hashCode() {
73-
return Objects.hash(label, value, count, uniqueCount);
74-
}
7591
}

src/main/resources/mappers/clickhouse/genomic_data/ClickhouseGenomicDataMapper.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,8 @@
133133
replace(mutation_type, '_', ' ') as label,
134134
mutation_type as value,
135135
count(*) as count,
136-
count(distinct(sample_unique_id)) as uniqueCount
136+
count(distinct(sample_unique_id)) as uniqueCount,
137+
arrayStringConcat(groupArray(DISTINCT sample_unique_id), ',') AS sampleIdsStr
137138
FROM genomic_event_derived
138139
<where>
139140
<include
@@ -156,6 +157,7 @@
156157
<result property="label" column="label"/>
157158
<result property="count" column="count"/>
158159
<result property="uniqueCount" column="uniqueCount"/>
160+
<result property="sampleIds" column="sampleIdsStr"/>
159161
</collection>
160162
</resultMap>
161163

0 commit comments

Comments
 (0)