@sjcrh/proteinpaint-server 2.108.0 → 2.108.1-0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjcrh/proteinpaint-server",
3
- "version": "2.108.0",
3
+ "version": "2.108.1-0",
4
4
  "type": "module",
5
5
  "description": "a genomics visualization tool for exploring a cohort's genotype and phenotype data",
6
6
  "main": "src/app.js",
package/routes/gdc.maf.js CHANGED
@@ -101,8 +101,10 @@ async function listMafFiles(q, ds) {
101
101
  if (normalTypeName)
102
102
  file.sample_types.push(normalTypeName);
103
103
  }
104
+ file.sample_types = [...new Set(file.sample_types)];
104
105
  files.push(file);
105
106
  }
107
+ files.sort((a, b) => b.file_size - a.file_size);
106
108
  const result = {
107
109
  files,
108
110
  filesTotal: re.data.pagination.total,
@@ -74,6 +74,12 @@ async function getResult(q, ds, genome) {
74
74
  ;
75
75
  ({ term2sample2value, byTermId, bySampleId } = await ds.queries[q.dataType].get(_q));
76
76
  }
77
+ for (const [term, obj] of term2sample2value) {
78
+ if (Object.keys(obj).length === 0) {
79
+ term2sample2value.delete(term);
80
+ delete byTermId[term];
81
+ }
82
+ }
77
83
  if (term2sample2value.size == 0)
78
84
  throw "no data";
79
85
  if (term2sample2value.size == 1) {