From b677b547a00bb4c30a49e33a3f30f2af45780379 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20T=C3=A1rraga=20Gim=C3=A9nez?= Date: Mon, 28 Aug 2023 11:22:00 +0200 Subject: [PATCH 1/6] core: update according to CellBase changes, #TASK-4898, #TASK-4641 --- .../alignment/AlignmentStorageManager.java | 4 +-- .../manager/VariantStorageManager.java | 4 +-- .../opencga/core/api/ParamConstants.java | 2 +- .../core/cellbase/CellBaseValidator.java | 17 +++++------ .../config/storage/CellBaseConfiguration.java | 29 +++++++++++++----- .../core/variant/VariantStorageEngine.java | 2 +- .../AbstractCellBaseVariantAnnotator.java | 2 +- .../CellBaseRestVariantAnnotator.java | 4 +-- ...java => VariantAnnotatorByApiKeyTest.java} | 30 +++++++++---------- .../annotators/VariantAnnotatorTest.java | 11 ++----- 10 files changed, 57 insertions(+), 48 deletions(-) rename opencga-storage/opencga-storage-core/src/test/java/org/opencb/opencga/storage/core/variant/annotation/annotators/{VariantAnnotatorByTokenTest.java => VariantAnnotatorByApiKeyTest.java} (87%) diff --git a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/alignment/AlignmentStorageManager.java b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/alignment/AlignmentStorageManager.java index 38953f5ff7f..fd8a0cebad5 100644 --- a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/alignment/AlignmentStorageManager.java +++ b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/alignment/AlignmentStorageManager.java @@ -230,7 +230,7 @@ public OpenCGAResult coverageStats(String studyIdStr, String String species = projectQueryResult.first().getOrganism().getScientificName(); String assembly = projectQueryResult.first().getOrganism().getAssembly(); String dataRelease = projectQueryResult.first().getCellbase().getDataRelease(); - String cellbaseToken = projectQueryResult.first().getCellbase().getToken(); + String cellbaseToken = projectQueryResult.first().getCellbase().getApiKey(); for (String geneName : geneNames) { @@ -451,7 +451,7 @@ public List mergeRegions(List regions, List genes, boole String species = projectQueryResult.first().getOrganism().getScientificName(); String assembly = projectQueryResult.first().getOrganism().getAssembly(); String dataRelease = projectQueryResult.first().getCellbase().getDataRelease(); - String cellbaseToken = projectQueryResult.first().getCellbase().getToken(); + String cellbaseToken = projectQueryResult.first().getCellbase().getApiKey(); CellBaseClient cellBaseClient = new CellBaseClient(species, assembly, dataRelease, cellbaseToken, projectQueryResult.first().getCellbase().toClientConfiguration()); GeneClient geneClient = cellBaseClient.getGeneClient(); diff --git a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/manager/VariantStorageManager.java b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/manager/VariantStorageManager.java index 806fbb6d818..b017ec0698c 100644 --- a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/manager/VariantStorageManager.java +++ b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/manager/VariantStorageManager.java @@ -1017,8 +1017,8 @@ private void setCellbaseConfiguration(VariantStorageEngine engine, String projec .get(project, new QueryOptions(INCLUDE, ProjectDBAdaptor.QueryParams.CELLBASE.key()), token) .first().getCellbase(); if (cellbase != null) { - if (StringUtils.isEmpty(cellbase.getToken()) || storageConfiguration.getCellbase() != null) { - cellbase.setToken(storageConfiguration.getCellbase().getToken()); + if (StringUtils.isEmpty(cellbase.getApiKey()) || storageConfiguration.getCellbase() != null) { + cellbase.setApiKey(storageConfiguration.getCellbase().getApiKey()); } engine.getConfiguration().setCellbase(cellbase); engine.reloadCellbaseConfiguration(); diff --git a/opencga-core/src/main/java/org/opencb/opencga/core/api/ParamConstants.java b/opencga-core/src/main/java/org/opencb/opencga/core/api/ParamConstants.java index b65214a9ba4..b1e57dbc24a 100644 --- a/opencga-core/src/main/java/org/opencb/opencga/core/api/ParamConstants.java +++ b/opencga-core/src/main/java/org/opencb/opencga/core/api/ParamConstants.java @@ -76,7 +76,7 @@ public class ParamConstants { public static final String CELLBASE_URL = "https://ws.zettagenomics.com/cellbase"; public static final String CELLBASE_VERSION = "v5.1"; public static final String CELLBASE_DATA_RELEASE = "2"; - public static final String CELLBASE_TOKEN = ""; + public static final String CELLBASE_APIKEY = ""; public static final String POP_FREQ_1000G_CB_V4 = "1kG_phase3"; public static final String POP_FREQ_1000G_CB_V5 = "1000G"; diff --git a/opencga-core/src/main/java/org/opencb/opencga/core/cellbase/CellBaseValidator.java b/opencga-core/src/main/java/org/opencb/opencga/core/cellbase/CellBaseValidator.java index 21f5c79fecd..83f1bd9e311 100644 --- a/opencga-core/src/main/java/org/opencb/opencga/core/cellbase/CellBaseValidator.java +++ b/opencga-core/src/main/java/org/opencb/opencga/core/cellbase/CellBaseValidator.java @@ -2,12 +2,11 @@ import org.apache.commons.lang3.StringUtils; import org.opencb.cellbase.client.rest.CellBaseClient; +import org.opencb.cellbase.core.api.key.ApiKeyManager; import org.opencb.cellbase.core.config.SpeciesConfiguration; import org.opencb.cellbase.core.config.SpeciesProperties; import org.opencb.cellbase.core.models.DataRelease; import org.opencb.cellbase.core.result.CellBaseDataResponse; -import org.opencb.cellbase.core.token.DataAccessTokenManager; -import org.opencb.cellbase.core.token.DataAccessTokenSources; import org.opencb.opencga.core.common.VersionUtils; import org.opencb.opencga.core.config.storage.CellBaseConfiguration; import org.slf4j.Logger; @@ -69,13 +68,13 @@ public String getDataRelease() { return cellBaseClient.getDataRelease(); } - public String getToken() { - return cellBaseClient.getToken(); + public String getApiKey() { + return cellBaseClient.getApiKey(); } - public DataAccessTokenSources getTokenSources() { - DataAccessTokenManager tokenManager = new DataAccessTokenManager(); - return tokenManager.decode(cellBaseClient.getToken()); + public List getApiKeyDataSources() { + ApiKeyManager apiKeyManager = new ApiKeyManager(); + return new ArrayList<>(apiKeyManager.getValidSources(cellBaseClient.getApiKey())); } public String getURL() { @@ -91,7 +90,7 @@ public CellBaseClient getCellBaseClient() { } public CellBaseConfiguration getCellBaseConfiguration() { - return new CellBaseConfiguration(getURL(), getVersion(), getDataRelease(), getToken()); + return new CellBaseConfiguration(getURL(), getVersion(), getDataRelease(), getApiKey()); } public String getDefaultDataRelease() throws IOException { @@ -281,7 +280,7 @@ public String toString() { + "species '" + getSpecies() + "', " + "assembly '" + getAssembly() + "', " + "dataRelease '" + getDataRelease() + "', " - + "token '" + getToken() + "'"; + + "token '" + getApiKey() + "'"; } } diff --git a/opencga-core/src/main/java/org/opencb/opencga/core/config/storage/CellBaseConfiguration.java b/opencga-core/src/main/java/org/opencb/opencga/core/config/storage/CellBaseConfiguration.java index 9a392c88168..1818beb363c 100644 --- a/opencga-core/src/main/java/org/opencb/opencga/core/config/storage/CellBaseConfiguration.java +++ b/opencga-core/src/main/java/org/opencb/opencga/core/config/storage/CellBaseConfiguration.java @@ -42,9 +42,13 @@ public class CellBaseConfiguration { @DataField(id = "dataRelease", description = "CellBase data release version to be used. If empty, will use the active one") private String dataRelease; - @DataField(id = "token", description = "CellBase token to access to the licensed/restricted data sources such as COSMIC, HGMD,...") + @Deprecated + @DataField(id = "token", deprecated = true, description = "CellBase token to access to the licensed/restricted data sources such as COSMIC, HGMD,...") private String token; + @DataField(id = "apiKey", description = "API key to access to the licensed/restricted data sources (COSMIC, HGMD,...) and to manage quota.") + private String apiKey; + public CellBaseConfiguration() { this(ParamConstants.CELLBASE_URL, ParamConstants.CELLBASE_VERSION); } @@ -54,11 +58,12 @@ public CellBaseConfiguration(String url, String version) { this.version = version; } - public CellBaseConfiguration(String url, String version, String dataRelease, String token) { + public CellBaseConfiguration(String url, String version, String dataRelease, String apiKey) { this.url = url; this.version = version; this.dataRelease = dataRelease; - this.token = token; + this.token = apiKey; + this.apiKey = apiKey; } @Override @@ -68,6 +73,7 @@ public String toString() { sb.append(", version='").append(version).append('\''); sb.append(", dataRelease='").append(dataRelease).append('\''); sb.append(", token='").append(token).append('\''); + sb.append(", apiKey='").append(apiKey).append('\''); sb.append('}'); return sb.toString(); } @@ -99,12 +105,21 @@ public CellBaseConfiguration setDataRelease(String dataRelease) { return this; } - public String getToken() { - return token; +// public String getToken() { +// return apiKey; +// } +// +// public CellBaseConfiguration setToken(String token) { +// this.apiKey = token; +// return this; +// } + + public String getApiKey() { + return apiKey; } - public CellBaseConfiguration setToken(String token) { - this.token = token; + public CellBaseConfiguration setApiKey(String apiKey) { + this.apiKey = apiKey; return this; } diff --git a/opencga-storage/opencga-storage-core/src/main/java/org/opencb/opencga/storage/core/variant/VariantStorageEngine.java b/opencga-storage/opencga-storage-core/src/main/java/org/opencb/opencga/storage/core/variant/VariantStorageEngine.java index c3c27c26c35..a4f560e49f2 100644 --- a/opencga-storage/opencga-storage-core/src/main/java/org/opencb/opencga/storage/core/variant/VariantStorageEngine.java +++ b/opencga-storage/opencga-storage-core/src/main/java/org/opencb/opencga/storage/core/variant/VariantStorageEngine.java @@ -1117,7 +1117,7 @@ public CellBaseUtils getCellBaseUtils() throws StorageEngineException { } species = toCellBaseSpeciesName(species); cellBaseUtils = new CellBaseUtils(new CellBaseClient(species, assembly, configuration.getCellbase().getDataRelease(), - configuration.getCellbase().getToken(), clientConfiguration)); + configuration.getCellbase().getApiKey(), clientConfiguration)); } return cellBaseUtils; } diff --git a/opencga-storage/opencga-storage-core/src/main/java/org/opencb/opencga/storage/core/variant/annotation/annotators/AbstractCellBaseVariantAnnotator.java b/opencga-storage/opencga-storage-core/src/main/java/org/opencb/opencga/storage/core/variant/annotation/annotators/AbstractCellBaseVariantAnnotator.java index 320c909c33a..fc743b13a76 100644 --- a/opencga-storage/opencga-storage-core/src/main/java/org/opencb/opencga/storage/core/variant/annotation/annotators/AbstractCellBaseVariantAnnotator.java +++ b/opencga-storage/opencga-storage-core/src/main/java/org/opencb/opencga/storage/core/variant/annotation/annotators/AbstractCellBaseVariantAnnotator.java @@ -72,7 +72,7 @@ public AbstractCellBaseVariantAnnotator(StorageConfiguration storageConfiguratio assembly = projectMetadata.getAssembly(); cellbaseVersion = storageConfiguration.getCellbase().getVersion(); cellbaseDataRelease = storageConfiguration.getCellbase().getDataRelease(); - cellbaseToken = storageConfiguration.getCellbase().getToken(); + cellbaseToken = storageConfiguration.getCellbase().getApiKey(); queryOptions = new QueryOptions(); if (StringUtils.isNotEmpty(params.getString(VariantStorageOptions.ANNOTATOR_CELLBASE_INCLUDE.key()))) { diff --git a/opencga-storage/opencga-storage-core/src/main/java/org/opencb/opencga/storage/core/variant/annotation/annotators/CellBaseRestVariantAnnotator.java b/opencga-storage/opencga-storage-core/src/main/java/org/opencb/opencga/storage/core/variant/annotation/annotators/CellBaseRestVariantAnnotator.java index 889cba2f42a..85ee3b0810c 100644 --- a/opencga-storage/opencga-storage-core/src/main/java/org/opencb/opencga/storage/core/variant/annotation/annotators/CellBaseRestVariantAnnotator.java +++ b/opencga-storage/opencga-storage-core/src/main/java/org/opencb/opencga/storage/core/variant/annotation/annotators/CellBaseRestVariantAnnotator.java @@ -113,8 +113,8 @@ public ProjectMetadata.VariantAnnotationMetadata getVariantAnnotationMetadata() + getDebugInfo("/meta/" + species + "/dataReleases") + ". "); } List privateSources; - if (StringUtils.isNotEmpty(cellBaseUtils.getToken())) { - privateSources = new ArrayList<>(cellBaseUtils.getTokenSources().getSources().keySet()); + if (StringUtils.isNotEmpty(cellBaseUtils.getApiKey())) { + privateSources = cellBaseUtils.getApiKeyDataSources(); } else { privateSources = new ArrayList<>(); } diff --git a/opencga-storage/opencga-storage-core/src/test/java/org/opencb/opencga/storage/core/variant/annotation/annotators/VariantAnnotatorByTokenTest.java b/opencga-storage/opencga-storage-core/src/test/java/org/opencb/opencga/storage/core/variant/annotation/annotators/VariantAnnotatorByApiKeyTest.java similarity index 87% rename from opencga-storage/opencga-storage-core/src/test/java/org/opencb/opencga/storage/core/variant/annotation/annotators/VariantAnnotatorByTokenTest.java rename to opencga-storage/opencga-storage-core/src/test/java/org/opencb/opencga/storage/core/variant/annotation/annotators/VariantAnnotatorByApiKeyTest.java index 0faf42d6cb7..806a75df2fb 100644 --- a/opencga-storage/opencga-storage-core/src/test/java/org/opencb/opencga/storage/core/variant/annotation/annotators/VariantAnnotatorByTokenTest.java +++ b/opencga-storage/opencga-storage-core/src/test/java/org/opencb/opencga/storage/core/variant/annotation/annotators/VariantAnnotatorByApiKeyTest.java @@ -21,7 +21,7 @@ import static org.junit.Assert.assertEquals; import static org.opencb.opencga.storage.core.variant.VariantStorageOptions.ANNOTATOR_CELLBASE_INCLUDE; -public class VariantAnnotatorByTokenTest { +public class VariantAnnotatorByApiKeyTest { private StorageConfiguration storageConfiguration; @@ -36,7 +36,7 @@ public void setUp() throws Exception { storageConfiguration.getCellbase().setUrl(url); storageConfiguration.getCellbase().setDataRelease("1"); storageConfiguration.getCellbase().setVersion("v5.3"); - storageConfiguration.getCellbase().setToken(null); + storageConfiguration.getCellbase().setApiKey(null); CellBaseUtils cellBaseUtils = new CellBaseUtils(new CellBaseClient(storageConfiguration.getCellbase().toClientConfiguration())); try { @@ -47,7 +47,7 @@ public void setUp() throws Exception { } @Test - public void testNoToken() throws Exception { + public void testNoApiKey() throws Exception { projectMetadata = new ProjectMetadata("hsapiens", "grch37", "1", 1, null, null, null); ObjectMap options = new ObjectMap(VariantStorageOptions.ANNOTATOR.key(), "cellbase"); CellBaseRestVariantAnnotator annotator = new CellBaseRestVariantAnnotator(storageConfiguration, projectMetadata, options); @@ -61,11 +61,11 @@ public void testNoToken() throws Exception { } @Test - public void testCOSMICToken() throws Exception { - String cosmicToken = System.getenv("CELLBASE_COSMIC_TOKEN"); - Assume.assumeTrue(StringUtils.isNotEmpty(cosmicToken)); + public void testCOSMICApiKey() throws Exception { + String apiKey = System.getenv("CELLBASE_COSMIC_APIKEY"); + Assume.assumeTrue(StringUtils.isNotEmpty(apiKey)); - storageConfiguration.getCellbase().setToken(cosmicToken); + storageConfiguration.getCellbase().setApiKey(apiKey); projectMetadata = new ProjectMetadata("hsapiens", "grch37", "1", 1, null, null, null); ObjectMap options = new ObjectMap(VariantStorageOptions.ANNOTATOR.key(), "cellbase"); CellBaseRestVariantAnnotator annotator = new CellBaseRestVariantAnnotator(storageConfiguration, projectMetadata, options); @@ -80,11 +80,11 @@ public void testCOSMICToken() throws Exception { } @Test - public void testHGMDToken() throws Exception { - String hgmdToken = System.getenv("CELLBASE_HGMD_TOKEN"); - Assume.assumeTrue(StringUtils.isNotEmpty(hgmdToken)); + public void testHGMDApiKey() throws Exception { + String apiKey = System.getenv("CELLBASE_HGMD_APIKEY"); + Assume.assumeTrue(StringUtils.isNotEmpty(apiKey)); - storageConfiguration.getCellbase().setToken(hgmdToken); + storageConfiguration.getCellbase().setApiKey(apiKey); projectMetadata = new ProjectMetadata("hsapiens", "grch37", "1", 1, null, null, null); ObjectMap options = new ObjectMap(VariantStorageOptions.ANNOTATOR.key(), "cellbase"); CellBaseRestVariantAnnotator annotator = new CellBaseRestVariantAnnotator(storageConfiguration, projectMetadata, options); @@ -99,11 +99,11 @@ public void testHGMDToken() throws Exception { } @Test - public void testCOSMICandHGMDToken() throws Exception { - String token = System.getenv("CELLBASE_TOKEN"); - Assume.assumeTrue(StringUtils.isNotEmpty(token)); + public void testCOSMICandHGMDApiKey() throws Exception { + String apiKey = System.getenv("CELLBASE_COSMIC_HGMD_APIKEY"); + Assume.assumeTrue(StringUtils.isNotEmpty(apiKey)); - storageConfiguration.getCellbase().setToken(token); + storageConfiguration.getCellbase().setApiKey(apiKey); projectMetadata = new ProjectMetadata("hsapiens", "grch37", "1", 1, null, null, null); ObjectMap options = new ObjectMap(VariantStorageOptions.ANNOTATOR.key(), "cellbase"); diff --git a/opencga-storage/opencga-storage-core/src/test/java/org/opencb/opencga/storage/core/variant/annotation/annotators/VariantAnnotatorTest.java b/opencga-storage/opencga-storage-core/src/test/java/org/opencb/opencga/storage/core/variant/annotation/annotators/VariantAnnotatorTest.java index cf2b4201b5f..260e1840dba 100644 --- a/opencga-storage/opencga-storage-core/src/test/java/org/opencb/opencga/storage/core/variant/annotation/annotators/VariantAnnotatorTest.java +++ b/opencga-storage/opencga-storage-core/src/test/java/org/opencb/opencga/storage/core/variant/annotation/annotators/VariantAnnotatorTest.java @@ -9,20 +9,15 @@ import org.opencb.biodata.models.variant.Variant; import org.opencb.biodata.models.variant.avro.EvidenceEntry; import org.opencb.biodata.models.variant.avro.VariantAnnotation; -import org.opencb.cellbase.client.config.ClientConfiguration; -import org.opencb.cellbase.client.config.RestConfig; -import org.opencb.cellbase.client.rest.CellBaseClient; import org.opencb.cellbase.core.result.CellBaseDataResult; import org.opencb.commons.datastore.core.ObjectMap; import org.opencb.opencga.core.testclassification.duration.ShortTests; import org.opencb.opencga.storage.core.StorageEngine; import org.opencb.opencga.core.config.storage.StorageConfiguration; import org.opencb.opencga.storage.core.metadata.models.ProjectMetadata; -import org.opencb.opencga.storage.core.utils.CellBaseUtils; import org.opencb.opencga.storage.core.variant.VariantStorageOptions; import org.opencb.opencga.storage.core.variant.annotation.VariantAnnotatorException; -import java.io.IOException; import java.util.*; import static org.hamcrest.CoreMatchers.instanceOf; @@ -139,7 +134,7 @@ public void useCellBaseTokens() throws VariantAnnotatorException { assertFalse(results.get(0).getTraitAssociation().stream().anyMatch(e -> e.getSource().getName().equals("hgmd"))); // Using COSMIC token - storageConfiguration.getCellbase().setToken("eyJhbGciOiJIUzI1NiJ9.eyJzb3VyY2VzIjp7ImNvc21pYyI6OTIyMzM3MjAzNjg1NDc3NTgwN30sInZlcnNpb24iOiIxLjAiLCJzdWIiOiJaRVRUQSIsImlhdCI6MTY3NTg3MjQ2Nn0.ByfPJn8Lkh5Sow4suRZcOqVxvWZRmTBBNLDzHEIZQ5U"); + storageConfiguration.getCellbase().setApiKey("eyJhbGciOiJIUzI1NiJ9.eyJzb3VyY2VzIjp7ImNvc21pYyI6OTIyMzM3MjAzNjg1NDc3NTgwN30sInZlcnNpb24iOiIxLjAiLCJzdWIiOiJaRVRUQSIsImlhdCI6MTY3NTg3MjQ2Nn0.ByfPJn8Lkh5Sow4suRZcOqVxvWZRmTBBNLDzHEIZQ5U"); variantAnnotator = VariantAnnotatorFactory.buildVariantAnnotator(storageConfiguration, projectMetadata, options); results = variantAnnotator.annotate(Collections.singletonList(new Variant("10:113588287:G:A"))); assertEquals(1, results.size()); @@ -148,7 +143,7 @@ public void useCellBaseTokens() throws VariantAnnotatorException { assertFalse(results.get(0).getTraitAssociation().stream().anyMatch(e -> e.getSource().getName().equals("hgmd"))); // Using HGMD token - storageConfiguration.getCellbase().setToken("eyJhbGciOiJIUzI1NiJ9.eyJzb3VyY2VzIjp7ImhnbWQiOjkyMjMzNzIwMzY4NTQ3NzU4MDd9LCJ2ZXJzaW9uIjoiMS4wIiwic3ViIjoiWkVUVEEiLCJpYXQiOjE2NzU4NzI1MDd9.f3JgVRt7_VrifNWTaRMW3aQfrKbtDbIxlzoenJRYJo0"); + storageConfiguration.getCellbase().setApiKey("eyJhbGciOiJIUzI1NiJ9.eyJzb3VyY2VzIjp7ImhnbWQiOjkyMjMzNzIwMzY4NTQ3NzU4MDd9LCJ2ZXJzaW9uIjoiMS4wIiwic3ViIjoiWkVUVEEiLCJpYXQiOjE2NzU4NzI1MDd9.f3JgVRt7_VrifNWTaRMW3aQfrKbtDbIxlzoenJRYJo0"); variantAnnotator = VariantAnnotatorFactory.buildVariantAnnotator(storageConfiguration, projectMetadata, options); results = variantAnnotator.annotate(Collections.singletonList(new Variant("10:113588287:G:A"))); assertEquals(1, results.size()); @@ -157,7 +152,7 @@ public void useCellBaseTokens() throws VariantAnnotatorException { assertTrue(results.get(0).getTraitAssociation().stream().anyMatch(e -> e.getSource().getName().equals("hgmd"))); // Using COSMIC = HGMD token - storageConfiguration.getCellbase().setToken("eyJhbGciOiJIUzI1NiJ9.eyJzb3VyY2VzIjp7ImNvc21pYyI6OTIyMzM3MjAzNjg1NDc3NTgwNywiaGdtZCI6OTIyMzM3MjAzNjg1NDc3NTgwN30sInZlcnNpb24iOiIxLjAiLCJzdWIiOiJaRVRUQSIsImlhdCI6MTY3NTg3MjUyN30.NCCFc4SAhjUsN5UU0wXGY6nCZx8jLglvaO1cNZYI0u4"); + storageConfiguration.getCellbase().setApiKey("eyJhbGciOiJIUzI1NiJ9.eyJzb3VyY2VzIjp7ImNvc21pYyI6OTIyMzM3MjAzNjg1NDc3NTgwNywiaGdtZCI6OTIyMzM3MjAzNjg1NDc3NTgwN30sInZlcnNpb24iOiIxLjAiLCJzdWIiOiJaRVRUQSIsImlhdCI6MTY3NTg3MjUyN30.NCCFc4SAhjUsN5UU0wXGY6nCZx8jLglvaO1cNZYI0u4"); variantAnnotator = VariantAnnotatorFactory.buildVariantAnnotator(storageConfiguration, projectMetadata, options); results = variantAnnotator.annotate(Collections.singletonList(new Variant("10:113588287:G:A"))); assertEquals(1, results.size()); From cb2e78bf8c06caac1facf09114920d4f923bb244 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20T=C3=A1rraga=20Gim=C3=A9nez?= Date: Tue, 29 Aug 2023 12:02:59 +0200 Subject: [PATCH 2/6] tests: remove VersionUtils and use it from java-commons-lib, and fix some tests using CellBase API keys, #TASK-4898, #TASK-4641 --- .../core/cellbase/CellBaseValidator.java | 2 +- .../opencga/core/common/VersionUtils.java | 123 ------------------ .../opencga/core/common/VersionUtilsTest.java | 35 ----- .../storage/core/utils/CellBaseUtilsTest.java | 20 +-- .../VariantAnnotatorByApiKeyTest.java | 18 +-- .../annotators/VariantAnnotatorTest.java | 68 +++++----- 6 files changed, 53 insertions(+), 213 deletions(-) delete mode 100644 opencga-core/src/main/java/org/opencb/opencga/core/common/VersionUtils.java delete mode 100644 opencga-core/src/test/java/org/opencb/opencga/core/common/VersionUtilsTest.java diff --git a/opencga-core/src/main/java/org/opencb/opencga/core/cellbase/CellBaseValidator.java b/opencga-core/src/main/java/org/opencb/opencga/core/cellbase/CellBaseValidator.java index 83f1bd9e311..dd8988e761b 100644 --- a/opencga-core/src/main/java/org/opencb/opencga/core/cellbase/CellBaseValidator.java +++ b/opencga-core/src/main/java/org/opencb/opencga/core/cellbase/CellBaseValidator.java @@ -7,7 +7,7 @@ import org.opencb.cellbase.core.config.SpeciesProperties; import org.opencb.cellbase.core.models.DataRelease; import org.opencb.cellbase.core.result.CellBaseDataResponse; -import org.opencb.opencga.core.common.VersionUtils; +import org.opencb.commons.utils.VersionUtils; import org.opencb.opencga.core.config.storage.CellBaseConfiguration; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/opencga-core/src/main/java/org/opencb/opencga/core/common/VersionUtils.java b/opencga-core/src/main/java/org/opencb/opencga/core/common/VersionUtils.java deleted file mode 100644 index 4e32c6ada32..00000000000 --- a/opencga-core/src/main/java/org/opencb/opencga/core/common/VersionUtils.java +++ /dev/null @@ -1,123 +0,0 @@ -package org.opencb.opencga.core.common; - -import org.apache.commons.lang3.StringUtils; - -import java.util.Comparator; -import java.util.List; -import java.util.stream.Collectors; - -public class VersionUtils { - - public static List order(List versions) { - return versions.stream().map(Version::new).sorted().map(Version::toString).collect(Collectors.toList()); - } - - public static boolean isMinVersion(String minVersion, String version) { - return isMinVersion(minVersion, version, false); - } - - public static boolean isMinVersion(String minVersion, String version, boolean ignorePreReleaseVersioning) { - return new Version(minVersion).compareTo(new Version(version), ignorePreReleaseVersioning) <= 0; - } - - public static class Version implements Comparable { - - private final int major; - private final int minor; - private final int patch; - private final int repatch; - private final String other; - - public static final Comparator COMPARATOR = Comparator - .comparingInt(Version::getMajor) - .thenComparingInt(Version::getMinor) - .thenComparingInt(Version::getPatch) - .thenComparingInt(Version::getRepatch) - .thenComparing((o1, o2) -> { - if (o1.other.equals(o2.other)) { - return 0; - } - if (o1.other.isEmpty()) { - return +1; - } - if (o2.other.isEmpty()) { - return -1; - } - if (o1.other.equals("-SNAPSHOT")) { - return -1; - } - if (o2.other.equals("-SNAPSHOT")) { - return +1; - } - return o1.other.compareTo(o2.other); - }); - - public static final Comparator COMPARATOR_NO_PR = Comparator - .comparingInt(Version::getMajor) - .thenComparingInt(Version::getMinor) - .thenComparingInt(Version::getPatch) - .thenComparingInt(Version::getRepatch); - - public Version(String version) { - String[] split = StringUtils.split(version, ".", 4); - major = Integer.parseInt(split[0]); - minor = Integer.parseInt(split[1]); - if (split.length == 4) { - patch = Integer.parseInt(split[2]); - String last = split[3]; - String[] split2 = StringUtils.split(last, "-+", 3); - repatch = Integer.parseInt(split2[0]); - other = last.substring(split2[0].length()); - } else { - String last = split[2]; - String[] split2 = StringUtils.split(last, "-+", 2); - patch = Integer.parseInt(split2[0]); - repatch = 0; - other = last.substring(split2[0].length()); - } - } - - @Override - public String toString() { - if (repatch > 0) { - return major + "." + minor + "." + patch + "." + repatch + other; - } else { - return major + "." + minor + "." + patch + other; - } - } - - @Override - public int compareTo(Version o) { - return COMPARATOR.compare(this, o); - } - - public int compareTo(Version o, boolean ignorePreReleaseVersioning) { - if (ignorePreReleaseVersioning) { - return COMPARATOR_NO_PR.compare(this, o); - } else { - return COMPARATOR.compare(this, o); - } - } - - public int getMajor() { - return major; - } - - public int getMinor() { - return minor; - } - - public int getPatch() { - return patch; - } - - public int getRepatch() { - return repatch; - } - - public String getOther() { - return other; - } - } - -} diff --git a/opencga-core/src/test/java/org/opencb/opencga/core/common/VersionUtilsTest.java b/opencga-core/src/test/java/org/opencb/opencga/core/common/VersionUtilsTest.java deleted file mode 100644 index a6b0dce858f..00000000000 --- a/opencga-core/src/test/java/org/opencb/opencga/core/common/VersionUtilsTest.java +++ /dev/null @@ -1,35 +0,0 @@ -package org.opencb.opencga.core.common; - -import org.junit.Assert; -import org.junit.Test; -import org.junit.experimental.categories.Category; -import org.opencb.opencga.core.testclassification.duration.ShortTests; - -@Category(ShortTests.class) -public class VersionUtilsTest { - public static String getComparation(String minVersion, String version) { - int c = new VersionUtils.Version(minVersion).compareTo(new VersionUtils.Version(version)); - String comp; - if (c == 0) { - comp = "="; - } else if (c < 0) { - comp = "<"; - } else { - comp = ">"; - } - System.out.println(minVersion + "\t" + comp + "\t" + version); - return comp; - } - - @Test - public void testOrder() { - Assert.assertEquals("<", getComparation("5.2.7", "5.2.8")); - Assert.assertEquals("=", getComparation("5.2.7", "5.2.7")); - Assert.assertEquals(">", getComparation("5.2.7.1", "5.2.7.1-alpha")); - Assert.assertEquals(">", getComparation("5.2.7", "5.2.7-SNAPSHOT")); - Assert.assertEquals("<", getComparation("5.2.7-alpha", "5.2.7")); - Assert.assertEquals("<", getComparation("5.2.7-alpha", "5.2.7-beta")); - Assert.assertEquals(">", getComparation("5.2.7", "5.2.6")); - Assert.assertEquals("=", getComparation("5.2.7", "5.2.7.0")); - } -} \ No newline at end of file diff --git a/opencga-storage/opencga-storage-core/src/test/java/org/opencb/opencga/storage/core/utils/CellBaseUtilsTest.java b/opencga-storage/opencga-storage-core/src/test/java/org/opencb/opencga/storage/core/utils/CellBaseUtilsTest.java index 1f679ace47e..93cb92e8899 100644 --- a/opencga-storage/opencga-storage-core/src/test/java/org/opencb/opencga/storage/core/utils/CellBaseUtilsTest.java +++ b/opencga-storage/opencga-storage-core/src/test/java/org/opencb/opencga/storage/core/utils/CellBaseUtilsTest.java @@ -21,7 +21,7 @@ import org.opencb.commons.datastore.core.ObjectMap; import org.opencb.commons.datastore.core.Query; import org.opencb.commons.datastore.core.QueryOptions; -import org.opencb.opencga.core.common.VersionUtils; +import org.opencb.commons.utils.VersionUtils; import org.opencb.opencga.core.testclassification.duration.MediumTests; import org.opencb.opencga.storage.core.variant.adaptors.VariantQueryException; import org.opencb.opencga.storage.core.variant.adaptors.VariantQueryParam; @@ -255,10 +255,10 @@ public void testGetTranscriptFlags() throws IOException { } @Test - public void testAnnotationWithHGMDToken() throws IOException { - Assume.assumeTrue(cellBaseUtils.isMinVersion("5.3.0")); - Assume.assumeThat(assembly, CoreMatchers.equalTo("grch37")); - String hgmdToken = System.getenv("CELLBASE_HGMD_TOKEN"); + public void testAnnotationWithHGMDApiKey() throws IOException { + Assume.assumeTrue(cellBaseUtils.isMinVersion("5.4.0")); + Assume.assumeThat(assembly, CoreMatchers.equalTo("grch38")); + String hgmdToken = System.getenv("CELLBASE_HGMD_APIKEY"); Assume.assumeTrue(StringUtils.isNotEmpty(hgmdToken)); cellBaseClient = new CellBaseClient("hsapiens", assembly, dataRelease, hgmdToken, @@ -271,14 +271,14 @@ public void testAnnotationWithHGMDToken() throws IOException { .getAnnotationByVariantIds(Collections.singletonList("10:113588287:G:A"), queryOptions); VariantAnnotation variantAnnotation = v.firstResult(); assertEquals(2, variantAnnotation.getTraitAssociation().size()); - assertEquals("clinvar", variantAnnotation.getTraitAssociation().get(0).getSource().getName()); - assertEquals("hgmd", variantAnnotation.getTraitAssociation().get(1).getSource().getName()); + assertTrue(variantAnnotation.getTraitAssociation().stream().anyMatch(e -> e.getSource().getName().equals("clinvar"))); + assertTrue(variantAnnotation.getTraitAssociation().stream().anyMatch(e -> e.getSource().getName().equals("hgmd"))); } @Test - public void testAnnotationWithoutHGMDToken() throws IOException { - Assume.assumeTrue(cellBaseUtils.isMinVersion("5.3.0")); - Assume.assumeThat(assembly, CoreMatchers.equalTo("grch37")); + public void testAnnotationWithoutHGMDAPiKey() throws IOException { + Assume.assumeTrue(cellBaseUtils.isMinVersion("5.4.0")); + Assume.assumeThat(assembly, CoreMatchers.equalTo("grch38")); cellBaseClient = new CellBaseClient("hsapiens", assembly, dataRelease, "", new ClientConfiguration().setVersion(version) diff --git a/opencga-storage/opencga-storage-core/src/test/java/org/opencb/opencga/storage/core/variant/annotation/annotators/VariantAnnotatorByApiKeyTest.java b/opencga-storage/opencga-storage-core/src/test/java/org/opencb/opencga/storage/core/variant/annotation/annotators/VariantAnnotatorByApiKeyTest.java index 806a75df2fb..02ae9aded18 100644 --- a/opencga-storage/opencga-storage-core/src/test/java/org/opencb/opencga/storage/core/variant/annotation/annotators/VariantAnnotatorByApiKeyTest.java +++ b/opencga-storage/opencga-storage-core/src/test/java/org/opencb/opencga/storage/core/variant/annotation/annotators/VariantAnnotatorByApiKeyTest.java @@ -34,21 +34,18 @@ public void setUp() throws Exception { storageConfiguration = StorageConfiguration.load(StorageEngine.class.getClassLoader().getResourceAsStream("storage-configuration.yml"), "yml"); String url = "https://uk.ws.zettagenomics.com/cellbase/"; storageConfiguration.getCellbase().setUrl(url); - storageConfiguration.getCellbase().setDataRelease("1"); - storageConfiguration.getCellbase().setVersion("v5.3"); + storageConfiguration.getCellbase().setDataRelease("3"); + storageConfiguration.getCellbase().setVersion("v5.4"); storageConfiguration.getCellbase().setApiKey(null); CellBaseUtils cellBaseUtils = new CellBaseUtils(new CellBaseClient(storageConfiguration.getCellbase().toClientConfiguration())); - try { - Assume.assumeTrue(cellBaseUtils.isMinVersion("5.3.0")); - } catch (RuntimeException e) { - Assume.assumeNoException("Cellbase '" + url + "' not available", e); - } + Assume.assumeTrue(cellBaseUtils.isMinVersion("v5.4")); + + projectMetadata = new ProjectMetadata("hsapiens", "grch38", "3", 1, null, null, null); } @Test public void testNoApiKey() throws Exception { - projectMetadata = new ProjectMetadata("hsapiens", "grch37", "1", 1, null, null, null); ObjectMap options = new ObjectMap(VariantStorageOptions.ANNOTATOR.key(), "cellbase"); CellBaseRestVariantAnnotator annotator = new CellBaseRestVariantAnnotator(storageConfiguration, projectMetadata, options); @@ -66,7 +63,7 @@ public void testCOSMICApiKey() throws Exception { Assume.assumeTrue(StringUtils.isNotEmpty(apiKey)); storageConfiguration.getCellbase().setApiKey(apiKey); - projectMetadata = new ProjectMetadata("hsapiens", "grch37", "1", 1, null, null, null); + ObjectMap options = new ObjectMap(VariantStorageOptions.ANNOTATOR.key(), "cellbase"); CellBaseRestVariantAnnotator annotator = new CellBaseRestVariantAnnotator(storageConfiguration, projectMetadata, options); assertEquals(Collections.singletonList("cosmic"), annotator.getVariantAnnotationMetadata().getPrivateSources()); @@ -85,7 +82,7 @@ public void testHGMDApiKey() throws Exception { Assume.assumeTrue(StringUtils.isNotEmpty(apiKey)); storageConfiguration.getCellbase().setApiKey(apiKey); - projectMetadata = new ProjectMetadata("hsapiens", "grch37", "1", 1, null, null, null); + ObjectMap options = new ObjectMap(VariantStorageOptions.ANNOTATOR.key(), "cellbase"); CellBaseRestVariantAnnotator annotator = new CellBaseRestVariantAnnotator(storageConfiguration, projectMetadata, options); assertEquals(Collections.singletonList("hgmd"), annotator.getVariantAnnotationMetadata().getPrivateSources()); @@ -105,7 +102,6 @@ public void testCOSMICandHGMDApiKey() throws Exception { storageConfiguration.getCellbase().setApiKey(apiKey); - projectMetadata = new ProjectMetadata("hsapiens", "grch37", "1", 1, null, null, null); ObjectMap options = new ObjectMap(VariantStorageOptions.ANNOTATOR.key(), "cellbase"); options.put(ANNOTATOR_CELLBASE_INCLUDE.key(), "clinical"); CellBaseRestVariantAnnotator annotator = new CellBaseRestVariantAnnotator(storageConfiguration, projectMetadata, options); diff --git a/opencga-storage/opencga-storage-core/src/test/java/org/opencb/opencga/storage/core/variant/annotation/annotators/VariantAnnotatorTest.java b/opencga-storage/opencga-storage-core/src/test/java/org/opencb/opencga/storage/core/variant/annotation/annotators/VariantAnnotatorTest.java index 260e1840dba..02b84fc38a9 100644 --- a/opencga-storage/opencga-storage-core/src/test/java/org/opencb/opencga/storage/core/variant/annotation/annotators/VariantAnnotatorTest.java +++ b/opencga-storage/opencga-storage-core/src/test/java/org/opencb/opencga/storage/core/variant/annotation/annotators/VariantAnnotatorTest.java @@ -1,6 +1,7 @@ package org.opencb.opencga.storage.core.variant.annotation.annotators; import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.lang.StringUtils; import org.junit.Before; import org.junit.Rule; import org.junit.Test; @@ -111,9 +112,9 @@ public void testErrorVariant() throws VariantAnnotatorException { } @Test - public void useCellBaseTokens() throws VariantAnnotatorException { + public void useCellBaseApiKeys() throws VariantAnnotatorException { storageConfiguration.getCellbase().setUrl("https://uk.ws.zettagenomics.com/cellbase/"); - storageConfiguration.getCellbase().setVersion("task-3808"); + storageConfiguration.getCellbase().setVersion("v5.4"); storageConfiguration.getCellbase().setDataRelease("3"); VariantAnnotator variantAnnotator = null; @@ -126,6 +127,8 @@ public void useCellBaseTokens() throws VariantAnnotatorException { } assumeTrue(variantAnnotator != null); + String apiKey; + // No token List results = variantAnnotator.annotate(Collections.singletonList(new Variant("10:113588287:G:A"))); assertEquals(1, results.size()); @@ -134,41 +137,40 @@ public void useCellBaseTokens() throws VariantAnnotatorException { assertFalse(results.get(0).getTraitAssociation().stream().anyMatch(e -> e.getSource().getName().equals("hgmd"))); // Using COSMIC token - storageConfiguration.getCellbase().setApiKey("eyJhbGciOiJIUzI1NiJ9.eyJzb3VyY2VzIjp7ImNvc21pYyI6OTIyMzM3MjAzNjg1NDc3NTgwN30sInZlcnNpb24iOiIxLjAiLCJzdWIiOiJaRVRUQSIsImlhdCI6MTY3NTg3MjQ2Nn0.ByfPJn8Lkh5Sow4suRZcOqVxvWZRmTBBNLDzHEIZQ5U"); - variantAnnotator = VariantAnnotatorFactory.buildVariantAnnotator(storageConfiguration, projectMetadata, options); - results = variantAnnotator.annotate(Collections.singletonList(new Variant("10:113588287:G:A"))); - assertEquals(1, results.size()); - assertTrue(results.get(0).getTraitAssociation().stream().anyMatch(e -> e.getSource().getName().equals("clinvar"))); - assertTrue(results.get(0).getTraitAssociation().stream().anyMatch(e -> e.getSource().getName().equals("cosmic"))); - assertFalse(results.get(0).getTraitAssociation().stream().anyMatch(e -> e.getSource().getName().equals("hgmd"))); + apiKey = System.getenv("CELLBASE_COSMIC_APIKEY"); + if (StringUtils.isNotEmpty(apiKey)) { + storageConfiguration.getCellbase().setApiKey(apiKey); + variantAnnotator = VariantAnnotatorFactory.buildVariantAnnotator(storageConfiguration, projectMetadata, options); + results = variantAnnotator.annotate(Collections.singletonList(new Variant("10:113588287:G:A"))); + assertEquals(1, results.size()); + assertTrue(results.get(0).getTraitAssociation().stream().anyMatch(e -> e.getSource().getName().equals("clinvar"))); + assertTrue(results.get(0).getTraitAssociation().stream().anyMatch(e -> e.getSource().getName().equals("cosmic"))); + assertFalse(results.get(0).getTraitAssociation().stream().anyMatch(e -> e.getSource().getName().equals("hgmd"))); + } // Using HGMD token - storageConfiguration.getCellbase().setApiKey("eyJhbGciOiJIUzI1NiJ9.eyJzb3VyY2VzIjp7ImhnbWQiOjkyMjMzNzIwMzY4NTQ3NzU4MDd9LCJ2ZXJzaW9uIjoiMS4wIiwic3ViIjoiWkVUVEEiLCJpYXQiOjE2NzU4NzI1MDd9.f3JgVRt7_VrifNWTaRMW3aQfrKbtDbIxlzoenJRYJo0"); - variantAnnotator = VariantAnnotatorFactory.buildVariantAnnotator(storageConfiguration, projectMetadata, options); - results = variantAnnotator.annotate(Collections.singletonList(new Variant("10:113588287:G:A"))); - assertEquals(1, results.size()); - assertTrue(results.get(0).getTraitAssociation().stream().anyMatch(e -> e.getSource().getName().equals("clinvar"))); - assertFalse(results.get(0).getTraitAssociation().stream().anyMatch(e -> e.getSource().getName().equals("cosmic"))); - assertTrue(results.get(0).getTraitAssociation().stream().anyMatch(e -> e.getSource().getName().equals("hgmd"))); - - // Using COSMIC = HGMD token - storageConfiguration.getCellbase().setApiKey("eyJhbGciOiJIUzI1NiJ9.eyJzb3VyY2VzIjp7ImNvc21pYyI6OTIyMzM3MjAzNjg1NDc3NTgwNywiaGdtZCI6OTIyMzM3MjAzNjg1NDc3NTgwN30sInZlcnNpb24iOiIxLjAiLCJzdWIiOiJaRVRUQSIsImlhdCI6MTY3NTg3MjUyN30.NCCFc4SAhjUsN5UU0wXGY6nCZx8jLglvaO1cNZYI0u4"); - variantAnnotator = VariantAnnotatorFactory.buildVariantAnnotator(storageConfiguration, projectMetadata, options); - results = variantAnnotator.annotate(Collections.singletonList(new Variant("10:113588287:G:A"))); - assertEquals(1, results.size()); - assertTrue(results.get(0).getTraitAssociation().stream().anyMatch(e -> e.getSource().getName().equals("clinvar"))); - assertTrue(results.get(0).getTraitAssociation().stream().anyMatch(e -> e.getSource().getName().equals("cosmic"))); - assertTrue(results.get(0).getTraitAssociation().stream().anyMatch(e -> e.getSource().getName().equals("hgmd"))); - } + apiKey = System.getenv("CELLBASE_HGMD_APIKEY"); + if (StringUtils.isNotEmpty(apiKey)) { + storageConfiguration.getCellbase().setApiKey(apiKey); + variantAnnotator = VariantAnnotatorFactory.buildVariantAnnotator(storageConfiguration, projectMetadata, options); + results = variantAnnotator.annotate(Collections.singletonList(new Variant("10:113588287:G:A"))); + assertEquals(1, results.size()); + assertTrue(results.get(0).getTraitAssociation().stream().anyMatch(e -> e.getSource().getName().equals("clinvar"))); + assertFalse(results.get(0).getTraitAssociation().stream().anyMatch(e -> e.getSource().getName().equals("cosmic"))); + assertTrue(results.get(0).getTraitAssociation().stream().anyMatch(e -> e.getSource().getName().equals("hgmd"))); + } - private Set getSources(VariantAnnotation variantAnnotation) { - Set sources = new HashSet<>(); - if (variantAnnotation != null && CollectionUtils.isNotEmpty(variantAnnotation.getTraitAssociation())) { - for (EvidenceEntry entry : variantAnnotation.getTraitAssociation()) { - sources.add(entry.getSource().getName()); - } + // Using COSMIC + HGMD token + apiKey = System.getenv("CELLBASE_COSMIC_HGMD_APIKEY"); + if (StringUtils.isNotEmpty(apiKey)) { + storageConfiguration.getCellbase().setApiKey(apiKey); + variantAnnotator = VariantAnnotatorFactory.buildVariantAnnotator(storageConfiguration, projectMetadata, options); + results = variantAnnotator.annotate(Collections.singletonList(new Variant("10:113588287:G:A"))); + assertEquals(1, results.size()); + assertTrue(results.get(0).getTraitAssociation().stream().anyMatch(e -> e.getSource().getName().equals("clinvar"))); + assertTrue(results.get(0).getTraitAssociation().stream().anyMatch(e -> e.getSource().getName().equals("cosmic"))); + assertTrue(results.get(0).getTraitAssociation().stream().anyMatch(e -> e.getSource().getName().equals("hgmd"))); } - return sources; } public static class TestCellBaseRestVariantAnnotator extends CellBaseRestVariantAnnotator { From 061730a7e45b5af2230fc9f113f235d18faf5a20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacobo=20Coll=20Morag=C3=B3n?= Date: Tue, 29 Aug 2023 15:26:31 +0100 Subject: [PATCH 3/6] app: Add migration for renaming cellbase.token to cellbase.apiKey #TASK-4898 --- .../catalog/RenameCellBaseToken2ApiKey.java | 50 +++++++++++++++++++ .../config/storage/CellBaseConfiguration.java | 15 ------ 2 files changed, 50 insertions(+), 15 deletions(-) create mode 100644 opencga-app/src/main/java/org/opencb/opencga/app/migrations/v2_9_0/catalog/RenameCellBaseToken2ApiKey.java diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/migrations/v2_9_0/catalog/RenameCellBaseToken2ApiKey.java b/opencga-app/src/main/java/org/opencb/opencga/app/migrations/v2_9_0/catalog/RenameCellBaseToken2ApiKey.java new file mode 100644 index 00000000000..72fe8e6499e --- /dev/null +++ b/opencga-app/src/main/java/org/opencb/opencga/app/migrations/v2_9_0/catalog/RenameCellBaseToken2ApiKey.java @@ -0,0 +1,50 @@ +package org.opencb.opencga.app.migrations.v2_9_0.catalog; + +import com.mongodb.client.model.Projections; +import com.mongodb.client.model.UpdateOneModel; +import com.mongodb.client.model.Updates; +import org.bson.Document; +import org.opencb.opencga.catalog.db.mongodb.MongoDBAdaptorFactory; +import org.opencb.opencga.catalog.migration.Migration; +import org.opencb.opencga.catalog.migration.MigrationTool; + +import java.util.List; + +import static com.mongodb.client.model.Filters.eq; + +@Migration(id = "rename_cellbase_token_2_api_key" , + description = "Rename CellBase Token to ApiKey", + version = "2.9.0", + domain = Migration.MigrationDomain.CATALOG, + language = Migration.MigrationLanguage.JAVA, + date = 20230829 +) +public class RenameCellBaseToken2ApiKey extends MigrationTool { + + @Override + protected void run() throws Exception { + + migrateCollection(MongoDBAdaptorFactory.USER_COLLECTION, + new Document("projects.id", new Document("$exists", true)), + Projections.include("_id", "projects"), + (userDocument, bulk) -> { + List projects = userDocument.getList("projects", Document.class); + for (int i = 0; i < projects.size(); i++) { + Document project = projects.get(i); + Document cellbase = project.get("cellbase", Document.class); + if (cellbase != null) { + String token = cellbase.getString("token"); + if (token != null) { + bulk.add(new UpdateOneModel<>( + eq("_id", userDocument.get("_id")), + Updates.combine( + Updates.set("projects." + i + ".cellbase.apiKey", token), + Updates.unset("projects." + i + ".cellbase.token") + ))); + } + } + } + }); + } + +} diff --git a/opencga-core/src/main/java/org/opencb/opencga/core/config/storage/CellBaseConfiguration.java b/opencga-core/src/main/java/org/opencb/opencga/core/config/storage/CellBaseConfiguration.java index 1818beb363c..2ef6a77cca4 100644 --- a/opencga-core/src/main/java/org/opencb/opencga/core/config/storage/CellBaseConfiguration.java +++ b/opencga-core/src/main/java/org/opencb/opencga/core/config/storage/CellBaseConfiguration.java @@ -42,10 +42,6 @@ public class CellBaseConfiguration { @DataField(id = "dataRelease", description = "CellBase data release version to be used. If empty, will use the active one") private String dataRelease; - @Deprecated - @DataField(id = "token", deprecated = true, description = "CellBase token to access to the licensed/restricted data sources such as COSMIC, HGMD,...") - private String token; - @DataField(id = "apiKey", description = "API key to access to the licensed/restricted data sources (COSMIC, HGMD,...) and to manage quota.") private String apiKey; @@ -62,7 +58,6 @@ public CellBaseConfiguration(String url, String version, String dataRelease, Str this.url = url; this.version = version; this.dataRelease = dataRelease; - this.token = apiKey; this.apiKey = apiKey; } @@ -72,7 +67,6 @@ public String toString() { sb.append("url='").append(url).append('\''); sb.append(", version='").append(version).append('\''); sb.append(", dataRelease='").append(dataRelease).append('\''); - sb.append(", token='").append(token).append('\''); sb.append(", apiKey='").append(apiKey).append('\''); sb.append('}'); return sb.toString(); @@ -105,15 +99,6 @@ public CellBaseConfiguration setDataRelease(String dataRelease) { return this; } -// public String getToken() { -// return apiKey; -// } -// -// public CellBaseConfiguration setToken(String token) { -// this.apiKey = token; -// return this; -// } - public String getApiKey() { return apiKey; } From af38b8bd620c9b0dce5c7f885d08fcb34fbdcf62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20T=C3=A1rraga=20Gim=C3=A9nez?= Date: Thu, 31 Aug 2023 16:23:38 +0200 Subject: [PATCH 4/6] client: generate OpenCGA clients to take into account the parameter API key, #TASK-4898, #TASK-4641 --- .../app/cli/main/OpenCgaCompleter.java | 2 +- .../app/cli/main/OpencgaCliOptionsParser.java | 2 +- ...erationsVariantStorageCommandExecutor.java | 2 +- .../executors/ProjectsCommandExecutor.java | 2 +- ...perationsVariantStorageCommandOptions.java | 4 ++-- .../main/options/ProjectsCommandOptions.java | 4 ++-- opencga-client/src/main/R/R/Admin-methods.R | 2 +- .../src/main/R/R/Alignment-methods.R | 2 +- opencga-client/src/main/R/R/AllGenerics.R | 20 +++++++++---------- .../src/main/R/R/Clinical-methods.R | 4 ++-- opencga-client/src/main/R/R/Cohort-methods.R | 4 ++-- opencga-client/src/main/R/R/Family-methods.R | 4 ++-- opencga-client/src/main/R/R/File-methods.R | 4 ++-- opencga-client/src/main/R/R/GA4GH-methods.R | 4 ++-- .../src/main/R/R/Individual-methods.R | 2 +- opencga-client/src/main/R/R/Job-methods.R | 4 ++-- opencga-client/src/main/R/R/Meta-methods.R | 2 +- .../src/main/R/R/Operation-methods.R | 2 +- opencga-client/src/main/R/R/Panel-methods.R | 2 +- opencga-client/src/main/R/R/Project-methods.R | 4 ++-- opencga-client/src/main/R/R/Sample-methods.R | 4 ++-- opencga-client/src/main/R/R/Study-methods.R | 4 ++-- opencga-client/src/main/R/R/User-methods.R | 4 ++-- opencga-client/src/main/R/R/Variant-methods.R | 2 +- .../client/rest/clients/AdminClient.java | 2 +- .../client/rest/clients/AlignmentClient.java | 2 +- .../rest/clients/ClinicalAnalysisClient.java | 2 +- .../client/rest/clients/CohortClient.java | 2 +- .../rest/clients/DiseasePanelClient.java | 2 +- .../client/rest/clients/FamilyClient.java | 2 +- .../client/rest/clients/FileClient.java | 2 +- .../client/rest/clients/GA4GHClient.java | 2 +- .../client/rest/clients/IndividualClient.java | 2 +- .../client/rest/clients/JobClient.java | 2 +- .../client/rest/clients/MetaClient.java | 2 +- .../client/rest/clients/ProjectClient.java | 2 +- .../client/rest/clients/SampleClient.java | 2 +- .../client/rest/clients/StudyClient.java | 2 +- .../client/rest/clients/UserClient.java | 2 +- .../client/rest/clients/VariantClient.java | 2 +- .../rest/clients/VariantOperationClient.java | 2 +- opencga-client/src/main/javascript/Admin.js | 2 +- .../src/main/javascript/Alignment.js | 2 +- .../src/main/javascript/ClinicalAnalysis.js | 2 +- opencga-client/src/main/javascript/Cohort.js | 2 +- .../src/main/javascript/DiseasePanel.js | 2 +- opencga-client/src/main/javascript/Family.js | 2 +- opencga-client/src/main/javascript/File.js | 2 +- opencga-client/src/main/javascript/GA4GH.js | 2 +- .../src/main/javascript/Individual.js | 2 +- opencga-client/src/main/javascript/Job.js | 2 +- opencga-client/src/main/javascript/Meta.js | 2 +- opencga-client/src/main/javascript/Project.js | 2 +- opencga-client/src/main/javascript/Sample.js | 2 +- opencga-client/src/main/javascript/Study.js | 2 +- opencga-client/src/main/javascript/User.js | 2 +- opencga-client/src/main/javascript/Variant.js | 2 +- .../src/main/javascript/VariantOperation.js | 2 +- .../pyopencga/rest_clients/admin_client.py | 2 +- .../rest_clients/alignment_client.py | 2 +- .../rest_clients/clinical_analysis_client.py | 2 +- .../pyopencga/rest_clients/cohort_client.py | 2 +- .../rest_clients/disease_panel_client.py | 2 +- .../pyopencga/rest_clients/family_client.py | 2 +- .../pyopencga/rest_clients/file_client.py | 2 +- .../pyopencga/rest_clients/ga4gh_client.py | 2 +- .../rest_clients/individual_client.py | 2 +- .../pyopencga/rest_clients/job_client.py | 2 +- .../pyopencga/rest_clients/meta_client.py | 2 +- .../pyopencga/rest_clients/project_client.py | 2 +- .../pyopencga/rest_clients/sample_client.py | 2 +- .../pyopencga/rest_clients/study_client.py | 2 +- .../pyopencga/rest_clients/user_client.py | 2 +- .../pyopencga/rest_clients/variant_client.py | 2 +- .../rest_clients/variant_operation_client.py | 2 +- 75 files changed, 96 insertions(+), 96 deletions(-) diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/OpenCgaCompleter.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/OpenCgaCompleter.java index 6627d4d82f1..8b3fc6bbc51 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/OpenCgaCompleter.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/OpenCgaCompleter.java @@ -1,5 +1,5 @@ /* -* Copyright 2015-2023-08-30 OpenCB +* Copyright 2015-2023-08-31 OpenCB * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/OpencgaCliOptionsParser.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/OpencgaCliOptionsParser.java index b619c612c32..471a564c487 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/OpencgaCliOptionsParser.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/OpencgaCliOptionsParser.java @@ -1,5 +1,5 @@ /* -* Copyright 2015-2023-08-30 OpenCB +* Copyright 2015-2023-08-31 OpenCB * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/OperationsVariantStorageCommandExecutor.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/OperationsVariantStorageCommandExecutor.java index 408f28841f3..78ed32b92dc 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/OperationsVariantStorageCommandExecutor.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/OperationsVariantStorageCommandExecutor.java @@ -197,7 +197,7 @@ private RestResponse configureCellbase() throws Exception { putNestedIfNotEmpty(beanParams, "url",commandOptions.url, true); putNestedIfNotEmpty(beanParams, "version",commandOptions.version, true); putNestedIfNotEmpty(beanParams, "dataRelease",commandOptions.dataRelease, true); - putNestedIfNotEmpty(beanParams, "token",commandOptions.token, true); + putNestedIfNotEmpty(beanParams, "apiKey",commandOptions.apiKey, true); cellBaseConfiguration = JacksonUtils.getDefaultObjectMapper().copy() .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, true) diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/ProjectsCommandExecutor.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/ProjectsCommandExecutor.java index 7facd50d4d6..2ed3593e612 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/ProjectsCommandExecutor.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/ProjectsCommandExecutor.java @@ -123,7 +123,7 @@ private RestResponse create() throws Exception { putNestedIfNotEmpty(beanParams, "cellbase.url",commandOptions.cellbaseUrl, true); putNestedIfNotEmpty(beanParams, "cellbase.version",commandOptions.cellbaseVersion, true); putNestedIfNotEmpty(beanParams, "cellbase.dataRelease",commandOptions.cellbaseDataRelease, true); - putNestedIfNotEmpty(beanParams, "cellbase.token",commandOptions.cellbaseToken, true); + putNestedIfNotEmpty(beanParams, "cellbase.apiKey",commandOptions.cellbaseApiKey, true); putNestedIfNotNull(beanParams, "attributes",commandOptions.attributes, true); projectCreateParams = JacksonUtils.getDefaultObjectMapper().copy() diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/options/OperationsVariantStorageCommandOptions.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/options/OperationsVariantStorageCommandOptions.java index c3c89bf4b1a..d0b8a26d019 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/options/OperationsVariantStorageCommandOptions.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/options/OperationsVariantStorageCommandOptions.java @@ -128,8 +128,8 @@ public class ConfigureCellbaseCommandOptions { @Parameter(names = {"--data-release"}, description = "CellBase data release version to be used. If empty, will use the active one", required = false, arity = 1) public String dataRelease; - @Parameter(names = {"--token"}, description = "CellBase token to access to the licensed/restricted data sources such as COSMIC, HGMD,...", required = false, arity = 1) - public String token; + @Parameter(names = {"--api-key"}, description = "API key to access to the licensed/restricted data sources (COSMIC, HGMD,...) and to manage quota.", required = false, arity = 1) + public String apiKey; } diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/options/ProjectsCommandOptions.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/options/ProjectsCommandOptions.java index 1f7a3782e45..a2eca8cb958 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/options/ProjectsCommandOptions.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/options/ProjectsCommandOptions.java @@ -110,8 +110,8 @@ public class CreateCommandOptions { @Parameter(names = {"--cellbase-data-release"}, description = "CellBase data release version to be used. If empty, will use the active one", required = false, arity = 1) public String cellbaseDataRelease; - @Parameter(names = {"--cellbase-token"}, description = "CellBase token to access to the licensed/restricted data sources such as COSMIC, HGMD,...", required = false, arity = 1) - public String cellbaseToken; + @Parameter(names = {"--cellbase-api-key"}, description = "API key to access to the licensed/restricted data sources (COSMIC, HGMD,...) and to manage quota.", required = false, arity = 1) + public String cellbaseApiKey; @DynamicParameter(names = {"--attributes"}, description = "The body web service attributes parameter. Use: --attributes key=value", required = false) public java.util.Map attributes = new HashMap<>(); //Dynamic parameters must be initialized; diff --git a/opencga-client/src/main/R/R/Admin-methods.R b/opencga-client/src/main/R/R/Admin-methods.R index 5d46536451d..683aadd80e1 100644 --- a/opencga-client/src/main/R/R/Admin-methods.R +++ b/opencga-client/src/main/R/R/Admin-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-08-30 +# Autogenerated on: 2023-08-31 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/R/R/Alignment-methods.R b/opencga-client/src/main/R/R/Alignment-methods.R index 206b0aa2646..175943692f6 100644 --- a/opencga-client/src/main/R/R/Alignment-methods.R +++ b/opencga-client/src/main/R/R/Alignment-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-08-30 +# Autogenerated on: 2023-08-31 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/R/R/AllGenerics.R b/opencga-client/src/main/R/R/AllGenerics.R index 8e9baedd284..088e6976532 100644 --- a/opencga-client/src/main/R/R/AllGenerics.R +++ b/opencga-client/src/main/R/R/AllGenerics.R @@ -1,31 +1,31 @@ # ############################################################################## ## UserClient -setGeneric("userClient", function(OpencgaR, user, filterId, users, endpointName, params=NULL, ...) +setGeneric("userClient", function(OpencgaR, filterId, users, user, endpointName, params=NULL, ...) standardGeneric("userClient")) # ############################################################################## ## ProjectClient -setGeneric("projectClient", function(OpencgaR, projects, project, endpointName, params=NULL, ...) +setGeneric("projectClient", function(OpencgaR, project, projects, endpointName, params=NULL, ...) standardGeneric("projectClient")) # ############################################################################## ## StudyClient -setGeneric("studyClient", function(OpencgaR, members, variableSet, studies, group, study, templateId, endpointName, params=NULL, ...) +setGeneric("studyClient", function(OpencgaR, members, variableSet, studies, study, templateId, group, endpointName, params=NULL, ...) standardGeneric("studyClient")) # ############################################################################## ## FileClient -setGeneric("fileClient", function(OpencgaR, files, members, file, annotationSet, folder, endpointName, params=NULL, ...) +setGeneric("fileClient", function(OpencgaR, members, annotationSet, file, files, folder, endpointName, params=NULL, ...) standardGeneric("fileClient")) # ############################################################################## ## JobClient -setGeneric("jobClient", function(OpencgaR, members, job, jobs, endpointName, params=NULL, ...) +setGeneric("jobClient", function(OpencgaR, job, members, jobs, endpointName, params=NULL, ...) standardGeneric("jobClient")) # ############################################################################## ## SampleClient -setGeneric("sampleClient", function(OpencgaR, members, sample, samples, annotationSet, endpointName, params=NULL, ...) +setGeneric("sampleClient", function(OpencgaR, samples, members, sample, annotationSet, endpointName, params=NULL, ...) standardGeneric("sampleClient")) # ############################################################################## @@ -35,12 +35,12 @@ setGeneric("individualClient", function(OpencgaR, members, individuals, annotati # ############################################################################## ## FamilyClient -setGeneric("familyClient", function(OpencgaR, members, family, annotationSet, families, endpointName, params=NULL, ...) +setGeneric("familyClient", function(OpencgaR, family, members, families, annotationSet, endpointName, params=NULL, ...) standardGeneric("familyClient")) # ############################################################################## ## CohortClient -setGeneric("cohortClient", function(OpencgaR, members, annotationSet, cohort, cohorts, endpointName, params=NULL, ...) +setGeneric("cohortClient", function(OpencgaR, members, cohort, annotationSet, cohorts, endpointName, params=NULL, ...) standardGeneric("cohortClient")) # ############################################################################## @@ -60,7 +60,7 @@ setGeneric("variantClient", function(OpencgaR, endpointName, params=NULL, ...) # ############################################################################## ## ClinicalClient -setGeneric("clinicalClient", function(OpencgaR, interpretations, members, interpretation, clinicalAnalysis, clinicalAnalyses, endpointName, params=NULL, ...) +setGeneric("clinicalClient", function(OpencgaR, interpretation, members, interpretations, clinicalAnalyses, clinicalAnalysis, endpointName, params=NULL, ...) standardGeneric("clinicalClient")) # ############################################################################## @@ -75,7 +75,7 @@ setGeneric("metaClient", function(OpencgaR, endpointName, params=NULL, ...) # ############################################################################## ## GA4GHClient -setGeneric("ga4ghClient", function(OpencgaR, file, study, endpointName, params=NULL, ...) +setGeneric("ga4ghClient", function(OpencgaR, study, file, endpointName, params=NULL, ...) standardGeneric("ga4ghClient")) # ############################################################################## diff --git a/opencga-client/src/main/R/R/Clinical-methods.R b/opencga-client/src/main/R/R/Clinical-methods.R index f0652ba64dd..b87af69bca9 100644 --- a/opencga-client/src/main/R/R/Clinical-methods.R +++ b/opencga-client/src/main/R/R/Clinical-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-08-30 +# Autogenerated on: 2023-08-31 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. @@ -58,7 +58,7 @@ #' [*]: Required parameter #' @export -setMethod("clinicalClient", "OpencgaR", function(OpencgaR, interpretations, members, interpretation, clinicalAnalysis, clinicalAnalyses, endpointName, params=NULL, ...) { +setMethod("clinicalClient", "OpencgaR", function(OpencgaR, interpretation, members, interpretations, clinicalAnalyses, clinicalAnalysis, endpointName, params=NULL, ...) { switch(endpointName, #' @section Endpoint /{apiVersion}/analysis/clinical/acl/{members}/update: diff --git a/opencga-client/src/main/R/R/Cohort-methods.R b/opencga-client/src/main/R/R/Cohort-methods.R index 2bcb87bbbbc..4aafeeb7609 100644 --- a/opencga-client/src/main/R/R/Cohort-methods.R +++ b/opencga-client/src/main/R/R/Cohort-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-08-30 +# Autogenerated on: 2023-08-31 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. @@ -39,7 +39,7 @@ #' [*]: Required parameter #' @export -setMethod("cohortClient", "OpencgaR", function(OpencgaR, members, annotationSet, cohort, cohorts, endpointName, params=NULL, ...) { +setMethod("cohortClient", "OpencgaR", function(OpencgaR, members, cohort, annotationSet, cohorts, endpointName, params=NULL, ...) { switch(endpointName, #' @section Endpoint /{apiVersion}/cohorts/acl/{members}/update: diff --git a/opencga-client/src/main/R/R/Family-methods.R b/opencga-client/src/main/R/R/Family-methods.R index 5993bbe8de9..069bac92a64 100644 --- a/opencga-client/src/main/R/R/Family-methods.R +++ b/opencga-client/src/main/R/R/Family-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-08-30 +# Autogenerated on: 2023-08-31 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. @@ -38,7 +38,7 @@ #' [*]: Required parameter #' @export -setMethod("familyClient", "OpencgaR", function(OpencgaR, members, family, annotationSet, families, endpointName, params=NULL, ...) { +setMethod("familyClient", "OpencgaR", function(OpencgaR, family, members, families, annotationSet, endpointName, params=NULL, ...) { switch(endpointName, #' @section Endpoint /{apiVersion}/families/acl/{members}/update: diff --git a/opencga-client/src/main/R/R/File-methods.R b/opencga-client/src/main/R/R/File-methods.R index 0ef0d2c83d8..1db2de2c791 100644 --- a/opencga-client/src/main/R/R/File-methods.R +++ b/opencga-client/src/main/R/R/File-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-08-30 +# Autogenerated on: 2023-08-31 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. @@ -54,7 +54,7 @@ #' [*]: Required parameter #' @export -setMethod("fileClient", "OpencgaR", function(OpencgaR, files, members, file, annotationSet, folder, endpointName, params=NULL, ...) { +setMethod("fileClient", "OpencgaR", function(OpencgaR, members, annotationSet, file, files, folder, endpointName, params=NULL, ...) { switch(endpointName, #' @section Endpoint /{apiVersion}/files/acl/{members}/update: diff --git a/opencga-client/src/main/R/R/GA4GH-methods.R b/opencga-client/src/main/R/R/GA4GH-methods.R index 534e75260ad..3d4b5de60c2 100644 --- a/opencga-client/src/main/R/R/GA4GH-methods.R +++ b/opencga-client/src/main/R/R/GA4GH-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-08-30 +# Autogenerated on: 2023-08-31 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. @@ -31,7 +31,7 @@ #' [*]: Required parameter #' @export -setMethod("ga4ghClient", "OpencgaR", function(OpencgaR, file, study, endpointName, params=NULL, ...) { +setMethod("ga4ghClient", "OpencgaR", function(OpencgaR, study, file, endpointName, params=NULL, ...) { switch(endpointName, #' @section Endpoint /{apiVersion}/ga4gh/reads/search: diff --git a/opencga-client/src/main/R/R/Individual-methods.R b/opencga-client/src/main/R/R/Individual-methods.R index 019acd410c2..348b34679a1 100644 --- a/opencga-client/src/main/R/R/Individual-methods.R +++ b/opencga-client/src/main/R/R/Individual-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-08-30 +# Autogenerated on: 2023-08-31 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/R/R/Job-methods.R b/opencga-client/src/main/R/R/Job-methods.R index f85fe4840f7..59955bac486 100644 --- a/opencga-client/src/main/R/R/Job-methods.R +++ b/opencga-client/src/main/R/R/Job-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-08-30 +# Autogenerated on: 2023-08-31 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. @@ -40,7 +40,7 @@ #' [*]: Required parameter #' @export -setMethod("jobClient", "OpencgaR", function(OpencgaR, members, job, jobs, endpointName, params=NULL, ...) { +setMethod("jobClient", "OpencgaR", function(OpencgaR, job, members, jobs, endpointName, params=NULL, ...) { switch(endpointName, #' @section Endpoint /{apiVersion}/jobs/acl/{members}/update: diff --git a/opencga-client/src/main/R/R/Meta-methods.R b/opencga-client/src/main/R/R/Meta-methods.R index d4de1c866b8..386dc6d24da 100644 --- a/opencga-client/src/main/R/R/Meta-methods.R +++ b/opencga-client/src/main/R/R/Meta-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-08-30 +# Autogenerated on: 2023-08-31 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/R/R/Operation-methods.R b/opencga-client/src/main/R/R/Operation-methods.R index 902a0403f47..f143297e89e 100644 --- a/opencga-client/src/main/R/R/Operation-methods.R +++ b/opencga-client/src/main/R/R/Operation-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-08-30 +# Autogenerated on: 2023-08-31 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/R/R/Panel-methods.R b/opencga-client/src/main/R/R/Panel-methods.R index e7d661d3a2c..1a7bf7bdbca 100644 --- a/opencga-client/src/main/R/R/Panel-methods.R +++ b/opencga-client/src/main/R/R/Panel-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-08-30 +# Autogenerated on: 2023-08-31 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/R/R/Project-methods.R b/opencga-client/src/main/R/R/Project-methods.R index b4ab8a5b98e..3e68f49bfe5 100644 --- a/opencga-client/src/main/R/R/Project-methods.R +++ b/opencga-client/src/main/R/R/Project-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-08-30 +# Autogenerated on: 2023-08-31 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. @@ -34,7 +34,7 @@ #' [*]: Required parameter #' @export -setMethod("projectClient", "OpencgaR", function(OpencgaR, projects, project, endpointName, params=NULL, ...) { +setMethod("projectClient", "OpencgaR", function(OpencgaR, project, projects, endpointName, params=NULL, ...) { switch(endpointName, #' @section Endpoint /{apiVersion}/projects/create: diff --git a/opencga-client/src/main/R/R/Sample-methods.R b/opencga-client/src/main/R/R/Sample-methods.R index 89b2d7b5876..a78d57987f3 100644 --- a/opencga-client/src/main/R/R/Sample-methods.R +++ b/opencga-client/src/main/R/R/Sample-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-08-30 +# Autogenerated on: 2023-08-31 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. @@ -39,7 +39,7 @@ #' [*]: Required parameter #' @export -setMethod("sampleClient", "OpencgaR", function(OpencgaR, members, sample, samples, annotationSet, endpointName, params=NULL, ...) { +setMethod("sampleClient", "OpencgaR", function(OpencgaR, samples, members, sample, annotationSet, endpointName, params=NULL, ...) { switch(endpointName, #' @section Endpoint /{apiVersion}/samples/acl/{members}/update: diff --git a/opencga-client/src/main/R/R/Study-methods.R b/opencga-client/src/main/R/R/Study-methods.R index 754fa677dea..682812a7583 100644 --- a/opencga-client/src/main/R/R/Study-methods.R +++ b/opencga-client/src/main/R/R/Study-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-08-30 +# Autogenerated on: 2023-08-31 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. @@ -46,7 +46,7 @@ #' [*]: Required parameter #' @export -setMethod("studyClient", "OpencgaR", function(OpencgaR, members, variableSet, studies, group, study, templateId, endpointName, params=NULL, ...) { +setMethod("studyClient", "OpencgaR", function(OpencgaR, members, variableSet, studies, study, templateId, group, endpointName, params=NULL, ...) { switch(endpointName, #' @section Endpoint /{apiVersion}/studies/acl/{members}/update: diff --git a/opencga-client/src/main/R/R/User-methods.R b/opencga-client/src/main/R/R/User-methods.R index 7fb54a32ff1..71089917286 100644 --- a/opencga-client/src/main/R/R/User-methods.R +++ b/opencga-client/src/main/R/R/User-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-08-30 +# Autogenerated on: 2023-08-31 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. @@ -38,7 +38,7 @@ #' [*]: Required parameter #' @export -setMethod("userClient", "OpencgaR", function(OpencgaR, user, filterId, users, endpointName, params=NULL, ...) { +setMethod("userClient", "OpencgaR", function(OpencgaR, filterId, users, user, endpointName, params=NULL, ...) { switch(endpointName, #' @section Endpoint /{apiVersion}/users/login: diff --git a/opencga-client/src/main/R/R/Variant-methods.R b/opencga-client/src/main/R/R/Variant-methods.R index 0b7a706cb8f..1925f53cf1d 100644 --- a/opencga-client/src/main/R/R/Variant-methods.R +++ b/opencga-client/src/main/R/R/Variant-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-08-30 +# Autogenerated on: 2023-08-31 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/AdminClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/AdminClient.java index 2a375bb7b83..71bae1378cd 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/AdminClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/AdminClient.java @@ -36,7 +36,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-08-30 +* Autogenerated on: 2023-08-31 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/AlignmentClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/AlignmentClient.java index 08257cc1a1a..e902d0d6454 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/AlignmentClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/AlignmentClient.java @@ -40,7 +40,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-08-30 +* Autogenerated on: 2023-08-31 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/ClinicalAnalysisClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/ClinicalAnalysisClient.java index 32ab712003e..012238a332a 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/ClinicalAnalysisClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/ClinicalAnalysisClient.java @@ -51,7 +51,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-08-30 +* Autogenerated on: 2023-08-31 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/CohortClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/CohortClient.java index 547601b9329..024ddc75a4c 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/CohortClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/CohortClient.java @@ -37,7 +37,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-08-30 +* Autogenerated on: 2023-08-31 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/DiseasePanelClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/DiseasePanelClient.java index ad5ea1a7047..ba7055998a1 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/DiseasePanelClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/DiseasePanelClient.java @@ -35,7 +35,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-08-30 +* Autogenerated on: 2023-08-31 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/FamilyClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/FamilyClient.java index d113cbdaf09..9b7142415e4 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/FamilyClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/FamilyClient.java @@ -36,7 +36,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-08-30 +* Autogenerated on: 2023-08-31 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/FileClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/FileClient.java index 72be6ed305b..c40f63da5d7 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/FileClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/FileClient.java @@ -43,7 +43,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-08-30 +* Autogenerated on: 2023-08-31 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/GA4GHClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/GA4GHClient.java index fbb84f972a4..a4afee831af 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/GA4GHClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/GA4GHClient.java @@ -27,7 +27,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-08-30 +* Autogenerated on: 2023-08-31 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/IndividualClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/IndividualClient.java index 5803d125e54..2b291285857 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/IndividualClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/IndividualClient.java @@ -36,7 +36,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-08-30 +* Autogenerated on: 2023-08-31 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/JobClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/JobClient.java index 27245d4011c..35e20d6ea8d 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/JobClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/JobClient.java @@ -37,7 +37,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-08-30 +* Autogenerated on: 2023-08-31 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/MetaClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/MetaClient.java index c2c015b670d..2a4c2afb9b8 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/MetaClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/MetaClient.java @@ -28,7 +28,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-08-30 +* Autogenerated on: 2023-08-31 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/ProjectClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/ProjectClient.java index 47aeec33622..b1dd2d4757b 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/ProjectClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/ProjectClient.java @@ -32,7 +32,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-08-30 +* Autogenerated on: 2023-08-31 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/SampleClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/SampleClient.java index d2dd71bc2f3..31b281cccd2 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/SampleClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/SampleClient.java @@ -36,7 +36,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-08-30 +* Autogenerated on: 2023-08-31 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/StudyClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/StudyClient.java index 53502e91c7e..6e4fb4a9495 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/StudyClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/StudyClient.java @@ -45,7 +45,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-08-30 +* Autogenerated on: 2023-08-31 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/UserClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/UserClient.java index eda89cb9228..3443565c6a3 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/UserClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/UserClient.java @@ -36,7 +36,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-08-30 +* Autogenerated on: 2023-08-31 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/VariantClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/VariantClient.java index 0d25391978a..fe1f4de3e99 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/VariantClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/VariantClient.java @@ -62,7 +62,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-08-30 +* Autogenerated on: 2023-08-31 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/VariantOperationClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/VariantOperationClient.java index ae6bef9d18d..e2b9052903e 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/VariantOperationClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/VariantOperationClient.java @@ -50,7 +50,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-08-30 +* Autogenerated on: 2023-08-31 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/Admin.js b/opencga-client/src/main/javascript/Admin.js index 26d6d454012..60a9d5b1c9e 100644 --- a/opencga-client/src/main/javascript/Admin.js +++ b/opencga-client/src/main/javascript/Admin.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-08-30 + * Autogenerated on: 2023-08-31 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/Alignment.js b/opencga-client/src/main/javascript/Alignment.js index 33aa92db017..10a7da5bad2 100644 --- a/opencga-client/src/main/javascript/Alignment.js +++ b/opencga-client/src/main/javascript/Alignment.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-08-30 + * Autogenerated on: 2023-08-31 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/ClinicalAnalysis.js b/opencga-client/src/main/javascript/ClinicalAnalysis.js index 4434d811346..687447b8005 100644 --- a/opencga-client/src/main/javascript/ClinicalAnalysis.js +++ b/opencga-client/src/main/javascript/ClinicalAnalysis.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-08-30 + * Autogenerated on: 2023-08-31 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/Cohort.js b/opencga-client/src/main/javascript/Cohort.js index cb53c5278a3..f121ff941f5 100644 --- a/opencga-client/src/main/javascript/Cohort.js +++ b/opencga-client/src/main/javascript/Cohort.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-08-30 + * Autogenerated on: 2023-08-31 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/DiseasePanel.js b/opencga-client/src/main/javascript/DiseasePanel.js index a4bc253c0bd..1216496f705 100644 --- a/opencga-client/src/main/javascript/DiseasePanel.js +++ b/opencga-client/src/main/javascript/DiseasePanel.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-08-30 + * Autogenerated on: 2023-08-31 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/Family.js b/opencga-client/src/main/javascript/Family.js index e971b3b2e81..ea150256018 100644 --- a/opencga-client/src/main/javascript/Family.js +++ b/opencga-client/src/main/javascript/Family.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-08-30 + * Autogenerated on: 2023-08-31 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/File.js b/opencga-client/src/main/javascript/File.js index b3219c4f08a..80d2eac1817 100644 --- a/opencga-client/src/main/javascript/File.js +++ b/opencga-client/src/main/javascript/File.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-08-30 + * Autogenerated on: 2023-08-31 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/GA4GH.js b/opencga-client/src/main/javascript/GA4GH.js index ec01beb21de..41810680d69 100644 --- a/opencga-client/src/main/javascript/GA4GH.js +++ b/opencga-client/src/main/javascript/GA4GH.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-08-30 + * Autogenerated on: 2023-08-31 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/Individual.js b/opencga-client/src/main/javascript/Individual.js index 71eb45dbafd..c611dbc3d20 100644 --- a/opencga-client/src/main/javascript/Individual.js +++ b/opencga-client/src/main/javascript/Individual.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-08-30 + * Autogenerated on: 2023-08-31 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/Job.js b/opencga-client/src/main/javascript/Job.js index 1e1cc91bc52..e751db7fb46 100644 --- a/opencga-client/src/main/javascript/Job.js +++ b/opencga-client/src/main/javascript/Job.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-08-30 + * Autogenerated on: 2023-08-31 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/Meta.js b/opencga-client/src/main/javascript/Meta.js index 24dfe87c63d..f49c2c01b37 100644 --- a/opencga-client/src/main/javascript/Meta.js +++ b/opencga-client/src/main/javascript/Meta.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-08-30 + * Autogenerated on: 2023-08-31 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/Project.js b/opencga-client/src/main/javascript/Project.js index e240c25cb46..0e5880626c3 100644 --- a/opencga-client/src/main/javascript/Project.js +++ b/opencga-client/src/main/javascript/Project.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-08-30 + * Autogenerated on: 2023-08-31 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/Sample.js b/opencga-client/src/main/javascript/Sample.js index 03c6a5b8d8f..21a7247620e 100644 --- a/opencga-client/src/main/javascript/Sample.js +++ b/opencga-client/src/main/javascript/Sample.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-08-30 + * Autogenerated on: 2023-08-31 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/Study.js b/opencga-client/src/main/javascript/Study.js index e99e8c7606b..c9e4deb0aac 100644 --- a/opencga-client/src/main/javascript/Study.js +++ b/opencga-client/src/main/javascript/Study.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-08-30 + * Autogenerated on: 2023-08-31 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/User.js b/opencga-client/src/main/javascript/User.js index bfed2a7bfec..904b617010a 100644 --- a/opencga-client/src/main/javascript/User.js +++ b/opencga-client/src/main/javascript/User.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-08-30 + * Autogenerated on: 2023-08-31 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/Variant.js b/opencga-client/src/main/javascript/Variant.js index ae9365d5448..3430052c798 100644 --- a/opencga-client/src/main/javascript/Variant.js +++ b/opencga-client/src/main/javascript/Variant.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-08-30 + * Autogenerated on: 2023-08-31 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/VariantOperation.js b/opencga-client/src/main/javascript/VariantOperation.js index f9837f69e25..5582f9cfd53 100644 --- a/opencga-client/src/main/javascript/VariantOperation.js +++ b/opencga-client/src/main/javascript/VariantOperation.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-08-30 + * Autogenerated on: 2023-08-31 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/admin_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/admin_client.py index e982694d126..98954f3e971 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/admin_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/admin_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-08-30 + Autogenerated on: 2023-08-31 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/alignment_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/alignment_client.py index b94f350449a..7a9da2b0a02 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/alignment_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/alignment_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-08-30 + Autogenerated on: 2023-08-31 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/clinical_analysis_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/clinical_analysis_client.py index ca4e1438978..7c5b60dc1a3 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/clinical_analysis_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/clinical_analysis_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-08-30 + Autogenerated on: 2023-08-31 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/cohort_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/cohort_client.py index fef4cafa48d..0a3b30eab24 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/cohort_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/cohort_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-08-30 + Autogenerated on: 2023-08-31 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/disease_panel_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/disease_panel_client.py index 8382900c307..e5176a346f7 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/disease_panel_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/disease_panel_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-08-30 + Autogenerated on: 2023-08-31 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/family_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/family_client.py index 0637f728a08..198bccd8143 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/family_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/family_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-08-30 + Autogenerated on: 2023-08-31 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/file_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/file_client.py index 816cdf83c0b..8ef5f6a3cee 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/file_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/file_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-08-30 + Autogenerated on: 2023-08-31 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/ga4gh_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/ga4gh_client.py index 6f62ec62786..4ed3b96720b 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/ga4gh_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/ga4gh_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-08-30 + Autogenerated on: 2023-08-31 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/individual_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/individual_client.py index 3982f010208..34ec70ec784 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/individual_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/individual_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-08-30 + Autogenerated on: 2023-08-31 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/job_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/job_client.py index 313cf0df796..d12fbfa375a 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/job_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/job_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-08-30 + Autogenerated on: 2023-08-31 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/meta_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/meta_client.py index 189a5ab62ea..c334170020b 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/meta_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/meta_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-08-30 + Autogenerated on: 2023-08-31 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/project_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/project_client.py index 0784b20594c..f9c91a6177f 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/project_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/project_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-08-30 + Autogenerated on: 2023-08-31 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/sample_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/sample_client.py index 258189685ef..d9afbca66d7 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/sample_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/sample_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-08-30 + Autogenerated on: 2023-08-31 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/study_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/study_client.py index 3726c1e0a3a..5698145ea79 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/study_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/study_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-08-30 + Autogenerated on: 2023-08-31 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/user_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/user_client.py index 80ac433566b..36018f0560f 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/user_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/user_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-08-30 + Autogenerated on: 2023-08-31 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/variant_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/variant_client.py index 32dfa804648..c6143f58c4d 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/variant_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/variant_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-08-30 + Autogenerated on: 2023-08-31 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/variant_operation_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/variant_operation_client.py index 4070484d219..10e74c335a6 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/variant_operation_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/variant_operation_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-08-30 + Autogenerated on: 2023-08-31 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. From 92558f56ec8f5c243385da948796d374a4875517 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20T=C3=A1rraga=20Gim=C3=A9nez?= Date: Thu, 7 Sep 2023 15:26:26 +0200 Subject: [PATCH 5/6] core: rename token to apiKey in some functions, #TASK-4898, #TASK-4641 --- .../opencb/opencga/core/cellbase/CellBaseValidator.java | 8 ++++---- .../annotators/AbstractCellBaseVariantAnnotator.java | 4 ++-- .../annotators/CellBaseRestVariantAnnotator.java | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/opencga-core/src/main/java/org/opencb/opencga/core/cellbase/CellBaseValidator.java b/opencga-core/src/main/java/org/opencb/opencga/core/cellbase/CellBaseValidator.java index 61f718dd785..edf5e3e50bc 100644 --- a/opencga-core/src/main/java/org/opencb/opencga/core/cellbase/CellBaseValidator.java +++ b/opencga-core/src/main/java/org/opencb/opencga/core/cellbase/CellBaseValidator.java @@ -198,7 +198,7 @@ private CellBaseConfiguration validate(boolean autoComplete) throws IOException cellBaseConfiguration.setApiKey(null); } else { // Check it's supported - if (!supportsToken(serverVersion)) { + if (!supportsApiKey(serverVersion)) { throw new IllegalArgumentException("API key not supported for cellbase " + "url: '" + getURL() + "'" + ", version: '" + inputVersion + "'"); @@ -270,8 +270,8 @@ public static boolean supportsDataReleaseActiveByDefaultIn(String serverVersion) return VersionUtils.isMinVersion("5.5.0", serverVersion, true); } - public static boolean supportsToken(String serverVersion) { - // Tokens support starts at version 5.4.0 + public static boolean supportsApiKey(String serverVersion) { + // API keys support starts at version 5.4.0 return VersionUtils.isMinVersion("5.4.0", serverVersion); } @@ -325,7 +325,7 @@ public String toString() { + "species '" + getSpecies() + "', " + "assembly '" + getAssembly() + "', " + "dataRelease '" + getDataRelease() + "', " - + "token '" + getApiKey() + "'"; + + "apiKey '" + getApiKey() + "'"; } } diff --git a/opencga-storage/opencga-storage-core/src/main/java/org/opencb/opencga/storage/core/variant/annotation/annotators/AbstractCellBaseVariantAnnotator.java b/opencga-storage/opencga-storage-core/src/main/java/org/opencb/opencga/storage/core/variant/annotation/annotators/AbstractCellBaseVariantAnnotator.java index fc743b13a76..da8d44b05b5 100644 --- a/opencga-storage/opencga-storage-core/src/main/java/org/opencb/opencga/storage/core/variant/annotation/annotators/AbstractCellBaseVariantAnnotator.java +++ b/opencga-storage/opencga-storage-core/src/main/java/org/opencb/opencga/storage/core/variant/annotation/annotators/AbstractCellBaseVariantAnnotator.java @@ -56,7 +56,7 @@ public abstract class AbstractCellBaseVariantAnnotator extends VariantAnnotator protected final String assembly; protected final String cellbaseVersion; protected final String cellbaseDataRelease; - protected final String cellbaseToken; + protected final String cellbaseApiKey; protected final QueryOptions queryOptions; protected final boolean supportImpreciseVariants; protected final boolean supportStarAlternate; @@ -72,7 +72,7 @@ public AbstractCellBaseVariantAnnotator(StorageConfiguration storageConfiguratio assembly = projectMetadata.getAssembly(); cellbaseVersion = storageConfiguration.getCellbase().getVersion(); cellbaseDataRelease = storageConfiguration.getCellbase().getDataRelease(); - cellbaseToken = storageConfiguration.getCellbase().getApiKey(); + cellbaseApiKey = storageConfiguration.getCellbase().getApiKey(); queryOptions = new QueryOptions(); if (StringUtils.isNotEmpty(params.getString(VariantStorageOptions.ANNOTATOR_CELLBASE_INCLUDE.key()))) { diff --git a/opencga-storage/opencga-storage-core/src/main/java/org/opencb/opencga/storage/core/variant/annotation/annotators/CellBaseRestVariantAnnotator.java b/opencga-storage/opencga-storage-core/src/main/java/org/opencb/opencga/storage/core/variant/annotation/annotators/CellBaseRestVariantAnnotator.java index 85ee3b0810c..a589a21e1a4 100644 --- a/opencga-storage/opencga-storage-core/src/main/java/org/opencb/opencga/storage/core/variant/annotation/annotators/CellBaseRestVariantAnnotator.java +++ b/opencga-storage/opencga-storage-core/src/main/java/org/opencb/opencga/storage/core/variant/annotation/annotators/CellBaseRestVariantAnnotator.java @@ -67,7 +67,7 @@ public CellBaseRestVariantAnnotator(StorageConfiguration storageConfiguration, P VariantStorageOptions.ANNOTATION_TIMEOUT.defaultValue()); clientConfiguration.getRest().setTimeout(timeoutMillis); - cellBaseClient = new CellBaseClient(species, assembly, cellbaseDataRelease, cellbaseToken, clientConfiguration); + cellBaseClient = new CellBaseClient(species, assembly, cellbaseDataRelease, cellbaseApiKey, clientConfiguration); cellBaseUtils = new CellBaseUtils(cellBaseClient); logger.info("Annotating with Cellbase REST. {}", cellBaseUtils); From 9b9ee1c44a9c4ce6e34a3f600d1e4ebc62080ffb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20T=C3=A1rraga=20Gim=C3=A9nez?= Date: Fri, 8 Sep 2023 08:29:43 +0200 Subject: [PATCH 6/6] analysis: use the project API key before using the storage API key, #TASK-4898, #TASK-4641 --- .../analysis/variant/manager/VariantStorageManager.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/manager/VariantStorageManager.java b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/manager/VariantStorageManager.java index e62528b6d28..22b337e9621 100644 --- a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/manager/VariantStorageManager.java +++ b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/manager/VariantStorageManager.java @@ -1021,7 +1021,8 @@ private void setCellbaseConfiguration(VariantStorageEngine engine, String projec .get(project, new QueryOptions(INCLUDE, ProjectDBAdaptor.QueryParams.CELLBASE.key()), token) .first().getCellbase(); if (cellbase != null) { - if (StringUtils.isEmpty(cellbase.getApiKey()) || storageConfiguration.getCellbase() != null) { + // To ensure that we use the project API key before using the storage API key + if (StringUtils.isEmpty(cellbase.getApiKey()) && storageConfiguration.getCellbase() != null) { cellbase.setApiKey(storageConfiguration.getCellbase().getApiKey()); } engine.getConfiguration().setCellbase(cellbase);