Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
167 commits
Select commit Hold shift + click to select a range
3d8bf65
admin: add federation create and connect wc
imedina Jun 5, 2025
ceac558
wc: add cohort Name column
imedina Jun 5, 2025
1cc0454
wc: add fix style in Name column
imedina Jun 5, 2025
c2636e8
wc: add stats from other Projects
imedina Jun 6, 2025
dc6b00a
wc: add userId filter to jobId
imedina Jun 6, 2025
451e38d
wc: use species in all variant links
imedina Jun 17, 2025
4375e0d
Merge branch 'develop' into TASK-7733
imedina Jun 17, 2025
73d4fde
swagger: pass current study to OpenApi web service
imedina Jun 18, 2025
3aa74ab
wc: add 'JSON_SPARSE' to variant grid export()
imedina Jun 20, 2025
8a9c6d8
wc: initial work on Job timeline and new cohort stats
imedina Jul 7, 2025
5ae9dc5
wc: Remove tooltip generated by the prediction formatter #TASK-7880 #…
jmjuanes Aug 12, 2025
feed764
wc: Fix code formatting of prediction formatter #TASK-7880 #TASK-7733
jmjuanes Aug 12, 2025
f3a5beb
wc: Add species and assembly argument in decipher link of variant-gri…
jmjuanes Sep 1, 2025
6767e59
wc: Refactor render method of variant-cohort-stats #TASK-7880 #TASK-7733
jmjuanes Sep 1, 2025
aa8507a
core: Fix link to uniprot in bioinfo utils #TASK-7880 #TASK-7733
jmjuanes Sep 1, 2025
742566c
core: Remove lrg link in getGeneLink method #TASK-7880 #TASK-7733
jmjuanes Sep 1, 2025
59dc11f
wc: Remove link to LRG in gene tooltip generated by variant grid form…
jmjuanes Sep 1, 2025
3f72d82
test: Fix cohort tests #TASK-7880 #TASK-7733
jmjuanes Sep 1, 2025
6cb8137
wc: Fix style of variant links in variant grid formatter #TASK-7880 #…
jmjuanes Sep 1, 2025
965a6e0
test: Fix ensembl genome browser link in variant browser grid tests #…
jmjuanes Sep 1, 2025
7e3dafe
core: Add utility to generate link to cellbase variant #TASK-7880 #TA…
jmjuanes Sep 2, 2025
69e3860
wc: Using correct link to cellbase in variant browser grid #TASK-7880…
jmjuanes Sep 2, 2025
8fa264f
wc: Using correct link to cellbase in variant interpreter grid #TASK-…
jmjuanes Sep 2, 2025
79f78b3
wc: Fix style of cohort name column #TASK-7880 #TASK-7733
jmjuanes Sep 2, 2025
f0fd4b5
wc: Fix style of cohort id column #TASK-7880 #TASK-7733
jmjuanes Sep 2, 2025
f32f525
test: Fix test to validate link to cellbase in variant browser #TASK-…
jmjuanes Sep 2, 2025
4680212
wc: make sure all cohorts are sorted alphabetically but keeping ALL f…
imedina Sep 2, 2025
faa60fe
wc: Add frequency compact mode for pulation frequencies display in va…
jmjuanes Sep 2, 2025
2fc109c
Merge branch 'release-4.x.x' into TASK-7733
jmjuanes Sep 3, 2025
7620c23
wc: Fix bug when variant callers configuraton is empty in vairant-fil…
jmjuanes Sep 3, 2025
966da34
wc: Fix displaying vairant id in variant browser grid #TASK-7880 #TAS…
jmjuanes Sep 3, 2025
9c0f8f7
core: Fix building links to ensembl in bioinfo-utils #TASK-7880 #TASK…
jmjuanes Sep 3, 2025
c6d7610
core: Fix building links to ensembl in bioinfo-utils #TASK-7880 #TASK…
jmjuanes Sep 3, 2025
e0efd2f
core: Improve generating links to cellbase #TASK-7880 #TASK-7733
jmjuanes Sep 3, 2025
0976b21
core: Fix generating links to ensembl #TASK-7880 #TASK-7733
jmjuanes Sep 3, 2025
6dfe937
wc: Fix generating link to ensembl from gene view #TASK-7880 #TASK-7733
jmjuanes Sep 3, 2025
ed58ca9
wc: Fix links to ensembl and refactor generating links to cellbase #T…
jmjuanes Sep 3, 2025
76534dd
wc: Fix links to ensembl and refactor generating links to cellbase #T…
jmjuanes Sep 3, 2025
d729fa5
wc: Add assembly when generating link to variant in variant id format…
jmjuanes Sep 3, 2025
685b4a0
wc: Fix generating gene links #TASK-7880 #TASK-7733
jmjuanes Sep 3, 2025
2720f84
test: Fix link to ensembl in variant-browser-grid test #TASK-7880 #TA…
jmjuanes Sep 3, 2025
1bc2b31
wc: Move method to generate tooltip for population frequencies #TASK-…
jmjuanes Sep 3, 2025
c1bcd32
wc: Remove rendering population frequencies as number and use box as …
jmjuanes Sep 3, 2025
22898b8
wc: Rename method to get population frequencies color #TASK-7880 #TAS…
jmjuanes Sep 3, 2025
8692ce2
wc: Add method to get the classification of the frequency #TASK-7880 …
jmjuanes Sep 3, 2025
f7cf2f9
wc: Initial implementation of the frequencies compact mode #TASK-7880…
jmjuanes Sep 3, 2025
62d3e5b
wc: Include cohort all in compact mode of population frequencies #TAS…
jmjuanes Sep 4, 2025
0ee06d6
wc: Minor code fixes in renderPopulationFrequencies formatter #TASK-7…
jmjuanes Sep 4, 2025
40bf5f7
wc: Add minimum width to all population frequency boxes #TASK-7880 #T…
jmjuanes Sep 4, 2025
631c546
styles: Add missing not-allowed cursor style #TASK-7880 #TASK-7733
jmjuanes Sep 4, 2025
a2ab0bb
wc: Add disabled effect to frequency boxes without value #TASK-7880 #…
jmjuanes Sep 4, 2025
cf3a292
wc: Minor fixes in population frequencies boxes #TASK-7880 #TASK-7733
jmjuanes Sep 4, 2025
06fb35c
wc: Fix properties of new cohort stats filter #TASK-7880 #TASK-7733
jmjuanes Sep 4, 2025
0984d1c
wc: Clean new cohort stats filter component and initialize dropdown #…
jmjuanes Sep 4, 2025
45f5283
wc: Implement logic to select cohorts in new cohort stats filter #TAS…
jmjuanes Sep 4, 2025
a28d011
wc: Improve render of new cohort stats filter #TASK-7880 #TASK-7733
jmjuanes Sep 4, 2025
d834174
wc: Initialize displaying inputs for selected cohorts #TASK-7880 #TAS…
jmjuanes Sep 5, 2025
7866737
wc: Fix values of inputs when removing a selected cohort #TASK-7880 #…
jmjuanes Sep 5, 2025
a85b7e3
wc: Adaot size and truncate cohort id in new cohort stats filter #TAS…
jmjuanes Sep 5, 2025
ae55be2
wc: Fix spacing between cohort select options #TASK-7880 #TASK-7733
jmjuanes Sep 5, 2025
bf7bdab
wc: Initialize getting state from current value in cohort stats filte…
jmjuanes Sep 5, 2025
772ad3b
wc: Remove commented code in cohort stats filter #TASK-7880 #TASK-7733
jmjuanes Sep 5, 2025
a3056b8
wc: Fix order of population classification boxes in variant grid form…
jmjuanes Sep 5, 2025
2c96c22
wc: Fix parsing cohort from query value in cohort stats filter #TASK-…
jmjuanes Sep 8, 2025
5b9d585
wc: Remove commented code in new cohort stats filter #TASK-7880 #TASK…
jmjuanes Sep 8, 2025
7ab9241
wc: Allow to set the initial value of the cohort stats freq value #TA…
jmjuanes Sep 8, 2025
534e160
wc: Fix setting the initial value of the operator in the cohort stats…
jmjuanes Sep 8, 2025
b707b72
wc: Allow to change freq value in cohort stats filter #TASK-7880 #TAS…
jmjuanes Sep 8, 2025
a31dee5
wc: Fix changing operator in new cohort stats filter #TASK-7880 #TASK…
jmjuanes Sep 8, 2025
22760f2
wc: Add scrolls in cohort dropdown of cohort stats filter #TASK-7880 …
jmjuanes Sep 8, 2025
af9738d
wc: Initial display of search input in cohort stats filter #TASK-7880…
jmjuanes Sep 8, 2025
16fd7cd
wc: Fix names of internal event handlers in cohort stats filter #TASK…
jmjuanes Sep 8, 2025
a008ec7
wc: Allow to filter displayed cohorts in new cohort stats filter #TAS…
jmjuanes Sep 8, 2025
8e51809
wc: Display empty state if no cohorts found #TASK-7880 #TASK-7733
jmjuanes Sep 8, 2025
328412c
wc: Allow to clear searched cohort in new cohort stats filter #TASK-7…
jmjuanes Sep 8, 2025
b959dfa
wc: Using a map to save searched cohorts #TASK-7880 #TASK-7733
jmjuanes Sep 8, 2025
d8d4c03
wc: Clean search input when clicking on clear button element #TASK-78…
jmjuanes Sep 8, 2025
fc9d0c4
wc: Change clear element to button in new cohort stats filter #TASK-7…
jmjuanes Sep 8, 2025
3eea584
wc: Display description in cohorts dropdown #TASK-7880 #TASK-7733
jmjuanes Sep 8, 2025
a6f7282
wc: Initial implementation of favorites in new cohort stats filter #T…
jmjuanes Sep 8, 2025
04a0050
wc: Fix displaying cohort description in dropdowns of cohort stats #T…
jmjuanes Sep 8, 2025
f7c5f7c
wc: Improvements in cohort stats filter #TASK-7880 #TASK-7733
jmjuanes Sep 8, 2025
fd9ed5d
wc: Display the number of cohorts in each study #TASK-7880 #TASK-7733
jmjuanes Sep 9, 2025
5c1f39d
wc: Allow to expand and collapse studies in cohort stats filter #TASK…
jmjuanes Sep 9, 2025
7e97b81
wc: Add chevron indicator in cohort stats filter #TASK-7880 #TASK-7733
jmjuanes Sep 9, 2025
941ce96
wc: Prevent text selection in study block of cohort stats filter #TAS…
jmjuanes Sep 9, 2025
e0bfd88
wc: Display additional cohort info in dropdown of cohort stats filter…
jmjuanes Sep 9, 2025
5862044
wc: Add new queryParams property in cellbase-search-autocomplete #TAS…
jmjuanes Sep 9, 2025
52db4a8
wc: Initialize additional query params object in cellbase-search-auto…
jmjuanes Sep 9, 2025
0436045
wc: Allow to specify query params for disorders in individual create …
jmjuanes Sep 9, 2025
2c29efa
iva: Clean and add placeholders for disorders and phenotypes source c…
jmjuanes Sep 9, 2025
bddc59c
wc: Allow to specify query params for phenotypes in individual create…
jmjuanes Sep 9, 2025
21272f1
wc: Clean individual-create #TASK-7880 #TASK-7733
jmjuanes Sep 9, 2025
8424892
wc: Allow to specify query params for phenotypes and disorders in ind…
jmjuanes Sep 9, 2025
1aa5bd5
wc: Code improvements in sample-create #TASK-7880 #TASK-7733
jmjuanes Sep 9, 2025
0b87c53
wc: Allow to specify query params for phenotypes in sample create #TA…
jmjuanes Sep 9, 2025
f7b2be7
wc: Allow to specify query params for phenotypes in sample update #TA…
jmjuanes Sep 9, 2025
b79b358
wc: Reset query params for phenotypes in observer of sample-create #T…
jmjuanes Sep 9, 2025
8937d07
wc: Force to reset query params for phenotypes and disorders in obser…
jmjuanes Sep 9, 2025
a5fca58
wc: Force to reset query params for phenotypes and disorders in obser…
jmjuanes Sep 9, 2025
dc98bf3
wc: Minor fixes in new cohort stats filter #TASK-7880 #TASK-7733
jmjuanes Sep 9, 2025
91d58ec
wc: Replace old cohort stats filter with the new one #TASK-7880 #TASK…
jmjuanes Sep 10, 2025
2f478f2
wc: Using new cohort stats filter in variant browser filters #TASK-78…
jmjuanes Sep 10, 2025
d8080ee
wc: Remove old cohort stats filter from variant browser #TASK-7880 #T…
jmjuanes Sep 10, 2025
ad0c9ba
wc: Fix bug displaying filters in filters-toolbar #TASK-7880 #TASK-7733
jmjuanes Sep 10, 2025
b17d2a4
wc: Remove family genotype filter from interpreter browser RD #TASK-7…
jmjuanes Sep 10, 2025
2376505
wc: Initialize component tags-input #TASK-7880 #TASK-7733
jmjuanes Sep 10, 2025
d8adf9b
wc: Some code fixes in cohort-create #TASK-7880 #TASK-7733
jmjuanes Sep 10, 2025
72179c7
wc: Allow to include tags in cohort-create #TASK-7880 #TASK-7733
jmjuanes Sep 10, 2025
890f047
wc: Minor code fixes in cohort-update #TASK-7880 #TASK-7733
jmjuanes Sep 11, 2025
cf11272
wc: Add tags to cohort-update form #TASK-7880 #TASK-7733
jmjuanes Sep 11, 2025
e7cb201
wc: Add tags column in cohort grid #TASK-7880 #TASK-7733
jmjuanes Sep 11, 2025
b073723
wc: Include tags in requested fields of cohort-grid #TASK-7880 #TASK-…
jmjuanes Sep 11, 2025
74f9ea1
wc: Display tags in cohort summary #TASK-7880 #TASK-7733
jmjuanes Sep 11, 2025
376749c
wc: Add tags filter in cohort-browser #TASK-7880 #TASK-7733
jmjuanes Sep 11, 2025
8fe4d24
iva: Add tags column in the default configuration of the cohort brows…
jmjuanes Sep 11, 2025
42835d8
iva: Add name and tags as default columns in cohort browser config #T…
jmjuanes Sep 11, 2025
75aaf27
iva: Add userId column in the default configuration of the job browse…
jmjuanes Sep 11, 2025
0b4a5ec
wc: Remove help message of the tags field in cohort-create form #TASK…
jmjuanes Sep 11, 2025
16013dc
wc: Remove help message of the tags field in cohort-update form #TASK…
jmjuanes Sep 11, 2025
43eca8c
wc: Add name filter in cohort browser #TASK-7880 #TASK-7733
jmjuanes Sep 11, 2025
3832d2f
iva: Add name filter in the default configuration of the cohort brows…
jmjuanes Sep 11, 2025
a352223
iva: Remove type filter in the default configuration of the cohort br…
jmjuanes Sep 11, 2025
bc424c8
wc: Remove type filter from the cohort browser #TASK-7880 #TASK-7733
jmjuanes Sep 11, 2025
d738731
wc: Fix name filter in opencga-browser-filter #TASK-7880 #TASK-7733
jmjuanes Sep 12, 2025
9089752
wc: Fix name of cohort name filter in cohort-browser #TASK-7880 #TASK…
jmjuanes Sep 12, 2025
d5b1647
wc: Allow to update cohort name in cohort-update #TASK-7880 #TASK-7733
jmjuanes Sep 12, 2025
a43d298
wc: Allow to provide a name for the cohort in cohort-create form #TAS…
jmjuanes Sep 12, 2025
d43f691
wc: Fix displaying cohort name in cohort-grid #TASK-7880 #TASK-7733
jmjuanes Sep 12, 2025
08e0be8
wc: Remove link style from cohort name field in cohort-grid #TASK-788…
jmjuanes Sep 12, 2025
8a384ff
wc: Remove cohort type and replace with the cohort name in cohort sum…
jmjuanes Sep 12, 2025
442183e
wc: Add status column in cohort-grid #TASK-7880 #TASK-7733
jmjuanes Sep 12, 2025
751f802
iva: Add status column in the default configuration of cohort browser…
jmjuanes Sep 12, 2025
9305035
pkg: Fix version in package.json #TASK-7880 #TASK-7733
jmjuanes Sep 12, 2025
7edf6e7
wc: Hide pop freq boxes when only population all is available #TASK-7…
jmjuanes Sep 16, 2025
a968d9c
wc: Allow to configure favourite cohorts in variant browser filters #…
jmjuanes Sep 16, 2025
d23ed58
wc: Allow to display cohorts that contains a specific tag as favourit…
jmjuanes Sep 16, 2025
77f795b
wc: Remove commented code in cohort stats filter #TASK-7880 #TASK-7733
jmjuanes Sep 16, 2025
c7ce5ff
wc: Add action to open folder in the file-grid #TASK-7880 #TASK-7733
jmjuanes Sep 17, 2025
8efad43
wc: Register open-folder action in file-grid #TASK-7880 #TASK-7733
jmjuanes Sep 17, 2025
cf024b1
iva: Remove not used configuration of opencga #TASK-7880 #TASK-7733
jmjuanes Sep 17, 2025
7ce9627
iva: Add cellbase supported versions in config.js #TASK-7880 #TASK-7733
jmjuanes Sep 17, 2025
6e52177
iva: Fix cellbase supported versions configuration #TASK-7880 #TASK-7733
jmjuanes Sep 17, 2025
65fc453
wc: Initialize method to get cellbase links in actions menu #TASK-788…
jmjuanes Sep 17, 2025
7a86a64
wc: Displaying all avaialble cellbase links in actions menu of varian…
jmjuanes Sep 17, 2025
9070b0d
wc: Include dataRelease in the cellbase links #TASK-7880 #TASK-7733
jmjuanes Sep 17, 2025
2fa7d21
core: Support including dataRelease and apiKey in cellbase generated …
jmjuanes Sep 17, 2025
d97cc3c
wc: Remove commented code in vairant browser grid #TASK-7880 #TASK-7733
jmjuanes Sep 17, 2025
4924d09
core: Fix arguments of method to get cellbase variant link #TASK-7880…
jmjuanes Sep 17, 2025
5f0629c
wc: Include cellbase apiKey only in current cellbase version #TASK-78…
jmjuanes Sep 17, 2025
e26ea2d
wc: Fix including apikey in cellbase action links #TASK-7880 #TASK-7733
jmjuanes Sep 17, 2025
44659d6
wc: Include links to cellbase in variant interpreter grid #TASK-7880 …
jmjuanes Sep 17, 2025
eec29c5
wc: Minor fixes in variant browser configuration #TASK-7880 #TASK-7733
jmjuanes Sep 17, 2025
42b5ce9
wc: Include check to verify that cellbase is configured #TASK-7880 #T…
jmjuanes Sep 17, 2025
b9420fd
iva: Remove unused cellbase initialization in iva-app #TASK-7880 #TAS…
jmjuanes Sep 17, 2025
c7e3d63
test: Add missing cellbase config initialization #TASK-7880 #TASK-7733
jmjuanes Sep 17, 2025
040a516
test: Remove unused cellbase initialization in test-app #TASK-7880 #T…
jmjuanes Sep 17, 2025
ee6b589
wc: add cohort view link to sample-grid
imedina Sep 22, 2025
6c77eca
wc: remove some 'ID' suffixes in filters and columns
imedina Sep 22, 2025
fa35f1a
wc: implement a variantStatus formatter
imedina Sep 22, 2025
bbc2a6d
wc: improve status column in file-grid
imedina Sep 22, 2025
15e0422
wc: sample variant browser must check if VCF files are READY when add…
imedina Sep 23, 2025
044024d
Merge branch 'develop' into TASK-7733
jmjuanes Oct 27, 2025
79c74d1
wc: fix bug when internal variant index is not defined #TASK-7733
jmjuanes Oct 27, 2025
ccc3c91
wc: change dispatched event name in tags-input #TASK-7733
jmjuanes Oct 30, 2025
dca459f
wc: fix tags-input event name in cohort components #TASK-7733
jmjuanes Oct 30, 2025
8f34430
config: update browser settings to changes in cohort and job columns …
jmjuanes Oct 30, 2025
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
2 changes: 1 addition & 1 deletion cypress/e2e/iva/cohort-browser-grid.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ context("Cohort Browser Grid", () => {
});

it("should allow to hide columns in the grid", () => {
const columns = ["Cohort ID", "Creation Date"];
const columns = ["Cohort", "Creation Date"];

cy.get("@cohort-grid")
.find("thead th")
Expand Down
5 changes: 2 additions & 3 deletions cypress/e2e/iva/variant-browser-grid.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -270,9 +270,8 @@ context("Variant Browser Grid", () => {
const externalLinks = [
["Decipher", "https://www.deciphergenomics.org/sequence-variant/"],
["Varsome", "https://varsome.com/variant/"],
["CellBase v5.2", "https://ws.zettagenomics.com/cellbase/webservices/rest/v5.2"],
["CellBase v5.8", "https://ws.zettagenomics.com/cellbase/webservices/rest/v5.8"],
["Ensembl Genome Browser", "http://ensembl.org/Homo_sapiens/Location/View"],
["CellBase", "https://ws.zettagenomics.com/cellbase/webservices/rest"],
["Ensembl Genome Browser", "https://www.ensembl.org/Homo_sapiens/Location/View"],
["UCSC Genome Browser", "https://genome.ucsc.edu/cgi-bin/hgTracks"],
];

Expand Down
109 changes: 67 additions & 42 deletions src/core/bioinfo/bioinfo-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@

export default class BioinfoUtils {

static isHuman(species) {
return ["hsapiens", "homo_sapiens", "homosapiens", "human"].includes(species.toLowerCase());
}

static getEnsemblHost(assembly = "GRCh38") {
return (assembly.toLowerCase() === "grch37") ? "https://grch37.ensembl.org" : "https://www.ensembl.org";
}

static sort(consequenceTypes, field) {
consequenceTypes.sort((a, b) => {
if (field(a) === "" && field(b) !== "") {
Expand Down Expand Up @@ -62,16 +70,21 @@ export default class BioinfoUtils {
return "https://www.genenames.org/tools/search/#!/all?query=" + geneName;
}

static getEnsemblLink(featureId, type = "gene", assembly = "GRCh38") {
const ensemblHost = assembly.toUpperCase() === "GRCH38" ? "www.ensembl.org" : "grch37.ensembl.org";
// Note: currently only human and mouse are supported
static getEnsemblLink(featureId, type = "gene", species = "hsapiens", assembly = "GRCh38") {
const ensemblHost = BioinfoUtils.getEnsemblHost(assembly);
const ensemblSpecies = BioinfoUtils.isHuman(species) ? "Homo_sapiens" : "Mus_musculus";
switch (type.toUpperCase()) {
case "GENE":
return `https://${ensemblHost}/Homo_sapiens/Gene/Summary?db=core;g=${featureId}`;
return `${ensemblHost}/${ensemblSpecies}/Gene/Summary?db=core;g=${featureId}`;
case "TRANSCRIPT":
return `https://${ensemblHost}/Homo_sapiens/Transcript/Summary?db=core;t=${featureId}`;
return `${ensemblHost}/${ensemblSpecies}/Transcript/Summary?db=core;t=${featureId}`;
case "VARIANT":
case "VARIATION":
return `https://${ensemblHost}/Homo_sapiens/Variation/Explore?vdb=variation;v=${featureId}`;
return `${ensemblHost}/${ensemblSpecies}/Variation/Explore?vdb=variation;v=${featureId}`;
case "LOCATION":
case "BROWSER":
return `${ensemblHost}/${ensemblSpecies}/Location/View?r=${featureId}`;
}
return "";
}
Expand All @@ -92,28 +105,23 @@ export default class BioinfoUtils {
return "https://www.ncbi.nlm.nih.gov/clinvar/variation/" + variantId;
}

static getUniprotLink(featureId, species = "Homo sapiens") {
// return "https://www.uniprot.org/uniprot/?sort=score&query=" + featureId + "+organism:" + species;
return "https://www.uniprot.org/uniprot/" + featureId;
static getUniprotLink(featureId) {
return `https://www.uniprot.org/uniprotkb?query=${featureId}`;
}

static getVariantLink(id, location, source, assembly) {
static getVariantLink(id, location, source, species = "hsapiens", assembly = "grch38") {
if (!source) {
return null;
}

// Check for cellbase source
// Check for CellBase source
if (source.toUpperCase().startsWith("CELLBASE_V")) {
const version = source.toUpperCase().replace("CELLBASE_", "").toLowerCase();
return `https://ws.zettagenomics.com/cellbase/webservices/rest/${version}/hsapiens/genomic/variant/${id}/annotation`;
return BioinfoUtils.getCellbaseVariantLink(id, "https://ws.zettagenomics.com/cellbase", version, "", "", species, assembly);
}

if (id?.startsWith("rs")) {
if (assembly?.toUpperCase() === "GRCH38") {
return `http://ensembl.org/Homo_sapiens/Variation/Explore?vdb=variation;v=${id}`;
} else {
return `http://grch37.ensembl.org/Homo_sapiens/Variation/Explore?vdb=variation;v=${id}`;
}
return BioinfoUtils.getEnsemblLink(id, "VARIATION", species, assembly);
}

if (id?.startsWith("HGNC:")) {
Expand All @@ -126,27 +134,20 @@ export default class BioinfoUtils {

switch (source.toUpperCase()) {
case "DECIPHER":
// To make things easier the conversion of OpenCB Variant ID to Decipher ID must happen here
// To make things easier, the conversion of OpenCB Variant ID to Decipher ID must happen here
const decipherId = id.replace(/:/g, "-");
return `https://www.deciphergenomics.org/sequence-variant/${decipherId}`;
case "ENSEMBL_GENOME_BROWSER":
if (assembly?.toUpperCase() === "GRCH38") {
return `http://ensembl.org/Homo_sapiens/Location/View?r=${region}`;
} else {
return `http://grch37.ensembl.org/Homo_sapiens/Location/View?r=${region}`;
}
return BioinfoUtils.getEnsemblLink(region, "BROWSER", species, assembly);
case "UCSC_GENOME_BROWSER":
return `https://genome.ucsc.edu/cgi-bin/hgTracks?db=hg38&position=chr${region}`;
const hg = assembly?.toUpperCase() === "GRCH38" ? "hg38" : "hg19";
return `https://genome.ucsc.edu/cgi-bin/hgTracks?db=${hg}&position=chr${region}`;
case "VARSOME":
if (assembly?.toUpperCase() === "GRCH38") {
return `https://varsome.com/variant/hg38/${BioinfoUtils.getVariantInVarsomeFormat(id)}`;
} else {
return `https://varsome.com/variant/hg19/${BioinfoUtils.getVariantInVarsomeFormat(id)}`;
}
return `https://varsome.com/variant/${assembly?.toUpperCase() === "GRCH38" ? "hg38" : "hg19"}/${BioinfoUtils.getVariantInVarsomeFormat(id)}`;
}
}

static getGeneLink(geneId, source, assembly = "GRCh38") {
static getGeneLink(geneId, source, species = "hsapiens", assembly = "GRCh38") {
if (!geneId) {
return null;
}
Expand All @@ -158,15 +159,9 @@ export default class BioinfoUtils {

switch (s.toUpperCase()) {
case "ENSEMBL":
if (assembly.toUpperCase() === "GRCH38") {
return `https://www.ensembl.org/Homo_sapiens/Gene/Summary?db=core;g=${geneId}`;
} else {
return `https://grch37.ensembl.org/Homo_sapiens/Gene/Summary?db=core;g=${geneId}`;
}
return BioinfoUtils.getEnsemblLink(geneId, "GENE", species, assembly);
case "HGNC":
return "https://www.genenames.org/tools/search/#!/all?query=" + geneId;
case "LRG":
return `https://www.lrg-sequence.org/search/?query=${geneId}`;
case "DECIPHER":
return `https://www.deciphergenomics.org/gene/${geneId}`;
case "COSMIC":
Expand Down Expand Up @@ -200,11 +195,7 @@ export default class BioinfoUtils {

switch (s.toUpperCase()) {
case "ENSEMBL":
if (assembly.toUpperCase() === "GRCH38") {
return `https://www.ensembl.org/Homo_sapiens/Transcript/Summary?db=core;t=${transcriptId}`;
} else {
return `https://grch37.ensembl.org/Homo_sapiens/Transcript/Summary?db=core;t=${transcriptId}`;
}
return BioinfoUtils.getEnsemblLink(transcriptId, "TRANSCRIPT", "hsapiens", assembly);
case "REFSEQ":
return `https://www.ncbi.nlm.nih.gov/gene/?term=${transcriptId}`;
}
Expand All @@ -222,7 +213,7 @@ export default class BioinfoUtils {

switch (s.toUpperCase()) {
case "ENSEMBL":
return `http://www.ensembl.org/Homo_sapiens/Transcript/Summary?db=core;p=${proteinId}`;
return BioinfoUtils.getEnsemblLink(proteinId, "PROTEIN", "hsapiens", "");
case "REFSEQ":
return `https://www.ncbi.nlm.nih.gov/gene/?term=${proteinId}`;
}
Expand Down Expand Up @@ -304,4 +295,38 @@ export default class BioinfoUtils {
return `https://www.pharmgkb.org/chemical/${pharmGKBId}`;
}

static getCellbaseLink(id, type = "VARIANT", host = "https://ws.zettagenomics.com/cellbase", version = "v5", dataRelease = "", apiKey = "", species = "hsapiens", assembly) {
let url = `${host}/webservices/rest/${version}/${species}`;
const searchParams = new URLSearchParams();

// 1. check the resource to generate the correct URL
switch (type?.toUpperCase()) {
case "VARIANT":
url = `${url}/genomic/variant/${id}/annotation`;
break;
}

// 2. check if dataRelease is provided
if (dataRelease) {
searchParams.append("dataRelease", dataRelease);
}

// 3. check if apiKey is provided
if (apiKey) {
searchParams.append("apiKey", apiKey);
}

// 4. add assembly if provided
if (assembly) {
searchParams.append("assembly", assembly);
}

return searchParams.size > 0 ? `${url}?${searchParams.toString()}` : url;
}

// alias to getCellbaseLink with type VARIANT
static getCellbaseVariantLink(id, host, version, dataRelease, apiKey, species, assembly) {
return BioinfoUtils.getCellbaseLink(id, "VARIANT", host, version, dataRelease, apiKey, species, assembly);
}

}
17 changes: 15 additions & 2 deletions src/core/clients/opencga/opencga-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -462,10 +462,23 @@ export class OpenCGAClient {
study: study.fqn,
internalStatus: "READY,CALCULATING,INVALID",
exclude: "samples",
limit: 100,
limit: 250,
});

// Sort cohorts alphabetically, but "ALL" first
study.cohorts = cohortsResponse.responses[0].results
.filter(cohort => !cohort.attributes?.IVA?.ignore);
.filter(cohort => !cohort.attributes?.IVA?.ignore)
// FIXME line above should check cohort.internal instead
// .filter(cohort => cohort.internal.index?.status === "READY");
.sort((a, b) => {
if (a.id === "ALL") {
return -1;
} else if (b.id === "ALL") {
return 1;
} else {
return a.id.localeCompare(b.id);
}
});

// Keep track of the studies to fetch Disease Panels
studies.push(study.fqn);
Expand Down
6 changes: 3 additions & 3 deletions src/sites/iva/conf/browsers.settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const CATALOG_SETTINGS = {
// merge criterium: internal sections and filters are used to hydrates the external filters list for each section (which is a list of string). Sections and filter order is respected.
sections: [
{
filters: ["id", "samples", "type", "date", "annotations"]
filters: ["id", "name", "samples", "tags", "date", "annotations"],
}
],
// merge criterium: full outer join-like. it adds objects presents in internal array only and in external array only. In case of same id, the external value overwrite the internal.
Expand All @@ -71,7 +71,7 @@ const CATALOG_SETTINGS = {
},
// merge criterium: uses this array as filter for internal 1D/2D array. It handles row/col span
// It is supported either columns[] or hiddenColumns[].
columns: ["id", "numSamples", "creationDate", "type"]
columns: ["id", "name", "tags", "numSamples", "creationDate", "status"],
},
// merge criterium: uses this array as filter for internal 1D array.
details: ["cohort-view", "sample-view", "json-view"]
Expand Down Expand Up @@ -181,7 +181,7 @@ const CATALOG_SETTINGS = {
// merge criterium: internal sections and filters are used to hydrates the external filters list for each section (which is a list of string). Sections and filter order is respected.
sections: [
{
filters: ["id", "tool", "input", "internalStatus", "priority", "tags", "creationDate", "visited"]
filters: ["id", "tool", "input", "internalStatus", "userId", "priority", "tags", "creationDate", "visited"]
}
],
// merge criterium: full outer join-like. it adds objects presents in internal array only and in external array only. In case of same id, the external value overwrite the internal.
Expand Down
60 changes: 15 additions & 45 deletions src/sites/iva/conf/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const hosts = [
},
{
id: "reference",
url: "https://test.app.zettagenomics.com/task-7706/opencga"
url: "https://test.app.zettagenomics.com/task-7733/opencga"
},
];

Expand All @@ -42,51 +42,21 @@ const opencga = {
active: false,
cookie: "JSESSIONID"
},
};

// This forces the following projects to be used instead of the user's project
// projects: [
// {
// id: "platinum",
// name: "Platinum",
// alias: "platinum",
// organism: {
// scientificName: "Homo sapiens",
// assembly: "GRCh37"
// },
// studies : [
// {
// id: "illumina_platinum",
// name: "Illumina Platinum",
// alias: "illumina_platinum"
// }
// ]
// }
// ],

// This allows IVA to query a OpenCGA instance being an 'anonymous' user, this means that no login is required.
// If 'projects' is empty then all public projects and studies of 'user' will be used.
// anonymous: {
// // user: "hgvauser",
// projects: [
// {
// id: "platinum",
// name: "Platinum",
// alias: "platinum",
// organism: {
// scientificName: "Homo sapiens",
// assembly: "GRCh37"
// },
// studies : [
// {
// id: "illumina_platinum",
// name: "Illumina Platinum",
// alias: "illumina_platinum"
// }
// ]
// }
// ]
// },
// summary: true,
const CELLBASE = {
supportedVersions: [
{
host: "https://ws.zettagenomics.com/cellbase",
version: "v5.2",
dataRelease: 3,
},
{
host: "https://ws.zettagenomics.com/cellbase",
version: "v5.8",
dataRelease: 7,
},
],
};

const SUITE = {
Expand Down
4 changes: 2 additions & 2 deletions src/sites/iva/conf/opencga-cohort-browser.settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const OPENCGA_COHORT_BROWSER_SETTINGS = {
// merge criterium: internal sections and filters are used to hydrates the external filters list for each section (which is a list of string). Sections and filter order is respected.
sections: [
{
filters: ["id", "samples", "type", "date", "annotations"]
filters: ["id", "name", "samples", "tags", "date", "annotations"]
}
],
// merge criterium: full outer join-like. it adds objects presents in internal array only and in external array only. In case of same id, the external value overwrite the internal.
Expand All @@ -24,7 +24,7 @@ const OPENCGA_COHORT_BROWSER_SETTINGS = {
},
// merge criterium: uses this array as filter for internal 1D/2D array. It handles row/col span
// It is supported either columns[] or hiddenColumns[].
columns: ["id", "numSamples", "creationDate", "type"]
columns: ["id", "name", "tags", "numSamples", "creationDate", "status"]
},
// merge criterium: uses this array as filter for internal 1D array.
details: ["cohort-view", "sample-view", "json-view"]
Expand Down
16 changes: 8 additions & 8 deletions src/sites/iva/conf/opencga-individual-browser.settings.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
const OPENCGA_INDIVIDUAL_BROWSER_SETTINGS = {
/**
* Full settings
*/

// TODO clinical-analysis-grid has no action column here

// model: {
// disorders: {
// source: "HPO",
// },
// phenotypes: {
// source: "HPO",
// },
// },
menu: {
// merge criterium: internal sections and filters are used to hydrates the external filters list for each section (which is a list of string). Sections and filter order is respected.
sections: [
Expand Down Expand Up @@ -44,6 +46,4 @@ const OPENCGA_INDIVIDUAL_BROWSER_SETTINGS = {
// }
// ]
},
// merge criterium: uses this array as filter for internal 1D array.
details: ["individual-view", "clinical-analysis-grid", "individual-inferred-sex", "individual-mendelian-error", "json-view"]
};
2 changes: 1 addition & 1 deletion src/sites/iva/conf/opencga-job-browser.settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const OPENCGA_JOB_BROWSER_SETTINGS = {
// merge criterium: internal sections and filters are used to hydrates the external filters list for each section (which is a list of string). Sections and filter order is respected.
sections: [
{
filters: ["id", "tool", "input", "internalStatus", "priority", "tags", "creationDate", "visited"]
filters: ["id", "tool", "input", "internalStatus", "userId", "priority", "tags", "creationDate", "visited"]
}
],
// merge criterium: full outer join-like. it adds objects presents in internal array only and in external array only. In case of same id, the external value overwrite the internal.
Expand Down
Loading
Loading