From d11cf4fafe245ace2e1d2eabd61a8e89366239f2 Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Tue, 10 Oct 2023 15:44:15 +0200 Subject: [PATCH 01/25] Prepare next release 2.8.5-SNAPSHOT --- opencga-analysis/pom.xml | 2 +- opencga-app/pom.xml | 2 +- opencga-catalog/pom.xml | 2 +- opencga-client/pom.xml | 2 +- opencga-clinical/pom.xml | 2 +- opencga-core/pom.xml | 2 +- opencga-master/pom.xml | 2 +- opencga-server/pom.xml | 2 +- opencga-storage/opencga-storage-app/pom.xml | 2 +- opencga-storage/opencga-storage-benchmark/pom.xml | 2 +- opencga-storage/opencga-storage-core/pom.xml | 2 +- .../opencga-storage-hadoop-core/pom.xml | 2 +- .../opencga-storage-hadoop-deps-emr6.1/pom.xml | 2 +- .../opencga-storage-hadoop-deps-hdp2.6/pom.xml | 2 +- .../opencga-storage-hadoop-deps-hdp3.1/pom.xml | 2 +- .../opencga-storage-hadoop-deps/pom.xml | 2 +- opencga-storage/opencga-storage-hadoop/pom.xml | 2 +- opencga-storage/opencga-storage-server/pom.xml | 2 +- opencga-storage/pom.xml | 2 +- opencga-test/pom.xml | 2 +- pom.xml | 14 +++++++------- 21 files changed, 27 insertions(+), 27 deletions(-) diff --git a/opencga-analysis/pom.xml b/opencga-analysis/pom.xml index 5def9cd5e2e..15dff3cd1e7 100644 --- a/opencga-analysis/pom.xml +++ b/opencga-analysis/pom.xml @@ -22,7 +22,7 @@ org.opencb.opencga opencga - 2.8.4 + 2.8.5-SNAPSHOT ../pom.xml diff --git a/opencga-app/pom.xml b/opencga-app/pom.xml index 9b7c4f29edd..5b5e9816d4b 100644 --- a/opencga-app/pom.xml +++ b/opencga-app/pom.xml @@ -22,7 +22,7 @@ org.opencb.opencga opencga - 2.8.4 + 2.8.5-SNAPSHOT ../pom.xml diff --git a/opencga-catalog/pom.xml b/opencga-catalog/pom.xml index 960d84a610a..0db6699e870 100644 --- a/opencga-catalog/pom.xml +++ b/opencga-catalog/pom.xml @@ -23,7 +23,7 @@ org.opencb.opencga opencga - 2.8.4 + 2.8.5-SNAPSHOT ../pom.xml diff --git a/opencga-client/pom.xml b/opencga-client/pom.xml index b8c097d777e..40aee62802c 100644 --- a/opencga-client/pom.xml +++ b/opencga-client/pom.xml @@ -22,7 +22,7 @@ org.opencb.opencga opencga - 2.8.4 + 2.8.5-SNAPSHOT ../pom.xml diff --git a/opencga-clinical/pom.xml b/opencga-clinical/pom.xml index e281f5d48a0..d4fe1b8f57a 100644 --- a/opencga-clinical/pom.xml +++ b/opencga-clinical/pom.xml @@ -5,7 +5,7 @@ org.opencb.opencga opencga - 2.8.4 + 2.8.5-SNAPSHOT ../pom.xml 4.0.0 diff --git a/opencga-core/pom.xml b/opencga-core/pom.xml index 1fcf341a09f..53ac0e8e0d8 100644 --- a/opencga-core/pom.xml +++ b/opencga-core/pom.xml @@ -22,7 +22,7 @@ org.opencb.opencga opencga - 2.8.4 + 2.8.5-SNAPSHOT ../pom.xml diff --git a/opencga-master/pom.xml b/opencga-master/pom.xml index 468fb7a5683..541395a0e23 100644 --- a/opencga-master/pom.xml +++ b/opencga-master/pom.xml @@ -22,7 +22,7 @@ opencga org.opencb.opencga - 2.8.4 + 2.8.5-SNAPSHOT ../pom.xml diff --git a/opencga-server/pom.xml b/opencga-server/pom.xml index 43949773d01..4709002d528 100644 --- a/opencga-server/pom.xml +++ b/opencga-server/pom.xml @@ -22,7 +22,7 @@ org.opencb.opencga opencga - 2.8.4 + 2.8.5-SNAPSHOT ../pom.xml diff --git a/opencga-storage/opencga-storage-app/pom.xml b/opencga-storage/opencga-storage-app/pom.xml index 8008b10a31f..3f1c313ed3a 100644 --- a/opencga-storage/opencga-storage-app/pom.xml +++ b/opencga-storage/opencga-storage-app/pom.xml @@ -22,7 +22,7 @@ org.opencb.opencga opencga-storage - 2.8.4 + 2.8.5-SNAPSHOT ../pom.xml diff --git a/opencga-storage/opencga-storage-benchmark/pom.xml b/opencga-storage/opencga-storage-benchmark/pom.xml index 9caad37be25..312e6003b2c 100644 --- a/opencga-storage/opencga-storage-benchmark/pom.xml +++ b/opencga-storage/opencga-storage-benchmark/pom.xml @@ -22,7 +22,7 @@ opencga-storage org.opencb.opencga - 2.8.4 + 2.8.5-SNAPSHOT ../pom.xml diff --git a/opencga-storage/opencga-storage-core/pom.xml b/opencga-storage/opencga-storage-core/pom.xml index 2c743523aeb..0c5f966aabd 100644 --- a/opencga-storage/opencga-storage-core/pom.xml +++ b/opencga-storage/opencga-storage-core/pom.xml @@ -25,7 +25,7 @@ org.opencb.opencga opencga-storage - 2.8.4 + 2.8.5-SNAPSHOT ../pom.xml diff --git a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/pom.xml b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/pom.xml index 39737e3e7be..98296b4901e 100644 --- a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/pom.xml +++ b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/pom.xml @@ -23,7 +23,7 @@ org.opencb.opencga opencga-storage-hadoop - 2.8.4 + 2.8.5-SNAPSHOT ../pom.xml diff --git a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/opencga-storage-hadoop-deps-emr6.1/pom.xml b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/opencga-storage-hadoop-deps-emr6.1/pom.xml index 55512378967..fe293123bdc 100644 --- a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/opencga-storage-hadoop-deps-emr6.1/pom.xml +++ b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/opencga-storage-hadoop-deps-emr6.1/pom.xml @@ -22,7 +22,7 @@ org.opencb.opencga opencga-storage-hadoop-deps - 2.8.4 + 2.8.5-SNAPSHOT ../pom.xml diff --git a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/opencga-storage-hadoop-deps-hdp2.6/pom.xml b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/opencga-storage-hadoop-deps-hdp2.6/pom.xml index 109b9c41cda..aac90a09a8a 100644 --- a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/opencga-storage-hadoop-deps-hdp2.6/pom.xml +++ b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/opencga-storage-hadoop-deps-hdp2.6/pom.xml @@ -22,7 +22,7 @@ org.opencb.opencga opencga-storage-hadoop-deps - 2.8.4 + 2.8.5-SNAPSHOT ../pom.xml diff --git a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/opencga-storage-hadoop-deps-hdp3.1/pom.xml b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/opencga-storage-hadoop-deps-hdp3.1/pom.xml index a662fff2a4a..7a69192b385 100644 --- a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/opencga-storage-hadoop-deps-hdp3.1/pom.xml +++ b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/opencga-storage-hadoop-deps-hdp3.1/pom.xml @@ -22,7 +22,7 @@ org.opencb.opencga opencga-storage-hadoop-deps - 2.8.4 + 2.8.5-SNAPSHOT ../pom.xml diff --git a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/pom.xml b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/pom.xml index d392b220a7b..707a75069a3 100644 --- a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/pom.xml +++ b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/pom.xml @@ -50,7 +50,7 @@ org.opencb.opencga opencga-storage-hadoop - 2.8.4 + 2.8.5-SNAPSHOT ../pom.xml diff --git a/opencga-storage/opencga-storage-hadoop/pom.xml b/opencga-storage/opencga-storage-hadoop/pom.xml index 7b57b777111..4088ff0d6c0 100644 --- a/opencga-storage/opencga-storage-hadoop/pom.xml +++ b/opencga-storage/opencga-storage-hadoop/pom.xml @@ -28,7 +28,7 @@ org.opencb.opencga opencga-storage - 2.8.4 + 2.8.5-SNAPSHOT ../pom.xml diff --git a/opencga-storage/opencga-storage-server/pom.xml b/opencga-storage/opencga-storage-server/pom.xml index b6e04e741d1..95e66c483d0 100644 --- a/opencga-storage/opencga-storage-server/pom.xml +++ b/opencga-storage/opencga-storage-server/pom.xml @@ -22,7 +22,7 @@ org.opencb.opencga opencga-storage - 2.8.4 + 2.8.5-SNAPSHOT ../pom.xml diff --git a/opencga-storage/pom.xml b/opencga-storage/pom.xml index bc38910593d..25fea1d22d3 100644 --- a/opencga-storage/pom.xml +++ b/opencga-storage/pom.xml @@ -22,7 +22,7 @@ org.opencb.opencga opencga - 2.8.4 + 2.8.5-SNAPSHOT ../pom.xml diff --git a/opencga-test/pom.xml b/opencga-test/pom.xml index 8420b1bfd5a..a4d34b234b5 100644 --- a/opencga-test/pom.xml +++ b/opencga-test/pom.xml @@ -24,7 +24,7 @@ org.opencb.opencga opencga - 2.8.4 + 2.8.5-SNAPSHOT ../pom.xml diff --git a/pom.xml b/pom.xml index 9da8d0e486f..f306b9a8557 100644 --- a/pom.xml +++ b/pom.xml @@ -22,7 +22,7 @@ org.opencb.opencga opencga - 2.8.4 + 2.8.5-SNAPSHOT pom OpenCGA OenCGA projects implements a big data platform for genomic data analysis @@ -42,12 +42,12 @@ - 2.8.4 - 2.8.4 - 5.4.1 - 2.8.0 - 4.8.0 - 2.8.4 + 2.8.5_dev + 2.8.5_dev + 5.4.2-SNAPSHOT + 2.8.1-SNAPSHOT + 4.8.1-SNAPSHOT + 2.8.5-SNAPSHOT 0.2.0 From 671ca6df4d4d558c5b8769749cf66be7cc753e95 Mon Sep 17 00:00:00 2001 From: pfurio Date: Mon, 16 Oct 2023 15:34:56 +0200 Subject: [PATCH 02/25] catalog: register malformed vcf after job execution, #TASK-2254 --- .../opencga/catalog/managers/FileManager.java | 18 ++++++++---- .../catalog/utils/FileMetadataReader.java | 2 +- .../monitor/daemons/ExecutionDaemon.java | 2 +- .../monitor/daemons/ExecutionDaemonTest.java | 29 +++++++++++++++++++ 4 files changed, 43 insertions(+), 8 deletions(-) diff --git a/opencga-catalog/src/main/java/org/opencb/opencga/catalog/managers/FileManager.java b/opencga-catalog/src/main/java/org/opencb/opencga/catalog/managers/FileManager.java index d3e4c12503a..b4b7c9d7a2b 100644 --- a/opencga-catalog/src/main/java/org/opencb/opencga/catalog/managers/FileManager.java +++ b/opencga-catalog/src/main/java/org/opencb/opencga/catalog/managers/FileManager.java @@ -3712,16 +3712,22 @@ OpenCGAResult registerFile(Study study, String filePath, URI fileUri, Stri File.Type type = filePath.endsWith("/") ? File.Type.DIRECTORY : File.Type.FILE; - File subfile = new File(Paths.get(filePath).getFileName().toString(), type, File.Format.UNKNOWN, - File.Bioformat.NONE, fileUri, filePath, "", TimeUtils.getTime(), TimeUtils.getTime(), - "", isExternal(study, filePath, fileUri), size, new Software(), new FileExperiment(), Collections.emptyList(), - Collections.emptyList(), jobId, studyManager.getCurrentRelease(study), Collections.emptyList(), Collections.emptyList(), - new FileQualityControl(), Collections.emptyMap(), new Status(), FileInternal.init(), Collections.emptyMap()); + File.Format format = org.opencb.opencga.catalog.managers.FileUtils.detectFormat(fileUri); + File.Bioformat bioformat = org.opencb.opencga.catalog.managers.FileUtils.detectBioformat(fileUri); + File subfile = new File(Paths.get(filePath).getFileName().toString(), type, format, bioformat, fileUri, filePath, "", + TimeUtils.getTime(), TimeUtils.getTime(), "", isExternal(study, filePath, fileUri), size, new Software(), + new FileExperiment(), Collections.emptyList(), Collections.emptyList(), jobId, studyManager.getCurrentRelease(study), + Collections.emptyList(), Collections.emptyList(), new FileQualityControl(), Collections.emptyMap(), new Status(), + FileInternal.init(), Collections.emptyMap()); subfile.setUuid(UuidUtils.generateOpenCgaUuid(UuidUtils.Entity.FILE)); checkHooks(subfile, study.getFqn(), HookConfiguration.Stage.CREATE); // Improve metadata information and extract samples if any - new FileMetadataReader(catalogManager).addMetadataInformation(study.getFqn(), subfile); + try { + new FileMetadataReader(catalogManager).addMetadataInformation(study.getFqn(), subfile); + } catch (CatalogException e) { + logger.warn("Could not extract metadata information from file {}: {}", fileUri, e.getMessage(), e); + } List existingSamples = new LinkedList<>(); List nonExistingSamples = new LinkedList<>(); validateNewSamples(study, subfile, existingSamples, nonExistingSamples, token); diff --git a/opencga-catalog/src/main/java/org/opencb/opencga/catalog/utils/FileMetadataReader.java b/opencga-catalog/src/main/java/org/opencb/opencga/catalog/utils/FileMetadataReader.java index 12cdbf83801..8a51691706f 100644 --- a/opencga-catalog/src/main/java/org/opencb/opencga/catalog/utils/FileMetadataReader.java +++ b/opencga-catalog/src/main/java/org/opencb/opencga/catalog/utils/FileMetadataReader.java @@ -181,7 +181,7 @@ private FileUpdateParams extractMetadataInformation(String studyId, File file) t VariantFileMetadata fileMetadata; try { fileMetadata = readVariantFileMetadata(file, file.getUri()); - } catch (IOException e) { + } catch (Exception e) { throw new CatalogIOException("Unable to read VariantSource", e); } if (fileMetadata != null) { diff --git a/opencga-master/src/main/java/org/opencb/opencga/master/monitor/daemons/ExecutionDaemon.java b/opencga-master/src/main/java/org/opencb/opencga/master/monitor/daemons/ExecutionDaemon.java index e7920c53303..602257b4fb2 100644 --- a/opencga-master/src/main/java/org/opencb/opencga/master/monitor/daemons/ExecutionDaemon.java +++ b/opencga-master/src/main/java/org/opencb/opencga/master/monitor/daemons/ExecutionDaemon.java @@ -986,7 +986,7 @@ private int processFinishedJob(Job job, Enums.ExecutionStatus status) { registeredFiles = fileManager.syncUntrackedFiles(job.getStudy().getId(), job.getOutDir().getPath(), uriPredicate, job.getId(), token).getResults(); } catch (CatalogException e) { - logger.error("Could not registered files in Catalog: {}", e.getMessage(), e); + logger.error("Could not register files in Catalog: {}", e.getMessage(), e); return 0; } diff --git a/opencga-master/src/test/java/org/opencb/opencga/master/monitor/daemons/ExecutionDaemonTest.java b/opencga-master/src/test/java/org/opencb/opencga/master/monitor/daemons/ExecutionDaemonTest.java index e04aee848ae..bf627ee3277 100644 --- a/opencga-master/src/test/java/org/opencb/opencga/master/monitor/daemons/ExecutionDaemonTest.java +++ b/opencga-master/src/test/java/org/opencb/opencga/master/monitor/daemons/ExecutionDaemonTest.java @@ -37,6 +37,7 @@ import org.opencb.opencga.core.exceptions.ToolException; import org.opencb.opencga.core.models.AclParams; import org.opencb.opencga.core.models.common.Enums; +import org.opencb.opencga.core.models.file.File; import org.opencb.opencga.core.models.file.FileContent; import org.opencb.opencga.core.models.job.Job; import org.opencb.opencga.core.models.job.JobInternal; @@ -52,6 +53,7 @@ import org.opencb.opencga.master.monitor.models.PrivateJobUpdateParams; import java.io.ByteArrayInputStream; +import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.net.URL; @@ -538,6 +540,33 @@ public void testRunJobFailMissingExecutionResult() throws Exception { assertEquals("Job could not finish successfully. Missing execution result", getJob(jobId).getInternal().getStatus().getDescription()); } + @Test + public void registerMalformedVcfFromExecutedJobTest() throws CatalogException { + HashMap params = new HashMap<>(); + params.put(ExecutionDaemon.OUTDIR_PARAM, "outputDir/"); + Job job = catalogManager.getJobManager().submit(studyFqn, "variant-index", Enums.Priority.MEDIUM, params, token).first(); + String jobId = job.getId(); + + daemon.checkJobs(); + job = catalogManager.getJobManager().get(studyFqn, jobId, QueryOptions.empty(), token).first(); + executor.jobStatus.put(jobId, Enums.ExecutionStatus.READY); + try { + // Create an empty VCF file (this will fail because OpenCGA will not be able to parse it) + Path vcffile = Paths.get(job.getOutDir().getUri()).resolve("myemptyvcf.vcf"); + Files.createFile(vcffile); + } catch (IOException e) { + throw new RuntimeException(e); + } + + daemon.checkJobs(); + + // Check the file has been properly registered + job = catalogManager.getJobManager().get(studyFqn, jobId, QueryOptions.empty(), token).first(); + assertEquals(1, job.getOutput().size()); + assertEquals("myemptyvcf.vcf", job.getOutput().get(0).getName()); + assertEquals(File.Format.VCF, job.getOutput().get(0).getFormat()); + } + private void checkStatus(Job job, String status) { assertEquals(status, job.getInternal().getStatus().getId()); assertEquals(status, job.getInternal().getStatus().getName()); From ebb158d6ae7f730db2714852864821c9e0482115 Mon Sep 17 00:00:00 2001 From: pfurio Date: Mon, 16 Oct 2023 16:08:57 +0200 Subject: [PATCH 03/25] catalog: register file with internal status ERROR, #TASK-2254 --- .../org/opencb/opencga/catalog/managers/FileManager.java | 1 + .../java/org/opencb/opencga/core/models/file/FileStatus.java | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/opencga-catalog/src/main/java/org/opencb/opencga/catalog/managers/FileManager.java b/opencga-catalog/src/main/java/org/opencb/opencga/catalog/managers/FileManager.java index b4b7c9d7a2b..d7cbd3cc475 100644 --- a/opencga-catalog/src/main/java/org/opencb/opencga/catalog/managers/FileManager.java +++ b/opencga-catalog/src/main/java/org/opencb/opencga/catalog/managers/FileManager.java @@ -3726,6 +3726,7 @@ OpenCGAResult registerFile(Study study, String filePath, URI fileUri, Stri try { new FileMetadataReader(catalogManager).addMetadataInformation(study.getFqn(), subfile); } catch (CatalogException e) { + subfile.getInternal().setStatus(new FileStatus(FileStatus.ERROR, "Could not extract metadata information: " + e.getMessage())); logger.warn("Could not extract metadata information from file {}: {}", fileUri, e.getMessage(), e); } List existingSamples = new LinkedList<>(); diff --git a/opencga-core/src/main/java/org/opencb/opencga/core/models/file/FileStatus.java b/opencga-core/src/main/java/org/opencb/opencga/core/models/file/FileStatus.java index 04ee6363d47..e35f463b9c6 100644 --- a/opencga-core/src/main/java/org/opencb/opencga/core/models/file/FileStatus.java +++ b/opencga-core/src/main/java/org/opencb/opencga/core/models/file/FileStatus.java @@ -33,9 +33,10 @@ public class FileStatus extends InternalStatus { public static final String DELETING = "DELETING"; // This status is set exactly before deleting the file from disk. public static final String REMOVED = "REMOVED"; public static final String MISSING_SAMPLES = "MISSING_SAMPLES"; + public static final String ERROR = "ERROR"; public static final List STATUS_LIST = Arrays.asList(READY, DELETED, TRASHED, STAGE, MISSING, PENDING_DELETE, DELETING, - REMOVED, MISSING_SAMPLES); + REMOVED, MISSING_SAMPLES, ERROR); public FileStatus(String status, String message) { if (isValid(status)) { @@ -59,7 +60,7 @@ public static boolean isValid(String status) { } if (status != null && (status.equals(STAGE) || status.equals(MISSING) || status.equals(TRASHED) || status.equals(PENDING_DELETE) || status.equals(DELETING) || status.equals(REMOVED) - || status.equals(MISSING_SAMPLES))) { + || status.equals(MISSING_SAMPLES) || status.equals(ERROR))) { return true; } return false; From a2a2fa519ecaf4373c3c4cc69a4ebb979b1f352e Mon Sep 17 00:00:00 2001 From: pfurio Date: Mon, 16 Oct 2023 16:27:25 +0200 Subject: [PATCH 04/25] catalog: check status id, #TASK-2254 --- .../opencga/master/monitor/daemons/ExecutionDaemonTest.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/opencga-master/src/test/java/org/opencb/opencga/master/monitor/daemons/ExecutionDaemonTest.java b/opencga-master/src/test/java/org/opencb/opencga/master/monitor/daemons/ExecutionDaemonTest.java index bf627ee3277..2251f2b5b09 100644 --- a/opencga-master/src/test/java/org/opencb/opencga/master/monitor/daemons/ExecutionDaemonTest.java +++ b/opencga-master/src/test/java/org/opencb/opencga/master/monitor/daemons/ExecutionDaemonTest.java @@ -39,6 +39,7 @@ import org.opencb.opencga.core.models.common.Enums; import org.opencb.opencga.core.models.file.File; import org.opencb.opencga.core.models.file.FileContent; +import org.opencb.opencga.core.models.file.FileStatus; import org.opencb.opencga.core.models.job.Job; import org.opencb.opencga.core.models.job.JobInternal; import org.opencb.opencga.core.models.job.JobInternalWebhook; @@ -565,6 +566,7 @@ public void registerMalformedVcfFromExecutedJobTest() throws CatalogException { assertEquals(1, job.getOutput().size()); assertEquals("myemptyvcf.vcf", job.getOutput().get(0).getName()); assertEquals(File.Format.VCF, job.getOutput().get(0).getFormat()); + assertEquals(FileStatus.ERROR, job.getOutput().get(0).getInternal().getStatus().getId()); } private void checkStatus(Job job, String status) { From e4962c8a9967b6198c81bb8bc3e5541e811ab95c Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Fri, 27 Oct 2023 15:39:23 +0200 Subject: [PATCH 05/25] CLI: getObjetcJson method params are now category and path --- .../app/cli/main/OpenCgaCompleter.java | 2 +- .../app/cli/main/OpencgaCliOptionsParser.java | 2 +- .../main/executors/AdminCommandExecutor.java | 13 ++--- .../AnalysisAlignmentCommandExecutor.java | 19 +++---- .../AnalysisClinicalCommandExecutor.java | 25 ++++----- .../AnalysisVariantCommandExecutor.java | 49 +++++++++--------- .../executors/CohortsCommandExecutor.java | 13 ++--- .../DiseasePanelsCommandExecutor.java | 9 ++-- .../executors/FamiliesCommandExecutor.java | 11 ++-- .../main/executors/FilesCommandExecutor.java | 19 +++---- .../executors/IndividualsCommandExecutor.java | 11 ++-- .../main/executors/JobsCommandExecutor.java | 9 ++-- .../main/executors/MetaCommandExecutor.java | 1 + .../executors/OpencgaCommandExecutor.java | 30 +++++++++-- ...erationsVariantStorageCommandExecutor.java | 51 ++++++++++--------- .../executors/ProjectsCommandExecutor.java | 5 +- .../executors/SamplesCommandExecutor.java | 11 ++-- .../executors/StudiesCommandExecutor.java | 17 ++++--- .../main/executors/UsersCommandExecutor.java | 7 +-- 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 | 18 +++---- .../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 | 2 +- .../src/main/R/R/Individual-methods.R | 4 +- 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 | 2 +- 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 | 4 +- .../client/rest/clients/AlignmentClient.java | 4 +- .../rest/clients/ClinicalAnalysisClient.java | 4 +- .../client/rest/clients/CohortClient.java | 4 +- .../rest/clients/DiseasePanelClient.java | 4 +- .../client/rest/clients/FamilyClient.java | 4 +- .../client/rest/clients/FileClient.java | 4 +- .../client/rest/clients/GA4GHClient.java | 4 +- .../client/rest/clients/IndividualClient.java | 4 +- .../client/rest/clients/JobClient.java | 4 +- .../client/rest/clients/MetaClient.java | 4 +- .../client/rest/clients/ProjectClient.java | 4 +- .../client/rest/clients/SampleClient.java | 4 +- .../client/rest/clients/StudyClient.java | 4 +- .../client/rest/clients/UserClient.java | 4 +- .../client/rest/clients/VariantClient.java | 4 +- .../rest/clients/VariantOperationClient.java | 4 +- 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 | 4 +- .../rest_clients/alignment_client.py | 4 +- .../rest_clients/clinical_analysis_client.py | 4 +- .../pyopencga/rest_clients/cohort_client.py | 4 +- .../rest_clients/disease_panel_client.py | 4 +- .../pyopencga/rest_clients/family_client.py | 4 +- .../pyopencga/rest_clients/file_client.py | 4 +- .../pyopencga/rest_clients/ga4gh_client.py | 4 +- .../rest_clients/individual_client.py | 4 +- .../pyopencga/rest_clients/job_client.py | 4 +- .../pyopencga/rest_clients/meta_client.py | 4 +- .../pyopencga/rest_clients/project_client.py | 4 +- .../pyopencga/rest_clients/sample_client.py | 4 +- .../pyopencga/rest_clients/study_client.py | 4 +- .../pyopencga/rest_clients/user_client.py | 4 +- .../pyopencga/rest_clients/variant_client.py | 4 +- .../rest_clients/variant_operation_client.py | 4 +- .../cli/ExecutorsCliRestApiWriter.java | 3 +- 89 files changed, 293 insertions(+), 254 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 ee9f603f739..7d088edef53 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-09-12 OpenCB +* Copyright 2015-2023-10-27 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 832d5638d49..279ccd36197 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-09-12 OpenCB +* Copyright 2015-2023-10-27 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/AdminCommandExecutor.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/AdminCommandExecutor.java index a16efb4df47..0ab7c6405dc 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/AdminCommandExecutor.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/AdminCommandExecutor.java @@ -48,6 +48,7 @@ */ public class AdminCommandExecutor extends OpencgaCommandExecutor { + public String categoryName = "admin"; public AdminCommandOptions adminCommandOptions; public AdminCommandExecutor(AdminCommandOptions adminCommandOptions) throws CatalogAuthenticationException { @@ -138,7 +139,7 @@ private RestResponse installCatalog() throws Exception { installationParams = new InstallationParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(installationParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/admin/catalog/install")); return res; } else if (commandOptions.jsonFile != null) { installationParams = JacksonUtils.getDefaultObjectMapper() @@ -167,7 +168,7 @@ private RestResponse jwtCatalog() throws Exception { jWTParams = new JWTParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(jWTParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/admin/catalog/jwt")); return res; } else if (commandOptions.jsonFile != null) { jWTParams = JacksonUtils.getDefaultObjectMapper() @@ -193,7 +194,7 @@ private RestResponse createUsers() throws Exception { userCreateParams = new UserCreateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(userCreateParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/admin/users/create")); return res; } else if (commandOptions.jsonFile != null) { userCreateParams = JacksonUtils.getDefaultObjectMapper() @@ -224,7 +225,7 @@ private RestResponse importUsers() throws Exception { userImportParams = new UserImportParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(userImportParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/admin/users/import")); return res; } else if (commandOptions.jsonFile != null) { userImportParams = JacksonUtils.getDefaultObjectMapper() @@ -272,7 +273,7 @@ private RestResponse syncUsers() throws Exception { groupSyncParams = new GroupSyncParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(groupSyncParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/admin/users/sync")); return res; } else if (commandOptions.jsonFile != null) { groupSyncParams = JacksonUtils.getDefaultObjectMapper() @@ -308,7 +309,7 @@ private RestResponse usersUpdateGroups() throws Exception { userUpdateGroup = new UserUpdateGroup(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(userUpdateGroup)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/admin/users/{user}/groups/update")); return res; } else if (commandOptions.jsonFile != null) { userUpdateGroup = JacksonUtils.getDefaultObjectMapper() diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/AnalysisAlignmentCommandExecutor.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/AnalysisAlignmentCommandExecutor.java index 328a83daeb4..60c7752ddbe 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/AnalysisAlignmentCommandExecutor.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/AnalysisAlignmentCommandExecutor.java @@ -48,6 +48,7 @@ */ public class AnalysisAlignmentCommandExecutor extends OpencgaCommandExecutor { + public String categoryName = "analysisAlignment"; public AnalysisAlignmentCommandOptions analysisAlignmentCommandOptions; public AnalysisAlignmentCommandExecutor(AnalysisAlignmentCommandOptions analysisAlignmentCommandOptions) throws CatalogAuthenticationException { @@ -134,7 +135,7 @@ private RestResponse runBwa() throws Exception { bwaWrapperParams = new BwaWrapperParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(bwaWrapperParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/alignment/bwa/run")); return res; } else if (commandOptions.jsonFile != null) { bwaWrapperParams = JacksonUtils.getDefaultObjectMapper() @@ -176,7 +177,7 @@ private RestResponse runCoverageIndex() throws Exception { coverageIndexParams = new CoverageIndexParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(coverageIndexParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/alignment/coverage/index/run")); return res; } else if (commandOptions.jsonFile != null) { coverageIndexParams = JacksonUtils.getDefaultObjectMapper() @@ -215,7 +216,7 @@ private RestResponse coverageQcGeneCoverageStatsRun() throws Exception { alignmentGeneCoverageStatsParams = new AlignmentGeneCoverageStatsParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(alignmentGeneCoverageStatsParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/alignment/coverage/qc/geneCoverageStats/run")); return res; } else if (commandOptions.jsonFile != null) { alignmentGeneCoverageStatsParams = JacksonUtils.getDefaultObjectMapper() @@ -311,7 +312,7 @@ private RestResponse runDeeptools() throws Exception { deeptoolsWrapperParams = new DeeptoolsWrapperParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(deeptoolsWrapperParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/alignment/deeptools/run")); return res; } else if (commandOptions.jsonFile != null) { deeptoolsWrapperParams = JacksonUtils.getDefaultObjectMapper() @@ -350,7 +351,7 @@ private RestResponse runFastqc() throws Exception { fastqcWrapperParams = new FastqcWrapperParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(fastqcWrapperParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/alignment/fastqc/run")); return res; } else if (commandOptions.jsonFile != null) { fastqcWrapperParams = JacksonUtils.getDefaultObjectMapper() @@ -389,7 +390,7 @@ private RestResponse runIndex() throws Exception { alignmentIndexParams = new AlignmentIndexParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(alignmentIndexParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/alignment/index/run")); return res; } else if (commandOptions.jsonFile != null) { alignmentIndexParams = JacksonUtils.getDefaultObjectMapper() @@ -427,7 +428,7 @@ private RestResponse runPicard() throws Exception { picardWrapperParams = new PicardWrapperParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(picardWrapperParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/alignment/picard/run")); return res; } else if (commandOptions.jsonFile != null) { picardWrapperParams = JacksonUtils.getDefaultObjectMapper() @@ -466,7 +467,7 @@ private RestResponse runQc() throws Exception { alignmentQcParams = new AlignmentQcParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(alignmentQcParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/alignment/qc/run")); return res; } else if (commandOptions.jsonFile != null) { alignmentQcParams = JacksonUtils.getDefaultObjectMapper() @@ -538,7 +539,7 @@ private RestResponse runSamtools() throws Exception { samtoolsWrapperParams = new SamtoolsWrapperParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(samtoolsWrapperParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/alignment/samtools/run")); return res; } else if (commandOptions.jsonFile != null) { samtoolsWrapperParams = JacksonUtils.getDefaultObjectMapper() diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/AnalysisClinicalCommandExecutor.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/AnalysisClinicalCommandExecutor.java index 3039ab1cc68..0bd8b87285e 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/AnalysisClinicalCommandExecutor.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/AnalysisClinicalCommandExecutor.java @@ -80,6 +80,7 @@ */ public class AnalysisClinicalCommandExecutor extends OpencgaCommandExecutor { + public String categoryName = "analysisClinical"; public AnalysisClinicalCommandOptions analysisClinicalCommandOptions; public AnalysisClinicalCommandExecutor(AnalysisClinicalCommandOptions analysisClinicalCommandOptions) throws CatalogAuthenticationException { @@ -217,7 +218,7 @@ private RestResponse updateAcl() throws Exception clinicalAnalysisAclUpdateParams = new ClinicalAnalysisAclUpdateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(clinicalAnalysisAclUpdateParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/clinical/acl/{members}/update")); return res; } else if (commandOptions.jsonFile != null) { clinicalAnalysisAclUpdateParams = JacksonUtils.getDefaultObjectMapper() @@ -251,7 +252,7 @@ private RestResponse updateClinicalConfiguration() throws Exception { clinicalAnalysisStudyConfiguration = new ClinicalAnalysisStudyConfiguration(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(clinicalAnalysisStudyConfiguration)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/clinical/clinical/configuration/update")); return res; } else if (commandOptions.jsonFile != null) { clinicalAnalysisStudyConfiguration = JacksonUtils.getDefaultObjectMapper() @@ -288,7 +289,7 @@ private RestResponse create() throws Exception { clinicalAnalysisCreateParams = new ClinicalAnalysisCreateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(clinicalAnalysisCreateParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/clinical/create")); return res; } else if (commandOptions.jsonFile != null) { clinicalAnalysisCreateParams = JacksonUtils.getDefaultObjectMapper() @@ -467,7 +468,7 @@ private RestResponse runInterpreterCancerTiering() throws Exception { cancerTieringInterpretationAnalysisParams = new CancerTieringInterpretationAnalysisParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(cancerTieringInterpretationAnalysisParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/clinical/interpreter/cancerTiering/run")); return res; } else if (commandOptions.jsonFile != null) { cancerTieringInterpretationAnalysisParams = JacksonUtils.getDefaultObjectMapper() @@ -506,7 +507,7 @@ private RestResponse runInterpreterExomiser() throws Exception { exomiserInterpretationAnalysisParams = new ExomiserInterpretationAnalysisParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(exomiserInterpretationAnalysisParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/clinical/interpreter/exomiser/run")); return res; } else if (commandOptions.jsonFile != null) { exomiserInterpretationAnalysisParams = JacksonUtils.getDefaultObjectMapper() @@ -543,7 +544,7 @@ private RestResponse runInterpreterTeam() throws Exception { teamInterpretationAnalysisParams = new TeamInterpretationAnalysisParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(teamInterpretationAnalysisParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/clinical/interpreter/team/run")); return res; } else if (commandOptions.jsonFile != null) { teamInterpretationAnalysisParams = JacksonUtils.getDefaultObjectMapper() @@ -583,7 +584,7 @@ private RestResponse runInterpreterTiering() throws Exception { tieringInterpretationAnalysisParams = new TieringInterpretationAnalysisParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(tieringInterpretationAnalysisParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/clinical/interpreter/tiering/run")); return res; } else if (commandOptions.jsonFile != null) { tieringInterpretationAnalysisParams = JacksonUtils.getDefaultObjectMapper() @@ -623,7 +624,7 @@ private RestResponse runInterpreterZetta() throws Exception { zettaInterpretationAnalysisParams = new ZettaInterpretationAnalysisParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(zettaInterpretationAnalysisParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/clinical/interpreter/zetta/run")); return res; } else if (commandOptions.jsonFile != null) { zettaInterpretationAnalysisParams = JacksonUtils.getDefaultObjectMapper() @@ -826,7 +827,7 @@ private RestResponse runRgaIndex() throws Exception { rgaAnalysisParams = new RgaAnalysisParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(rgaAnalysisParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/clinical/rga/index/run")); return res; } else if (commandOptions.jsonFile != null) { rgaAnalysisParams = JacksonUtils.getDefaultObjectMapper() @@ -1166,7 +1167,7 @@ private RestResponse update() throws Exception { clinicalAnalysisUpdateParams = new ClinicalAnalysisUpdateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(clinicalAnalysisUpdateParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/clinical/{clinicalAnalyses}/update")); return res; } else if (commandOptions.jsonFile != null) { clinicalAnalysisUpdateParams = JacksonUtils.getDefaultObjectMapper() @@ -1241,7 +1242,7 @@ private RestResponse createInterpretation() throws Exception { interpretationCreateParams = new InterpretationCreateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(interpretationCreateParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/clinical/{clinicalAnalysis}/interpretation/create")); return res; } else if (commandOptions.jsonFile != null) { interpretationCreateParams = JacksonUtils.getDefaultObjectMapper() @@ -1331,7 +1332,7 @@ private RestResponse updateInterpretation() throws Exception { interpretationUpdateParams = new InterpretationUpdateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(interpretationUpdateParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/clinical/{clinicalAnalysis}/interpretation/{interpretation}/update")); return res; } else if (commandOptions.jsonFile != null) { interpretationUpdateParams = JacksonUtils.getDefaultObjectMapper() diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/AnalysisVariantCommandExecutor.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/AnalysisVariantCommandExecutor.java index 601ea3739bf..418b0c3ac40 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/AnalysisVariantCommandExecutor.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/AnalysisVariantCommandExecutor.java @@ -76,6 +76,7 @@ */ public class AnalysisVariantCommandExecutor extends OpencgaCommandExecutor { + public String categoryName = "analysisVariant"; public AnalysisVariantCommandOptions analysisVariantCommandOptions; public AnalysisVariantCommandExecutor(AnalysisVariantCommandOptions analysisVariantCommandOptions) throws CatalogAuthenticationException { @@ -315,7 +316,7 @@ private RestResponse runCircos() throws Exception { circosAnalysisParams = new CircosAnalysisParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(circosAnalysisParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/variant/circos/run")); return res; } else if (commandOptions.jsonFile != null) { circosAnalysisParams = JacksonUtils.getDefaultObjectMapper() @@ -384,7 +385,7 @@ private RestResponse runCohortStats() throws Exception { cohortVariantStatsAnalysisParams = new CohortVariantStatsAnalysisParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(cohortVariantStatsAnalysisParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/variant/cohort/stats/run")); return res; } else if (commandOptions.jsonFile != null) { cohortVariantStatsAnalysisParams = JacksonUtils.getDefaultObjectMapper() @@ -425,7 +426,7 @@ private RestResponse runExomiser() throws Exception { exomiserWrapperParams = new ExomiserWrapperParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(exomiserWrapperParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/variant/exomiser/run")); return res; } else if (commandOptions.jsonFile != null) { exomiserWrapperParams = JacksonUtils.getDefaultObjectMapper() @@ -466,7 +467,7 @@ private RestResponse runExport() throws Exception { variantExportParams = new VariantExportParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(variantExportParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/variant/export/run")); return res; } else if (commandOptions.jsonFile != null) { variantExportParams = JacksonUtils.getDefaultObjectMapper() @@ -607,7 +608,7 @@ private RestResponse runFamilyQc() throws Exception { familyQcAnalysisParams = new FamilyQcAnalysisParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(familyQcAnalysisParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/variant/family/qc/run")); return res; } else if (commandOptions.jsonFile != null) { familyQcAnalysisParams = JacksonUtils.getDefaultObjectMapper() @@ -667,7 +668,7 @@ private RestResponse runGatk() throws Exception { gatkWrapperParams = new GatkWrapperParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(gatkWrapperParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/variant/gatk/run")); return res; } else if (commandOptions.jsonFile != null) { gatkWrapperParams = JacksonUtils.getDefaultObjectMapper() @@ -706,7 +707,7 @@ private RestResponse runGenomePlot() throws Exception { genomePlotAnalysisParams = new GenomePlotAnalysisParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(genomePlotAnalysisParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/variant/genomePlot/run")); return res; } else if (commandOptions.jsonFile != null) { genomePlotAnalysisParams = JacksonUtils.getDefaultObjectMapper() @@ -747,7 +748,7 @@ private RestResponse runGwas() throws Exception { gwasAnalysisParams = new GwasAnalysisParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(gwasAnalysisParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/variant/gwas/run")); return res; } else if (commandOptions.jsonFile != null) { gwasAnalysisParams = JacksonUtils.getDefaultObjectMapper() @@ -795,7 +796,7 @@ private RestResponse runHrDetect() throws Exception { hRDetectAnalysisParams = new HRDetectAnalysisParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(hRDetectAnalysisParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/variant/hrDetect/run")); return res; } else if (commandOptions.jsonFile != null) { hRDetectAnalysisParams = JacksonUtils.getDefaultObjectMapper() @@ -844,7 +845,7 @@ private RestResponse runIndex() throws Exception { variantIndexParams = new VariantIndexParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(variantIndexParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/variant/index/run")); return res; } else if (commandOptions.jsonFile != null) { variantIndexParams = JacksonUtils.getDefaultObjectMapper() @@ -909,7 +910,7 @@ private RestResponse runIndividualQc() throws Exception { individualQcAnalysisParams = new IndividualQcAnalysisParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(individualQcAnalysisParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/variant/individual/qc/run")); return res; } else if (commandOptions.jsonFile != null) { individualQcAnalysisParams = JacksonUtils.getDefaultObjectMapper() @@ -949,7 +950,7 @@ private RestResponse runInferredSex() throws Exception { inferredSexAnalysisParams = new InferredSexAnalysisParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(inferredSexAnalysisParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/variant/inferredSex/run")); return res; } else if (commandOptions.jsonFile != null) { inferredSexAnalysisParams = JacksonUtils.getDefaultObjectMapper() @@ -1022,7 +1023,7 @@ private RestResponse runKnockout() throws Exception { knockoutAnalysisParams = new KnockoutAnalysisParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(knockoutAnalysisParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/variant/knockout/run")); return res; } else if (commandOptions.jsonFile != null) { knockoutAnalysisParams = JacksonUtils.getDefaultObjectMapper() @@ -1068,7 +1069,7 @@ private RestResponse runMendelianError() throws Exception { mendelianErrorAnalysisParams = new MendelianErrorAnalysisParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(mendelianErrorAnalysisParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/variant/mendelianError/run")); return res; } else if (commandOptions.jsonFile != null) { mendelianErrorAnalysisParams = JacksonUtils.getDefaultObjectMapper() @@ -1161,7 +1162,7 @@ private RestResponse runMutationalSignature() throws Exception { mutationalSignatureAnalysisParams = new MutationalSignatureAnalysisParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(mutationalSignatureAnalysisParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/variant/mutationalSignature/run")); return res; } else if (commandOptions.jsonFile != null) { mutationalSignatureAnalysisParams = JacksonUtils.getDefaultObjectMapper() @@ -1213,7 +1214,7 @@ private RestResponse runPlink() throws Exception { plinkWrapperParams = new PlinkWrapperParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(plinkWrapperParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/variant/plink/run")); return res; } else if (commandOptions.jsonFile != null) { plinkWrapperParams = JacksonUtils.getDefaultObjectMapper() @@ -1341,7 +1342,7 @@ private RestResponse runRelatedness() throws Exception { relatednessAnalysisParams = new RelatednessAnalysisParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(relatednessAnalysisParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/variant/relatedness/run")); return res; } else if (commandOptions.jsonFile != null) { relatednessAnalysisParams = JacksonUtils.getDefaultObjectMapper() @@ -1382,7 +1383,7 @@ private RestResponse runRvtests() throws Exception { rvtestsWrapperParams = new RvtestsWrapperParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(rvtestsWrapperParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/variant/rvtests/run")); return res; } else if (commandOptions.jsonFile != null) { rvtestsWrapperParams = JacksonUtils.getDefaultObjectMapper() @@ -1456,7 +1457,7 @@ private RestResponse runSampleEligibility() throws Exception { sampleEligibilityAnalysisParams = new SampleEligibilityAnalysisParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(sampleEligibilityAnalysisParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/variant/sample/eligibility/run")); return res; } else if (commandOptions.jsonFile != null) { sampleEligibilityAnalysisParams = JacksonUtils.getDefaultObjectMapper() @@ -1495,7 +1496,7 @@ private RestResponse runSampleQc() throws Exception { sampleQcAnalysisParams = new SampleQcAnalysisParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(sampleQcAnalysisParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/variant/sample/qc/run")); return res; } else if (commandOptions.jsonFile != null) { sampleQcAnalysisParams = JacksonUtils.getDefaultObjectMapper() @@ -1596,7 +1597,7 @@ private RestResponse runSample() throws Exception { sampleVariantFilterParams = new SampleVariantFilterParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(sampleVariantFilterParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/variant/sample/run")); return res; } else if (commandOptions.jsonFile != null) { sampleVariantFilterParams = JacksonUtils.getDefaultObjectMapper() @@ -1690,7 +1691,7 @@ private RestResponse runSampleStats() throws Exception { sampleVariantStatsAnalysisParams = new SampleVariantStatsAnalysisParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(sampleVariantStatsAnalysisParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/variant/sample/stats/run")); return res; } else if (commandOptions.jsonFile != null) { sampleVariantStatsAnalysisParams = JacksonUtils.getDefaultObjectMapper() @@ -1763,7 +1764,7 @@ private RestResponse runStatsExport() throws Exception { variantStatsExportParams = new VariantStatsExportParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(variantStatsExportParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/variant/stats/export/run")); return res; } else if (commandOptions.jsonFile != null) { variantStatsExportParams = JacksonUtils.getDefaultObjectMapper() @@ -1804,7 +1805,7 @@ private RestResponse runStats() throws Exception { variantStatsAnalysisParams = new VariantStatsAnalysisParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(variantStatsAnalysisParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/variant/stats/run")); return res; } else if (commandOptions.jsonFile != null) { variantStatsAnalysisParams = JacksonUtils.getDefaultObjectMapper() diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/CohortsCommandExecutor.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/CohortsCommandExecutor.java index 92677f27fa4..4767a83173c 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/CohortsCommandExecutor.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/CohortsCommandExecutor.java @@ -50,6 +50,7 @@ */ public class CohortsCommandExecutor extends OpencgaCommandExecutor { + public String categoryName = "cohorts"; public CohortsCommandOptions cohortsCommandOptions; public CohortsCommandExecutor(CohortsCommandOptions cohortsCommandOptions) throws CatalogAuthenticationException { @@ -129,7 +130,7 @@ private RestResponse updateAcl() throws Exception { cohortAclUpdateParams = new CohortAclUpdateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(cohortAclUpdateParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/cohorts/acl/{members}/update")); return res; } else if (commandOptions.jsonFile != null) { cohortAclUpdateParams = JacksonUtils.getDefaultObjectMapper() @@ -190,7 +191,7 @@ private RestResponse loadAnnotationSets() throws Exception { tsvAnnotationParams = new TsvAnnotationParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(tsvAnnotationParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/cohorts/annotationSets/load")); return res; } else if (commandOptions.jsonFile != null) { tsvAnnotationParams = JacksonUtils.getDefaultObjectMapper() @@ -228,7 +229,7 @@ private RestResponse create() throws Exception { cohortCreateParams = new CohortCreateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(cohortCreateParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/cohorts/create")); return res; } else if (commandOptions.jsonFile != null) { cohortCreateParams = JacksonUtils.getDefaultObjectMapper() @@ -314,7 +315,7 @@ private RestResponse generate() throws Exception { cohortGenerateParams = new CohortGenerateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(cohortGenerateParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/cohorts/generate")); return res; } else if (commandOptions.jsonFile != null) { cohortGenerateParams = JacksonUtils.getDefaultObjectMapper() @@ -441,7 +442,7 @@ private RestResponse update() throws Exception { cohortUpdateParams = new CohortUpdateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(cohortUpdateParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/cohorts/{cohorts}/update")); return res; } else if (commandOptions.jsonFile != null) { cohortUpdateParams = JacksonUtils.getDefaultObjectMapper() @@ -484,7 +485,7 @@ private RestResponse updateAnnotationSetsAnnotations() throws Exception objectMap = new ObjectMap(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(objectMap)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/cohorts/{cohort}/annotationSets/{annotationSet}/annotations/update")); return res; } else if (commandOptions.jsonFile != null) { objectMap = JacksonUtils.getDefaultObjectMapper() diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/DiseasePanelsCommandExecutor.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/DiseasePanelsCommandExecutor.java index 3e05c22aa5f..5c6446b45e4 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/DiseasePanelsCommandExecutor.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/DiseasePanelsCommandExecutor.java @@ -44,6 +44,7 @@ */ public class DiseasePanelsCommandExecutor extends OpencgaCommandExecutor { + public String categoryName = "diseasePanels"; public DiseasePanelsCommandOptions diseasePanelsCommandOptions; public DiseasePanelsCommandExecutor(DiseasePanelsCommandOptions diseasePanelsCommandOptions) throws CatalogAuthenticationException { @@ -114,7 +115,7 @@ private RestResponse updateAcl() throws Exception { panelAclUpdateParams = new PanelAclUpdateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(panelAclUpdateParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/panels/acl/{members}/update")); return res; } else if (commandOptions.jsonFile != null) { panelAclUpdateParams = JacksonUtils.getDefaultObjectMapper() @@ -151,7 +152,7 @@ private RestResponse create() throws Exception { panelCreateParams = new PanelCreateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(panelCreateParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/panels/create")); return res; } else if (commandOptions.jsonFile != null) { panelCreateParams = JacksonUtils.getDefaultObjectMapper() @@ -230,7 +231,7 @@ private RestResponse importPanels() throws Exception { panelImportParams = new PanelImportParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(panelImportParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/panels/import")); return res; } else if (commandOptions.jsonFile != null) { panelImportParams = JacksonUtils.getDefaultObjectMapper() @@ -352,7 +353,7 @@ private RestResponse update() throws Exception { panelUpdateParams = new PanelUpdateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(panelUpdateParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/panels/{panels}/update")); return res; } else if (commandOptions.jsonFile != null) { panelUpdateParams = JacksonUtils.getDefaultObjectMapper() diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/FamiliesCommandExecutor.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/FamiliesCommandExecutor.java index 35e1596aba4..60a56535f4a 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/FamiliesCommandExecutor.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/FamiliesCommandExecutor.java @@ -50,6 +50,7 @@ */ public class FamiliesCommandExecutor extends OpencgaCommandExecutor { + public String categoryName = "families"; public FamiliesCommandOptions familiesCommandOptions; public FamiliesCommandExecutor(FamiliesCommandOptions familiesCommandOptions) throws CatalogAuthenticationException { @@ -127,7 +128,7 @@ private RestResponse updateAcl() throws Exception { familyAclUpdateParams = new FamilyAclUpdateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(familyAclUpdateParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/families/acl/{members}/update")); return res; } else if (commandOptions.jsonFile != null) { familyAclUpdateParams = JacksonUtils.getDefaultObjectMapper() @@ -192,7 +193,7 @@ private RestResponse loadAnnotationSets() throws Exception { tsvAnnotationParams = new TsvAnnotationParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(tsvAnnotationParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/families/annotationSets/load")); return res; } else if (commandOptions.jsonFile != null) { tsvAnnotationParams = JacksonUtils.getDefaultObjectMapper() @@ -229,7 +230,7 @@ private RestResponse create() throws Exception { familyCreateParams = new FamilyCreateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(familyCreateParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/families/create")); return res; } else if (commandOptions.jsonFile != null) { familyCreateParams = JacksonUtils.getDefaultObjectMapper() @@ -393,7 +394,7 @@ private RestResponse update() throws Exception { familyUpdateParams = new FamilyUpdateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(familyUpdateParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/families/{families}/update")); return res; } else if (commandOptions.jsonFile != null) { familyUpdateParams = JacksonUtils.getDefaultObjectMapper() @@ -437,7 +438,7 @@ private RestResponse updateAnnotationSetsAnnotations() throws Exception objectMap = new ObjectMap(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(objectMap)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/families/{family}/annotationSets/{annotationSet}/annotations/update")); return res; } else if (commandOptions.jsonFile != null) { objectMap = JacksonUtils.getDefaultObjectMapper() diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/FilesCommandExecutor.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/FilesCommandExecutor.java index 039e0d536e3..b4cfc6fdb9f 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/FilesCommandExecutor.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/FilesCommandExecutor.java @@ -96,6 +96,7 @@ */ public class FilesCommandExecutor extends OpencgaCommandExecutor { + public String categoryName = "files"; public FilesCommandOptions filesCommandOptions; public FilesCommandExecutor(FilesCommandOptions filesCommandOptions) throws CatalogAuthenticationException { @@ -220,7 +221,7 @@ private RestResponse updateAcl() throws Exception { fileAclUpdateParams = new FileAclUpdateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(fileAclUpdateParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/files/acl/{members}/update")); return res; } else if (commandOptions.jsonFile != null) { fileAclUpdateParams = JacksonUtils.getDefaultObjectMapper() @@ -290,7 +291,7 @@ private RestResponse loadAnnotationSets() throws Exception { tsvAnnotationParams = new TsvAnnotationParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(tsvAnnotationParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/files/annotationSets/load")); return res; } else if (commandOptions.jsonFile != null) { tsvAnnotationParams = JacksonUtils.getDefaultObjectMapper() @@ -331,7 +332,7 @@ private RestResponse create() throws Exception { fileCreateParams = new FileCreateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(fileCreateParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/files/create")); return res; } else if (commandOptions.jsonFile != null) { fileCreateParams = JacksonUtils.getDefaultObjectMapper() @@ -427,7 +428,7 @@ private RestResponse fetch() throws Exception { fileFetch = new FileFetch(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(fileFetch)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/files/fetch")); return res; } else if (commandOptions.jsonFile != null) { fileFetch = JacksonUtils.getDefaultObjectMapper() @@ -469,7 +470,7 @@ private RestResponse link() throws Exception { fileLinkParams = new FileLinkParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(fileLinkParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/files/link")); return res; } else if (commandOptions.jsonFile != null) { fileLinkParams = JacksonUtils.getDefaultObjectMapper() @@ -515,7 +516,7 @@ private RestResponse runLink() throws Exception { fileLinkToolParams = new FileLinkToolParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(fileLinkToolParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/files/link/run")); return res; } else if (commandOptions.jsonFile != null) { fileLinkToolParams = JacksonUtils.getDefaultObjectMapper() @@ -557,7 +558,7 @@ private RestResponse runPostlink() throws Exception { postLinkToolParams = new PostLinkToolParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(postLinkToolParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/files/postlink/run")); return res; } else if (commandOptions.jsonFile != null) { postLinkToolParams = JacksonUtils.getDefaultObjectMapper() @@ -723,7 +724,7 @@ private RestResponse update() throws Exception { fileUpdateParams = new FileUpdateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(fileUpdateParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/files/{files}/update")); return res; } else if (commandOptions.jsonFile != null) { fileUpdateParams = JacksonUtils.getDefaultObjectMapper() @@ -790,7 +791,7 @@ private RestResponse updateAnnotationSetsAnnotations() throws Exception { objectMap = new ObjectMap(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(objectMap)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/files/{file}/annotationSets/{annotationSet}/annotations/update")); return res; } else if (commandOptions.jsonFile != null) { objectMap = JacksonUtils.getDefaultObjectMapper() diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/IndividualsCommandExecutor.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/IndividualsCommandExecutor.java index 86fcc2f8d58..0675de1255f 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/IndividualsCommandExecutor.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/IndividualsCommandExecutor.java @@ -56,6 +56,7 @@ */ public class IndividualsCommandExecutor extends OpencgaCommandExecutor { + public String categoryName = "individuals"; public IndividualsCommandOptions individualsCommandOptions; public IndividualsCommandExecutor(IndividualsCommandOptions individualsCommandOptions) throws CatalogAuthenticationException { @@ -136,7 +137,7 @@ private RestResponse updateAcl() throws Exception { individualAclUpdateParams = new IndividualAclUpdateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(individualAclUpdateParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/individuals/acl/{members}/update")); return res; } else if (commandOptions.jsonFile != null) { individualAclUpdateParams = JacksonUtils.getDefaultObjectMapper() @@ -207,7 +208,7 @@ private RestResponse loadAnnotationSets() throws Exception { tsvAnnotationParams = new TsvAnnotationParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(tsvAnnotationParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/individuals/annotationSets/load")); return res; } else if (commandOptions.jsonFile != null) { tsvAnnotationParams = JacksonUtils.getDefaultObjectMapper() @@ -244,7 +245,7 @@ private RestResponse create() throws Exception { individualCreateParams = new IndividualCreateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(individualCreateParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/individuals/create")); return res; } else if (commandOptions.jsonFile != null) { individualCreateParams = JacksonUtils.getDefaultObjectMapper() @@ -449,7 +450,7 @@ private RestResponse update() throws Exception { individualUpdateParams = new IndividualUpdateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(individualUpdateParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/individuals/{individuals}/update")); return res; } else if (commandOptions.jsonFile != null) { individualUpdateParams = JacksonUtils.getDefaultObjectMapper() @@ -519,7 +520,7 @@ private RestResponse updateAnnotationSetsAnnotations() throws Except objectMap = new ObjectMap(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(objectMap)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/individuals/{individual}/annotationSets/{annotationSet}/annotations/update")); return res; } else if (commandOptions.jsonFile != null) { objectMap = JacksonUtils.getDefaultObjectMapper() diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/JobsCommandExecutor.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/JobsCommandExecutor.java index 93723bdc05e..846c568724e 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/JobsCommandExecutor.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/JobsCommandExecutor.java @@ -67,6 +67,7 @@ */ public class JobsCommandExecutor extends OpencgaCommandExecutor { + public String categoryName = "jobs"; public JobsCommandOptions jobsCommandOptions; public JobsCommandExecutor(JobsCommandOptions jobsCommandOptions) throws CatalogAuthenticationException { @@ -142,7 +143,7 @@ private RestResponse updateAcl() throws Exception { jobAclUpdateParams = new JobAclUpdateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(jobAclUpdateParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/jobs/acl/{members}/update")); return res; } else if (commandOptions.jsonFile != null) { jobAclUpdateParams = JacksonUtils.getDefaultObjectMapper() @@ -207,7 +208,7 @@ private RestResponse create() throws Exception { jobCreateParams = new JobCreateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(jobCreateParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/jobs/create")); return res; } else if (commandOptions.jsonFile != null) { jobCreateParams = JacksonUtils.getDefaultObjectMapper() @@ -294,7 +295,7 @@ private RestResponse retry() throws Exception { jobRetryParams = new JobRetryParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(jobRetryParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/jobs/retry")); return res; } else if (commandOptions.jsonFile != null) { jobRetryParams = JacksonUtils.getDefaultObjectMapper() @@ -430,7 +431,7 @@ private RestResponse update() throws Exception { jobUpdateParams = new JobUpdateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(jobUpdateParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/jobs/{jobs}/update")); return res; } else if (commandOptions.jsonFile != null) { jobUpdateParams = JacksonUtils.getDefaultObjectMapper() diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/MetaCommandExecutor.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/MetaCommandExecutor.java index 3f8448898be..0cc03b91ef7 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/MetaCommandExecutor.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/MetaCommandExecutor.java @@ -37,6 +37,7 @@ */ public class MetaCommandExecutor extends OpencgaCommandExecutor { + public String categoryName = "meta"; public MetaCommandOptions metaCommandOptions; public MetaCommandExecutor(MetaCommandOptions metaCommandOptions) throws CatalogAuthenticationException { diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/OpencgaCommandExecutor.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/OpencgaCommandExecutor.java index 8360af46f00..fc2357c14ad 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/OpencgaCommandExecutor.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/OpencgaCommandExecutor.java @@ -17,11 +17,11 @@ package org.opencb.opencga.app.cli.main.executors; import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.StringUtils; import org.opencb.commons.datastore.core.ObjectMap; -import org.opencb.commons.utils.DataModelsUtils; import org.opencb.opencga.app.cli.CommandExecutor; import org.opencb.opencga.app.cli.GeneralCliOptions; import org.opencb.opencga.app.cli.main.io.*; @@ -36,6 +36,9 @@ import org.opencb.opencga.core.models.user.AuthenticationResponse; import org.opencb.opencga.core.response.QueryType; import org.opencb.opencga.core.response.RestResponse; +import org.opencb.opencga.server.generator.models.RestCategory; +import org.opencb.opencga.server.generator.models.RestEndpoint; +import org.opencb.opencga.server.generator.models.RestParameter; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -221,11 +224,30 @@ public OpencgaCommandExecutor setOpenCGAClient(OpenCGAClient openCGAClient) { return this; } - public String getObjectAsJSON(Object o) throws Exception { - String jsonInString = "Data model not found."; + public String getObjectAsJSON(String objectCategory, String objectPath) throws Exception { + String jsonInString = ""; try { - jsonInString = DataModelsUtils.dataModelToJsonString(o.getClass()); + ObjectMap queryParams = new ObjectMap(); + queryParams.putIfNotEmpty("category", String.valueOf(objectCategory)); + RestResponse response = openCGAClient.getMetaClient().api(queryParams); + ObjectMapper jsonObjectMapper = new ObjectMapper(); + for (List list : response.getResponses().get(0).getResults()) { + List categories = jsonObjectMapper.convertValue(list, new TypeReference>() {}); + for (RestCategory category : categories) { + for (RestEndpoint endpoint: category.getEndpoints()){ + if(objectPath.equals(endpoint.getPath())){ + for (RestParameter parameter:endpoint.getParameters()){ + //jsonInString += parameter.getName()+":"+parameter.getAllowedValues()+"\n"; + jsonInString += parameter.toString()+"\n"; + } + // + } + } + } + } + // jsonInString = DataModelsUtils.dataModelToJsonString(o.getClass()); } catch (Exception e) { + jsonInString = "Data model not found."; CommandLineUtils.error(e); } return jsonInString; 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 78ed32b92dc..7e1faf04dfd 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 @@ -61,6 +61,7 @@ */ public class OperationsVariantStorageCommandExecutor extends OpencgaCommandExecutor { + public String categoryName = "operationsVariantStorage"; public OperationsVariantStorageCommandOptions operationsVariantStorageCommandOptions; public OperationsVariantStorageCommandExecutor(OperationsVariantStorageCommandOptions operationsVariantStorageCommandOptions) throws CatalogAuthenticationException { @@ -187,7 +188,7 @@ private RestResponse configureCellbase() throws Exception { cellBaseConfiguration = new CellBaseConfiguration(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(cellBaseConfiguration)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/operation/cellbase/configure")); return res; } else if (commandOptions.jsonFile != null) { cellBaseConfiguration = JacksonUtils.getDefaultObjectMapper() @@ -227,7 +228,7 @@ private RestResponse aggregateVariant() throws Exception { variantAggregateParams = new VariantAggregateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(variantAggregateParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/operation/variant/aggregate")); return res; } else if (commandOptions.jsonFile != null) { variantAggregateParams = JacksonUtils.getDefaultObjectMapper() @@ -282,7 +283,7 @@ private RestResponse indexVariantAnnotation() throws Exception { variantAnnotationIndexParams = new VariantAnnotationIndexParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(variantAnnotationIndexParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/operation/variant/annotation/index")); return res; } else if (commandOptions.jsonFile != null) { variantAnnotationIndexParams = JacksonUtils.getDefaultObjectMapper() @@ -324,7 +325,7 @@ private RestResponse saveVariantAnnotation() throws Exception { variantAnnotationSaveParams = new VariantAnnotationSaveParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(variantAnnotationSaveParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/operation/variant/annotation/save")); return res; } else if (commandOptions.jsonFile != null) { variantAnnotationSaveParams = JacksonUtils.getDefaultObjectMapper() @@ -358,7 +359,7 @@ private RestResponse configureVariant() throws Exception { variantConfigureParams = new VariantConfigureParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(variantConfigureParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/operation/variant/configure")); return res; } else if (commandOptions.jsonFile != null) { variantConfigureParams = JacksonUtils.getDefaultObjectMapper() @@ -395,7 +396,7 @@ private RestResponse deleteVariant() throws Exception { variantFileDeleteParams = new VariantFileDeleteParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(variantFileDeleteParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/operation/variant/delete")); return res; } else if (commandOptions.jsonFile != null) { variantFileDeleteParams = JacksonUtils.getDefaultObjectMapper() @@ -433,7 +434,7 @@ private RestResponse aggregateVariantFamily() throws Exception { variantAggregateFamilyParams = new VariantAggregateFamilyParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(variantAggregateFamilyParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/operation/variant/family/aggregate")); return res; } else if (commandOptions.jsonFile != null) { variantAggregateFamilyParams = JacksonUtils.getDefaultObjectMapper() @@ -472,7 +473,7 @@ private RestResponse indexVariantFamily() throws Exception { variantFamilyIndexParams = new VariantFamilyIndexParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(variantFamilyIndexParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/operation/variant/family/index")); return res; } else if (commandOptions.jsonFile != null) { variantFamilyIndexParams = JacksonUtils.getDefaultObjectMapper() @@ -512,7 +513,7 @@ private RestResponse indexVariant() throws Exception { variantIndexParams = new VariantIndexParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(variantIndexParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/operation/variant/index")); return res; } else if (commandOptions.jsonFile != null) { variantIndexParams = JacksonUtils.getDefaultObjectMapper() @@ -577,7 +578,7 @@ private RestResponse launcherVariantIndex() throws Exception { variantFileIndexJobLauncherParams = new VariantFileIndexJobLauncherParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(variantFileIndexJobLauncherParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/operation/variant/index/launcher")); return res; } else if (commandOptions.jsonFile != null) { variantFileIndexJobLauncherParams = JacksonUtils.getDefaultObjectMapper() @@ -644,7 +645,7 @@ private RestResponse runVariantJulie() throws Exception { julieParams = new JulieParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(julieParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/operation/variant/julie/run")); return res; } else if (commandOptions.jsonFile != null) { julieParams = JacksonUtils.getDefaultObjectMapper() @@ -679,7 +680,7 @@ private RestResponse repairVariantMetadata() throws Exception { variantStorageMetadataRepairToolParams = new VariantStorageMetadataRepairToolParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(variantStorageMetadataRepairToolParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/operation/variant/metadata/repair")); return res; } else if (commandOptions.jsonFile != null) { variantStorageMetadataRepairToolParams = JacksonUtils.getDefaultObjectMapper() @@ -717,7 +718,7 @@ private RestResponse synchronizeVariantMetadata() throws Exception { variantStorageMetadataSynchronizeParams = new VariantStorageMetadataSynchronizeParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(variantStorageMetadataSynchronizeParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/operation/variant/metadata/synchronize")); return res; } else if (commandOptions.jsonFile != null) { variantStorageMetadataSynchronizeParams = JacksonUtils.getDefaultObjectMapper() @@ -751,7 +752,7 @@ private RestResponse pruneVariant() throws Exception { variantPruneParams = new VariantPruneParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(variantPruneParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/operation/variant/prune")); return res; } else if (commandOptions.jsonFile != null) { variantPruneParams = JacksonUtils.getDefaultObjectMapper() @@ -790,7 +791,7 @@ private RestResponse deleteVariantSample() throws Exception { variantSampleDeleteParams = new VariantSampleDeleteParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(variantSampleDeleteParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/operation/variant/sample/delete")); return res; } else if (commandOptions.jsonFile != null) { variantSampleDeleteParams = JacksonUtils.getDefaultObjectMapper() @@ -829,7 +830,7 @@ private RestResponse indexVariantSample() throws Exception { variantSecondarySampleIndexParams = new VariantSecondarySampleIndexParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(variantSecondarySampleIndexParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/operation/variant/sample/index")); return res; } else if (commandOptions.jsonFile != null) { variantSecondarySampleIndexParams = JacksonUtils.getDefaultObjectMapper() @@ -867,7 +868,7 @@ private RestResponse variantSampleIndexConfigure() throws Exception { sampleIndexConfiguration = new SampleIndexConfiguration(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(sampleIndexConfiguration)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/operation/variant/sample/index/configure")); return res; } else if (commandOptions.jsonFile != null) { sampleIndexConfiguration = JacksonUtils.getDefaultObjectMapper() @@ -918,7 +919,7 @@ private RestResponse indexVariantScore() throws Exception { variantScoreIndexParams = new VariantScoreIndexParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(variantScoreIndexParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/operation/variant/score/index")); return res; } else if (commandOptions.jsonFile != null) { variantScoreIndexParams = JacksonUtils.getDefaultObjectMapper() @@ -961,7 +962,7 @@ private RestResponse variantSecondaryAnnotationIndex() throws Exception { variantSecondaryAnnotationIndexParams = new VariantSecondaryAnnotationIndexParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(variantSecondaryAnnotationIndexParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/operation/variant/secondary/annotation/index")); return res; } else if (commandOptions.jsonFile != null) { variantSecondaryAnnotationIndexParams = JacksonUtils.getDefaultObjectMapper() @@ -1000,7 +1001,7 @@ private RestResponse variantSecondarySampleIndex() throws Exception { variantSecondarySampleIndexParams = new VariantSecondarySampleIndexParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(variantSecondarySampleIndexParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/operation/variant/secondary/sample/index")); return res; } else if (commandOptions.jsonFile != null) { variantSecondarySampleIndexParams = JacksonUtils.getDefaultObjectMapper() @@ -1038,7 +1039,7 @@ private RestResponse configureVariantSecondarySampleIndex() throws Exceptio sampleIndexConfiguration = new SampleIndexConfiguration(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(sampleIndexConfiguration)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/operation/variant/secondary/sample/index/configure")); return res; } else if (commandOptions.jsonFile != null) { sampleIndexConfiguration = JacksonUtils.getDefaultObjectMapper() @@ -1069,7 +1070,7 @@ private RestResponse secondaryIndexVariant() throws Exception { variantSecondaryAnnotationIndexParams = new VariantSecondaryAnnotationIndexParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(variantSecondaryAnnotationIndexParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/operation/variant/secondaryIndex")); return res; } else if (commandOptions.jsonFile != null) { variantSecondaryAnnotationIndexParams = JacksonUtils.getDefaultObjectMapper() @@ -1127,7 +1128,7 @@ private RestResponse deleteVariantStats() throws Exception { variantStatsDeleteParams = new VariantStatsDeleteParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(variantStatsDeleteParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/operation/variant/stats/delete")); return res; } else if (commandOptions.jsonFile != null) { variantStatsDeleteParams = JacksonUtils.getDefaultObjectMapper() @@ -1165,7 +1166,7 @@ private RestResponse indexVariantStats() throws Exception { variantStatsIndexParams = new VariantStatsIndexParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(variantStatsIndexParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/operation/variant/stats/index")); return res; } else if (commandOptions.jsonFile != null) { variantStatsIndexParams = JacksonUtils.getDefaultObjectMapper() @@ -1207,7 +1208,7 @@ private RestResponse deleteVariantStudy() throws Exception { variantStudyDeleteParams = new VariantStudyDeleteParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(variantStudyDeleteParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/operation/variant/study/delete")); return res; } else if (commandOptions.jsonFile != null) { variantStudyDeleteParams = JacksonUtils.getDefaultObjectMapper() 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 2ed3593e612..98bb7eb2814 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 @@ -42,6 +42,7 @@ */ public class ProjectsCommandExecutor extends OpencgaCommandExecutor { + public String categoryName = "projects"; public ProjectsCommandOptions projectsCommandOptions; public ProjectsCommandExecutor(ProjectsCommandOptions projectsCommandOptions) throws CatalogAuthenticationException { @@ -105,7 +106,7 @@ private RestResponse create() throws Exception { projectCreateParams = new ProjectCreateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(projectCreateParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/projects/create")); return res; } else if (commandOptions.jsonFile != null) { projectCreateParams = JacksonUtils.getDefaultObjectMapper() @@ -227,7 +228,7 @@ private RestResponse update() throws Exception { projectUpdateParams = new ProjectUpdateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(projectUpdateParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/projects/{project}/update")); return res; } else if (commandOptions.jsonFile != null) { projectUpdateParams = JacksonUtils.getDefaultObjectMapper() diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/SamplesCommandExecutor.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/SamplesCommandExecutor.java index a88c8330a26..7d0ebf47cc8 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/SamplesCommandExecutor.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/SamplesCommandExecutor.java @@ -55,6 +55,7 @@ */ public class SamplesCommandExecutor extends OpencgaCommandExecutor { + public String categoryName = "samples"; public SamplesCommandOptions samplesCommandOptions; public SamplesCommandExecutor(SamplesCommandOptions samplesCommandOptions) throws CatalogAuthenticationException { @@ -134,7 +135,7 @@ private RestResponse updateAcl() throws Exception { sampleAclUpdateParams = new SampleAclUpdateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(sampleAclUpdateParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/samples/acl/{members}/update")); return res; } else if (commandOptions.jsonFile != null) { sampleAclUpdateParams = JacksonUtils.getDefaultObjectMapper() @@ -202,7 +203,7 @@ private RestResponse loadAnnotationSets() throws Exception { tsvAnnotationParams = new TsvAnnotationParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(tsvAnnotationParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/samples/annotationSets/load")); return res; } else if (commandOptions.jsonFile != null) { tsvAnnotationParams = JacksonUtils.getDefaultObjectMapper() @@ -238,7 +239,7 @@ private RestResponse create() throws Exception { sampleCreateParams = new SampleCreateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(sampleCreateParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/samples/create")); return res; } else if (commandOptions.jsonFile != null) { sampleCreateParams = JacksonUtils.getDefaultObjectMapper() @@ -476,7 +477,7 @@ private RestResponse update() throws Exception { sampleUpdateParams = new SampleUpdateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(sampleUpdateParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/samples/{samples}/update")); return res; } else if (commandOptions.jsonFile != null) { sampleUpdateParams = JacksonUtils.getDefaultObjectMapper() @@ -536,7 +537,7 @@ private RestResponse updateAnnotationSetsAnnotations() throws Exception objectMap = new ObjectMap(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(objectMap)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/samples/{sample}/annotationSets/{annotationSet}/annotations/update")); return res; } else if (commandOptions.jsonFile != null) { objectMap = JacksonUtils.getDefaultObjectMapper() diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/StudiesCommandExecutor.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/StudiesCommandExecutor.java index 944262e77f1..fef8f85a042 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/StudiesCommandExecutor.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/StudiesCommandExecutor.java @@ -90,6 +90,7 @@ */ public class StudiesCommandExecutor extends OpencgaCommandExecutor { + public String categoryName = "studies"; public StudiesCommandOptions studiesCommandOptions; public StudiesCommandExecutor(StudiesCommandOptions studiesCommandOptions) throws CatalogAuthenticationException { @@ -183,7 +184,7 @@ private RestResponse updateAcl() throws Exception { studyAclUpdateParams = new StudyAclUpdateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(studyAclUpdateParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/studies/acl/{members}/update")); return res; } else if (commandOptions.jsonFile != null) { studyAclUpdateParams = JacksonUtils.getDefaultObjectMapper() @@ -218,7 +219,7 @@ private RestResponse create() throws Exception { studyCreateParams = new StudyCreateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(studyCreateParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/studies/create")); return res; } else if (commandOptions.jsonFile != null) { studyCreateParams = JacksonUtils.getDefaultObjectMapper() @@ -360,7 +361,7 @@ private RestResponse updateGroups() throws Exception { groupCreateParams = new GroupCreateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(groupCreateParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/studies/{study}/groups/update")); return res; } else if (commandOptions.jsonFile != null) { groupCreateParams = JacksonUtils.getDefaultObjectMapper() @@ -391,7 +392,7 @@ private RestResponse updateGroupsUsers() throws Exception { groupUpdateParams = new GroupUpdateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(groupUpdateParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/studies/{study}/groups/{group}/users/update")); return res; } else if (commandOptions.jsonFile != null) { groupUpdateParams = JacksonUtils.getDefaultObjectMapper() @@ -428,7 +429,7 @@ private RestResponse updatePermissionRules() throws Exception { permissionRule = new PermissionRule(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(permissionRule)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/studies/{study}/permissionRules/update")); return res; } else if (commandOptions.jsonFile != null) { permissionRule = JacksonUtils.getDefaultObjectMapper() @@ -511,7 +512,7 @@ private RestResponse update() throws Exception { studyUpdateParams = new StudyUpdateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(studyUpdateParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/studies/{study}/update")); return res; } else if (commandOptions.jsonFile != null) { studyUpdateParams = JacksonUtils.getDefaultObjectMapper() @@ -562,7 +563,7 @@ private RestResponse updateVariableSets() throws Exception { variableSetCreateParams = new VariableSetCreateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(variableSetCreateParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/studies/{study}/variableSets/update")); return res; } else if (commandOptions.jsonFile != null) { variableSetCreateParams = JacksonUtils.getDefaultObjectMapper() @@ -596,7 +597,7 @@ private RestResponse updateVariableSetsVariables() throws Exception variable = new Variable(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(variable)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/studies/{study}/variableSets/{variableSet}/variables/update")); return res; } else if (commandOptions.jsonFile != null) { variable = JacksonUtils.getDefaultObjectMapper() diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/UsersCommandExecutor.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/UsersCommandExecutor.java index b2cca1037ba..f44e3449cc5 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/UsersCommandExecutor.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/UsersCommandExecutor.java @@ -61,6 +61,7 @@ */ public class UsersCommandExecutor extends OpencgaCommandExecutor { + public String categoryName = "users"; public UsersCommandOptions usersCommandOptions; public UsersCommandExecutor(UsersCommandOptions usersCommandOptions) throws CatalogAuthenticationException { @@ -136,7 +137,7 @@ private RestResponse password() throws Exception { passwordChangeParams = new PasswordChangeParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(passwordChangeParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/users/password")); return res; } else if (commandOptions.jsonFile != null) { passwordChangeParams = JacksonUtils.getDefaultObjectMapper() @@ -192,7 +193,7 @@ private RestResponse updateConfigs() throws Exception { configUpdateParams = new ConfigUpdateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(configUpdateParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/users/{user}/configs/update")); return res; } else if (commandOptions.jsonFile != null) { configUpdateParams = JacksonUtils.getDefaultObjectMapper() @@ -257,7 +258,7 @@ private RestResponse update() throws Exception { userUpdateParams = new UserUpdateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); - PrintUtils.println(getObjectAsJSON(userUpdateParams)); + PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/users/{user}/update")); return res; } else if (commandOptions.jsonFile != null) { userUpdateParams = JacksonUtils.getDefaultObjectMapper() diff --git a/opencga-client/src/main/R/R/Admin-methods.R b/opencga-client/src/main/R/R/Admin-methods.R index f36ae979df6..ca588e36aec 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-09-12 +# Autogenerated on: 2023-10-27 # # 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 7f1a6a2d745..42453c4b949 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-09-12 +# Autogenerated on: 2023-10-27 # # 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 5756f579584..1094354e3de 100644 --- a/opencga-client/src/main/R/R/AllGenerics.R +++ b/opencga-client/src/main/R/R/AllGenerics.R @@ -1,6 +1,6 @@ # ############################################################################## ## UserClient -setGeneric("userClient", function(OpencgaR, filterId, user, users, endpointName, params=NULL, ...) +setGeneric("userClient", function(OpencgaR, user, filterId, users, endpointName, params=NULL, ...) standardGeneric("userClient")) # ############################################################################## @@ -10,37 +10,37 @@ setGeneric("projectClient", function(OpencgaR, projects, project, endpointName, # ############################################################################## ## StudyClient -setGeneric("studyClient", function(OpencgaR, study, group, variableSet, studies, members, templateId, endpointName, params=NULL, ...) +setGeneric("studyClient", function(OpencgaR, templateId, variableSet, study, group, studies, members, endpointName, params=NULL, ...) standardGeneric("studyClient")) # ############################################################################## ## FileClient -setGeneric("fileClient", function(OpencgaR, file, files, folder, members, annotationSet, endpointName, params=NULL, ...) +setGeneric("fileClient", function(OpencgaR, files, file, folder, annotationSet, members, endpointName, params=NULL, ...) standardGeneric("fileClient")) # ############################################################################## ## JobClient -setGeneric("jobClient", function(OpencgaR, members, job, jobs, endpointName, params=NULL, ...) +setGeneric("jobClient", function(OpencgaR, jobs, members, job, endpointName, params=NULL, ...) standardGeneric("jobClient")) # ############################################################################## ## SampleClient -setGeneric("sampleClient", function(OpencgaR, sample, members, annotationSet, samples, endpointName, params=NULL, ...) +setGeneric("sampleClient", function(OpencgaR, sample, samples, members, annotationSet, endpointName, params=NULL, ...) standardGeneric("sampleClient")) # ############################################################################## ## IndividualClient -setGeneric("individualClient", function(OpencgaR, members, annotationSet, individuals, individual, endpointName, params=NULL, ...) +setGeneric("individualClient", function(OpencgaR, individual, members, individuals, annotationSet, endpointName, params=NULL, ...) standardGeneric("individualClient")) # ############################################################################## ## FamilyClient -setGeneric("familyClient", function(OpencgaR, families, members, annotationSet, family, endpointName, params=NULL, ...) +setGeneric("familyClient", function(OpencgaR, annotationSet, members, family, families, endpointName, params=NULL, ...) standardGeneric("familyClient")) # ############################################################################## ## CohortClient -setGeneric("cohortClient", function(OpencgaR, members, annotationSet, cohort, cohorts, endpointName, params=NULL, ...) +setGeneric("cohortClient", function(OpencgaR, cohort, members, cohorts, annotationSet, endpointName, params=NULL, ...) standardGeneric("cohortClient")) # ############################################################################## @@ -60,7 +60,7 @@ setGeneric("variantClient", function(OpencgaR, endpointName, params=NULL, ...) # ############################################################################## ## ClinicalClient -setGeneric("clinicalClient", function(OpencgaR, interpretation, interpretations, clinicalAnalysis, clinicalAnalyses, members, endpointName, params=NULL, ...) +setGeneric("clinicalClient", function(OpencgaR, clinicalAnalysis, clinicalAnalyses, interpretations, members, interpretation, endpointName, params=NULL, ...) standardGeneric("clinicalClient")) # ############################################################################## diff --git a/opencga-client/src/main/R/R/Clinical-methods.R b/opencga-client/src/main/R/R/Clinical-methods.R index 5d84fa14614..063b5ca56bf 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-09-12 +# Autogenerated on: 2023-10-27 # # 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, interpretation, interpretations, clinicalAnalysis, clinicalAnalyses, members, endpointName, params=NULL, ...) { +setMethod("clinicalClient", "OpencgaR", function(OpencgaR, clinicalAnalysis, clinicalAnalyses, interpretations, members, interpretation, 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 d192d6feec1..86c256ad13c 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-09-12 +# Autogenerated on: 2023-10-27 # # 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, cohort, members, cohorts, annotationSet, 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 c582b23a93a..f61994486fa 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-09-12 +# Autogenerated on: 2023-10-27 # # 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, families, members, annotationSet, family, endpointName, params=NULL, ...) { +setMethod("familyClient", "OpencgaR", function(OpencgaR, annotationSet, members, family, families, 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 f3eeac80df2..12a692cba71 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-09-12 +# Autogenerated on: 2023-10-27 # # 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, file, files, folder, members, annotationSet, endpointName, params=NULL, ...) { +setMethod("fileClient", "OpencgaR", function(OpencgaR, files, file, folder, annotationSet, members, 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 639683e171c..d03fe839d00 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-09-12 +# Autogenerated on: 2023-10-27 # # 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/Individual-methods.R b/opencga-client/src/main/R/R/Individual-methods.R index 1839f2cb8c9..6c6db781f0f 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-09-12 +# Autogenerated on: 2023-10-27 # # 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("individualClient", "OpencgaR", function(OpencgaR, members, annotationSet, individuals, individual, endpointName, params=NULL, ...) { +setMethod("individualClient", "OpencgaR", function(OpencgaR, individual, members, individuals, annotationSet, endpointName, params=NULL, ...) { switch(endpointName, #' @section Endpoint /{apiVersion}/individuals/acl/{members}/update: diff --git a/opencga-client/src/main/R/R/Job-methods.R b/opencga-client/src/main/R/R/Job-methods.R index ed70e8df6cf..2336177e4e3 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-09-12 +# Autogenerated on: 2023-10-27 # # 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, jobs, members, job, 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 c278a0c47e4..10888d84a65 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-09-12 +# Autogenerated on: 2023-10-27 # # 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 11621e2cf87..492c6a7c654 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-09-12 +# Autogenerated on: 2023-10-27 # # 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 20fb425cc31..9ff4ec9416b 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-09-12 +# Autogenerated on: 2023-10-27 # # 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 80d88c4cc79..a0cdf42263b 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-09-12 +# Autogenerated on: 2023-10-27 # # 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/Sample-methods.R b/opencga-client/src/main/R/R/Sample-methods.R index 32e64a3ecc9..e154dbdea1d 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-09-12 +# Autogenerated on: 2023-10-27 # # 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, sample, members, annotationSet, samples, endpointName, params=NULL, ...) { +setMethod("sampleClient", "OpencgaR", function(OpencgaR, sample, samples, members, 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 a9c9a3c90f8..ec660266b5a 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-09-12 +# Autogenerated on: 2023-10-27 # # 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, study, group, variableSet, studies, members, templateId, endpointName, params=NULL, ...) { +setMethod("studyClient", "OpencgaR", function(OpencgaR, templateId, variableSet, study, group, studies, members, 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 2a1d1bc3e82..65db531b18c 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-09-12 +# Autogenerated on: 2023-10-27 # # 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, filterId, user, users, endpointName, params=NULL, ...) { +setMethod("userClient", "OpencgaR", function(OpencgaR, user, filterId, users, 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 ad760abcd16..70d0f7406a2 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-09-12 +# Autogenerated on: 2023-10-27 # # 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 6aad0bc7842..b8650868796 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-09-12 +* Autogenerated on: 2023-10-27 * * 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. @@ -45,7 +45,7 @@ /** * This class contains methods for the Admin webservices. - * Client version: 2.11.0-SNAPSHOT + * Client version: 2.12.0-SNAPSHOT * PATH: admin */ public class AdminClient extends AbstractParentClient { 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 16c679f642f..e979ae69978 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-09-12 +* Autogenerated on: 2023-10-27 * * 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. @@ -49,7 +49,7 @@ /** * This class contains methods for the Alignment webservices. - * Client version: 2.11.0-SNAPSHOT + * Client version: 2.12.0-SNAPSHOT * PATH: analysis/alignment */ public class AlignmentClient extends AbstractParentClient { 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 94ab79f677d..8e45768167c 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-09-12 +* Autogenerated on: 2023-10-27 * * 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. @@ -60,7 +60,7 @@ /** * This class contains methods for the ClinicalAnalysis webservices. - * Client version: 2.11.0-SNAPSHOT + * Client version: 2.12.0-SNAPSHOT * PATH: analysis/clinical */ public class ClinicalAnalysisClient extends AbstractParentClient { 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 2320ca7bbcd..a6c7798a94b 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-09-12 +* Autogenerated on: 2023-10-27 * * 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 @@ /** * This class contains methods for the Cohort webservices. - * Client version: 2.11.0-SNAPSHOT + * Client version: 2.12.0-SNAPSHOT * PATH: cohorts */ public class CohortClient extends AbstractParentClient { 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 ad9ef470eaa..979f96e572e 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-09-12 +* Autogenerated on: 2023-10-27 * * 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. @@ -44,7 +44,7 @@ /** * This class contains methods for the DiseasePanel webservices. - * Client version: 2.11.0-SNAPSHOT + * Client version: 2.12.0-SNAPSHOT * PATH: panels */ public class DiseasePanelClient extends AbstractParentClient { 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 94b0e7cf66d..60b4ca25d77 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-09-12 +* Autogenerated on: 2023-10-27 * * 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. @@ -45,7 +45,7 @@ /** * This class contains methods for the Family webservices. - * Client version: 2.11.0-SNAPSHOT + * Client version: 2.12.0-SNAPSHOT * PATH: families */ public class FamilyClient extends AbstractParentClient { 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 94eeead7197..795aeff6846 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-09-12 +* Autogenerated on: 2023-10-27 * * 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. @@ -52,7 +52,7 @@ /** * This class contains methods for the File webservices. - * Client version: 2.11.0-SNAPSHOT + * Client version: 2.12.0-SNAPSHOT * PATH: files */ public class FileClient extends AbstractParentClient { 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 48b4524ea7f..b843ea82794 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-09-12 +* Autogenerated on: 2023-10-27 * * 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. @@ -36,7 +36,7 @@ /** * This class contains methods for the GA4GH webservices. - * Client version: 2.11.0-SNAPSHOT + * Client version: 2.12.0-SNAPSHOT * PATH: ga4gh */ public class GA4GHClient extends AbstractParentClient { 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 b89c47024df..71a2b12acb5 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-09-12 +* Autogenerated on: 2023-10-27 * * 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. @@ -45,7 +45,7 @@ /** * This class contains methods for the Individual webservices. - * Client version: 2.11.0-SNAPSHOT + * Client version: 2.12.0-SNAPSHOT * PATH: individuals */ public class IndividualClient extends AbstractParentClient { 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 7945a8d65cc..a3ba8a9fcd1 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-09-12 +* Autogenerated on: 2023-10-27 * * 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 @@ /** * This class contains methods for the Job webservices. - * Client version: 2.11.0-SNAPSHOT + * Client version: 2.12.0-SNAPSHOT * PATH: jobs */ public class JobClient extends AbstractParentClient { 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 794c6ad3394..49ec8ae0eed 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-09-12 +* Autogenerated on: 2023-10-27 * * 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. @@ -37,7 +37,7 @@ /** * This class contains methods for the Meta webservices. - * Client version: 2.11.0-SNAPSHOT + * Client version: 2.12.0-SNAPSHOT * PATH: meta */ public class MetaClient extends AbstractParentClient { 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 317a4af226c..0b92cedd97b 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-09-12 +* Autogenerated on: 2023-10-27 * * 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. @@ -41,7 +41,7 @@ /** * This class contains methods for the Project webservices. - * Client version: 2.11.0-SNAPSHOT + * Client version: 2.12.0-SNAPSHOT * PATH: projects */ public class ProjectClient extends AbstractParentClient { 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 5cbb8f10fd4..4dfeecc596d 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-09-12 +* Autogenerated on: 2023-10-27 * * 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. @@ -45,7 +45,7 @@ /** * This class contains methods for the Sample webservices. - * Client version: 2.11.0-SNAPSHOT + * Client version: 2.12.0-SNAPSHOT * PATH: samples */ public class SampleClient extends AbstractParentClient { 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 8f018861260..e86ac389d40 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-09-12 +* Autogenerated on: 2023-10-27 * * 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 @@ /** * This class contains methods for the Study webservices. - * Client version: 2.11.0-SNAPSHOT + * Client version: 2.12.0-SNAPSHOT * PATH: studies */ public class StudyClient extends AbstractParentClient { 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 adb4ce85938..e5984ffeff2 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-09-12 +* Autogenerated on: 2023-10-27 * * 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. @@ -45,7 +45,7 @@ /** * This class contains methods for the User webservices. - * Client version: 2.11.0-SNAPSHOT + * Client version: 2.12.0-SNAPSHOT * PATH: users */ public class UserClient extends AbstractParentClient { 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 4801650a0f9..07360eddb66 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-09-12 +* Autogenerated on: 2023-10-27 * * 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. @@ -71,7 +71,7 @@ /** * This class contains methods for the Variant webservices. - * Client version: 2.11.0-SNAPSHOT + * Client version: 2.12.0-SNAPSHOT * PATH: analysis/variant */ public class VariantClient extends AbstractParentClient { 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 c1ffc952c9d..27222047a76 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-09-12 +* Autogenerated on: 2023-10-27 * * 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. @@ -59,7 +59,7 @@ /** * This class contains methods for the VariantOperation webservices. - * Client version: 2.11.0-SNAPSHOT + * Client version: 2.12.0-SNAPSHOT * PATH: operation */ public class VariantOperationClient extends AbstractParentClient { diff --git a/opencga-client/src/main/javascript/Admin.js b/opencga-client/src/main/javascript/Admin.js index 2466edfccfd..fdfb9de6aa6 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-09-12 + * Autogenerated on: 2023-10-27 * * 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 446219c5a59..8c967d31de0 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-09-12 + * Autogenerated on: 2023-10-27 * * 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 221fa4a68da..b814ab17d37 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-09-12 + * Autogenerated on: 2023-10-27 * * 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 9d070dc8ec8..8a3379c7348 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-09-12 + * Autogenerated on: 2023-10-27 * * 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 1d97f0d3b6f..a0967fc19f7 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-09-12 + * Autogenerated on: 2023-10-27 * * 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 5b11ceacd3a..a1183ca4f60 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-09-12 + * Autogenerated on: 2023-10-27 * * 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 27d76b733e7..58e1343ad16 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-09-12 + * Autogenerated on: 2023-10-27 * * 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 2e3f968ab05..e61030ad0e3 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-09-12 + * Autogenerated on: 2023-10-27 * * 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 160bb589c50..8e5089be7fd 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-09-12 + * Autogenerated on: 2023-10-27 * * 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 52f5cdde599..21d175e0ca3 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-09-12 + * Autogenerated on: 2023-10-27 * * 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 0207e95847a..02c96c1dade 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-09-12 + * Autogenerated on: 2023-10-27 * * 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 f43c7394d71..e38753e0c87 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-09-12 + * Autogenerated on: 2023-10-27 * * 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 edefccf3e5a..abbe89cf5ac 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-09-12 + * Autogenerated on: 2023-10-27 * * 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 d153ba9d316..d0eb2bb02fe 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-09-12 + * Autogenerated on: 2023-10-27 * * 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 d8c60b8d409..b65022b6a8b 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-09-12 + * Autogenerated on: 2023-10-27 * * 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 35617fde07f..d3ced6ac6ad 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-09-12 + * Autogenerated on: 2023-10-27 * * 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 daa6917728a..7044b256894 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-09-12 + * Autogenerated on: 2023-10-27 * * 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 28598b602eb..90d868b6533 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-09-12 + Autogenerated on: 2023-10-27 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. @@ -14,7 +14,7 @@ class Admin(_ParentRestClient): """ This class contains methods for the 'Admin' webservices - Client version: 2.11.0-SNAPSHOT + Client version: 2.12.0-SNAPSHOT PATH: /{apiVersion}/admin """ 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 d19895d21ba..b3fd66f2f86 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-09-12 + Autogenerated on: 2023-10-27 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. @@ -14,7 +14,7 @@ class Alignment(_ParentRestClient): """ This class contains methods for the 'Analysis - Alignment' webservices - Client version: 2.11.0-SNAPSHOT + Client version: 2.12.0-SNAPSHOT PATH: /{apiVersion}/analysis/alignment """ 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 cf8de0798c5..359a1bdcb5b 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-09-12 + Autogenerated on: 2023-10-27 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. @@ -14,7 +14,7 @@ class ClinicalAnalysis(_ParentRestClient): """ This class contains methods for the 'Analysis - Clinical' webservices - Client version: 2.11.0-SNAPSHOT + Client version: 2.12.0-SNAPSHOT PATH: /{apiVersion}/analysis/clinical """ 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 f7d6ad80542..021ca07f480 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-09-12 + Autogenerated on: 2023-10-27 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. @@ -14,7 +14,7 @@ class Cohort(_ParentRestClient): """ This class contains methods for the 'Cohorts' webservices - Client version: 2.11.0-SNAPSHOT + Client version: 2.12.0-SNAPSHOT PATH: /{apiVersion}/cohorts """ 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 6d47ea09d3c..e02a70f6560 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-09-12 + Autogenerated on: 2023-10-27 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. @@ -14,7 +14,7 @@ class DiseasePanel(_ParentRestClient): """ This class contains methods for the 'Disease Panels' webservices - Client version: 2.11.0-SNAPSHOT + Client version: 2.12.0-SNAPSHOT PATH: /{apiVersion}/panels """ 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 65e3a070dce..a321fc45b54 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-09-12 + Autogenerated on: 2023-10-27 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. @@ -14,7 +14,7 @@ class Family(_ParentRestClient): """ This class contains methods for the 'Families' webservices - Client version: 2.11.0-SNAPSHOT + Client version: 2.12.0-SNAPSHOT PATH: /{apiVersion}/families """ 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 c6c028d3b3a..7a0f41fcb5a 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-09-12 + Autogenerated on: 2023-10-27 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. @@ -14,7 +14,7 @@ class File(_ParentRestClient): """ This class contains methods for the 'Files' webservices - Client version: 2.11.0-SNAPSHOT + Client version: 2.12.0-SNAPSHOT PATH: /{apiVersion}/files """ 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 48e5b17de75..c9966af7a5e 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-09-12 + Autogenerated on: 2023-10-27 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. @@ -14,7 +14,7 @@ class GA4GH(_ParentRestClient): """ This class contains methods for the 'GA4GH' webservices - Client version: 2.11.0-SNAPSHOT + Client version: 2.12.0-SNAPSHOT PATH: /{apiVersion}/ga4gh """ 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 07dd3d04b0d..2c811e6c501 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-09-12 + Autogenerated on: 2023-10-27 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. @@ -14,7 +14,7 @@ class Individual(_ParentRestClient): """ This class contains methods for the 'Individuals' webservices - Client version: 2.11.0-SNAPSHOT + Client version: 2.12.0-SNAPSHOT PATH: /{apiVersion}/individuals """ 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 d692f8e099c..80078af84e6 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-09-12 + Autogenerated on: 2023-10-27 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. @@ -14,7 +14,7 @@ class Job(_ParentRestClient): """ This class contains methods for the 'Jobs' webservices - Client version: 2.11.0-SNAPSHOT + Client version: 2.12.0-SNAPSHOT PATH: /{apiVersion}/jobs """ 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 d43227b33f8..6e7cc082b1f 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-09-12 + Autogenerated on: 2023-10-27 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. @@ -14,7 +14,7 @@ class Meta(_ParentRestClient): """ This class contains methods for the 'Meta' webservices - Client version: 2.11.0-SNAPSHOT + Client version: 2.12.0-SNAPSHOT PATH: /{apiVersion}/meta """ 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 bd29b4b1013..1b063026bd1 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-09-12 + Autogenerated on: 2023-10-27 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. @@ -14,7 +14,7 @@ class Project(_ParentRestClient): """ This class contains methods for the 'Projects' webservices - Client version: 2.11.0-SNAPSHOT + Client version: 2.12.0-SNAPSHOT PATH: /{apiVersion}/projects """ 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 fcb5c944884..9d4c3d3b56a 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-09-12 + Autogenerated on: 2023-10-27 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. @@ -14,7 +14,7 @@ class Sample(_ParentRestClient): """ This class contains methods for the 'Samples' webservices - Client version: 2.11.0-SNAPSHOT + Client version: 2.12.0-SNAPSHOT PATH: /{apiVersion}/samples """ 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 40cc9a63c08..0c67bc31819 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-09-12 + Autogenerated on: 2023-10-27 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. @@ -14,7 +14,7 @@ class Study(_ParentRestClient): """ This class contains methods for the 'Studies' webservices - Client version: 2.11.0-SNAPSHOT + Client version: 2.12.0-SNAPSHOT PATH: /{apiVersion}/studies """ 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 3f2ed4eae3e..bfc4b7d4d9a 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-09-12 + Autogenerated on: 2023-10-27 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. @@ -14,7 +14,7 @@ class User(_ParentRestClient): """ This class contains methods for the 'Users' webservices - Client version: 2.11.0-SNAPSHOT + Client version: 2.12.0-SNAPSHOT PATH: /{apiVersion}/users """ 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 80e1746470a..b7e2829b208 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-09-12 + Autogenerated on: 2023-10-27 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. @@ -14,7 +14,7 @@ class Variant(_ParentRestClient): """ This class contains methods for the 'Analysis - Variant' webservices - Client version: 2.11.0-SNAPSHOT + Client version: 2.12.0-SNAPSHOT PATH: /{apiVersion}/analysis/variant """ 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 4297fbf08ae..6736e33528e 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-09-12 + Autogenerated on: 2023-10-27 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. @@ -14,7 +14,7 @@ class VariantOperation(_ParentRestClient): """ This class contains methods for the 'Operations - Variant Storage' webservices - Client version: 2.11.0-SNAPSHOT + Client version: 2.12.0-SNAPSHOT PATH: /{apiVersion}/operation """ diff --git a/opencga-server/src/main/java/org/opencb/opencga/server/generator/writers/cli/ExecutorsCliRestApiWriter.java b/opencga-server/src/main/java/org/opencb/opencga/server/generator/writers/cli/ExecutorsCliRestApiWriter.java index f75776a7dfa..9a7c35caa86 100644 --- a/opencga-server/src/main/java/org/opencb/opencga/server/generator/writers/cli/ExecutorsCliRestApiWriter.java +++ b/opencga-server/src/main/java/org/opencb/opencga/server/generator/writers/cli/ExecutorsCliRestApiWriter.java @@ -170,6 +170,7 @@ protected String getClassHeader(String key) { CategoryConfig config = availableCategoryConfigs.get(key); sb.append("public class " + getAsClassName(restCategory.getName()) + "CommandExecutor extends " + getExtendedClass() + " {\n\n"); + sb.append(" public String categoryName = \"" + getAsVariableName(getAsCamelCase(restCategory.getName())) + "\";\n"); sb.append(" public " + getAsClassName(restCategory.getName()) + "CommandOptions " + getAsVariableName(getAsCamelCase(restCategory.getName())) + "CommandOptions;\n\n"); sb.append(" public " + getAsClassName(restCategory.getName()) + "CommandExecutor(" + getAsClassName(restCategory.getName()) @@ -373,7 +374,7 @@ private String getBodyParams(RestCategory restCategory, RestEndpoint restEndpoin sb.append("\n " + variableName + " = new " + bodyClassName + "();"); sb.append("\n RestResponse<" + getValidResponseNames(restEndpoint.getResponse()) + "> res = new RestResponse<>();"); sb.append("\n res.setType(QueryType.VOID);"); - sb.append("\n PrintUtils.println(getObjectAsJSON(" + variableName + "));"); + sb.append("\n PrintUtils.println(getObjectAsJSON(categoryName,\""+restEndpoint.getPath()+"\"));"); sb.append("\n return res;"); sb.append("\n } else if (commandOptions.jsonFile != null) {"); sb.append("\n " + getAsVariableName(bodyClassName) + " = JacksonUtils.getDefaultObjectMapper()"); From 686cf70fffcdf7c6f9450232cb74c74ba4d967db Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Fri, 27 Oct 2023 16:35:13 +0200 Subject: [PATCH 06/25] CLI: TextOutputWriter manage errors #TASK-5166 --- .../app/cli/main/io/TextOutputWriter.java | 38 ++++++++++--------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/io/TextOutputWriter.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/io/TextOutputWriter.java index 1b8914bdbf0..a4e75a72794 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/io/TextOutputWriter.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/io/TextOutputWriter.java @@ -88,22 +88,14 @@ public void print(RestResponse queryResponse) { throw new RuntimeException(e); } - /* // if (queryResponse != null && queryResponse.getType().equals(QueryType.VOID)) { - if (queryResponse.getEvents() != null) { - for (Event event : ((RestResponse)queryResponse.getResponses().get(0)).getEvents()) { - if (StringUtils.isNotEmpty(event.getMessage())) { - if (event.getType().equals(Event.Type.ERROR)) { - PrintUtils.printError(event.getMessage()); - } else { - PrintUtils.printInfo(event.getMessage()); - } - } else { - PrintUtils.printError(event.getMessage()); - } + if (queryResponse != null && queryResponse.getType().equals(QueryType.VOID)) { + if (queryResponse.getResponses() != null && queryResponse.getResponses().size() > 0) { + manageEvents(((RestResponse) queryResponse.getResponses().get(0)).getEvents()); + } else if (queryResponse.getEvents() != null && queryResponse.getEvents().size() > 0) { + manageEvents(queryResponse.getEvents()); } + return; } - // return; - // } if (checkErrors(queryResponse) && queryResponse.allResultsSize() == 0) { return; } @@ -112,11 +104,9 @@ public void print(RestResponse queryResponse) { return; } - ps.print(printMetadata(queryResponse)); -*/ - List queryResultList = queryResponse.getResponses(); + List queryResultList = queryResponse.getResponses(); if (CollectionUtils.isNotEmpty(queryResultList) && ((OpenCGAResult) queryResultList.get(0)) != null && ((OpenCGAResult) queryResultList.get(0)).getNumMatches() > -1 && !isEdition(queryResultList) && isNotAnIdOrMessage(queryResultList)) { @@ -183,6 +173,20 @@ public void print(RestResponse queryResponse) { } } + private void manageEvents(final List events) { + for (Event event : events) { + if (StringUtils.isNotEmpty(event.getMessage())) { + if (event.getType().equals(Event.Type.ERROR)) { + PrintUtils.printError(event.getMessage()); + } else { + PrintUtils.printInfo(event.getMessage()); + } + } else { + PrintUtils.printError(event.getMessage()); + } + } + } + private boolean isNotAnIdOrMessage(List queryResultList) { return !(queryResultList.get(0).getResultType().equals("java.lang.String") && ((OpenCGAResult) queryResultList.get(0)).getNumMatches() == 1); From 09744d77851bc4df4c2cc3654e4776282eccc9a3 Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Tue, 31 Oct 2023 14:22:10 +0100 Subject: [PATCH 07/25] client: Regenerate the clients #TASK-5200 --- .../opencga/app/cli/main/OpenCgaCompleter.java | 2 +- .../app/cli/main/OpencgaCliOptionsParser.java | 2 +- 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 | 18 +++++++++--------- opencga-client/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 | 2 +- .../src/main/R/R/Individual-methods.R | 4 ++-- 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 | 2 +- opencga-client/src/main/R/R/Variant-methods.R | 2 +- .../client/rest/clients/AdminClient.java | 4 ++-- .../client/rest/clients/AlignmentClient.java | 4 ++-- .../rest/clients/ClinicalAnalysisClient.java | 4 ++-- .../client/rest/clients/CohortClient.java | 4 ++-- .../rest/clients/DiseasePanelClient.java | 4 ++-- .../client/rest/clients/FamilyClient.java | 4 ++-- .../client/rest/clients/FileClient.java | 4 ++-- .../client/rest/clients/GA4GHClient.java | 4 ++-- .../client/rest/clients/IndividualClient.java | 4 ++-- .../opencga/client/rest/clients/JobClient.java | 4 ++-- .../client/rest/clients/MetaClient.java | 4 ++-- .../client/rest/clients/ProjectClient.java | 4 ++-- .../client/rest/clients/SampleClient.java | 4 ++-- .../client/rest/clients/StudyClient.java | 4 ++-- .../client/rest/clients/UserClient.java | 4 ++-- .../client/rest/clients/VariantClient.java | 4 ++-- .../rest/clients/VariantOperationClient.java | 4 ++-- 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 | 4 ++-- .../pyopencga/rest_clients/alignment_client.py | 4 ++-- .../rest_clients/clinical_analysis_client.py | 4 ++-- .../pyopencga/rest_clients/cohort_client.py | 4 ++-- .../rest_clients/disease_panel_client.py | 4 ++-- .../pyopencga/rest_clients/family_client.py | 4 ++-- .../pyopencga/rest_clients/file_client.py | 4 ++-- .../pyopencga/rest_clients/ga4gh_client.py | 4 ++-- .../rest_clients/individual_client.py | 4 ++-- .../pyopencga/rest_clients/job_client.py | 4 ++-- .../pyopencga/rest_clients/meta_client.py | 4 ++-- .../pyopencga/rest_clients/project_client.py | 4 ++-- .../pyopencga/rest_clients/sample_client.py | 4 ++-- .../pyopencga/rest_clients/study_client.py | 4 ++-- .../pyopencga/rest_clients/user_client.py | 4 ++-- .../pyopencga/rest_clients/variant_client.py | 4 ++-- .../rest_clients/variant_operation_client.py | 4 ++-- 71 files changed, 122 insertions(+), 122 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 81bc80aeb2f..b440ceed89c 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-10-04 OpenCB +* Copyright 2015-2023-10-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 646d8963b89..3a5725bf56e 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-10-04 OpenCB +* Copyright 2015-2023-10-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-client/src/main/R/R/Admin-methods.R b/opencga-client/src/main/R/R/Admin-methods.R index 5faa2c44b78..9fc8c2c9b4c 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-10-04 +# Autogenerated on: 2023-10-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 c8ccfb56960..b44cf082a5c 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-10-04 +# Autogenerated on: 2023-10-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 b749fd1f45f..f1301abe655 100644 --- a/opencga-client/src/main/R/R/AllGenerics.R +++ b/opencga-client/src/main/R/R/AllGenerics.R @@ -5,42 +5,42 @@ setGeneric("userClient", function(OpencgaR, filterId, users, user, endpointName, # ############################################################################## ## ProjectClient -setGeneric("projectClient", function(OpencgaR, project, projects, endpointName, params=NULL, ...) +setGeneric("projectClient", function(OpencgaR, projects, project, endpointName, params=NULL, ...) standardGeneric("projectClient")) # ############################################################################## ## StudyClient -setGeneric("studyClient", function(OpencgaR, group, members, templateId, variableSet, studies, study, endpointName, params=NULL, ...) +setGeneric("studyClient", function(OpencgaR, group, members, study, templateId, studies, variableSet, endpointName, params=NULL, ...) standardGeneric("studyClient")) # ############################################################################## ## FileClient -setGeneric("fileClient", function(OpencgaR, members, files, folder, annotationSet, file, endpointName, params=NULL, ...) +setGeneric("fileClient", function(OpencgaR, folder, members, files, annotationSet, file, endpointName, params=NULL, ...) standardGeneric("fileClient")) # ############################################################################## ## JobClient -setGeneric("jobClient", function(OpencgaR, members, job, jobs, endpointName, params=NULL, ...) +setGeneric("jobClient", function(OpencgaR, job, jobs, members, endpointName, params=NULL, ...) standardGeneric("jobClient")) # ############################################################################## ## SampleClient -setGeneric("sampleClient", function(OpencgaR, members, samples, annotationSet, sample, endpointName, params=NULL, ...) +setGeneric("sampleClient", function(OpencgaR, annotationSet, sample, samples, members, endpointName, params=NULL, ...) standardGeneric("sampleClient")) # ############################################################################## ## IndividualClient -setGeneric("individualClient", function(OpencgaR, members, annotationSet, individual, individuals, endpointName, params=NULL, ...) +setGeneric("individualClient", function(OpencgaR, individual, individuals, members, annotationSet, endpointName, params=NULL, ...) standardGeneric("individualClient")) # ############################################################################## ## FamilyClient -setGeneric("familyClient", function(OpencgaR, families, members, annotationSet, family, endpointName, params=NULL, ...) +setGeneric("familyClient", function(OpencgaR, annotationSet, families, members, family, endpointName, params=NULL, ...) standardGeneric("familyClient")) # ############################################################################## ## CohortClient -setGeneric("cohortClient", function(OpencgaR, members, annotationSet, cohorts, cohort, endpointName, params=NULL, ...) +setGeneric("cohortClient", function(OpencgaR, annotationSet, cohorts, members, cohort, endpointName, params=NULL, ...) standardGeneric("cohortClient")) # ############################################################################## @@ -60,7 +60,7 @@ setGeneric("variantClient", function(OpencgaR, endpointName, params=NULL, ...) # ############################################################################## ## ClinicalClient -setGeneric("clinicalClient", function(OpencgaR, members, clinicalAnalysis, interpretations, clinicalAnalyses, interpretation, endpointName, params=NULL, ...) +setGeneric("clinicalClient", function(OpencgaR, interpretations, members, clinicalAnalyses, clinicalAnalysis, interpretation, endpointName, params=NULL, ...) standardGeneric("clinicalClient")) # ############################################################################## diff --git a/opencga-client/src/main/R/R/Clinical-methods.R b/opencga-client/src/main/R/R/Clinical-methods.R index 229e1a40aeb..000ea655444 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-10-04 +# Autogenerated on: 2023-10-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, members, clinicalAnalysis, interpretations, clinicalAnalyses, interpretation, endpointName, params=NULL, ...) { +setMethod("clinicalClient", "OpencgaR", function(OpencgaR, interpretations, members, clinicalAnalyses, clinicalAnalysis, interpretation, 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 5cbbca27e88..a23ab7fe2d9 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-10-04 +# Autogenerated on: 2023-10-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, cohorts, cohort, endpointName, params=NULL, ...) { +setMethod("cohortClient", "OpencgaR", function(OpencgaR, annotationSet, cohorts, members, cohort, 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 92babc2d42a..9b91eec1830 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-10-04 +# Autogenerated on: 2023-10-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, families, members, annotationSet, family, endpointName, params=NULL, ...) { +setMethod("familyClient", "OpencgaR", function(OpencgaR, annotationSet, families, members, family, 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 a5160bf9489..4e6f491f921 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-10-04 +# Autogenerated on: 2023-10-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, members, files, folder, annotationSet, file, endpointName, params=NULL, ...) { +setMethod("fileClient", "OpencgaR", function(OpencgaR, folder, members, files, annotationSet, file, 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 7c91d78c0d9..0e98f744822 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-10-04 +# Autogenerated on: 2023-10-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/Individual-methods.R b/opencga-client/src/main/R/R/Individual-methods.R index 38653dd2fb3..1646b349f28 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-10-04 +# Autogenerated on: 2023-10-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("individualClient", "OpencgaR", function(OpencgaR, members, annotationSet, individual, individuals, endpointName, params=NULL, ...) { +setMethod("individualClient", "OpencgaR", function(OpencgaR, individual, individuals, members, annotationSet, endpointName, params=NULL, ...) { switch(endpointName, #' @section Endpoint /{apiVersion}/individuals/acl/{members}/update: diff --git a/opencga-client/src/main/R/R/Job-methods.R b/opencga-client/src/main/R/R/Job-methods.R index 4ddac21f0b7..e078da2acbc 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-10-04 +# Autogenerated on: 2023-10-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, jobs, members, 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 b98878431e5..ad9badfac2b 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-10-04 +# Autogenerated on: 2023-10-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 032c05951da..063b89773fb 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-10-04 +# Autogenerated on: 2023-10-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 0b68b9bd20b..4a531400a55 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-10-04 +# Autogenerated on: 2023-10-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 a392aa6b259..76888f37ee5 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-10-04 +# Autogenerated on: 2023-10-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, project, projects, endpointName, params=NULL, ...) { +setMethod("projectClient", "OpencgaR", function(OpencgaR, projects, project, 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 68067e64a3b..0f87565844b 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-10-04 +# Autogenerated on: 2023-10-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, samples, annotationSet, sample, endpointName, params=NULL, ...) { +setMethod("sampleClient", "OpencgaR", function(OpencgaR, annotationSet, sample, samples, members, 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 0b480943c23..de200065cd3 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-10-04 +# Autogenerated on: 2023-10-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, group, members, templateId, variableSet, studies, study, endpointName, params=NULL, ...) { +setMethod("studyClient", "OpencgaR", function(OpencgaR, group, members, study, templateId, studies, variableSet, 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 f347e8cd017..71d7d8c5abd 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-10-04 +# Autogenerated on: 2023-10-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/Variant-methods.R b/opencga-client/src/main/R/R/Variant-methods.R index 40838d6adfe..1dbcb5ded0c 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-10-04 +# Autogenerated on: 2023-10-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 96be750670b..71beae5d3c6 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 @@ -35,7 +35,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-10-04 +* Autogenerated on: 2023-10-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. @@ -44,7 +44,7 @@ /** * This class contains methods for the Admin webservices. - * Client version: 2.8.4-SNAPSHOT + * Client version: 2.8.5-SNAPSHOT * PATH: admin */ public class AdminClient extends AbstractParentClient { 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 e1ddc11bfa8..d47e3193d55 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-10-04 +* Autogenerated on: 2023-10-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. @@ -49,7 +49,7 @@ /** * This class contains methods for the Alignment webservices. - * Client version: 2.8.4-SNAPSHOT + * Client version: 2.8.5-SNAPSHOT * PATH: analysis/alignment */ public class AlignmentClient extends AbstractParentClient { 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 91445e510b3..469e957f263 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-10-04 +* Autogenerated on: 2023-10-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. @@ -60,7 +60,7 @@ /** * This class contains methods for the ClinicalAnalysis webservices. - * Client version: 2.8.4-SNAPSHOT + * Client version: 2.8.5-SNAPSHOT * PATH: analysis/clinical */ public class ClinicalAnalysisClient extends AbstractParentClient { 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 95f8b5eda99..bc9da62bc9f 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-10-04 +* Autogenerated on: 2023-10-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 @@ /** * This class contains methods for the Cohort webservices. - * Client version: 2.8.4-SNAPSHOT + * Client version: 2.8.5-SNAPSHOT * PATH: cohorts */ public class CohortClient extends AbstractParentClient { 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 cb08168920f..00be08b1dc2 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-10-04 +* Autogenerated on: 2023-10-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. @@ -44,7 +44,7 @@ /** * This class contains methods for the DiseasePanel webservices. - * Client version: 2.8.4-SNAPSHOT + * Client version: 2.8.5-SNAPSHOT * PATH: panels */ public class DiseasePanelClient extends AbstractParentClient { 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 bdc6c656bbb..3b6474a68ec 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-10-04 +* Autogenerated on: 2023-10-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. @@ -45,7 +45,7 @@ /** * This class contains methods for the Family webservices. - * Client version: 2.8.4-SNAPSHOT + * Client version: 2.8.5-SNAPSHOT * PATH: families */ public class FamilyClient extends AbstractParentClient { 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 f44d3e22ade..ecfb7ba9b66 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-10-04 +* Autogenerated on: 2023-10-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. @@ -52,7 +52,7 @@ /** * This class contains methods for the File webservices. - * Client version: 2.8.4-SNAPSHOT + * Client version: 2.8.5-SNAPSHOT * PATH: files */ public class FileClient extends AbstractParentClient { 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 9af11491608..59e0081ec90 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-10-04 +* Autogenerated on: 2023-10-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. @@ -36,7 +36,7 @@ /** * This class contains methods for the GA4GH webservices. - * Client version: 2.8.4-SNAPSHOT + * Client version: 2.8.5-SNAPSHOT * PATH: ga4gh */ public class GA4GHClient extends AbstractParentClient { 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 53a50f476bc..34b635b8127 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-10-04 +* Autogenerated on: 2023-10-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. @@ -45,7 +45,7 @@ /** * This class contains methods for the Individual webservices. - * Client version: 2.8.4-SNAPSHOT + * Client version: 2.8.5-SNAPSHOT * PATH: individuals */ public class IndividualClient extends AbstractParentClient { 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 0652bc2436d..8eea74e5496 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-10-04 +* Autogenerated on: 2023-10-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 @@ /** * This class contains methods for the Job webservices. - * Client version: 2.8.4-SNAPSHOT + * Client version: 2.8.5-SNAPSHOT * PATH: jobs */ public class JobClient extends AbstractParentClient { 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 b934db26203..bfde0b4dd25 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-10-04 +* Autogenerated on: 2023-10-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. @@ -37,7 +37,7 @@ /** * This class contains methods for the Meta webservices. - * Client version: 2.8.4-SNAPSHOT + * Client version: 2.8.5-SNAPSHOT * PATH: meta */ public class MetaClient extends AbstractParentClient { 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 64f54763f2e..b77b1565a26 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-10-04 +* Autogenerated on: 2023-10-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. @@ -41,7 +41,7 @@ /** * This class contains methods for the Project webservices. - * Client version: 2.8.4-SNAPSHOT + * Client version: 2.8.5-SNAPSHOT * PATH: projects */ public class ProjectClient extends AbstractParentClient { 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 d0f185066a1..e746cf5132b 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-10-04 +* Autogenerated on: 2023-10-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. @@ -45,7 +45,7 @@ /** * This class contains methods for the Sample webservices. - * Client version: 2.8.4-SNAPSHOT + * Client version: 2.8.5-SNAPSHOT * PATH: samples */ public class SampleClient extends AbstractParentClient { 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 028975cafd6..013fbc730a6 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-10-04 +* Autogenerated on: 2023-10-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 @@ /** * This class contains methods for the Study webservices. - * Client version: 2.8.4-SNAPSHOT + * Client version: 2.8.5-SNAPSHOT * PATH: studies */ public class StudyClient extends AbstractParentClient { 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 31fae0170a4..895433cb4e9 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-10-04 +* Autogenerated on: 2023-10-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. @@ -45,7 +45,7 @@ /** * This class contains methods for the User webservices. - * Client version: 2.8.4-SNAPSHOT + * Client version: 2.8.5-SNAPSHOT * PATH: users */ public class UserClient extends AbstractParentClient { 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 89f512c31da..dfcbf1d8a76 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-10-04 +* Autogenerated on: 2023-10-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. @@ -71,7 +71,7 @@ /** * This class contains methods for the Variant webservices. - * Client version: 2.8.4-SNAPSHOT + * Client version: 2.8.5-SNAPSHOT * PATH: analysis/variant */ public class VariantClient extends AbstractParentClient { 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 539f4d2d5d0..7f3d3bbacb4 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-10-04 +* Autogenerated on: 2023-10-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. @@ -59,7 +59,7 @@ /** * This class contains methods for the VariantOperation webservices. - * Client version: 2.8.4-SNAPSHOT + * Client version: 2.8.5-SNAPSHOT * PATH: operation */ public class VariantOperationClient extends AbstractParentClient { diff --git a/opencga-client/src/main/javascript/Admin.js b/opencga-client/src/main/javascript/Admin.js index 43448df0a88..4c31ec6ca50 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-10-04 + * Autogenerated on: 2023-10-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 347d5d3c4b3..127b90a7864 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-10-04 + * Autogenerated on: 2023-10-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 8c4b1fc8f09..fd4515da44f 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-10-04 + * Autogenerated on: 2023-10-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 1f2e74a0fda..5e2310c7f28 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-10-04 + * Autogenerated on: 2023-10-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 dcf0f9ea625..165ef98f522 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-10-04 + * Autogenerated on: 2023-10-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 ffc8c0ae151..7f2a218d7f1 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-10-04 + * Autogenerated on: 2023-10-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 78177eea8ca..b0345b96e7a 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-10-04 + * Autogenerated on: 2023-10-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 60276c7c692..c3e6323e6a3 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-10-04 + * Autogenerated on: 2023-10-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 5f9ac89ae24..7888ce29395 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-10-04 + * Autogenerated on: 2023-10-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 d5c6bff8f9f..45feabfd2b8 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-10-04 + * Autogenerated on: 2023-10-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 9c50397eed7..3560f97b009 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-10-04 + * Autogenerated on: 2023-10-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 ac6b512a0f7..98e39365455 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-10-04 + * Autogenerated on: 2023-10-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 47638a1517b..d297aeab110 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-10-04 + * Autogenerated on: 2023-10-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 bd0909c995f..a5bc080928b 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-10-04 + * Autogenerated on: 2023-10-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 9a94f2dd9e5..8c1c3f7156d 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-10-04 + * Autogenerated on: 2023-10-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 f470e79bc10..163646bac69 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-10-04 + * Autogenerated on: 2023-10-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 e1881513fd0..c83d1872b47 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-10-04 + * Autogenerated on: 2023-10-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 dd26a83ef54..702d47bc840 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-10-04 + Autogenerated on: 2023-10-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. @@ -14,7 +14,7 @@ class Admin(_ParentRestClient): """ This class contains methods for the 'Admin' webservices - Client version: 2.8.4-SNAPSHOT + Client version: 2.8.5-SNAPSHOT PATH: /{apiVersion}/admin """ 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 c402c27faa8..a60a493bf1d 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-10-04 + Autogenerated on: 2023-10-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. @@ -14,7 +14,7 @@ class Alignment(_ParentRestClient): """ This class contains methods for the 'Analysis - Alignment' webservices - Client version: 2.8.4-SNAPSHOT + Client version: 2.8.5-SNAPSHOT PATH: /{apiVersion}/analysis/alignment """ 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 d3f1927102b..2bec764952a 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-10-04 + Autogenerated on: 2023-10-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. @@ -14,7 +14,7 @@ class ClinicalAnalysis(_ParentRestClient): """ This class contains methods for the 'Analysis - Clinical' webservices - Client version: 2.8.4-SNAPSHOT + Client version: 2.8.5-SNAPSHOT PATH: /{apiVersion}/analysis/clinical """ 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 3c3cb584041..0d8b9e09458 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-10-04 + Autogenerated on: 2023-10-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. @@ -14,7 +14,7 @@ class Cohort(_ParentRestClient): """ This class contains methods for the 'Cohorts' webservices - Client version: 2.8.4-SNAPSHOT + Client version: 2.8.5-SNAPSHOT PATH: /{apiVersion}/cohorts """ 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 bc80ec0403d..15d4be26981 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-10-04 + Autogenerated on: 2023-10-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. @@ -14,7 +14,7 @@ class DiseasePanel(_ParentRestClient): """ This class contains methods for the 'Disease Panels' webservices - Client version: 2.8.4-SNAPSHOT + Client version: 2.8.5-SNAPSHOT PATH: /{apiVersion}/panels """ 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 ab32e42c325..1caa8bba951 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-10-04 + Autogenerated on: 2023-10-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. @@ -14,7 +14,7 @@ class Family(_ParentRestClient): """ This class contains methods for the 'Families' webservices - Client version: 2.8.4-SNAPSHOT + Client version: 2.8.5-SNAPSHOT PATH: /{apiVersion}/families """ 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 08344545d75..797924beb39 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-10-04 + Autogenerated on: 2023-10-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. @@ -14,7 +14,7 @@ class File(_ParentRestClient): """ This class contains methods for the 'Files' webservices - Client version: 2.8.4-SNAPSHOT + Client version: 2.8.5-SNAPSHOT PATH: /{apiVersion}/files """ 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 82abbc91e0a..c3dc2da9008 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-10-04 + Autogenerated on: 2023-10-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. @@ -14,7 +14,7 @@ class GA4GH(_ParentRestClient): """ This class contains methods for the 'GA4GH' webservices - Client version: 2.8.4-SNAPSHOT + Client version: 2.8.5-SNAPSHOT PATH: /{apiVersion}/ga4gh """ 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 03ccaff7058..df1e5e04c7f 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-10-04 + Autogenerated on: 2023-10-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. @@ -14,7 +14,7 @@ class Individual(_ParentRestClient): """ This class contains methods for the 'Individuals' webservices - Client version: 2.8.4-SNAPSHOT + Client version: 2.8.5-SNAPSHOT PATH: /{apiVersion}/individuals """ 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 1b9946676c7..a3a0756e683 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-10-04 + Autogenerated on: 2023-10-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. @@ -14,7 +14,7 @@ class Job(_ParentRestClient): """ This class contains methods for the 'Jobs' webservices - Client version: 2.8.4-SNAPSHOT + Client version: 2.8.5-SNAPSHOT PATH: /{apiVersion}/jobs """ 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 c2912d49faa..5be715b476b 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-10-04 + Autogenerated on: 2023-10-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. @@ -14,7 +14,7 @@ class Meta(_ParentRestClient): """ This class contains methods for the 'Meta' webservices - Client version: 2.8.4-SNAPSHOT + Client version: 2.8.5-SNAPSHOT PATH: /{apiVersion}/meta """ 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 6e8eb18d1cd..123dc28a80e 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-10-04 + Autogenerated on: 2023-10-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. @@ -14,7 +14,7 @@ class Project(_ParentRestClient): """ This class contains methods for the 'Projects' webservices - Client version: 2.8.4-SNAPSHOT + Client version: 2.8.5-SNAPSHOT PATH: /{apiVersion}/projects """ 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 2e5734521cc..860b3e8be05 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-10-04 + Autogenerated on: 2023-10-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. @@ -14,7 +14,7 @@ class Sample(_ParentRestClient): """ This class contains methods for the 'Samples' webservices - Client version: 2.8.4-SNAPSHOT + Client version: 2.8.5-SNAPSHOT PATH: /{apiVersion}/samples """ 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 4a2d7250413..4e159692017 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-10-04 + Autogenerated on: 2023-10-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. @@ -14,7 +14,7 @@ class Study(_ParentRestClient): """ This class contains methods for the 'Studies' webservices - Client version: 2.8.4-SNAPSHOT + Client version: 2.8.5-SNAPSHOT PATH: /{apiVersion}/studies """ 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 3027cdd4965..13a63d1a64a 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-10-04 + Autogenerated on: 2023-10-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. @@ -14,7 +14,7 @@ class User(_ParentRestClient): """ This class contains methods for the 'Users' webservices - Client version: 2.8.4-SNAPSHOT + Client version: 2.8.5-SNAPSHOT PATH: /{apiVersion}/users """ 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 933dd47ada4..dc5bc0f8c43 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-10-04 + Autogenerated on: 2023-10-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. @@ -14,7 +14,7 @@ class Variant(_ParentRestClient): """ This class contains methods for the 'Analysis - Variant' webservices - Client version: 2.8.4-SNAPSHOT + Client version: 2.8.5-SNAPSHOT PATH: /{apiVersion}/analysis/variant """ 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 6061c2625d0..fa8a6ee5d52 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-10-04 + Autogenerated on: 2023-10-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. @@ -14,7 +14,7 @@ class VariantOperation(_ParentRestClient): """ This class contains methods for the 'Operations - Variant Storage' webservices - Client version: 2.8.4-SNAPSHOT + Client version: 2.8.5-SNAPSHOT PATH: /{apiVersion}/operation """ From 5226ae7d3ec3116d920da601f3a2e0ee9f67cb32 Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Thu, 2 Nov 2023 17:32:16 +0100 Subject: [PATCH 08/25] cli:getObjectAsJSON completo #TASK-5160 --- .../app/cli/main/OpenCgaCompleter.java | 2 +- .../app/cli/main/OpencgaCliOptionsParser.java | 2 +- .../AnalysisAlignmentCommandExecutor.java | 2 +- .../AnalysisClinicalCommandExecutor.java | 2 +- .../AnalysisVariantCommandExecutor.java | 2 +- .../DiseasePanelsCommandExecutor.java | 2 +- .../executors/OpencgaCommandExecutor.java | 79 +++++++++++++++++-- ...erationsVariantStorageCommandExecutor.java | 2 +- 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 | 14 ++-- .../src/main/R/R/Clinical-methods.R | 4 +- opencga-client/src/main/R/R/Cohort-methods.R | 2 +- 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 | 2 +- .../src/main/R/R/Individual-methods.R | 2 +- opencga-client/src/main/R/R/Job-methods.R | 2 +- 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 +- .../writers/ParentClientRestApiWriter.java | 6 +- .../cli/ExecutorsCliRestApiWriter.java | 2 +- 79 files changed, 166 insertions(+), 99 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 7d088edef53..db447fe40b6 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-10-27 OpenCB +* Copyright 2015-2023-11-02 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 279ccd36197..1dfe8779b88 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-10-27 OpenCB +* Copyright 2015-2023-11-02 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/AnalysisAlignmentCommandExecutor.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/AnalysisAlignmentCommandExecutor.java index 60c7752ddbe..28e02d2ad67 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/AnalysisAlignmentCommandExecutor.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/AnalysisAlignmentCommandExecutor.java @@ -48,7 +48,7 @@ */ public class AnalysisAlignmentCommandExecutor extends OpencgaCommandExecutor { - public String categoryName = "analysisAlignment"; + public String categoryName = "alignment"; public AnalysisAlignmentCommandOptions analysisAlignmentCommandOptions; public AnalysisAlignmentCommandExecutor(AnalysisAlignmentCommandOptions analysisAlignmentCommandOptions) throws CatalogAuthenticationException { diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/AnalysisClinicalCommandExecutor.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/AnalysisClinicalCommandExecutor.java index 0bd8b87285e..284aff68cc4 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/AnalysisClinicalCommandExecutor.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/AnalysisClinicalCommandExecutor.java @@ -80,7 +80,7 @@ */ public class AnalysisClinicalCommandExecutor extends OpencgaCommandExecutor { - public String categoryName = "analysisClinical"; + public String categoryName = "clinical"; public AnalysisClinicalCommandOptions analysisClinicalCommandOptions; public AnalysisClinicalCommandExecutor(AnalysisClinicalCommandOptions analysisClinicalCommandOptions) throws CatalogAuthenticationException { diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/AnalysisVariantCommandExecutor.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/AnalysisVariantCommandExecutor.java index 418b0c3ac40..5ae64623bb5 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/AnalysisVariantCommandExecutor.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/AnalysisVariantCommandExecutor.java @@ -76,7 +76,7 @@ */ public class AnalysisVariantCommandExecutor extends OpencgaCommandExecutor { - public String categoryName = "analysisVariant"; + public String categoryName = "variant"; public AnalysisVariantCommandOptions analysisVariantCommandOptions; public AnalysisVariantCommandExecutor(AnalysisVariantCommandOptions analysisVariantCommandOptions) throws CatalogAuthenticationException { diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/DiseasePanelsCommandExecutor.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/DiseasePanelsCommandExecutor.java index 5c6446b45e4..29e5e25e4b9 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/DiseasePanelsCommandExecutor.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/DiseasePanelsCommandExecutor.java @@ -44,7 +44,7 @@ */ public class DiseasePanelsCommandExecutor extends OpencgaCommandExecutor { - public String categoryName = "diseasePanels"; + public String categoryName = "panels"; public DiseasePanelsCommandOptions diseasePanelsCommandOptions; public DiseasePanelsCommandExecutor(DiseasePanelsCommandOptions diseasePanelsCommandOptions) throws CatalogAuthenticationException { diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/OpencgaCommandExecutor.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/OpencgaCommandExecutor.java index fc2357c14ad..b46e5f387ab 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/OpencgaCommandExecutor.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/OpencgaCommandExecutor.java @@ -225,27 +225,33 @@ public OpencgaCommandExecutor setOpenCGAClient(OpenCGAClient openCGAClient) { } public String getObjectAsJSON(String objectCategory, String objectPath) throws Exception { - String jsonInString = ""; + String jsonInString = "\n"; try { ObjectMap queryParams = new ObjectMap(); - queryParams.putIfNotEmpty("category", String.valueOf(objectCategory)); + queryParams.putIfNotEmpty("category", objectCategory); RestResponse response = openCGAClient.getMetaClient().api(queryParams); ObjectMapper jsonObjectMapper = new ObjectMapper(); for (List list : response.getResponses().get(0).getResults()) { List categories = jsonObjectMapper.convertValue(list, new TypeReference>() {}); for (RestCategory category : categories) { - for (RestEndpoint endpoint: category.getEndpoints()){ - if(objectPath.equals(endpoint.getPath())){ - for (RestParameter parameter:endpoint.getParameters()){ + for (RestEndpoint endpoint : category.getEndpoints()) { + if (objectPath.equals(endpoint.getPath())) { + boolean enc = false; + for (RestParameter parameter : endpoint.getParameters()) { //jsonInString += parameter.getName()+":"+parameter.getAllowedValues()+"\n"; - jsonInString += parameter.toString()+"\n"; + if (parameter.getData() != null) { + enc = true; + jsonInString += printBody(parameter.getData(), ""); + } + } + if (!enc) { + jsonInString += "No model available"; } // } } } - } - // jsonInString = DataModelsUtils.dataModelToJsonString(o.getClass()); + } } catch (Exception e) { jsonInString = "Data model not found."; CommandLineUtils.error(e); @@ -253,6 +259,63 @@ public String getObjectAsJSON(String objectCategory, String objectPath) throws E return jsonInString; } + private String printBody(List data, String tabs) { + String res = ""; + res += "{\n"; + String tab = " " + tabs; + for (RestParameter parameter : data) { + if (parameter.getData() == null) { + res += printParameter(parameter, tab); + } else { + res += tab + parameter.getName() + "\"" + ": [" + printBody(parameter.getData(), tab) + "],\n"; + } + } + res += tabs + "}"; + return res; + + } + + private String printParameter(RestParameter parameter, String tab) { + + return tab + "\"" + parameter.getName() + "\"" + ":" + printParameterValue(parameter) + ",\n"; + } + + private String printParameterValue(RestParameter parameter) { + + if(!StringUtils.isEmpty(parameter.getAllowedValues())){ + return parameter.getAllowedValues().replace(" ", "|"); + } + switch (parameter.getType()) { + case "Boolean": + case "java.lang.Boolean": + return "false"; + case "Long": + case "Float": + case "Double": + case "Integer": + case "int": + case "double": + case "float": + case "long": + return "0"; + case "List": + return "[\"\"]"; + case "Date": + return "\"dd/mm/yyyy\""; + case "Map": + return "{\"key\": \"value\"}"; + case "String": + return "\"\""; + default: + return "\"-\""; + } + } + + private boolean isNumeric(String type) { + + return "int".equals(type) || "Long".equals(type) || "Float".equals(type) || "double".equals(type); + } + public RestResponse saveSession(String user, AuthenticationResponse response) throws ClientException, IOException { RestResponse res = new RestResponse<>(); if (response != null) { 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 7e1faf04dfd..6197d5eb410 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 @@ -61,7 +61,7 @@ */ public class OperationsVariantStorageCommandExecutor extends OpencgaCommandExecutor { - public String categoryName = "operationsVariantStorage"; + public String categoryName = "operation"; public OperationsVariantStorageCommandOptions operationsVariantStorageCommandOptions; public OperationsVariantStorageCommandExecutor(OperationsVariantStorageCommandOptions operationsVariantStorageCommandOptions) throws CatalogAuthenticationException { diff --git a/opencga-client/src/main/R/R/Admin-methods.R b/opencga-client/src/main/R/R/Admin-methods.R index ca588e36aec..1c4a4479bb0 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-10-27 +# Autogenerated on: 2023-11-02 # # 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 42453c4b949..5c97d7f69d1 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-10-27 +# Autogenerated on: 2023-11-02 # # 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 1094354e3de..85629266564 100644 --- a/opencga-client/src/main/R/R/AllGenerics.R +++ b/opencga-client/src/main/R/R/AllGenerics.R @@ -1,21 +1,21 @@ # ############################################################################## ## UserClient -setGeneric("userClient", function(OpencgaR, user, filterId, users, endpointName, params=NULL, ...) +setGeneric("userClient", function(OpencgaR, filterId, user, users, 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, templateId, variableSet, study, group, studies, members, endpointName, params=NULL, ...) +setGeneric("studyClient", function(OpencgaR, group, members, studies, study, templateId, variableSet, endpointName, params=NULL, ...) standardGeneric("studyClient")) # ############################################################################## ## FileClient -setGeneric("fileClient", function(OpencgaR, files, file, folder, annotationSet, members, endpointName, params=NULL, ...) +setGeneric("fileClient", function(OpencgaR, files, file, members, annotationSet, folder, endpointName, params=NULL, ...) standardGeneric("fileClient")) # ############################################################################## @@ -25,7 +25,7 @@ setGeneric("jobClient", function(OpencgaR, jobs, members, job, endpointName, par # ############################################################################## ## SampleClient -setGeneric("sampleClient", function(OpencgaR, sample, samples, members, annotationSet, endpointName, params=NULL, ...) +setGeneric("sampleClient", function(OpencgaR, samples, members, sample, annotationSet, endpointName, params=NULL, ...) standardGeneric("sampleClient")) # ############################################################################## @@ -35,7 +35,7 @@ setGeneric("individualClient", function(OpencgaR, individual, members, individua # ############################################################################## ## FamilyClient -setGeneric("familyClient", function(OpencgaR, annotationSet, members, family, families, endpointName, params=NULL, ...) +setGeneric("familyClient", function(OpencgaR, members, family, families, annotationSet, endpointName, params=NULL, ...) standardGeneric("familyClient")) # ############################################################################## @@ -60,7 +60,7 @@ setGeneric("variantClient", function(OpencgaR, endpointName, params=NULL, ...) # ############################################################################## ## ClinicalClient -setGeneric("clinicalClient", function(OpencgaR, clinicalAnalysis, clinicalAnalyses, interpretations, members, interpretation, endpointName, params=NULL, ...) +setGeneric("clinicalClient", function(OpencgaR, clinicalAnalysis, members, interpretation, interpretations, clinicalAnalyses, endpointName, params=NULL, ...) standardGeneric("clinicalClient")) # ############################################################################## diff --git a/opencga-client/src/main/R/R/Clinical-methods.R b/opencga-client/src/main/R/R/Clinical-methods.R index 063b5ca56bf..58c38ecb630 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-10-27 +# Autogenerated on: 2023-11-02 # # 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, clinicalAnalysis, clinicalAnalyses, interpretations, members, interpretation, endpointName, params=NULL, ...) { +setMethod("clinicalClient", "OpencgaR", function(OpencgaR, clinicalAnalysis, members, interpretation, interpretations, clinicalAnalyses, 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 86c256ad13c..aeca965c7b2 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-10-27 +# Autogenerated on: 2023-11-02 # # 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/Family-methods.R b/opencga-client/src/main/R/R/Family-methods.R index f61994486fa..747382a2b15 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-10-27 +# Autogenerated on: 2023-11-02 # # 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, annotationSet, members, family, families, endpointName, params=NULL, ...) { +setMethod("familyClient", "OpencgaR", function(OpencgaR, members, family, 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 12a692cba71..89b8034de42 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-10-27 +# Autogenerated on: 2023-11-02 # # 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, file, folder, annotationSet, members, endpointName, params=NULL, ...) { +setMethod("fileClient", "OpencgaR", function(OpencgaR, files, file, members, annotationSet, 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 d03fe839d00..98aaad0e987 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-10-27 +# Autogenerated on: 2023-11-02 # # 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/Individual-methods.R b/opencga-client/src/main/R/R/Individual-methods.R index 6c6db781f0f..bf6750fc941 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-10-27 +# Autogenerated on: 2023-11-02 # # 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 2336177e4e3..37e3a2c9548 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-10-27 +# Autogenerated on: 2023-11-02 # # 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/Meta-methods.R b/opencga-client/src/main/R/R/Meta-methods.R index 10888d84a65..481bae671e6 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-10-27 +# Autogenerated on: 2023-11-02 # # 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 492c6a7c654..93934f11fef 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-10-27 +# Autogenerated on: 2023-11-02 # # 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 9ff4ec9416b..4d45393c182 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-10-27 +# Autogenerated on: 2023-11-02 # # 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 a0cdf42263b..570ebfc9cf7 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-10-27 +# Autogenerated on: 2023-11-02 # # 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 e154dbdea1d..319ded3abbb 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-10-27 +# Autogenerated on: 2023-11-02 # # 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, sample, samples, members, 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 ec660266b5a..9873110e560 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-10-27 +# Autogenerated on: 2023-11-02 # # 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, templateId, variableSet, study, group, studies, members, endpointName, params=NULL, ...) { +setMethod("studyClient", "OpencgaR", function(OpencgaR, group, members, studies, study, templateId, variableSet, 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 65db531b18c..458947e9b4e 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-10-27 +# Autogenerated on: 2023-11-02 # # 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, user, users, 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 70d0f7406a2..1957998638d 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-10-27 +# Autogenerated on: 2023-11-02 # # 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 b8650868796..5460d28052e 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-10-27 +* Autogenerated on: 2023-11-02 * * 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 e979ae69978..33a9c268320 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-10-27 +* Autogenerated on: 2023-11-02 * * 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 8e45768167c..a322c2c9e3b 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-10-27 +* Autogenerated on: 2023-11-02 * * 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 a6c7798a94b..9631f0aacb0 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-10-27 +* Autogenerated on: 2023-11-02 * * 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 979f96e572e..7e60a93d950 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-10-27 +* Autogenerated on: 2023-11-02 * * 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 60b4ca25d77..25e941e8b0b 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-10-27 +* Autogenerated on: 2023-11-02 * * 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 795aeff6846..7abe70688b7 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-10-27 +* Autogenerated on: 2023-11-02 * * 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 b843ea82794..45eea839db8 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-10-27 +* Autogenerated on: 2023-11-02 * * 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 71a2b12acb5..478a20a285a 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-10-27 +* Autogenerated on: 2023-11-02 * * 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 a3ba8a9fcd1..cf96ffaaf61 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-10-27 +* Autogenerated on: 2023-11-02 * * 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 49ec8ae0eed..6dd12a34e12 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-10-27 +* Autogenerated on: 2023-11-02 * * 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 0b92cedd97b..3db333e8d16 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-10-27 +* Autogenerated on: 2023-11-02 * * 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 4dfeecc596d..e80e58efb11 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-10-27 +* Autogenerated on: 2023-11-02 * * 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 e86ac389d40..df90b1e2153 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-10-27 +* Autogenerated on: 2023-11-02 * * 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 e5984ffeff2..736744268b5 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-10-27 +* Autogenerated on: 2023-11-02 * * 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 07360eddb66..d85feb6f179 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-10-27 +* Autogenerated on: 2023-11-02 * * 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 27222047a76..2e20373c6d7 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-10-27 +* Autogenerated on: 2023-11-02 * * 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 fdfb9de6aa6..0522ec1c5a9 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-10-27 + * Autogenerated on: 2023-11-02 * * 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 8c967d31de0..6f3df1f5998 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-10-27 + * Autogenerated on: 2023-11-02 * * 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 b814ab17d37..6431faa5cf3 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-10-27 + * Autogenerated on: 2023-11-02 * * 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 8a3379c7348..6a234b6554e 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-10-27 + * Autogenerated on: 2023-11-02 * * 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 a0967fc19f7..21eb1f0422e 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-10-27 + * Autogenerated on: 2023-11-02 * * 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 a1183ca4f60..cae578e4413 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-10-27 + * Autogenerated on: 2023-11-02 * * 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 58e1343ad16..63ce3b943da 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-10-27 + * Autogenerated on: 2023-11-02 * * 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 e61030ad0e3..611b81c5727 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-10-27 + * Autogenerated on: 2023-11-02 * * 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 8e5089be7fd..534e2d3c7ed 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-10-27 + * Autogenerated on: 2023-11-02 * * 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 21d175e0ca3..be7c71c00e7 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-10-27 + * Autogenerated on: 2023-11-02 * * 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 02c96c1dade..07bd4c5b07c 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-10-27 + * Autogenerated on: 2023-11-02 * * 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 e38753e0c87..54dd86064a5 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-10-27 + * Autogenerated on: 2023-11-02 * * 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 abbe89cf5ac..42cd10689ae 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-10-27 + * Autogenerated on: 2023-11-02 * * 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 d0eb2bb02fe..4c6931b0c89 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-10-27 + * Autogenerated on: 2023-11-02 * * 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 b65022b6a8b..2db00a202b2 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-10-27 + * Autogenerated on: 2023-11-02 * * 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 d3ced6ac6ad..5edd6753b11 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-10-27 + * Autogenerated on: 2023-11-02 * * 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 7044b256894..b9f8f029258 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-10-27 + * Autogenerated on: 2023-11-02 * * 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 90d868b6533..972e456556c 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-10-27 + Autogenerated on: 2023-11-02 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 b3fd66f2f86..1b598296913 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-10-27 + Autogenerated on: 2023-11-02 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 359a1bdcb5b..3bd95f48564 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-10-27 + Autogenerated on: 2023-11-02 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 021ca07f480..1eea42c98a3 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-10-27 + Autogenerated on: 2023-11-02 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 e02a70f6560..eb9aea88c65 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-10-27 + Autogenerated on: 2023-11-02 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 a321fc45b54..f78c61e2a5a 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-10-27 + Autogenerated on: 2023-11-02 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 7a0f41fcb5a..a65add7cf7e 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-10-27 + Autogenerated on: 2023-11-02 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 c9966af7a5e..f4e96d25df2 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-10-27 + Autogenerated on: 2023-11-02 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 2c811e6c501..fadca48f497 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-10-27 + Autogenerated on: 2023-11-02 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 80078af84e6..e8f18894ef9 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-10-27 + Autogenerated on: 2023-11-02 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 6e7cc082b1f..dd437e17394 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-10-27 + Autogenerated on: 2023-11-02 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 1b063026bd1..dac784edf9a 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-10-27 + Autogenerated on: 2023-11-02 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 9d4c3d3b56a..b13fec2f082 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-10-27 + Autogenerated on: 2023-11-02 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 0c67bc31819..d4312e58800 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-10-27 + Autogenerated on: 2023-11-02 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 bfc4b7d4d9a..2d6a136c750 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-10-27 + Autogenerated on: 2023-11-02 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 b7e2829b208..c3c298dbbc6 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-10-27 + Autogenerated on: 2023-11-02 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 6736e33528e..f0357486079 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-10-27 + Autogenerated on: 2023-11-02 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-server/src/main/java/org/opencb/opencga/server/generator/writers/ParentClientRestApiWriter.java b/opencga-server/src/main/java/org/opencb/opencga/server/generator/writers/ParentClientRestApiWriter.java index 72857bc2aec..940c6e56427 100644 --- a/opencga-server/src/main/java/org/opencb/opencga/server/generator/writers/ParentClientRestApiWriter.java +++ b/opencga-server/src/main/java/org/opencb/opencga/server/generator/writers/ParentClientRestApiWriter.java @@ -83,11 +83,15 @@ protected static String reverseCommandName(String commandName) { return commandName.toLowerCase(); } + public String getCategoryRestName(RestCategory restCategory, CategoryConfig categoryConfig) { + return restCategory.getPath().substring(restCategory.getPath().lastIndexOf("/") + 1); + } + public String getCategoryCommandName(RestCategory restCategory, CategoryConfig categoryConfig) { if (!StringUtils.isEmpty(categoryConfig.getCommandName())) { return categoryConfig.getCommandName(); } - return restCategory.getPath().substring(restCategory.getPath().lastIndexOf("/") + 1); + return getCategoryRestName(restCategory, categoryConfig); } protected void writeToFile(File file, StringBuffer sb) throws IOException { diff --git a/opencga-server/src/main/java/org/opencb/opencga/server/generator/writers/cli/ExecutorsCliRestApiWriter.java b/opencga-server/src/main/java/org/opencb/opencga/server/generator/writers/cli/ExecutorsCliRestApiWriter.java index 9a7c35caa86..f9c5c7d0f18 100644 --- a/opencga-server/src/main/java/org/opencb/opencga/server/generator/writers/cli/ExecutorsCliRestApiWriter.java +++ b/opencga-server/src/main/java/org/opencb/opencga/server/generator/writers/cli/ExecutorsCliRestApiWriter.java @@ -170,7 +170,7 @@ protected String getClassHeader(String key) { CategoryConfig config = availableCategoryConfigs.get(key); sb.append("public class " + getAsClassName(restCategory.getName()) + "CommandExecutor extends " + getExtendedClass() + " {\n\n"); - sb.append(" public String categoryName = \"" + getAsVariableName(getAsCamelCase(restCategory.getName())) + "\";\n"); + sb.append(" public String categoryName = \"" + getCategoryRestName(restCategory, config) + "\";\n"); sb.append(" public " + getAsClassName(restCategory.getName()) + "CommandOptions " + getAsVariableName(getAsCamelCase(restCategory.getName())) + "CommandOptions;\n\n"); sb.append(" public " + getAsClassName(restCategory.getName()) + "CommandExecutor(" + getAsClassName(restCategory.getName()) From 98d42e3bb2ea5a30eb897fb43714586fee134915 Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Fri, 3 Nov 2023 11:27:42 +0100 Subject: [PATCH 09/25] cli:Deleted unused object in executors #TASK-5160 --- .../app/cli/main/OpenCgaCompleter.java | 2 +- .../app/cli/main/OpencgaCliOptionsParser.java | 2 +- .../main/executors/AdminCommandExecutor.java | 6 ----- .../AnalysisAlignmentCommandExecutor.java | 9 ------- .../AnalysisClinicalCommandExecutor.java | 12 --------- .../AnalysisVariantCommandExecutor.java | 24 ------------------ .../executors/CohortsCommandExecutor.java | 6 ----- .../DiseasePanelsCommandExecutor.java | 4 --- .../executors/FamiliesCommandExecutor.java | 5 ---- .../main/executors/FilesCommandExecutor.java | 9 ------- .../executors/IndividualsCommandExecutor.java | 5 ---- .../main/executors/JobsCommandExecutor.java | 4 --- ...erationsVariantStorageCommandExecutor.java | 25 ------------------- .../executors/ProjectsCommandExecutor.java | 2 -- .../executors/SamplesCommandExecutor.java | 5 ---- .../executors/StudiesCommandExecutor.java | 8 ------ .../main/executors/UsersCommandExecutor.java | 3 --- 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 | 18 ++++++------- .../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 | 2 +- .../src/main/R/R/Individual-methods.R | 4 +-- 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 | 2 +- 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 +- .../cli/ExecutorsCliRestApiWriter.java | 1 - 87 files changed, 88 insertions(+), 216 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 db447fe40b6..3c30b6d022e 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-11-02 OpenCB +* Copyright 2015-2023-11-03 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 1dfe8779b88..19ca44161d1 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-11-02 OpenCB +* Copyright 2015-2023-11-03 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/AdminCommandExecutor.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/AdminCommandExecutor.java index 0ab7c6405dc..554a475732c 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/AdminCommandExecutor.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/AdminCommandExecutor.java @@ -136,7 +136,6 @@ private RestResponse installCatalog() throws Exception { InstallationParams installationParams = null; if (commandOptions.jsonDataModel) { - installationParams = new InstallationParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/admin/catalog/install")); @@ -165,7 +164,6 @@ private RestResponse jwtCatalog() throws Exception { JWTParams jWTParams = null; if (commandOptions.jsonDataModel) { - jWTParams = new JWTParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/admin/catalog/jwt")); @@ -191,7 +189,6 @@ private RestResponse createUsers() throws Exception { UserCreateParams userCreateParams = null; if (commandOptions.jsonDataModel) { - userCreateParams = new UserCreateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/admin/users/create")); @@ -222,7 +219,6 @@ private RestResponse importUsers() throws Exception { UserImportParams userImportParams = null; if (commandOptions.jsonDataModel) { - userImportParams = new UserImportParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/admin/users/import")); @@ -270,7 +266,6 @@ private RestResponse syncUsers() throws Exception { GroupSyncParams groupSyncParams = null; if (commandOptions.jsonDataModel) { - groupSyncParams = new GroupSyncParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/admin/users/sync")); @@ -306,7 +301,6 @@ private RestResponse usersUpdateGroups() throws Exception { UserUpdateGroup userUpdateGroup = null; if (commandOptions.jsonDataModel) { - userUpdateGroup = new UserUpdateGroup(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/admin/users/{user}/groups/update")); diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/AnalysisAlignmentCommandExecutor.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/AnalysisAlignmentCommandExecutor.java index 28e02d2ad67..5e9f53fb2cf 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/AnalysisAlignmentCommandExecutor.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/AnalysisAlignmentCommandExecutor.java @@ -132,7 +132,6 @@ private RestResponse runBwa() throws Exception { BwaWrapperParams bwaWrapperParams = null; if (commandOptions.jsonDataModel) { - bwaWrapperParams = new BwaWrapperParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/alignment/bwa/run")); @@ -174,7 +173,6 @@ private RestResponse runCoverageIndex() throws Exception { CoverageIndexParams coverageIndexParams = null; if (commandOptions.jsonDataModel) { - coverageIndexParams = new CoverageIndexParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/alignment/coverage/index/run")); @@ -213,7 +211,6 @@ private RestResponse coverageQcGeneCoverageStatsRun() throws Exception { AlignmentGeneCoverageStatsParams alignmentGeneCoverageStatsParams = null; if (commandOptions.jsonDataModel) { - alignmentGeneCoverageStatsParams = new AlignmentGeneCoverageStatsParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/alignment/coverage/qc/geneCoverageStats/run")); @@ -309,7 +306,6 @@ private RestResponse runDeeptools() throws Exception { DeeptoolsWrapperParams deeptoolsWrapperParams = null; if (commandOptions.jsonDataModel) { - deeptoolsWrapperParams = new DeeptoolsWrapperParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/alignment/deeptools/run")); @@ -348,7 +344,6 @@ private RestResponse runFastqc() throws Exception { FastqcWrapperParams fastqcWrapperParams = null; if (commandOptions.jsonDataModel) { - fastqcWrapperParams = new FastqcWrapperParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/alignment/fastqc/run")); @@ -387,7 +382,6 @@ private RestResponse runIndex() throws Exception { AlignmentIndexParams alignmentIndexParams = null; if (commandOptions.jsonDataModel) { - alignmentIndexParams = new AlignmentIndexParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/alignment/index/run")); @@ -425,7 +419,6 @@ private RestResponse runPicard() throws Exception { PicardWrapperParams picardWrapperParams = null; if (commandOptions.jsonDataModel) { - picardWrapperParams = new PicardWrapperParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/alignment/picard/run")); @@ -464,7 +457,6 @@ private RestResponse runQc() throws Exception { AlignmentQcParams alignmentQcParams = null; if (commandOptions.jsonDataModel) { - alignmentQcParams = new AlignmentQcParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/alignment/qc/run")); @@ -536,7 +528,6 @@ private RestResponse runSamtools() throws Exception { SamtoolsWrapperParams samtoolsWrapperParams = null; if (commandOptions.jsonDataModel) { - samtoolsWrapperParams = new SamtoolsWrapperParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/alignment/samtools/run")); diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/AnalysisClinicalCommandExecutor.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/AnalysisClinicalCommandExecutor.java index 284aff68cc4..2cf48aa5a8c 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/AnalysisClinicalCommandExecutor.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/AnalysisClinicalCommandExecutor.java @@ -215,7 +215,6 @@ private RestResponse updateAcl() throws Exception ClinicalAnalysisAclUpdateParams clinicalAnalysisAclUpdateParams = null; if (commandOptions.jsonDataModel) { - clinicalAnalysisAclUpdateParams = new ClinicalAnalysisAclUpdateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/clinical/acl/{members}/update")); @@ -249,7 +248,6 @@ private RestResponse updateClinicalConfiguration() throws Exception { ClinicalAnalysisStudyConfiguration clinicalAnalysisStudyConfiguration = null; if (commandOptions.jsonDataModel) { - clinicalAnalysisStudyConfiguration = new ClinicalAnalysisStudyConfiguration(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/clinical/clinical/configuration/update")); @@ -286,7 +284,6 @@ private RestResponse create() throws Exception { ClinicalAnalysisCreateParams clinicalAnalysisCreateParams = null; if (commandOptions.jsonDataModel) { - clinicalAnalysisCreateParams = new ClinicalAnalysisCreateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/clinical/create")); @@ -465,7 +462,6 @@ private RestResponse runInterpreterCancerTiering() throws Exception { CancerTieringInterpretationAnalysisParams cancerTieringInterpretationAnalysisParams = null; if (commandOptions.jsonDataModel) { - cancerTieringInterpretationAnalysisParams = new CancerTieringInterpretationAnalysisParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/clinical/interpreter/cancerTiering/run")); @@ -504,7 +500,6 @@ private RestResponse runInterpreterExomiser() throws Exception { ExomiserInterpretationAnalysisParams exomiserInterpretationAnalysisParams = null; if (commandOptions.jsonDataModel) { - exomiserInterpretationAnalysisParams = new ExomiserInterpretationAnalysisParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/clinical/interpreter/exomiser/run")); @@ -541,7 +536,6 @@ private RestResponse runInterpreterTeam() throws Exception { TeamInterpretationAnalysisParams teamInterpretationAnalysisParams = null; if (commandOptions.jsonDataModel) { - teamInterpretationAnalysisParams = new TeamInterpretationAnalysisParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/clinical/interpreter/team/run")); @@ -581,7 +575,6 @@ private RestResponse runInterpreterTiering() throws Exception { TieringInterpretationAnalysisParams tieringInterpretationAnalysisParams = null; if (commandOptions.jsonDataModel) { - tieringInterpretationAnalysisParams = new TieringInterpretationAnalysisParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/clinical/interpreter/tiering/run")); @@ -621,7 +614,6 @@ private RestResponse runInterpreterZetta() throws Exception { ZettaInterpretationAnalysisParams zettaInterpretationAnalysisParams = null; if (commandOptions.jsonDataModel) { - zettaInterpretationAnalysisParams = new ZettaInterpretationAnalysisParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/clinical/interpreter/zetta/run")); @@ -824,7 +816,6 @@ private RestResponse runRgaIndex() throws Exception { RgaAnalysisParams rgaAnalysisParams = null; if (commandOptions.jsonDataModel) { - rgaAnalysisParams = new RgaAnalysisParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/clinical/rga/index/run")); @@ -1164,7 +1155,6 @@ private RestResponse update() throws Exception { ClinicalAnalysisUpdateParams clinicalAnalysisUpdateParams = null; if (commandOptions.jsonDataModel) { - clinicalAnalysisUpdateParams = new ClinicalAnalysisUpdateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/clinical/{clinicalAnalyses}/update")); @@ -1239,7 +1229,6 @@ private RestResponse createInterpretation() throws Exception { InterpretationCreateParams interpretationCreateParams = null; if (commandOptions.jsonDataModel) { - interpretationCreateParams = new InterpretationCreateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/clinical/{clinicalAnalysis}/interpretation/create")); @@ -1329,7 +1318,6 @@ private RestResponse updateInterpretation() throws Exception { InterpretationUpdateParams interpretationUpdateParams = null; if (commandOptions.jsonDataModel) { - interpretationUpdateParams = new InterpretationUpdateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/clinical/{clinicalAnalysis}/interpretation/{interpretation}/update")); diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/AnalysisVariantCommandExecutor.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/AnalysisVariantCommandExecutor.java index 5ae64623bb5..45346945d18 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/AnalysisVariantCommandExecutor.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/AnalysisVariantCommandExecutor.java @@ -313,7 +313,6 @@ private RestResponse runCircos() throws Exception { CircosAnalysisParams circosAnalysisParams = null; if (commandOptions.jsonDataModel) { - circosAnalysisParams = new CircosAnalysisParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/variant/circos/run")); @@ -382,7 +381,6 @@ private RestResponse runCohortStats() throws Exception { CohortVariantStatsAnalysisParams cohortVariantStatsAnalysisParams = null; if (commandOptions.jsonDataModel) { - cohortVariantStatsAnalysisParams = new CohortVariantStatsAnalysisParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/variant/cohort/stats/run")); @@ -423,7 +421,6 @@ private RestResponse runExomiser() throws Exception { ExomiserWrapperParams exomiserWrapperParams = null; if (commandOptions.jsonDataModel) { - exomiserWrapperParams = new ExomiserWrapperParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/variant/exomiser/run")); @@ -464,7 +461,6 @@ private RestResponse runExport() throws Exception { VariantExportParams variantExportParams = null; if (commandOptions.jsonDataModel) { - variantExportParams = new VariantExportParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/variant/export/run")); @@ -605,7 +601,6 @@ private RestResponse runFamilyQc() throws Exception { FamilyQcAnalysisParams familyQcAnalysisParams = null; if (commandOptions.jsonDataModel) { - familyQcAnalysisParams = new FamilyQcAnalysisParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/variant/family/qc/run")); @@ -665,7 +660,6 @@ private RestResponse runGatk() throws Exception { GatkWrapperParams gatkWrapperParams = null; if (commandOptions.jsonDataModel) { - gatkWrapperParams = new GatkWrapperParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/variant/gatk/run")); @@ -704,7 +698,6 @@ private RestResponse runGenomePlot() throws Exception { GenomePlotAnalysisParams genomePlotAnalysisParams = null; if (commandOptions.jsonDataModel) { - genomePlotAnalysisParams = new GenomePlotAnalysisParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/variant/genomePlot/run")); @@ -745,7 +738,6 @@ private RestResponse runGwas() throws Exception { GwasAnalysisParams gwasAnalysisParams = null; if (commandOptions.jsonDataModel) { - gwasAnalysisParams = new GwasAnalysisParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/variant/gwas/run")); @@ -793,7 +785,6 @@ private RestResponse runHrDetect() throws Exception { HRDetectAnalysisParams hRDetectAnalysisParams = null; if (commandOptions.jsonDataModel) { - hRDetectAnalysisParams = new HRDetectAnalysisParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/variant/hrDetect/run")); @@ -842,7 +833,6 @@ private RestResponse runIndex() throws Exception { VariantIndexParams variantIndexParams = null; if (commandOptions.jsonDataModel) { - variantIndexParams = new VariantIndexParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/variant/index/run")); @@ -907,7 +897,6 @@ private RestResponse runIndividualQc() throws Exception { IndividualQcAnalysisParams individualQcAnalysisParams = null; if (commandOptions.jsonDataModel) { - individualQcAnalysisParams = new IndividualQcAnalysisParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/variant/individual/qc/run")); @@ -947,7 +936,6 @@ private RestResponse runInferredSex() throws Exception { InferredSexAnalysisParams inferredSexAnalysisParams = null; if (commandOptions.jsonDataModel) { - inferredSexAnalysisParams = new InferredSexAnalysisParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/variant/inferredSex/run")); @@ -1020,7 +1008,6 @@ private RestResponse runKnockout() throws Exception { KnockoutAnalysisParams knockoutAnalysisParams = null; if (commandOptions.jsonDataModel) { - knockoutAnalysisParams = new KnockoutAnalysisParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/variant/knockout/run")); @@ -1066,7 +1053,6 @@ private RestResponse runMendelianError() throws Exception { MendelianErrorAnalysisParams mendelianErrorAnalysisParams = null; if (commandOptions.jsonDataModel) { - mendelianErrorAnalysisParams = new MendelianErrorAnalysisParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/variant/mendelianError/run")); @@ -1159,7 +1145,6 @@ private RestResponse runMutationalSignature() throws Exception { MutationalSignatureAnalysisParams mutationalSignatureAnalysisParams = null; if (commandOptions.jsonDataModel) { - mutationalSignatureAnalysisParams = new MutationalSignatureAnalysisParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/variant/mutationalSignature/run")); @@ -1211,7 +1196,6 @@ private RestResponse runPlink() throws Exception { PlinkWrapperParams plinkWrapperParams = null; if (commandOptions.jsonDataModel) { - plinkWrapperParams = new PlinkWrapperParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/variant/plink/run")); @@ -1339,7 +1323,6 @@ private RestResponse runRelatedness() throws Exception { RelatednessAnalysisParams relatednessAnalysisParams = null; if (commandOptions.jsonDataModel) { - relatednessAnalysisParams = new RelatednessAnalysisParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/variant/relatedness/run")); @@ -1380,7 +1363,6 @@ private RestResponse runRvtests() throws Exception { RvtestsWrapperParams rvtestsWrapperParams = null; if (commandOptions.jsonDataModel) { - rvtestsWrapperParams = new RvtestsWrapperParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/variant/rvtests/run")); @@ -1454,7 +1436,6 @@ private RestResponse runSampleEligibility() throws Exception { SampleEligibilityAnalysisParams sampleEligibilityAnalysisParams = null; if (commandOptions.jsonDataModel) { - sampleEligibilityAnalysisParams = new SampleEligibilityAnalysisParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/variant/sample/eligibility/run")); @@ -1493,7 +1474,6 @@ private RestResponse runSampleQc() throws Exception { SampleQcAnalysisParams sampleQcAnalysisParams = null; if (commandOptions.jsonDataModel) { - sampleQcAnalysisParams = new SampleQcAnalysisParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/variant/sample/qc/run")); @@ -1594,7 +1574,6 @@ private RestResponse runSample() throws Exception { SampleVariantFilterParams sampleVariantFilterParams = null; if (commandOptions.jsonDataModel) { - sampleVariantFilterParams = new SampleVariantFilterParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/variant/sample/run")); @@ -1688,7 +1667,6 @@ private RestResponse runSampleStats() throws Exception { SampleVariantStatsAnalysisParams sampleVariantStatsAnalysisParams = null; if (commandOptions.jsonDataModel) { - sampleVariantStatsAnalysisParams = new SampleVariantStatsAnalysisParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/variant/sample/stats/run")); @@ -1761,7 +1739,6 @@ private RestResponse runStatsExport() throws Exception { VariantStatsExportParams variantStatsExportParams = null; if (commandOptions.jsonDataModel) { - variantStatsExportParams = new VariantStatsExportParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/variant/stats/export/run")); @@ -1802,7 +1779,6 @@ private RestResponse runStats() throws Exception { VariantStatsAnalysisParams variantStatsAnalysisParams = null; if (commandOptions.jsonDataModel) { - variantStatsAnalysisParams = new VariantStatsAnalysisParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/analysis/variant/stats/run")); diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/CohortsCommandExecutor.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/CohortsCommandExecutor.java index 4767a83173c..d2ed4126cd3 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/CohortsCommandExecutor.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/CohortsCommandExecutor.java @@ -127,7 +127,6 @@ private RestResponse updateAcl() throws Exception { CohortAclUpdateParams cohortAclUpdateParams = null; if (commandOptions.jsonDataModel) { - cohortAclUpdateParams = new CohortAclUpdateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/cohorts/acl/{members}/update")); @@ -188,7 +187,6 @@ private RestResponse loadAnnotationSets() throws Exception { TsvAnnotationParams tsvAnnotationParams = null; if (commandOptions.jsonDataModel) { - tsvAnnotationParams = new TsvAnnotationParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/cohorts/annotationSets/load")); @@ -226,7 +224,6 @@ private RestResponse create() throws Exception { CohortCreateParams cohortCreateParams = null; if (commandOptions.jsonDataModel) { - cohortCreateParams = new CohortCreateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/cohorts/create")); @@ -312,7 +309,6 @@ private RestResponse generate() throws Exception { CohortGenerateParams cohortGenerateParams = null; if (commandOptions.jsonDataModel) { - cohortGenerateParams = new CohortGenerateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/cohorts/generate")); @@ -439,7 +435,6 @@ private RestResponse update() throws Exception { CohortUpdateParams cohortUpdateParams = null; if (commandOptions.jsonDataModel) { - cohortUpdateParams = new CohortUpdateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/cohorts/{cohorts}/update")); @@ -482,7 +477,6 @@ private RestResponse updateAnnotationSetsAnnotations() throws Exception ObjectMap objectMap = null; if (commandOptions.jsonDataModel) { - objectMap = new ObjectMap(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/cohorts/{cohort}/annotationSets/{annotationSet}/annotations/update")); diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/DiseasePanelsCommandExecutor.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/DiseasePanelsCommandExecutor.java index 29e5e25e4b9..7079d284db3 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/DiseasePanelsCommandExecutor.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/DiseasePanelsCommandExecutor.java @@ -112,7 +112,6 @@ private RestResponse updateAcl() throws Exception { PanelAclUpdateParams panelAclUpdateParams = null; if (commandOptions.jsonDataModel) { - panelAclUpdateParams = new PanelAclUpdateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/panels/acl/{members}/update")); @@ -149,7 +148,6 @@ private RestResponse create() throws Exception { PanelCreateParams panelCreateParams = null; if (commandOptions.jsonDataModel) { - panelCreateParams = new PanelCreateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/panels/create")); @@ -228,7 +226,6 @@ private RestResponse importPanels() throws Exception { PanelImportParams panelImportParams = null; if (commandOptions.jsonDataModel) { - panelImportParams = new PanelImportParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/panels/import")); @@ -350,7 +347,6 @@ private RestResponse update() throws Exception { PanelUpdateParams panelUpdateParams = null; if (commandOptions.jsonDataModel) { - panelUpdateParams = new PanelUpdateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/panels/{panels}/update")); diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/FamiliesCommandExecutor.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/FamiliesCommandExecutor.java index 60a56535f4a..5d43691e059 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/FamiliesCommandExecutor.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/FamiliesCommandExecutor.java @@ -125,7 +125,6 @@ private RestResponse updateAcl() throws Exception { FamilyAclUpdateParams familyAclUpdateParams = null; if (commandOptions.jsonDataModel) { - familyAclUpdateParams = new FamilyAclUpdateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/families/acl/{members}/update")); @@ -190,7 +189,6 @@ private RestResponse loadAnnotationSets() throws Exception { TsvAnnotationParams tsvAnnotationParams = null; if (commandOptions.jsonDataModel) { - tsvAnnotationParams = new TsvAnnotationParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/families/annotationSets/load")); @@ -227,7 +225,6 @@ private RestResponse create() throws Exception { FamilyCreateParams familyCreateParams = null; if (commandOptions.jsonDataModel) { - familyCreateParams = new FamilyCreateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/families/create")); @@ -391,7 +388,6 @@ private RestResponse update() throws Exception { FamilyUpdateParams familyUpdateParams = null; if (commandOptions.jsonDataModel) { - familyUpdateParams = new FamilyUpdateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/families/{families}/update")); @@ -435,7 +431,6 @@ private RestResponse updateAnnotationSetsAnnotations() throws Exception ObjectMap objectMap = null; if (commandOptions.jsonDataModel) { - objectMap = new ObjectMap(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/families/{family}/annotationSets/{annotationSet}/annotations/update")); diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/FilesCommandExecutor.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/FilesCommandExecutor.java index b4cfc6fdb9f..403df36ac0d 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/FilesCommandExecutor.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/FilesCommandExecutor.java @@ -218,7 +218,6 @@ private RestResponse updateAcl() throws Exception { FileAclUpdateParams fileAclUpdateParams = null; if (commandOptions.jsonDataModel) { - fileAclUpdateParams = new FileAclUpdateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/files/acl/{members}/update")); @@ -288,7 +287,6 @@ private RestResponse loadAnnotationSets() throws Exception { TsvAnnotationParams tsvAnnotationParams = null; if (commandOptions.jsonDataModel) { - tsvAnnotationParams = new TsvAnnotationParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/files/annotationSets/load")); @@ -329,7 +327,6 @@ private RestResponse create() throws Exception { FileCreateParams fileCreateParams = null; if (commandOptions.jsonDataModel) { - fileCreateParams = new FileCreateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/files/create")); @@ -425,7 +422,6 @@ private RestResponse fetch() throws Exception { FileFetch fileFetch = null; if (commandOptions.jsonDataModel) { - fileFetch = new FileFetch(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/files/fetch")); @@ -467,7 +463,6 @@ private RestResponse link() throws Exception { FileLinkParams fileLinkParams = null; if (commandOptions.jsonDataModel) { - fileLinkParams = new FileLinkParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/files/link")); @@ -513,7 +508,6 @@ private RestResponse runLink() throws Exception { FileLinkToolParams fileLinkToolParams = null; if (commandOptions.jsonDataModel) { - fileLinkToolParams = new FileLinkToolParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/files/link/run")); @@ -555,7 +549,6 @@ private RestResponse runPostlink() throws Exception { PostLinkToolParams postLinkToolParams = null; if (commandOptions.jsonDataModel) { - postLinkToolParams = new PostLinkToolParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/files/postlink/run")); @@ -721,7 +714,6 @@ private RestResponse update() throws Exception { FileUpdateParams fileUpdateParams = null; if (commandOptions.jsonDataModel) { - fileUpdateParams = new FileUpdateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/files/{files}/update")); @@ -788,7 +780,6 @@ private RestResponse updateAnnotationSetsAnnotations() throws Exception { ObjectMap objectMap = null; if (commandOptions.jsonDataModel) { - objectMap = new ObjectMap(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/files/{file}/annotationSets/{annotationSet}/annotations/update")); diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/IndividualsCommandExecutor.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/IndividualsCommandExecutor.java index 0675de1255f..1ced6389e2c 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/IndividualsCommandExecutor.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/IndividualsCommandExecutor.java @@ -134,7 +134,6 @@ private RestResponse updateAcl() throws Exception { IndividualAclUpdateParams individualAclUpdateParams = null; if (commandOptions.jsonDataModel) { - individualAclUpdateParams = new IndividualAclUpdateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/individuals/acl/{members}/update")); @@ -205,7 +204,6 @@ private RestResponse loadAnnotationSets() throws Exception { TsvAnnotationParams tsvAnnotationParams = null; if (commandOptions.jsonDataModel) { - tsvAnnotationParams = new TsvAnnotationParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/individuals/annotationSets/load")); @@ -242,7 +240,6 @@ private RestResponse create() throws Exception { IndividualCreateParams individualCreateParams = null; if (commandOptions.jsonDataModel) { - individualCreateParams = new IndividualCreateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/individuals/create")); @@ -447,7 +444,6 @@ private RestResponse update() throws Exception { IndividualUpdateParams individualUpdateParams = null; if (commandOptions.jsonDataModel) { - individualUpdateParams = new IndividualUpdateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/individuals/{individuals}/update")); @@ -517,7 +513,6 @@ private RestResponse updateAnnotationSetsAnnotations() throws Except ObjectMap objectMap = null; if (commandOptions.jsonDataModel) { - objectMap = new ObjectMap(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/individuals/{individual}/annotationSets/{annotationSet}/annotations/update")); diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/JobsCommandExecutor.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/JobsCommandExecutor.java index 846c568724e..03b344a434f 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/JobsCommandExecutor.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/JobsCommandExecutor.java @@ -140,7 +140,6 @@ private RestResponse updateAcl() throws Exception { JobAclUpdateParams jobAclUpdateParams = null; if (commandOptions.jsonDataModel) { - jobAclUpdateParams = new JobAclUpdateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/jobs/acl/{members}/update")); @@ -205,7 +204,6 @@ private RestResponse create() throws Exception { JobCreateParams jobCreateParams = null; if (commandOptions.jsonDataModel) { - jobCreateParams = new JobCreateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/jobs/create")); @@ -292,7 +290,6 @@ private RestResponse retry() throws Exception { JobRetryParams jobRetryParams = null; if (commandOptions.jsonDataModel) { - jobRetryParams = new JobRetryParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/jobs/retry")); @@ -428,7 +425,6 @@ private RestResponse update() throws Exception { JobUpdateParams jobUpdateParams = null; if (commandOptions.jsonDataModel) { - jobUpdateParams = new JobUpdateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/jobs/{jobs}/update")); 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 6197d5eb410..b06ef4b655c 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 @@ -185,7 +185,6 @@ private RestResponse configureCellbase() throws Exception { CellBaseConfiguration cellBaseConfiguration = null; if (commandOptions.jsonDataModel) { - cellBaseConfiguration = new CellBaseConfiguration(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/operation/cellbase/configure")); @@ -225,7 +224,6 @@ private RestResponse aggregateVariant() throws Exception { VariantAggregateParams variantAggregateParams = null; if (commandOptions.jsonDataModel) { - variantAggregateParams = new VariantAggregateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/operation/variant/aggregate")); @@ -280,7 +278,6 @@ private RestResponse indexVariantAnnotation() throws Exception { VariantAnnotationIndexParams variantAnnotationIndexParams = null; if (commandOptions.jsonDataModel) { - variantAnnotationIndexParams = new VariantAnnotationIndexParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/operation/variant/annotation/index")); @@ -322,7 +319,6 @@ private RestResponse saveVariantAnnotation() throws Exception { VariantAnnotationSaveParams variantAnnotationSaveParams = null; if (commandOptions.jsonDataModel) { - variantAnnotationSaveParams = new VariantAnnotationSaveParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/operation/variant/annotation/save")); @@ -356,7 +352,6 @@ private RestResponse configureVariant() throws Exception { VariantConfigureParams variantConfigureParams = null; if (commandOptions.jsonDataModel) { - variantConfigureParams = new VariantConfigureParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/operation/variant/configure")); @@ -393,7 +388,6 @@ private RestResponse deleteVariant() throws Exception { VariantFileDeleteParams variantFileDeleteParams = null; if (commandOptions.jsonDataModel) { - variantFileDeleteParams = new VariantFileDeleteParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/operation/variant/delete")); @@ -431,7 +425,6 @@ private RestResponse aggregateVariantFamily() throws Exception { VariantAggregateFamilyParams variantAggregateFamilyParams = null; if (commandOptions.jsonDataModel) { - variantAggregateFamilyParams = new VariantAggregateFamilyParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/operation/variant/family/aggregate")); @@ -470,7 +463,6 @@ private RestResponse indexVariantFamily() throws Exception { VariantFamilyIndexParams variantFamilyIndexParams = null; if (commandOptions.jsonDataModel) { - variantFamilyIndexParams = new VariantFamilyIndexParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/operation/variant/family/index")); @@ -510,7 +502,6 @@ private RestResponse indexVariant() throws Exception { VariantIndexParams variantIndexParams = null; if (commandOptions.jsonDataModel) { - variantIndexParams = new VariantIndexParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/operation/variant/index")); @@ -575,7 +566,6 @@ private RestResponse launcherVariantIndex() throws Exception { VariantFileIndexJobLauncherParams variantFileIndexJobLauncherParams = null; if (commandOptions.jsonDataModel) { - variantFileIndexJobLauncherParams = new VariantFileIndexJobLauncherParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/operation/variant/index/launcher")); @@ -642,7 +632,6 @@ private RestResponse runVariantJulie() throws Exception { JulieParams julieParams = null; if (commandOptions.jsonDataModel) { - julieParams = new JulieParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/operation/variant/julie/run")); @@ -677,7 +666,6 @@ private RestResponse repairVariantMetadata() throws Exception { VariantStorageMetadataRepairToolParams variantStorageMetadataRepairToolParams = null; if (commandOptions.jsonDataModel) { - variantStorageMetadataRepairToolParams = new VariantStorageMetadataRepairToolParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/operation/variant/metadata/repair")); @@ -715,7 +703,6 @@ private RestResponse synchronizeVariantMetadata() throws Exception { VariantStorageMetadataSynchronizeParams variantStorageMetadataSynchronizeParams = null; if (commandOptions.jsonDataModel) { - variantStorageMetadataSynchronizeParams = new VariantStorageMetadataSynchronizeParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/operation/variant/metadata/synchronize")); @@ -749,7 +736,6 @@ private RestResponse pruneVariant() throws Exception { VariantPruneParams variantPruneParams = null; if (commandOptions.jsonDataModel) { - variantPruneParams = new VariantPruneParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/operation/variant/prune")); @@ -788,7 +774,6 @@ private RestResponse deleteVariantSample() throws Exception { VariantSampleDeleteParams variantSampleDeleteParams = null; if (commandOptions.jsonDataModel) { - variantSampleDeleteParams = new VariantSampleDeleteParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/operation/variant/sample/delete")); @@ -827,7 +812,6 @@ private RestResponse indexVariantSample() throws Exception { VariantSecondarySampleIndexParams variantSecondarySampleIndexParams = null; if (commandOptions.jsonDataModel) { - variantSecondarySampleIndexParams = new VariantSecondarySampleIndexParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/operation/variant/sample/index")); @@ -865,7 +849,6 @@ private RestResponse variantSampleIndexConfigure() throws Exception { SampleIndexConfiguration sampleIndexConfiguration = null; if (commandOptions.jsonDataModel) { - sampleIndexConfiguration = new SampleIndexConfiguration(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/operation/variant/sample/index/configure")); @@ -916,7 +899,6 @@ private RestResponse indexVariantScore() throws Exception { VariantScoreIndexParams variantScoreIndexParams = null; if (commandOptions.jsonDataModel) { - variantScoreIndexParams = new VariantScoreIndexParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/operation/variant/score/index")); @@ -959,7 +941,6 @@ private RestResponse variantSecondaryAnnotationIndex() throws Exception { VariantSecondaryAnnotationIndexParams variantSecondaryAnnotationIndexParams = null; if (commandOptions.jsonDataModel) { - variantSecondaryAnnotationIndexParams = new VariantSecondaryAnnotationIndexParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/operation/variant/secondary/annotation/index")); @@ -998,7 +979,6 @@ private RestResponse variantSecondarySampleIndex() throws Exception { VariantSecondarySampleIndexParams variantSecondarySampleIndexParams = null; if (commandOptions.jsonDataModel) { - variantSecondarySampleIndexParams = new VariantSecondarySampleIndexParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/operation/variant/secondary/sample/index")); @@ -1036,7 +1016,6 @@ private RestResponse configureVariantSecondarySampleIndex() throws Exceptio SampleIndexConfiguration sampleIndexConfiguration = null; if (commandOptions.jsonDataModel) { - sampleIndexConfiguration = new SampleIndexConfiguration(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/operation/variant/secondary/sample/index/configure")); @@ -1067,7 +1046,6 @@ private RestResponse secondaryIndexVariant() throws Exception { VariantSecondaryAnnotationIndexParams variantSecondaryAnnotationIndexParams = null; if (commandOptions.jsonDataModel) { - variantSecondaryAnnotationIndexParams = new VariantSecondaryAnnotationIndexParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/operation/variant/secondaryIndex")); @@ -1125,7 +1103,6 @@ private RestResponse deleteVariantStats() throws Exception { VariantStatsDeleteParams variantStatsDeleteParams = null; if (commandOptions.jsonDataModel) { - variantStatsDeleteParams = new VariantStatsDeleteParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/operation/variant/stats/delete")); @@ -1163,7 +1140,6 @@ private RestResponse indexVariantStats() throws Exception { VariantStatsIndexParams variantStatsIndexParams = null; if (commandOptions.jsonDataModel) { - variantStatsIndexParams = new VariantStatsIndexParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/operation/variant/stats/index")); @@ -1205,7 +1181,6 @@ private RestResponse deleteVariantStudy() throws Exception { VariantStudyDeleteParams variantStudyDeleteParams = null; if (commandOptions.jsonDataModel) { - variantStudyDeleteParams = new VariantStudyDeleteParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/operation/variant/study/delete")); 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 98bb7eb2814..e1f4f665965 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 @@ -103,7 +103,6 @@ private RestResponse create() throws Exception { ProjectCreateParams projectCreateParams = null; if (commandOptions.jsonDataModel) { - projectCreateParams = new ProjectCreateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/projects/create")); @@ -225,7 +224,6 @@ private RestResponse update() throws Exception { ProjectUpdateParams projectUpdateParams = null; if (commandOptions.jsonDataModel) { - projectUpdateParams = new ProjectUpdateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/projects/{project}/update")); diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/SamplesCommandExecutor.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/SamplesCommandExecutor.java index 7d0ebf47cc8..7b7041d8979 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/SamplesCommandExecutor.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/SamplesCommandExecutor.java @@ -132,7 +132,6 @@ private RestResponse updateAcl() throws Exception { SampleAclUpdateParams sampleAclUpdateParams = null; if (commandOptions.jsonDataModel) { - sampleAclUpdateParams = new SampleAclUpdateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/samples/acl/{members}/update")); @@ -200,7 +199,6 @@ private RestResponse loadAnnotationSets() throws Exception { TsvAnnotationParams tsvAnnotationParams = null; if (commandOptions.jsonDataModel) { - tsvAnnotationParams = new TsvAnnotationParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/samples/annotationSets/load")); @@ -236,7 +234,6 @@ private RestResponse create() throws Exception { SampleCreateParams sampleCreateParams = null; if (commandOptions.jsonDataModel) { - sampleCreateParams = new SampleCreateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/samples/create")); @@ -474,7 +471,6 @@ private RestResponse update() throws Exception { SampleUpdateParams sampleUpdateParams = null; if (commandOptions.jsonDataModel) { - sampleUpdateParams = new SampleUpdateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/samples/{samples}/update")); @@ -534,7 +530,6 @@ private RestResponse updateAnnotationSetsAnnotations() throws Exception ObjectMap objectMap = null; if (commandOptions.jsonDataModel) { - objectMap = new ObjectMap(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/samples/{sample}/annotationSets/{annotationSet}/annotations/update")); diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/StudiesCommandExecutor.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/StudiesCommandExecutor.java index fef8f85a042..3ede6e70bfd 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/StudiesCommandExecutor.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/StudiesCommandExecutor.java @@ -181,7 +181,6 @@ private RestResponse updateAcl() throws Exception { StudyAclUpdateParams studyAclUpdateParams = null; if (commandOptions.jsonDataModel) { - studyAclUpdateParams = new StudyAclUpdateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/studies/acl/{members}/update")); @@ -216,7 +215,6 @@ private RestResponse create() throws Exception { StudyCreateParams studyCreateParams = null; if (commandOptions.jsonDataModel) { - studyCreateParams = new StudyCreateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/studies/create")); @@ -358,7 +356,6 @@ private RestResponse updateGroups() throws Exception { GroupCreateParams groupCreateParams = null; if (commandOptions.jsonDataModel) { - groupCreateParams = new GroupCreateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/studies/{study}/groups/update")); @@ -389,7 +386,6 @@ private RestResponse updateGroupsUsers() throws Exception { GroupUpdateParams groupUpdateParams = null; if (commandOptions.jsonDataModel) { - groupUpdateParams = new GroupUpdateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/studies/{study}/groups/{group}/users/update")); @@ -426,7 +422,6 @@ private RestResponse updatePermissionRules() throws Exception { PermissionRule permissionRule = null; if (commandOptions.jsonDataModel) { - permissionRule = new PermissionRule(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/studies/{study}/permissionRules/update")); @@ -509,7 +504,6 @@ private RestResponse update() throws Exception { StudyUpdateParams studyUpdateParams = null; if (commandOptions.jsonDataModel) { - studyUpdateParams = new StudyUpdateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/studies/{study}/update")); @@ -560,7 +554,6 @@ private RestResponse updateVariableSets() throws Exception { VariableSetCreateParams variableSetCreateParams = null; if (commandOptions.jsonDataModel) { - variableSetCreateParams = new VariableSetCreateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/studies/{study}/variableSets/update")); @@ -594,7 +587,6 @@ private RestResponse updateVariableSetsVariables() throws Exception Variable variable = null; if (commandOptions.jsonDataModel) { - variable = new Variable(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/studies/{study}/variableSets/{variableSet}/variables/update")); diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/UsersCommandExecutor.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/UsersCommandExecutor.java index f44e3449cc5..c2480761b0f 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/UsersCommandExecutor.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/UsersCommandExecutor.java @@ -134,7 +134,6 @@ private RestResponse password() throws Exception { PasswordChangeParams passwordChangeParams = null; if (commandOptions.jsonDataModel) { - passwordChangeParams = new PasswordChangeParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/users/password")); @@ -190,7 +189,6 @@ private RestResponse updateConfigs() throws Exception { ConfigUpdateParams configUpdateParams = null; if (commandOptions.jsonDataModel) { - configUpdateParams = new ConfigUpdateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/users/{user}/configs/update")); @@ -255,7 +253,6 @@ private RestResponse update() throws Exception { UserUpdateParams userUpdateParams = null; if (commandOptions.jsonDataModel) { - userUpdateParams = new UserUpdateParams(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); PrintUtils.println(getObjectAsJSON(categoryName,"/{apiVersion}/users/{user}/update")); diff --git a/opencga-client/src/main/R/R/Admin-methods.R b/opencga-client/src/main/R/R/Admin-methods.R index 1c4a4479bb0..21b9e768143 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-11-02 +# Autogenerated on: 2023-11-03 # # 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 5c97d7f69d1..8a5cd0de53b 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-11-02 +# Autogenerated on: 2023-11-03 # # 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 85629266564..d9e358e4632 100644 --- a/opencga-client/src/main/R/R/AllGenerics.R +++ b/opencga-client/src/main/R/R/AllGenerics.R @@ -1,6 +1,6 @@ # ############################################################################## ## UserClient -setGeneric("userClient", function(OpencgaR, filterId, user, users, endpointName, params=NULL, ...) +setGeneric("userClient", function(OpencgaR, filterId, users, user, endpointName, params=NULL, ...) standardGeneric("userClient")) # ############################################################################## @@ -10,37 +10,37 @@ setGeneric("projectClient", function(OpencgaR, project, projects, endpointName, # ############################################################################## ## StudyClient -setGeneric("studyClient", function(OpencgaR, group, members, studies, study, templateId, variableSet, endpointName, params=NULL, ...) +setGeneric("studyClient", function(OpencgaR, variableSet, group, templateId, studies, study, members, endpointName, params=NULL, ...) standardGeneric("studyClient")) # ############################################################################## ## FileClient -setGeneric("fileClient", function(OpencgaR, files, file, members, annotationSet, folder, endpointName, params=NULL, ...) +setGeneric("fileClient", function(OpencgaR, annotationSet, folder, file, files, members, endpointName, params=NULL, ...) standardGeneric("fileClient")) # ############################################################################## ## JobClient -setGeneric("jobClient", function(OpencgaR, jobs, members, job, endpointName, params=NULL, ...) +setGeneric("jobClient", function(OpencgaR, job, members, jobs, endpointName, params=NULL, ...) standardGeneric("jobClient")) # ############################################################################## ## SampleClient -setGeneric("sampleClient", function(OpencgaR, samples, members, sample, annotationSet, endpointName, params=NULL, ...) +setGeneric("sampleClient", function(OpencgaR, sample, annotationSet, members, samples, endpointName, params=NULL, ...) standardGeneric("sampleClient")) # ############################################################################## ## IndividualClient -setGeneric("individualClient", function(OpencgaR, individual, members, individuals, annotationSet, endpointName, params=NULL, ...) +setGeneric("individualClient", function(OpencgaR, individuals, annotationSet, members, individual, endpointName, params=NULL, ...) standardGeneric("individualClient")) # ############################################################################## ## FamilyClient -setGeneric("familyClient", function(OpencgaR, members, family, families, annotationSet, endpointName, params=NULL, ...) +setGeneric("familyClient", function(OpencgaR, family, families, annotationSet, members, endpointName, params=NULL, ...) standardGeneric("familyClient")) # ############################################################################## ## CohortClient -setGeneric("cohortClient", function(OpencgaR, cohort, members, cohorts, annotationSet, endpointName, params=NULL, ...) +setGeneric("cohortClient", function(OpencgaR, cohort, cohorts, annotationSet, members, endpointName, params=NULL, ...) standardGeneric("cohortClient")) # ############################################################################## @@ -60,7 +60,7 @@ setGeneric("variantClient", function(OpencgaR, endpointName, params=NULL, ...) # ############################################################################## ## ClinicalClient -setGeneric("clinicalClient", function(OpencgaR, clinicalAnalysis, members, interpretation, interpretations, clinicalAnalyses, endpointName, params=NULL, ...) +setGeneric("clinicalClient", function(OpencgaR, clinicalAnalyses, interpretations, interpretation, members, clinicalAnalysis, endpointName, params=NULL, ...) standardGeneric("clinicalClient")) # ############################################################################## diff --git a/opencga-client/src/main/R/R/Clinical-methods.R b/opencga-client/src/main/R/R/Clinical-methods.R index 58c38ecb630..dc8d8f8f907 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-11-02 +# Autogenerated on: 2023-11-03 # # 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, clinicalAnalysis, members, interpretation, interpretations, clinicalAnalyses, endpointName, params=NULL, ...) { +setMethod("clinicalClient", "OpencgaR", function(OpencgaR, clinicalAnalyses, interpretations, interpretation, members, 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 aeca965c7b2..81cae39da51 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-11-02 +# Autogenerated on: 2023-11-03 # # 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, cohort, members, cohorts, annotationSet, endpointName, params=NULL, ...) { +setMethod("cohortClient", "OpencgaR", function(OpencgaR, cohort, cohorts, annotationSet, members, 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 747382a2b15..b16d016404b 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-11-02 +# Autogenerated on: 2023-11-03 # # 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, families, annotationSet, endpointName, params=NULL, ...) { +setMethod("familyClient", "OpencgaR", function(OpencgaR, family, families, annotationSet, members, 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 89b8034de42..5251f640f97 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-11-02 +# Autogenerated on: 2023-11-03 # # 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, file, members, annotationSet, folder, endpointName, params=NULL, ...) { +setMethod("fileClient", "OpencgaR", function(OpencgaR, annotationSet, folder, file, files, members, 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 98aaad0e987..d02b3cde65e 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-11-02 +# Autogenerated on: 2023-11-03 # # 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/Individual-methods.R b/opencga-client/src/main/R/R/Individual-methods.R index bf6750fc941..d26b4443259 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-11-02 +# Autogenerated on: 2023-11-03 # # 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("individualClient", "OpencgaR", function(OpencgaR, individual, members, individuals, annotationSet, endpointName, params=NULL, ...) { +setMethod("individualClient", "OpencgaR", function(OpencgaR, individuals, annotationSet, members, individual, endpointName, params=NULL, ...) { switch(endpointName, #' @section Endpoint /{apiVersion}/individuals/acl/{members}/update: diff --git a/opencga-client/src/main/R/R/Job-methods.R b/opencga-client/src/main/R/R/Job-methods.R index 37e3a2c9548..2fa40f4bb1a 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-11-02 +# Autogenerated on: 2023-11-03 # # 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, jobs, members, job, 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 481bae671e6..666c2bc2d65 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-11-02 +# Autogenerated on: 2023-11-03 # # 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 93934f11fef..84e56923789 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-11-02 +# Autogenerated on: 2023-11-03 # # 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 4d45393c182..c43aefd4e83 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-11-02 +# Autogenerated on: 2023-11-03 # # 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 570ebfc9cf7..fca55584441 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-11-02 +# Autogenerated on: 2023-11-03 # # 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/Sample-methods.R b/opencga-client/src/main/R/R/Sample-methods.R index 319ded3abbb..1902a9802b9 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-11-02 +# Autogenerated on: 2023-11-03 # # 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, samples, members, sample, annotationSet, endpointName, params=NULL, ...) { +setMethod("sampleClient", "OpencgaR", function(OpencgaR, sample, annotationSet, members, samples, 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 9873110e560..c5a9c65dbc2 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-11-02 +# Autogenerated on: 2023-11-03 # # 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, group, members, studies, study, templateId, variableSet, endpointName, params=NULL, ...) { +setMethod("studyClient", "OpencgaR", function(OpencgaR, variableSet, group, templateId, studies, study, members, 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 458947e9b4e..75e1312fd44 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-11-02 +# Autogenerated on: 2023-11-03 # # 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, filterId, user, 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 1957998638d..20dcf8ed70d 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-11-02 +# Autogenerated on: 2023-11-03 # # 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 5460d28052e..712a7c20af5 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-11-02 +* Autogenerated on: 2023-11-03 * * 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 33a9c268320..b44121e5a72 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-11-02 +* Autogenerated on: 2023-11-03 * * 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 a322c2c9e3b..eb7f743ba10 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-11-02 +* Autogenerated on: 2023-11-03 * * 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 9631f0aacb0..ad36e64ed70 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-11-02 +* Autogenerated on: 2023-11-03 * * 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 7e60a93d950..cfa9601a978 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-11-02 +* Autogenerated on: 2023-11-03 * * 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 25e941e8b0b..b524791ca20 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-11-02 +* Autogenerated on: 2023-11-03 * * 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 7abe70688b7..97a97aaa3a2 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-11-02 +* Autogenerated on: 2023-11-03 * * 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 45eea839db8..624e63f5837 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-11-02 +* Autogenerated on: 2023-11-03 * * 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 478a20a285a..3d60c1d23aa 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-11-02 +* Autogenerated on: 2023-11-03 * * 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 cf96ffaaf61..c377f59750b 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-11-02 +* Autogenerated on: 2023-11-03 * * 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 6dd12a34e12..4c127e53014 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-11-02 +* Autogenerated on: 2023-11-03 * * 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 3db333e8d16..46e60e4ce05 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-11-02 +* Autogenerated on: 2023-11-03 * * 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 e80e58efb11..abbfcda3ee1 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-11-02 +* Autogenerated on: 2023-11-03 * * 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 df90b1e2153..7501055226c 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-11-02 +* Autogenerated on: 2023-11-03 * * 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 736744268b5..1662f2637ac 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-11-02 +* Autogenerated on: 2023-11-03 * * 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 d85feb6f179..00082995e1d 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-11-02 +* Autogenerated on: 2023-11-03 * * 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 2e20373c6d7..897c7238585 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-11-02 +* Autogenerated on: 2023-11-03 * * 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 0522ec1c5a9..418a0581e82 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-11-02 + * Autogenerated on: 2023-11-03 * * 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 6f3df1f5998..beeafc20632 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-11-02 + * Autogenerated on: 2023-11-03 * * 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 6431faa5cf3..1212831ff4b 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-11-02 + * Autogenerated on: 2023-11-03 * * 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 6a234b6554e..d7c504eb522 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-11-02 + * Autogenerated on: 2023-11-03 * * 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 21eb1f0422e..d8a09b02b0c 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-11-02 + * Autogenerated on: 2023-11-03 * * 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 cae578e4413..de43021a504 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-11-02 + * Autogenerated on: 2023-11-03 * * 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 63ce3b943da..e755e011718 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-11-02 + * Autogenerated on: 2023-11-03 * * 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 611b81c5727..f3173a19f88 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-11-02 + * Autogenerated on: 2023-11-03 * * 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 534e2d3c7ed..3949189d8d8 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-11-02 + * Autogenerated on: 2023-11-03 * * 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 be7c71c00e7..85872676aee 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-11-02 + * Autogenerated on: 2023-11-03 * * 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 07bd4c5b07c..6c314393866 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-11-02 + * Autogenerated on: 2023-11-03 * * 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 54dd86064a5..d3df6335892 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-11-02 + * Autogenerated on: 2023-11-03 * * 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 42cd10689ae..7e6faef19ec 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-11-02 + * Autogenerated on: 2023-11-03 * * 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 4c6931b0c89..f1a64ad76bc 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-11-02 + * Autogenerated on: 2023-11-03 * * 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 2db00a202b2..b608f4ddf47 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-11-02 + * Autogenerated on: 2023-11-03 * * 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 5edd6753b11..d001b9138be 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-11-02 + * Autogenerated on: 2023-11-03 * * 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 b9f8f029258..f6308428e08 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-11-02 + * Autogenerated on: 2023-11-03 * * 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 972e456556c..2dd26790249 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-11-02 + Autogenerated on: 2023-11-03 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 1b598296913..70295d0eed4 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-11-02 + Autogenerated on: 2023-11-03 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 3bd95f48564..ce670c939a5 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-11-02 + Autogenerated on: 2023-11-03 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 1eea42c98a3..4494f9564a2 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-11-02 + Autogenerated on: 2023-11-03 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 eb9aea88c65..61b41a907d1 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-11-02 + Autogenerated on: 2023-11-03 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 f78c61e2a5a..ef3ab2d231b 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-11-02 + Autogenerated on: 2023-11-03 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 a65add7cf7e..466f5c46cb0 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-11-02 + Autogenerated on: 2023-11-03 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 f4e96d25df2..8802e16df45 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-11-02 + Autogenerated on: 2023-11-03 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 fadca48f497..5142cc5132a 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-11-02 + Autogenerated on: 2023-11-03 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 e8f18894ef9..6c24a55fbf0 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-11-02 + Autogenerated on: 2023-11-03 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 dd437e17394..cd7536a5f85 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-11-02 + Autogenerated on: 2023-11-03 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 dac784edf9a..03c4fde1eda 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-11-02 + Autogenerated on: 2023-11-03 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 b13fec2f082..9adf7677cb8 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-11-02 + Autogenerated on: 2023-11-03 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 d4312e58800..f4e9db46b1e 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-11-02 + Autogenerated on: 2023-11-03 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 2d6a136c750..4cae5fc0437 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-11-02 + Autogenerated on: 2023-11-03 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 c3c298dbbc6..1c71eecfa0b 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-11-02 + Autogenerated on: 2023-11-03 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 f0357486079..01015fe28d5 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-11-02 + Autogenerated on: 2023-11-03 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-server/src/main/java/org/opencb/opencga/server/generator/writers/cli/ExecutorsCliRestApiWriter.java b/opencga-server/src/main/java/org/opencb/opencga/server/generator/writers/cli/ExecutorsCliRestApiWriter.java index f9c5c7d0f18..f8daa4e2fe2 100644 --- a/opencga-server/src/main/java/org/opencb/opencga/server/generator/writers/cli/ExecutorsCliRestApiWriter.java +++ b/opencga-server/src/main/java/org/opencb/opencga/server/generator/writers/cli/ExecutorsCliRestApiWriter.java @@ -371,7 +371,6 @@ private String getBodyParams(RestCategory restCategory, RestEndpoint restEndpoin sb.append("\n " + bodyClassName + " " + variableName + " = null;"); sb.append("\n if (commandOptions.jsonDataModel) {"); - sb.append("\n " + variableName + " = new " + bodyClassName + "();"); sb.append("\n RestResponse<" + getValidResponseNames(restEndpoint.getResponse()) + "> res = new RestResponse<>();"); sb.append("\n res.setType(QueryType.VOID);"); sb.append("\n PrintUtils.println(getObjectAsJSON(categoryName,\""+restEndpoint.getPath()+"\"));"); From 4ebda03f2ccee0a307b68ccee355e54ae37cf0db Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Thu, 9 Nov 2023 12:57:16 +0100 Subject: [PATCH 10/25] Prepare release 2.8.5 --- opencga-analysis/pom.xml | 2 +- opencga-app/pom.xml | 2 +- opencga-catalog/pom.xml | 2 +- opencga-client/pom.xml | 2 +- opencga-clinical/pom.xml | 2 +- opencga-core/pom.xml | 2 +- opencga-master/pom.xml | 2 +- opencga-server/pom.xml | 2 +- opencga-storage/opencga-storage-app/pom.xml | 2 +- opencga-storage/opencga-storage-benchmark/pom.xml | 2 +- opencga-storage/opencga-storage-core/pom.xml | 2 +- .../opencga-storage-hadoop-core/pom.xml | 2 +- .../opencga-storage-hadoop-deps-emr6.1/pom.xml | 2 +- .../opencga-storage-hadoop-deps-hdp2.6/pom.xml | 2 +- .../opencga-storage-hadoop-deps-hdp3.1/pom.xml | 2 +- .../opencga-storage-hadoop-deps/pom.xml | 2 +- opencga-storage/opencga-storage-hadoop/pom.xml | 2 +- opencga-storage/opencga-storage-server/pom.xml | 2 +- opencga-storage/pom.xml | 2 +- opencga-test/pom.xml | 2 +- pom.xml | 14 +++++++------- 21 files changed, 27 insertions(+), 27 deletions(-) diff --git a/opencga-analysis/pom.xml b/opencga-analysis/pom.xml index 15dff3cd1e7..d0c275a1018 100644 --- a/opencga-analysis/pom.xml +++ b/opencga-analysis/pom.xml @@ -22,7 +22,7 @@ org.opencb.opencga opencga - 2.8.5-SNAPSHOT + 2.8.5 ../pom.xml diff --git a/opencga-app/pom.xml b/opencga-app/pom.xml index 5b5e9816d4b..25666510d61 100644 --- a/opencga-app/pom.xml +++ b/opencga-app/pom.xml @@ -22,7 +22,7 @@ org.opencb.opencga opencga - 2.8.5-SNAPSHOT + 2.8.5 ../pom.xml diff --git a/opencga-catalog/pom.xml b/opencga-catalog/pom.xml index 0db6699e870..38fc83e954b 100644 --- a/opencga-catalog/pom.xml +++ b/opencga-catalog/pom.xml @@ -23,7 +23,7 @@ org.opencb.opencga opencga - 2.8.5-SNAPSHOT + 2.8.5 ../pom.xml diff --git a/opencga-client/pom.xml b/opencga-client/pom.xml index 40aee62802c..433bb6fd1b2 100644 --- a/opencga-client/pom.xml +++ b/opencga-client/pom.xml @@ -22,7 +22,7 @@ org.opencb.opencga opencga - 2.8.5-SNAPSHOT + 2.8.5 ../pom.xml diff --git a/opencga-clinical/pom.xml b/opencga-clinical/pom.xml index d4fe1b8f57a..8036793b3ed 100644 --- a/opencga-clinical/pom.xml +++ b/opencga-clinical/pom.xml @@ -5,7 +5,7 @@ org.opencb.opencga opencga - 2.8.5-SNAPSHOT + 2.8.5 ../pom.xml 4.0.0 diff --git a/opencga-core/pom.xml b/opencga-core/pom.xml index 53ac0e8e0d8..33315ba11c1 100644 --- a/opencga-core/pom.xml +++ b/opencga-core/pom.xml @@ -22,7 +22,7 @@ org.opencb.opencga opencga - 2.8.5-SNAPSHOT + 2.8.5 ../pom.xml diff --git a/opencga-master/pom.xml b/opencga-master/pom.xml index 541395a0e23..b3be1aea114 100644 --- a/opencga-master/pom.xml +++ b/opencga-master/pom.xml @@ -22,7 +22,7 @@ opencga org.opencb.opencga - 2.8.5-SNAPSHOT + 2.8.5 ../pom.xml diff --git a/opencga-server/pom.xml b/opencga-server/pom.xml index 4709002d528..c186a98f496 100644 --- a/opencga-server/pom.xml +++ b/opencga-server/pom.xml @@ -22,7 +22,7 @@ org.opencb.opencga opencga - 2.8.5-SNAPSHOT + 2.8.5 ../pom.xml diff --git a/opencga-storage/opencga-storage-app/pom.xml b/opencga-storage/opencga-storage-app/pom.xml index 3f1c313ed3a..be44ddec7cf 100644 --- a/opencga-storage/opencga-storage-app/pom.xml +++ b/opencga-storage/opencga-storage-app/pom.xml @@ -22,7 +22,7 @@ org.opencb.opencga opencga-storage - 2.8.5-SNAPSHOT + 2.8.5 ../pom.xml diff --git a/opencga-storage/opencga-storage-benchmark/pom.xml b/opencga-storage/opencga-storage-benchmark/pom.xml index 312e6003b2c..0b332bdb89a 100644 --- a/opencga-storage/opencga-storage-benchmark/pom.xml +++ b/opencga-storage/opencga-storage-benchmark/pom.xml @@ -22,7 +22,7 @@ opencga-storage org.opencb.opencga - 2.8.5-SNAPSHOT + 2.8.5 ../pom.xml diff --git a/opencga-storage/opencga-storage-core/pom.xml b/opencga-storage/opencga-storage-core/pom.xml index 0c5f966aabd..cc4f4fa7496 100644 --- a/opencga-storage/opencga-storage-core/pom.xml +++ b/opencga-storage/opencga-storage-core/pom.xml @@ -25,7 +25,7 @@ org.opencb.opencga opencga-storage - 2.8.5-SNAPSHOT + 2.8.5 ../pom.xml diff --git a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/pom.xml b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/pom.xml index 98296b4901e..c0f70ba8746 100644 --- a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/pom.xml +++ b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/pom.xml @@ -23,7 +23,7 @@ org.opencb.opencga opencga-storage-hadoop - 2.8.5-SNAPSHOT + 2.8.5 ../pom.xml diff --git a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/opencga-storage-hadoop-deps-emr6.1/pom.xml b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/opencga-storage-hadoop-deps-emr6.1/pom.xml index fe293123bdc..e5f67d7a6ca 100644 --- a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/opencga-storage-hadoop-deps-emr6.1/pom.xml +++ b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/opencga-storage-hadoop-deps-emr6.1/pom.xml @@ -22,7 +22,7 @@ org.opencb.opencga opencga-storage-hadoop-deps - 2.8.5-SNAPSHOT + 2.8.5 ../pom.xml diff --git a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/opencga-storage-hadoop-deps-hdp2.6/pom.xml b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/opencga-storage-hadoop-deps-hdp2.6/pom.xml index aac90a09a8a..b6c1bd893fb 100644 --- a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/opencga-storage-hadoop-deps-hdp2.6/pom.xml +++ b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/opencga-storage-hadoop-deps-hdp2.6/pom.xml @@ -22,7 +22,7 @@ org.opencb.opencga opencga-storage-hadoop-deps - 2.8.5-SNAPSHOT + 2.8.5 ../pom.xml diff --git a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/opencga-storage-hadoop-deps-hdp3.1/pom.xml b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/opencga-storage-hadoop-deps-hdp3.1/pom.xml index 7a69192b385..270a8977b7d 100644 --- a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/opencga-storage-hadoop-deps-hdp3.1/pom.xml +++ b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/opencga-storage-hadoop-deps-hdp3.1/pom.xml @@ -22,7 +22,7 @@ org.opencb.opencga opencga-storage-hadoop-deps - 2.8.5-SNAPSHOT + 2.8.5 ../pom.xml diff --git a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/pom.xml b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/pom.xml index 707a75069a3..a2ea99fc31e 100644 --- a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/pom.xml +++ b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/pom.xml @@ -50,7 +50,7 @@ org.opencb.opencga opencga-storage-hadoop - 2.8.5-SNAPSHOT + 2.8.5 ../pom.xml diff --git a/opencga-storage/opencga-storage-hadoop/pom.xml b/opencga-storage/opencga-storage-hadoop/pom.xml index 4088ff0d6c0..4c0e2ef0984 100644 --- a/opencga-storage/opencga-storage-hadoop/pom.xml +++ b/opencga-storage/opencga-storage-hadoop/pom.xml @@ -28,7 +28,7 @@ org.opencb.opencga opencga-storage - 2.8.5-SNAPSHOT + 2.8.5 ../pom.xml diff --git a/opencga-storage/opencga-storage-server/pom.xml b/opencga-storage/opencga-storage-server/pom.xml index 95e66c483d0..fc833ae2a71 100644 --- a/opencga-storage/opencga-storage-server/pom.xml +++ b/opencga-storage/opencga-storage-server/pom.xml @@ -22,7 +22,7 @@ org.opencb.opencga opencga-storage - 2.8.5-SNAPSHOT + 2.8.5 ../pom.xml diff --git a/opencga-storage/pom.xml b/opencga-storage/pom.xml index 25fea1d22d3..3d38521c1a8 100644 --- a/opencga-storage/pom.xml +++ b/opencga-storage/pom.xml @@ -22,7 +22,7 @@ org.opencb.opencga opencga - 2.8.5-SNAPSHOT + 2.8.5 ../pom.xml diff --git a/opencga-test/pom.xml b/opencga-test/pom.xml index a4d34b234b5..013e3283386 100644 --- a/opencga-test/pom.xml +++ b/opencga-test/pom.xml @@ -24,7 +24,7 @@ org.opencb.opencga opencga - 2.8.5-SNAPSHOT + 2.8.5 ../pom.xml diff --git a/pom.xml b/pom.xml index f306b9a8557..958197fcda8 100644 --- a/pom.xml +++ b/pom.xml @@ -22,7 +22,7 @@ org.opencb.opencga opencga - 2.8.5-SNAPSHOT + 2.8.5 pom OpenCGA OenCGA projects implements a big data platform for genomic data analysis @@ -42,12 +42,12 @@ - 2.8.5_dev - 2.8.5_dev - 5.4.2-SNAPSHOT - 2.8.1-SNAPSHOT - 4.8.1-SNAPSHOT - 2.8.5-SNAPSHOT + 2.8.5 + 2.8.5 + 5.4.1 + 2.8.0 + 4.8.0 + 2.8.5 0.2.0 From 014967cc3b15fd93c0c981207dd592a0125c5144 Mon Sep 17 00:00:00 2001 From: pfurio Date: Thu, 16 Nov 2023 15:54:14 +0100 Subject: [PATCH 11/25] core: add annotationSet support for ClinicalAnalysis, #TASK-5198 --- .../clinical/ClinicalTsvAnnotationLoader.java | 53 +++++ .../internal/InternalCliOptionsParser.java | 1 + .../executors/ClinicalCommandExecutor.java | 19 ++ .../options/ClinicalCommandOptions.java | 29 +++ .../db/api/ClinicalAnalysisDBAdaptor.java | 20 +- .../db/mongodb/AnnotationMongoDBAdaptor.java | 35 ++-- .../mongodb/AuthorizationMongoDBAdaptor.java | 2 +- .../ClinicalAnalysisMongoDBAdaptor.java | 134 ++++++++++--- .../db/mongodb/IndividualMongoDBAdaptor.java | 4 +- .../mongodb/InterpretationMongoDBAdaptor.java | 10 +- .../converters/ClinicalAnalysisConverter.java | 2 +- ...linicalAnalysisCatalogMongoDBIterator.java | 25 ++- .../managers/ClinicalAnalysisManager.java | 186 ++++++++++++------ .../catalog/managers/StudyManager.java | 9 +- .../catalog/managers/AbstractManagerTest.java | 2 +- .../managers/ClinicalAnalysisManagerTest.java | 126 ++++++++++++ .../models/clinical/ClinicalAnalysis.java | 15 +- .../ClinicalAnalysisCreateParams.java | 19 +- .../clinical/ClinicalAnalysisPermissions.java | 5 +- .../ClinicalAnalysisUpdateParams.java | 19 +- .../core/models/study/StudyPermissions.java | 8 +- .../core/models/study/VariableSet.java | 3 +- .../monitor/daemons/ExecutionDaemon.java | 2 + .../rest/analysis/ClinicalWebService.java | 68 ++++++- 24 files changed, 644 insertions(+), 152 deletions(-) create mode 100644 opencga-analysis/src/main/java/org/opencb/opencga/analysis/clinical/ClinicalTsvAnnotationLoader.java diff --git a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/clinical/ClinicalTsvAnnotationLoader.java b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/clinical/ClinicalTsvAnnotationLoader.java new file mode 100644 index 00000000000..1d2be95e82e --- /dev/null +++ b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/clinical/ClinicalTsvAnnotationLoader.java @@ -0,0 +1,53 @@ +/* + * Copyright 2015-2020 OpenCB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.opencb.opencga.analysis.clinical; + +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.analysis.annotations.TsvAnnotationLoader; +import org.opencb.opencga.catalog.exceptions.CatalogException; +import org.opencb.opencga.catalog.managers.AnnotationSetManager; +import org.opencb.opencga.catalog.utils.Constants; +import org.opencb.opencga.catalog.utils.ParamUtils; +import org.opencb.opencga.core.models.clinical.ClinicalAnalysisUpdateParams; +import org.opencb.opencga.core.models.common.AnnotationSet; +import org.opencb.opencga.core.models.common.Enums; +import org.opencb.opencga.core.tools.annotations.Tool; + +import java.util.Collections; + +@Tool(id = ClinicalTsvAnnotationLoader.ID, resource = Enums.Resource.CLINICAL_ANALYSIS, type = Tool.Type.OPERATION, + description = "Load annotations from TSV file.") +public class ClinicalTsvAnnotationLoader extends TsvAnnotationLoader { + public final static String ID = "clinical-tsv-load"; + + @Override + public int count(Query query) throws CatalogException { + return catalogManager.getClinicalAnalysisManager().count(study, query, token).getNumResults(); + } + + @Override + public void addAnnotationSet(String entryId, AnnotationSet annotationSet, QueryOptions options) throws CatalogException { + ClinicalAnalysisUpdateParams updateParams = new ClinicalAnalysisUpdateParams() + .setAnnotationSets(Collections.singletonList(annotationSet)); + QueryOptions queryOptions = options != null ? new QueryOptions(options) : new QueryOptions(); + queryOptions.put(Constants.ACTIONS, new ObjectMap(AnnotationSetManager.ANNOTATION_SETS, ParamUtils.BasicUpdateAction.ADD)); + + catalogManager.getClinicalAnalysisManager().update(study, entryId, updateParams, queryOptions, token); + } +} diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/internal/InternalCliOptionsParser.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/internal/InternalCliOptionsParser.java index 132ad854c82..0079461d25a 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/internal/InternalCliOptionsParser.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/internal/InternalCliOptionsParser.java @@ -226,6 +226,7 @@ public InternalCliOptionsParser() { clinicalSubCommands.addCommand(RGA_INDEX_RUN_COMMAND, clinicalCommandOptions.rgaSecondaryIndexCommandOptions); clinicalSubCommands.addCommand(RGA_AUX_INDEX_RUN_COMMAND, clinicalCommandOptions.rgaAuxiliarSecondaryIndexCommandOptions); clinicalSubCommands.addCommand(EXOMISER_INTERPRETATION_RUN_COMMAND, clinicalCommandOptions.exomiserInterpretationCommandOptions); + clinicalSubCommands.addCommand("tsv-load", clinicalCommandOptions.tsvLoad); fileCommandOptions = new FileCommandOptions(commonCommandOptions, jCommander); jCommander.addCommand("files", fileCommandOptions); diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/internal/executors/ClinicalCommandExecutor.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/internal/executors/ClinicalCommandExecutor.java index e0785c79fee..14256ac1652 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/internal/executors/ClinicalCommandExecutor.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/internal/executors/ClinicalCommandExecutor.java @@ -24,6 +24,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.analysis.clinical.ClinicalTsvAnnotationLoader; import org.opencb.opencga.analysis.clinical.exomiser.ExomiserInterpretationAnalysis; import org.opencb.opencga.analysis.clinical.rga.AuxiliarRgaAnalysis; import org.opencb.opencga.analysis.clinical.rga.RgaAnalysis; @@ -96,6 +97,9 @@ public void execute() throws Exception { case EXOMISER_INTERPRETATION_RUN_COMMAND: exomiserInterpretation(); break; + case "tsv-load": + tsvLoad(); + break; default: logger.error("Subcommand not valid"); break; @@ -314,4 +318,19 @@ private void exomiserInterpretation() throws Exception { // exomiserInterpretationAnalysis.setPrimary(cliOptions.primary); exomiserInterpretationAnalysis.start(); } + + private void tsvLoad() throws ToolException { + ClinicalCommandOptions.TsvLoad options = clinicalCommandOptions.tsvLoad; + + Path outDir = Paths.get(options.outDir); + + ClinicalTsvAnnotationLoader annotationLoader = new ClinicalTsvAnnotationLoader(); + annotationLoader.setAnnotationSetId(options.annotationSetId); + annotationLoader.setVariableSetId(options.variableSetId); + annotationLoader.setPath(options.filePath); + annotationLoader.setStudy(options.study); + + annotationLoader.setUp(opencgaHome.toString(), new ObjectMap(), outDir, options.commonOptions.token); + annotationLoader.start(); + } } diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/internal/options/ClinicalCommandOptions.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/internal/options/ClinicalCommandOptions.java index 2663f3c7c5e..9c7f8806fc7 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/internal/options/ClinicalCommandOptions.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/internal/options/ClinicalCommandOptions.java @@ -5,6 +5,7 @@ import com.beust.jcommander.Parameters; import com.beust.jcommander.ParametersDelegate; import org.opencb.biodata.models.clinical.ClinicalProperty; +import org.opencb.opencga.analysis.clinical.ClinicalTsvAnnotationLoader; import org.opencb.opencga.analysis.clinical.exomiser.ExomiserInterpretationAnalysis; import org.opencb.opencga.analysis.clinical.rga.AuxiliarRgaAnalysis; import org.opencb.opencga.analysis.clinical.rga.RgaAnalysis; @@ -14,6 +15,7 @@ import org.opencb.opencga.analysis.clinical.zetta.ZettaInterpretationAnalysis; import org.opencb.opencga.app.cli.GeneralCliOptions; import org.opencb.opencga.app.cli.internal.InternalCliOptionsParser; +import org.opencb.opencga.core.api.ParamConstants; import org.opencb.opencga.core.models.clinical.RgaAnalysisParams; import org.opencb.opencga.storage.app.cli.client.options.StorageVariantCommandOptions.BasicVariantQueryOptions; @@ -33,6 +35,7 @@ public class ClinicalCommandOptions { public final RgaSecondaryIndexCommandOptions rgaSecondaryIndexCommandOptions; public final RgaAuxiliarSecondaryIndexCommandOptions rgaAuxiliarSecondaryIndexCommandOptions; public final ExomiserInterpretationCommandOptions exomiserInterpretationCommandOptions; + public final TsvLoad tsvLoad; public JCommander jCommander; public GeneralCliOptions.CommonCommandOptions commonCommandOptions; @@ -53,6 +56,7 @@ public ClinicalCommandOptions(GeneralCliOptions.CommonCommandOptions commonComma this.rgaSecondaryIndexCommandOptions = new RgaSecondaryIndexCommandOptions(); this.rgaAuxiliarSecondaryIndexCommandOptions = new RgaAuxiliarSecondaryIndexCommandOptions(); this.exomiserInterpretationCommandOptions = new ExomiserInterpretationCommandOptions(); + this.tsvLoad = new TsvLoad(); } @Parameters(commandNames = {TieringCommandOptions.TIERING_INTERPRETATION_RUN_COMMAND}, commandDescription = @@ -335,4 +339,29 @@ public class ExomiserInterpretationCommandOptions extends GeneralCliOptions.Stud @Parameter(names = {"-o", "--outdir"}, description = "Directory where output files will be saved", arity = 1) public String outdir; } + + @Parameters(commandNames = {"tsv-load"}, commandDescription = "Load annotations from a TSV file") + public class TsvLoad extends GeneralCliOptions.StudyOption { + + public static final String TSV_LOAD_COMMAND = ClinicalTsvAnnotationLoader.ID; + + @ParametersDelegate + public GeneralCliOptions.CommonCommandOptions commonOptions = commonCommandOptions; + + @ParametersDelegate + public InternalCliOptionsParser.JobOptions jobOptions = internalJobOptions; + + @Parameter(names = {"--file"}, description = "Path to the TSV file.", required = true, arity = 1) + public String filePath; + + @Parameter(names = {"--variable-set-id"}, description = ParamConstants.VARIABLE_SET_DESCRIPTION, required = true, arity = 1) + public String variableSetId; + + @Parameter(names = {"--annotation-set-id"}, description = "AnnotationSet id that will be given to the new annotations.", + required = true, arity = 1) + public String annotationSetId; + + @Parameter(names = {"-o", "--outdir"}, description = "Directory where output files will be saved", required = true, arity = 1) + public String outDir; + } } diff --git a/opencga-catalog/src/main/java/org/opencb/opencga/catalog/db/api/ClinicalAnalysisDBAdaptor.java b/opencga-catalog/src/main/java/org/opencb/opencga/catalog/db/api/ClinicalAnalysisDBAdaptor.java index f40e073d760..ac30c48e9d2 100644 --- a/opencga-catalog/src/main/java/org/opencb/opencga/catalog/db/api/ClinicalAnalysisDBAdaptor.java +++ b/opencga-catalog/src/main/java/org/opencb/opencga/catalog/db/api/ClinicalAnalysisDBAdaptor.java @@ -26,8 +26,10 @@ import org.opencb.opencga.catalog.exceptions.CatalogDBException; import org.opencb.opencga.catalog.exceptions.CatalogException; import org.opencb.opencga.catalog.exceptions.CatalogParameterException; +import org.opencb.opencga.catalog.utils.Constants; import org.opencb.opencga.core.api.ParamConstants; import org.opencb.opencga.core.models.clinical.ClinicalAnalysis; +import org.opencb.opencga.core.models.study.VariableSet; import org.opencb.opencga.core.response.OpenCGAResult; import java.util.List; @@ -38,7 +40,7 @@ /** * Created by pfurio on 05/06/17. */ -public interface ClinicalAnalysisDBAdaptor extends CoreDBAdaptor { +public interface ClinicalAnalysisDBAdaptor extends AnnotationSetDBAdaptor { enum QueryParams implements QueryParam { ID("id", TEXT, ""), @@ -109,7 +111,11 @@ enum QueryParams implements QueryParam { DELETED(ParamConstants.DELETED_PARAM, BOOLEAN, ""), STUDY_UID("studyUid", INTEGER_ARRAY, ""), - STUDY("study", INTEGER_ARRAY, ""); // Alias to studyId in the database. Only for the webservices. + STUDY("study", INTEGER_ARRAY, ""), // Alias to studyId in the database. Only for the webservices. + + ANNOTATION_SETS("annotationSets", TEXT_ARRAY, ""), + ANNOTATION_SET_NAME("annotationSetName", TEXT_ARRAY, ""), + ANNOTATION(Constants.ANNOTATION, TEXT_ARRAY, ""); private static Map map; @@ -170,14 +176,16 @@ default void checkId(long clinicalAnalysisId) throws CatalogDBException, Catalog OpenCGAResult nativeInsert(Map clinicalAnalysis, String userId) throws CatalogDBException; - OpenCGAResult insert(long studyId, ClinicalAnalysis clinicalAnalysis, List clinicalAuditList, QueryOptions options) + OpenCGAResult insert(long studyId, ClinicalAnalysis clinicalAnalysis, List variableSetList, + List clinicalAuditList, QueryOptions options) throws CatalogDBException, CatalogParameterException, CatalogAuthorizationException; - OpenCGAResult update(long id, ObjectMap parameters, List clinicalAuditList, QueryOptions queryOptions) + OpenCGAResult update(long id, ObjectMap parameters, List variableSetList, + List clinicalAuditList, QueryOptions queryOptions) throws CatalogDBException, CatalogParameterException, CatalogAuthorizationException; - OpenCGAResult update(Query query, ObjectMap parameters, List clinicalAuditList, - QueryOptions queryOptions) + OpenCGAResult update(Query query, ObjectMap parameters, List variableSetList, + List clinicalAuditList, QueryOptions queryOptions) throws CatalogDBException, CatalogParameterException, CatalogAuthorizationException; OpenCGAResult get(long clinicalAnalysisUid, QueryOptions options) diff --git a/opencga-catalog/src/main/java/org/opencb/opencga/catalog/db/mongodb/AnnotationMongoDBAdaptor.java b/opencga-catalog/src/main/java/org/opencb/opencga/catalog/db/mongodb/AnnotationMongoDBAdaptor.java index 15c7555e75e..e8cfa1d0ad1 100644 --- a/opencga-catalog/src/main/java/org/opencb/opencga/catalog/db/mongodb/AnnotationMongoDBAdaptor.java +++ b/opencga-catalog/src/main/java/org/opencb/opencga/catalog/db/mongodb/AnnotationMongoDBAdaptor.java @@ -262,7 +262,7 @@ public boolean containsAnnotationQuery(Query query) { return query.containsKey(Constants.ANNOTATION); } - OpenCGAResult updateAnnotationSets(ClientSession clientSession, long entryId, ObjectMap parameters, + OpenCGAResult updateAnnotationSets(ClientSession clientSession, long entryUid, ObjectMap parameters, List variableSetList, QueryOptions options, boolean isVersioned) throws CatalogDBException, CatalogParameterException, CatalogAuthorizationException { Map actionMap = options.getMap(Constants.ACTIONS, new HashMap<>()); @@ -281,7 +281,7 @@ OpenCGAResult updateAnnotationSets(ClientSession clientSess // Create or remove a new annotation set if (action == ParamUtils.BasicUpdateAction.ADD || action == ParamUtils.BasicUpdateAction.SET) { // 1. Check the annotation set ids are not in use - validateNewAnnotations(clientSession, entryId, annotationSetList, variableSetList, isVersioned); + validateNewAnnotations(clientSession, entryUid, annotationSetList, variableSetList, isVersioned); // 2. Obtain the list of documents that need to be inserted List annotationDocumentList = getNewAnnotationList(annotationSetList, variableSetList); @@ -290,26 +290,26 @@ OpenCGAResult updateAnnotationSets(ClientSession clientSess if (action == ParamUtils.BasicUpdateAction.SET) { if (CollectionUtils.isEmpty(internalAnnotationDocumentList)) { // 2.1 Remove all user existing annotations - removeAllAnnotationSets(clientSession, entryId, isVersioned); + removeAllAnnotationSets(clientSession, entryUid, isVersioned); } else { // 2.1 Remove all internal existing annotations - removeAllAnnotationSets(clientSession, entryId, isVersioned, true); + removeAllAnnotationSets(clientSession, entryUid, isVersioned, true); } } if (CollectionUtils.isEmpty(internalAnnotationDocumentList)) { // 3. Insert the list of documents - addNewAnnotations(clientSession, entryId, annotationDocumentList, isVersioned); + addNewAnnotations(clientSession, entryUid, annotationDocumentList, isVersioned); // 4. Set variable set map uid - id - addPrivateVariableMap(clientSession, entryId, getPrivateVariableMapToSet(annotationSetList, variableSetList), + addPrivateVariableMap(clientSession, entryUid, getPrivateVariableMapToSet(annotationSetList, variableSetList), isVersioned); } else { // 3. Insert the list of documents - addNewAnnotations(clientSession, entryId, internalAnnotationDocumentList, isVersioned, true); + addNewAnnotations(clientSession, entryUid, internalAnnotationDocumentList, isVersioned, true); // 4. Set variable set map uid - id - addPrivateVariableMap(clientSession, entryId, getPrivateVariableMapToSet(annotationSetList, variableSetList), + addPrivateVariableMap(clientSession, entryUid, getPrivateVariableMapToSet(annotationSetList, variableSetList), isVersioned, true); } @@ -317,7 +317,7 @@ OpenCGAResult updateAnnotationSets(ClientSession clientSess // Action = REMOVE // 0. Obtain the annotationSet to be removed to know the variableSet being annotated - OpenCGAResult queryResult = nativeGet(new Query(PRIVATE_UID, entryId), new QueryOptions(QueryOptions.INCLUDE, + OpenCGAResult queryResult = nativeGet(new Query(PRIVATE_UID, entryUid), new QueryOptions(QueryOptions.INCLUDE, Arrays.asList(ANNOTATION_SETS))); if (queryResult.getNumResults() != 1) { @@ -373,7 +373,7 @@ OpenCGAResult updateAnnotationSets(ClientSession clientSess } // 1. Remove annotationSet - removeAnnotationSetByAnnotationSetId(clientSession, entryId, annotationSet.getId(), isVersioned); + removeAnnotationSetByAnnotationSetId(clientSession, entryUid, annotationSet.getId(), isVersioned); String variableSetId = annotationSetIdVariableSetUidMap.get(annotationSet.getId()); // Remove the annotation set from the variableSetAnnotationsets @@ -384,7 +384,7 @@ OpenCGAResult updateAnnotationSets(ClientSession clientSess // 2. Unset variable set map uid - id Map variableSetMapToRemove = new HashMap<>(); variableSetMapToRemove.put(variableSetId, null); - removePrivateVariableMap(clientSession, entryId, variableSetMapToRemove, isVersioned); + removePrivateVariableMap(clientSession, entryUid, variableSetMapToRemove, isVersioned); } } else if (StringUtils.isNotEmpty(annotationSet.getVariableSetId())) { VariableSet variableSet = variableSetMap.get(annotationSet.getVariableSetId()); @@ -402,19 +402,18 @@ OpenCGAResult updateAnnotationSets(ClientSession clientSess if (!variableSet.isInternal()) { // Remove all annotationSets - removeAnnotationSetByVariableSetId(clientSession, entryId, variableSet.getUid(), isVersioned); - removePrivateVariableMap(clientSession, entryId, variableSetMapToRemove, isVersioned); + removeAnnotationSetByVariableSetId(clientSession, entryUid, variableSet.getUid(), isVersioned); + removePrivateVariableMap(clientSession, entryUid, variableSetMapToRemove, isVersioned); } else { // Remove all annotationSets - removeAnnotationSetByVariableSetId(clientSession, entryId, variableSet.getUid(), isVersioned, true); - removePrivateVariableMap(clientSession, entryId, variableSetMapToRemove, isVersioned, true); + removeAnnotationSetByVariableSetId(clientSession, entryUid, variableSet.getUid(), isVersioned, true); + removePrivateVariableMap(clientSession, entryUid, variableSetMapToRemove, isVersioned, true); } } } else { throw new CatalogDBException("Could not delete AnnotationSet. AnnotationSet 'id' or 'variableSetId' not defined."); } } - } } else if (actionMap.containsKey(ANNOTATIONS)) { // Update annotation @@ -424,10 +423,10 @@ OpenCGAResult updateAnnotationSets(ClientSession clientSess List annotationDocumentList = getNewAnnotationList(Collections.singletonList(annotationSet), variableSetList); // 2. Remove all the existing annotations of the annotation set - removeAnnotationSetByAnnotationSetId(clientSession, entryId, annotationSet.getId(), isVersioned); + removeAnnotationSetByAnnotationSetId(clientSession, entryUid, annotationSet.getId(), isVersioned); // 3. Add new list of annotations - addNewAnnotations(clientSession, entryId, annotationDocumentList, isVersioned); + addNewAnnotations(clientSession, entryUid, annotationDocumentList, isVersioned); } return endWrite(startTime, 1, 1, new ArrayList<>()); diff --git a/opencga-catalog/src/main/java/org/opencb/opencga/catalog/db/mongodb/AuthorizationMongoDBAdaptor.java b/opencga-catalog/src/main/java/org/opencb/opencga/catalog/db/mongodb/AuthorizationMongoDBAdaptor.java index fff9a1ed3b3..26d65edff3f 100644 --- a/opencga-catalog/src/main/java/org/opencb/opencga/catalog/db/mongodb/AuthorizationMongoDBAdaptor.java +++ b/opencga-catalog/src/main/java/org/opencb/opencga/catalog/db/mongodb/AuthorizationMongoDBAdaptor.java @@ -128,7 +128,7 @@ private void initCollectionConnections() { this.dbCollectionMap.put(Enums.Resource.JOB, Collections.singletonList(dbAdaptorFactory.getCatalogJobDBAdaptor().getJobCollection())); this.dbCollectionMap.put(Enums.Resource.CLINICAL_ANALYSIS, - Collections.singletonList(dbAdaptorFactory.getClinicalAnalysisDBAdaptor().getClinicalCollection())); + Collections.singletonList(dbAdaptorFactory.getClinicalAnalysisDBAdaptor().getCollection())); // Versioned models will always have first the main collection and second the archive collection this.dbCollectionMap.put(Enums.Resource.INDIVIDUAL, Arrays.asList(dbAdaptorFactory.getCatalogIndividualDBAdaptor().getCollection(), diff --git a/opencga-catalog/src/main/java/org/opencb/opencga/catalog/db/mongodb/ClinicalAnalysisMongoDBAdaptor.java b/opencga-catalog/src/main/java/org/opencb/opencga/catalog/db/mongodb/ClinicalAnalysisMongoDBAdaptor.java index 9ef226dabde..67f9a035aa0 100644 --- a/opencga-catalog/src/main/java/org/opencb/opencga/catalog/db/mongodb/ClinicalAnalysisMongoDBAdaptor.java +++ b/opencga-catalog/src/main/java/org/opencb/opencga/catalog/db/mongodb/ClinicalAnalysisMongoDBAdaptor.java @@ -48,6 +48,7 @@ import org.opencb.opencga.core.common.TimeUtils; import org.opencb.opencga.core.config.Configuration; import org.opencb.opencga.core.models.clinical.*; +import org.opencb.opencga.core.models.common.AnnotationSet; import org.opencb.opencga.core.models.common.Enums; import org.opencb.opencga.core.models.common.FlagAnnotation; import org.opencb.opencga.core.models.common.InternalStatus; @@ -56,22 +57,27 @@ import org.opencb.opencga.core.models.individual.Individual; import org.opencb.opencga.core.models.panel.Panel; import org.opencb.opencga.core.models.sample.Sample; +import org.opencb.opencga.core.models.study.StudyPermissions; +import org.opencb.opencga.core.models.study.VariableSet; import org.opencb.opencga.core.response.OpenCGAResult; import org.slf4j.LoggerFactory; +import javax.annotation.Nullable; import java.io.IOException; import java.util.*; import java.util.concurrent.TimeUnit; import java.util.function.Consumer; +import java.util.function.UnaryOperator; import static org.opencb.opencga.catalog.db.api.ClinicalAnalysisDBAdaptor.QueryParams.*; +import static org.opencb.opencga.catalog.db.mongodb.AuthorizationMongoDBUtils.filterAnnotationSets; import static org.opencb.opencga.catalog.db.mongodb.AuthorizationMongoDBUtils.getQueryForAuthorisedEntries; import static org.opencb.opencga.catalog.db.mongodb.MongoDBUtils.*; /** * Created by pfurio on 05/06/17. */ -public class ClinicalAnalysisMongoDBAdaptor extends MongoDBAdaptor implements ClinicalAnalysisDBAdaptor { +public class ClinicalAnalysisMongoDBAdaptor extends AnnotationMongoDBAdaptor implements ClinicalAnalysisDBAdaptor { private static final String PRIVATE_DUE_DATE = "_dueDate"; private final MongoDBCollection clinicalCollection; @@ -87,6 +93,11 @@ public ClinicalAnalysisMongoDBAdaptor(MongoDBCollection clinicalCollection, Mong this.clinicalConverter = new ClinicalAnalysisConverter(); } + @Override + protected MongoDBCollection getCollection() { + return clinicalCollection; + } + static void fixCommentsForRemoval(ObjectMap parameters) { if (parameters.get(COMMENTS.key()) == null) { return; @@ -144,8 +155,27 @@ static void fixFilesForRemoval(ObjectMap parameters) { parameters.put(FILES.key(), fileParamList); } - public MongoDBCollection getClinicalCollection() { - return clinicalCollection; + @Override + public OpenCGAResult getAnnotationSet(long id, @Nullable String annotationSetName) + throws CatalogDBException, CatalogParameterException, CatalogAuthorizationException { + QueryOptions queryOptions = new QueryOptions(); + List includeList = new ArrayList<>(); + + if (StringUtils.isNotEmpty(annotationSetName)) { + includeList.add(Constants.ANNOTATION_SET_NAME + "." + annotationSetName); + } else { + includeList.add(QueryParams.ANNOTATION_SETS.key()); + } + queryOptions.put(QueryOptions.INCLUDE, includeList); + + OpenCGAResult clinicalDataResult = get(id, queryOptions); + if (CollectionUtils.isEmpty(clinicalDataResult.first().getAnnotationSets())) { + return new OpenCGAResult<>(clinicalDataResult.getTime(), clinicalDataResult.getEvents(), 0, Collections.emptyList(), 0); + } else { + List annotationSets = clinicalDataResult.first().getAnnotationSets(); + int size = annotationSets.size(); + return new OpenCGAResult<>(clinicalDataResult.getTime(), clinicalDataResult.getEvents(), size, annotationSets, size); + } } @Override @@ -190,7 +220,8 @@ public OpenCGAResult update(Query query, ObjectMap parameters, } @Override - public OpenCGAResult update(long uid, ObjectMap parameters, List clinicalAuditList, QueryOptions queryOptions) + public OpenCGAResult update(long uid, ObjectMap parameters, List variableSetList, List clinicalAuditList, + QueryOptions queryOptions) throws CatalogDBException, CatalogParameterException, CatalogAuthorizationException { Query query = new Query(QueryParams.UID.key(), uid); QueryOptions options = new QueryOptions() @@ -203,7 +234,8 @@ public OpenCGAResult update(long uid, ObjectMap parameters, List String clinicalAnalysisId = result.first().getId(); try { - return runTransaction(clientSession -> update(clientSession, result.first(), parameters, clinicalAuditList, queryOptions)); + return runTransaction(clientSession -> privateUpdate(clientSession, result.first(), parameters, variableSetList, + clinicalAuditList, queryOptions)); } catch (CatalogDBException e) { logger.error("Could not update clinical analysis {}: {}", clinicalAnalysisId, e.getMessage(), e); throw new CatalogDBException("Could not update clinical analysis " + clinicalAnalysisId + ": " + e.getMessage(), e.getCause()); @@ -211,26 +243,40 @@ public OpenCGAResult update(long uid, ObjectMap parameters, List } @Override - public OpenCGAResult update(Query query, ObjectMap parameters, List clinicalAuditList, QueryOptions queryOptions) - throws CatalogDBException { - return null; + public OpenCGAResult update(Query query, ObjectMap parameters, List variableSetList, List clinicalAuditList, + QueryOptions queryOptions) throws CatalogDBException { + throw new NotImplementedException("Not possible updating Clinical Analyses based on a query"); } - OpenCGAResult update(ClientSession clientSession, ClinicalAnalysis clinical, ObjectMap parameters, - List clinicalAuditList, QueryOptions queryOptions) + @Override + public OpenCGAResult update(long uid, ObjectMap parameters, List variableSetList, QueryOptions queryOptions) + throws CatalogDBException, CatalogParameterException, CatalogAuthorizationException { + throw new NotImplementedException("Use other update method passing the ClinicalAuditList"); + } + + @Override + public OpenCGAResult update(Query query, ObjectMap parameters, List variableSetList, QueryOptions queryOptions) + throws CatalogDBException, CatalogParameterException, CatalogAuthorizationException { + throw new NotImplementedException("Use other update method passing the ClinicalAuditList"); + } + + OpenCGAResult privateUpdate(ClientSession clientSession, ClinicalAnalysis clinical, ObjectMap parameters, + List variableSetList, List clinicalAuditList, QueryOptions queryOptions) throws CatalogDBException, CatalogParameterException, CatalogAuthorizationException { long tmpStartTime = startQuery(); String clinicalAnalysisId = clinical.getId(); long clinicalAnalysisUid = clinical.getUid(); + DataResult result = updateAnnotationSets(clientSession, clinicalAnalysisUid, parameters, variableSetList, queryOptions, false); + + // Perform the update Query query = new Query(QueryParams.UID.key(), clinicalAnalysisUid); UpdateDocument updateDocument = parseAndValidateUpdateParams(parameters, clinicalAuditList, query, queryOptions); Document updateOperation = updateDocument.toFinalUpdateDocument(); - List events = new ArrayList<>(); if (!updateOperation.isEmpty() || !updateDocument.getNestedUpdateList().isEmpty()) { - DataResult update; + DataResult update; if (!updateOperation.isEmpty()) { Bson bsonQuery = Filters.eq(PRIVATE_UID, clinicalAnalysisUid); @@ -270,7 +316,7 @@ OpenCGAResult update(ClientSession clientSession, ClinicalAnalysis clinical, Obj } } - } else { + } else if (result.getNumUpdated() == 0) { throw new CatalogDBException("Nothing to update"); } @@ -679,7 +725,7 @@ public DBIterator iterator(Query query, QueryOptions options) public DBIterator iterator(ClientSession clientSession, Query query, QueryOptions options) throws CatalogDBException, CatalogParameterException, CatalogAuthorizationException { MongoDBIterator mongoCursor = getMongoCursor(clientSession, query, options, null); - return new ClinicalAnalysisCatalogMongoDBIterator<>(mongoCursor, clientSession, clinicalConverter, dbAdaptorFactory, options); + return new ClinicalAnalysisCatalogMongoDBIterator<>(mongoCursor, clientSession, clinicalConverter, null, dbAdaptorFactory, options); } @Override @@ -694,7 +740,7 @@ private DBIterator nativeIterator(ClientSession clientSession, Query q queryOptions.put(NATIVE_QUERY, true); MongoDBIterator mongoCursor = getMongoCursor(clientSession, query, queryOptions); - return new ClinicalAnalysisCatalogMongoDBIterator(mongoCursor, clientSession, null, dbAdaptorFactory, queryOptions); + return new ClinicalAnalysisCatalogMongoDBIterator(mongoCursor, clientSession, null, null, dbAdaptorFactory, queryOptions); } @Override @@ -702,7 +748,12 @@ public DBIterator iterator(long studyUid, Query query, QueryOp throws CatalogDBException, CatalogAuthorizationException, CatalogParameterException { query.put(PRIVATE_STUDY_UID, studyUid); MongoDBIterator mongoCursor = getMongoCursor(query, options, user); - return new ClinicalAnalysisCatalogMongoDBIterator(mongoCursor, null, clinicalConverter, dbAdaptorFactory, studyUid, user, options); + Document studyDocument = getStudyDocument(null, studyUid); + UnaryOperator iteratorFilter = (d) -> filterAnnotationSets(studyDocument, d, user, + StudyPermissions.Permissions.VIEW_CLINICAL_ANNOTATIONS.name(), + ClinicalAnalysisPermissions.VIEW_ANNOTATIONS.name()); + return new ClinicalAnalysisCatalogMongoDBIterator(mongoCursor, null, clinicalConverter, iteratorFilter, dbAdaptorFactory, studyUid, + user, options); } @Override @@ -710,10 +761,14 @@ public DBIterator nativeIterator(long studyUid, Query query, QueryOptions option throws CatalogDBException, CatalogAuthorizationException, CatalogParameterException { QueryOptions queryOptions = options != null ? new QueryOptions(options) : new QueryOptions(); queryOptions.put(NATIVE_QUERY, true); - query.put(PRIVATE_STUDY_UID, studyUid); MongoDBIterator mongoCursor = getMongoCursor(query, queryOptions, user); - return new ClinicalAnalysisCatalogMongoDBIterator(mongoCursor, null, null, dbAdaptorFactory, studyUid, user, options); + Document studyDocument = getStudyDocument(null, studyUid); + UnaryOperator iteratorFilter = (d) -> filterAnnotationSets(studyDocument, d, user, + StudyPermissions.Permissions.VIEW_CLINICAL_ANNOTATIONS.name(), + ClinicalAnalysisPermissions.VIEW_ANNOTATIONS.name()); + return new ClinicalAnalysisCatalogMongoDBIterator(mongoCursor, null, null, iteratorFilter, dbAdaptorFactory, studyUid, user, + options); } private MongoDBIterator getMongoCursor(ClientSession clientSession, Query query, QueryOptions options) @@ -823,14 +878,15 @@ public OpenCGAResult nativeInsert(Map clinicalAnalysis, String u } @Override - public OpenCGAResult insert(long studyId, ClinicalAnalysis clinicalAnalysis, List clinicalAuditList, - QueryOptions options) throws CatalogDBException, CatalogParameterException, CatalogAuthorizationException { + public OpenCGAResult insert(long studyId, ClinicalAnalysis clinicalAnalysis, List variableSetList, + List clinicalAuditList, QueryOptions options) + throws CatalogDBException, CatalogParameterException, CatalogAuthorizationException { try { return runTransaction(clientSession -> { long tmpStartTime = startQuery(); logger.debug("Starting ClinicalAnalysis insert transaction for ClinicalAnalysis id '{}'", clinicalAnalysis.getId()); dbAdaptorFactory.getCatalogStudyDBAdaptor().checkId(studyId); - insert(clientSession, studyId, clinicalAnalysis, clinicalAuditList); + insert(clientSession, studyId, clinicalAnalysis, variableSetList, clinicalAuditList); return endWrite(tmpStartTime, 1, 1, 0, 0, null); }); } catch (Exception e) { @@ -839,7 +895,8 @@ public OpenCGAResult insert(long studyId, ClinicalAnalysis clinicalAnalysis, Lis } } - ClinicalAnalysis insert(ClientSession clientSession, long studyId, ClinicalAnalysis clinicalAnalysis, List clinicalAudit) + ClinicalAnalysis insert(ClientSession clientSession, long studyId, ClinicalAnalysis clinicalAnalysis, List variableSetList, + List clinicalAudit) throws CatalogDBException, CatalogParameterException, CatalogAuthorizationException { if (clinicalAnalysis.getInterpretation() != null) { InterpretationMongoDBAdaptor interpretationDBAdaptor = dbAdaptorFactory.getInterpretationDBAdaptor(); @@ -865,7 +922,7 @@ ClinicalAnalysis insert(ClientSession clientSession, long studyId, ClinicalAnaly clinicalAnalysis.setUuid(UuidUtils.generateOpenCgaUuid(UuidUtils.Entity.CLINICAL)); } - Document clinicalDocument = clinicalConverter.convertToStorageType(clinicalAnalysis); + Document clinicalDocument = clinicalConverter.convertToStorageType(clinicalAnalysis, variableSetList); if (StringUtils.isNotEmpty(clinicalAnalysis.getCreationDate())) { clinicalDocument.put(PRIVATE_CREATION_DATE, TimeUtils.toDate(clinicalAnalysis.getCreationDate())); } else { @@ -1001,8 +1058,8 @@ void updateClinicalAnalysisFamilyReferences(ClientSession clientSession, Family } ObjectMap params = new ObjectMap(QueryParams.FAMILY.key(), familyCopy); - OpenCGAResult result = dbAdaptorFactory.getClinicalAnalysisDBAdaptor().update(clientSession, clinicalAnalysis, params, - null, QueryOptions.empty()); + OpenCGAResult result = dbAdaptorFactory.getClinicalAnalysisDBAdaptor().privateUpdate(clientSession, clinicalAnalysis, + params, Collections.emptyList(), null, QueryOptions.empty()); if (result.getNumUpdated() != 1) { throw new CatalogDBException("ClinicalAnalysis '" + clinicalAnalysis.getId() + "' could not be updated to the latest " + "family version of '" + family.getId() + "'"); @@ -1059,7 +1116,7 @@ void updateClinicalAnalysisPanelReferences(ClientSession clientSession, Panel pa actionMap.put(PANELS.key(), ParamUtils.BasicUpdateAction.SET); QueryOptions updateOptions = new QueryOptions(Constants.ACTIONS, actionMap); ObjectMap params = new ObjectMap(PANELS.key(), panelList); - update(clientSession, clinicalAnalysis, params, null, updateOptions); + privateUpdate(clientSession, clinicalAnalysis, params, Collections.emptyList(), null, updateOptions); // Update references from Interpretations dbAdaptorFactory.getInterpretationDBAdaptor().updateInterpretationPanelReferences(clientSession, clinicalAnalysis, panel); @@ -1082,6 +1139,7 @@ protected Bson parseQuery(Query query, Document extraQuery) private Bson parseQuery(Query query, Document extraQuery, String user) throws CatalogDBException, CatalogParameterException, CatalogAuthorizationException { List andBsonList = new ArrayList<>(); + Document annotationDocument = null; Query queryCopy = new Query(query); queryCopy.remove(QueryParams.DELETED.key()); @@ -1094,9 +1152,13 @@ private Bson parseQuery(Query query, Document extraQuery, String user) andBsonList.addAll(AuthorizationMongoDBUtils.parseAclQuery(studyDocument, queryCopy, Enums.Resource.CLINICAL_ANALYSIS, user, configuration)); } else { - // Get the document query needed to check the permissions as well - andBsonList.add(getQueryForAuthorisedEntries(studyDocument, user, - ClinicalAnalysisPermissions.VIEW.name(), Enums.Resource.CLINICAL_ANALYSIS, configuration)); + if (containsAnnotationQuery(query)) { + andBsonList.add(getQueryForAuthorisedEntries(studyDocument, user, + ClinicalAnalysisPermissions.VIEW_ANNOTATIONS.name(), Enums.Resource.CLINICAL_ANALYSIS, configuration)); + } else { + andBsonList.add(getQueryForAuthorisedEntries(studyDocument, user, ClinicalAnalysisPermissions.VIEW.name(), + Enums.Resource.CLINICAL_ANALYSIS, configuration)); + } } queryCopy.remove(ParamConstants.ACL_PARAM); @@ -1107,6 +1169,9 @@ private Bson parseQuery(Query query, Document extraQuery, String user) QueryParams queryParam = QueryParams.getParam(entry.getKey()) != null ? QueryParams.getParam(entry.getKey()) : QueryParams.getParam(key); if (queryParam == null) { + if (Constants.PRIVATE_ANNOTATION_PARAM_TYPES.equals(entry.getKey())) { + continue; + } throw new CatalogDBException("Unexpected parameter " + entry.getKey() + ". The parameter does not exist or cannot be " + "queried for."); } @@ -1154,6 +1219,12 @@ private Bson parseQuery(Query query, Document extraQuery, String user) queryCopy.getString(queryParam.key()))); addAutoOrQuery(INTERNAL_STATUS_ID.key(), queryParam.key(), queryCopy, INTERNAL_STATUS_ID.type(), andBsonList); break; + case ANNOTATION: + if (annotationDocument == null) { + annotationDocument = createAnnotationQuery(queryCopy.getString(QueryParams.ANNOTATION.key()), + queryCopy.get(Constants.PRIVATE_ANNOTATION_PARAM_TYPES, ObjectMap.class)); + } + break; // Other parameter that can be queried. case ID: case UUID: @@ -1179,11 +1250,14 @@ private Bson parseQuery(Query query, Document extraQuery, String user) throw new CatalogDBException("Cannot query by parameter " + queryParam.key()); } } catch (Exception e) { - logger.error("Error with " + entry.getKey() + " " + entry.getValue()); + logger.error("Error with {}: {}", entry.getKey(), entry.getValue()); throw new CatalogDBException(e); } } + if (annotationDocument != null && !annotationDocument.isEmpty()) { + andBsonList.add(annotationDocument); + } if (extraQuery != null && !extraQuery.isEmpty()) { andBsonList.add(extraQuery); } diff --git a/opencga-catalog/src/main/java/org/opencb/opencga/catalog/db/mongodb/IndividualMongoDBAdaptor.java b/opencga-catalog/src/main/java/org/opencb/opencga/catalog/db/mongodb/IndividualMongoDBAdaptor.java index 6437a0293b2..d9c6857200a 100644 --- a/opencga-catalog/src/main/java/org/opencb/opencga/catalog/db/mongodb/IndividualMongoDBAdaptor.java +++ b/opencga-catalog/src/main/java/org/opencb/opencga/catalog/db/mongodb/IndividualMongoDBAdaptor.java @@ -625,8 +625,8 @@ private void updateClinicalAnalysisIndividualReferences(ClientSession clientSess ObjectMap params = new ObjectMap(ClinicalAnalysisDBAdaptor.QueryParams.PROBAND.key(), individualCopy); - OpenCGAResult result = dbAdaptorFactory.getClinicalAnalysisDBAdaptor().update(clientSession, clinicalAnalysis, params, null, - QueryOptions.empty()); + OpenCGAResult result = dbAdaptorFactory.getClinicalAnalysisDBAdaptor().privateUpdate(clientSession, clinicalAnalysis, + params, Collections.emptyList(), null, QueryOptions.empty()); if (result.getNumUpdated() != 1) { throw new CatalogDBException("ClinicalAnalysis '" + clinicalAnalysis.getId() + "' could not be updated to the latest " + "individual version of '" + individual.getId() + "'"); diff --git a/opencga-catalog/src/main/java/org/opencb/opencga/catalog/db/mongodb/InterpretationMongoDBAdaptor.java b/opencga-catalog/src/main/java/org/opencb/opencga/catalog/db/mongodb/InterpretationMongoDBAdaptor.java index cf2b0a64eaa..97b1d50546b 100644 --- a/opencga-catalog/src/main/java/org/opencb/opencga/catalog/db/mongodb/InterpretationMongoDBAdaptor.java +++ b/opencga-catalog/src/main/java/org/opencb/opencga/catalog/db/mongodb/InterpretationMongoDBAdaptor.java @@ -200,7 +200,7 @@ private void updateClinicalAnalysisReferences(ClientSession clientSession, Inter } // Update interpretation(s) in ClinicalAnalysis - clinicalDBAdaptor.update(clientSession, ca, params, clinicalAuditList, options); + clinicalDBAdaptor.privateUpdate(clientSession, ca, params, Collections.emptyList(), clinicalAuditList, options); break; case SECONDARY: // Add to secondaryInterpretations array in ClinicalAnalysis @@ -215,7 +215,7 @@ private void updateClinicalAnalysisReferences(ClientSession clientSession, Inter params.put(ClinicalAnalysisDBAdaptor.QueryParams.INTERPRETATION.key(), null); } - clinicalDBAdaptor.update(clientSession, ca, params, clinicalAuditList, options); + clinicalDBAdaptor.privateUpdate(clientSession, ca, params, Collections.emptyList(), clinicalAuditList, options); break; default: throw new IllegalStateException("Unknown action " + action); @@ -785,7 +785,8 @@ private void updateClinicalAnalysisInterpretationReference(ClientSession clientS params = new ObjectMap(ClinicalAnalysisDBAdaptor.QueryParams.SECONDARY_INTERPRETATIONS.key(), interpretationList); } - OpenCGAResult update = clinicalDBAdaptor.update(clientSession, ca, params, clinicalAuditList, options); + OpenCGAResult update = clinicalDBAdaptor.privateUpdate(clientSession, ca, params, Collections.emptyList(), clinicalAuditList, + options); if (update.getNumUpdated() != 1) { throw new CatalogDBException("Could not update interpretation reference in Clinical Analysis to new version"); } @@ -877,7 +878,8 @@ OpenCGAResult delete(ClientSession clientSession, Interpretation interpretation, actions.put(ClinicalAnalysisDBAdaptor.QueryParams.SECONDARY_INTERPRETATIONS.key(), ParamUtils.BasicUpdateAction.REMOVE); clinicalOptions.put(Constants.ACTIONS, actions); } - clinicalDBAdaptor.update(clientSession, clinicalAnalysis, clinicalParams, clinicalAuditList, clinicalOptions); + clinicalDBAdaptor.privateUpdate(clientSession, clinicalAnalysis, clinicalParams, Collections.emptyList(), clinicalAuditList, + clinicalOptions); Query query = new Query() .append(QueryParams.UID.key(), interpretation.getUid()) diff --git a/opencga-catalog/src/main/java/org/opencb/opencga/catalog/db/mongodb/converters/ClinicalAnalysisConverter.java b/opencga-catalog/src/main/java/org/opencb/opencga/catalog/db/mongodb/converters/ClinicalAnalysisConverter.java index 1244c9a7b7e..9fb50af19d7 100644 --- a/opencga-catalog/src/main/java/org/opencb/opencga/catalog/db/mongodb/converters/ClinicalAnalysisConverter.java +++ b/opencga-catalog/src/main/java/org/opencb/opencga/catalog/db/mongodb/converters/ClinicalAnalysisConverter.java @@ -32,7 +32,7 @@ /** * Created by pfurio on 05/06/17. */ -public class ClinicalAnalysisConverter extends OpenCgaMongoConverter { +public class ClinicalAnalysisConverter extends AnnotableConverter { public ClinicalAnalysisConverter() { super(ClinicalAnalysis.class); diff --git a/opencga-catalog/src/main/java/org/opencb/opencga/catalog/db/mongodb/iterators/ClinicalAnalysisCatalogMongoDBIterator.java b/opencga-catalog/src/main/java/org/opencb/opencga/catalog/db/mongodb/iterators/ClinicalAnalysisCatalogMongoDBIterator.java index 05607ed5a68..fa4ead98ef1 100644 --- a/opencga-catalog/src/main/java/org/opencb/opencga/catalog/db/mongodb/iterators/ClinicalAnalysisCatalogMongoDBIterator.java +++ b/opencga-catalog/src/main/java/org/opencb/opencga/catalog/db/mongodb/iterators/ClinicalAnalysisCatalogMongoDBIterator.java @@ -21,24 +21,26 @@ import org.bson.Document; import org.opencb.commons.datastore.core.Query; import org.opencb.commons.datastore.core.QueryOptions; -import org.opencb.commons.datastore.mongodb.GenericDocumentComplexConverter; import org.opencb.commons.datastore.mongodb.MongoDBIterator; import org.opencb.opencga.catalog.db.api.*; import org.opencb.opencga.catalog.db.mongodb.*; +import org.opencb.opencga.catalog.db.mongodb.converters.AnnotableConverter; import org.opencb.opencga.catalog.exceptions.CatalogAuthorizationException; import org.opencb.opencga.catalog.exceptions.CatalogDBException; import org.opencb.opencga.catalog.exceptions.CatalogParameterException; import org.opencb.opencga.core.common.JacksonUtils; +import org.opencb.opencga.core.models.common.Annotable; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.IOException; import java.util.*; +import java.util.function.UnaryOperator; import static org.opencb.opencga.catalog.db.api.ClinicalAnalysisDBAdaptor.QueryParams.*; import static org.opencb.opencga.catalog.db.mongodb.MongoDBAdaptor.NATIVE_QUERY; -public class ClinicalAnalysisCatalogMongoDBIterator extends CatalogMongoDBIterator { +public class ClinicalAnalysisCatalogMongoDBIterator extends AnnotableCatalogMongoDBIterator { private long studyUid; private String user; @@ -54,8 +56,6 @@ public class ClinicalAnalysisCatalogMongoDBIterator extends CatalogMongoDBIte private QueryOptions interpretationQueryOptions; private QueryOptions panelQueryOptions; - private QueryOptions options; - private Queue clinicalAnalysisListBuffer; private Logger logger; @@ -68,21 +68,20 @@ public class ClinicalAnalysisCatalogMongoDBIterator extends CatalogMongoDBIte private static final String UID_VERSION_SEP = "___"; public ClinicalAnalysisCatalogMongoDBIterator(MongoDBIterator mongoCursor, ClientSession clientSession, - GenericDocumentComplexConverter converter, MongoDBAdaptorFactory dbAdaptorFactory, - QueryOptions options) { - this(mongoCursor, clientSession, converter, dbAdaptorFactory, 0, null, options); + AnnotableConverter converter, UnaryOperator filter, + MongoDBAdaptorFactory dbAdaptorFactory, QueryOptions options) { + this(mongoCursor, clientSession, converter, filter, dbAdaptorFactory, 0, null, options); } public ClinicalAnalysisCatalogMongoDBIterator(MongoDBIterator mongoCursor, ClientSession clientSession, - GenericDocumentComplexConverter converter, MongoDBAdaptorFactory dbAdaptorFactory, - long studyUid, String user, QueryOptions options) { - super(mongoCursor, clientSession, converter, null); + AnnotableConverter converter, UnaryOperator filter, + MongoDBAdaptorFactory dbAdaptorFactory, long studyUid, String user, + QueryOptions options) { + super(mongoCursor, clientSession, converter, filter, options); this.user = user; this.studyUid = studyUid; - this.options = options; - this.fileDBAdaptor = dbAdaptorFactory.getCatalogFileDBAdaptor(); this.familyDBAdaptor = dbAdaptorFactory.getCatalogFamilyDBAdaptor(); this.individualDBAdaptor = dbAdaptorFactory.getCatalogIndividualDBAdaptor(); @@ -110,7 +109,7 @@ public E next() { addAclInformation(next, options); if (converter != null) { - return (E) converter.convertToDataModelType(next); + return (E) converter.convertToDataModelType(next, options); } else { return (E) next; } diff --git a/opencga-catalog/src/main/java/org/opencb/opencga/catalog/managers/ClinicalAnalysisManager.java b/opencga-catalog/src/main/java/org/opencb/opencga/catalog/managers/ClinicalAnalysisManager.java index da22c3da07b..63a0ca46dd6 100644 --- a/opencga-catalog/src/main/java/org/opencb/opencga/catalog/managers/ClinicalAnalysisManager.java +++ b/opencga-catalog/src/main/java/org/opencb/opencga/catalog/managers/ClinicalAnalysisManager.java @@ -19,7 +19,10 @@ import com.fasterxml.jackson.core.JsonProcessingException; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; -import org.opencb.biodata.models.clinical.*; +import org.opencb.biodata.models.clinical.ClinicalAnalyst; +import org.opencb.biodata.models.clinical.ClinicalAudit; +import org.opencb.biodata.models.clinical.ClinicalComment; +import org.opencb.biodata.models.clinical.Disorder; import org.opencb.biodata.models.common.Status; import org.opencb.commons.datastore.core.Event; import org.opencb.commons.datastore.core.ObjectMap; @@ -34,16 +37,19 @@ import org.opencb.opencga.catalog.exceptions.CatalogException; import org.opencb.opencga.catalog.exceptions.CatalogParameterException; import org.opencb.opencga.catalog.models.InternalGetDataResult; +import org.opencb.opencga.catalog.utils.AnnotationUtils; import org.opencb.opencga.catalog.utils.Constants; import org.opencb.opencga.catalog.utils.ParamUtils; import org.opencb.opencga.catalog.utils.UuidUtils; import org.opencb.opencga.core.api.ParamConstants; +import org.opencb.opencga.core.common.JacksonUtils; import org.opencb.opencga.core.common.TimeUtils; import org.opencb.opencga.core.config.Configuration; import org.opencb.opencga.core.models.AclEntryList; import org.opencb.opencga.core.models.AclParams; import org.opencb.opencga.core.models.audit.AuditRecord; import org.opencb.opencga.core.models.clinical.*; +import org.opencb.opencga.core.models.common.AnnotationSet; import org.opencb.opencga.core.models.common.Enums; import org.opencb.opencga.core.models.common.FlagAnnotation; import org.opencb.opencga.core.models.common.FlagValue; @@ -56,6 +62,7 @@ import org.opencb.opencga.core.models.sample.Sample; import org.opencb.opencga.core.models.study.Study; import org.opencb.opencga.core.models.study.StudyPermissions; +import org.opencb.opencga.core.models.study.VariableSet; import org.opencb.opencga.core.models.study.configuration.ClinicalConsent; import org.opencb.opencga.core.models.study.configuration.*; import org.opencb.opencga.core.models.user.User; @@ -64,6 +71,7 @@ import org.slf4j.LoggerFactory; import javax.annotation.Nullable; +import java.io.IOException; import java.util.*; import java.util.function.Function; import java.util.stream.Collectors; @@ -75,7 +83,7 @@ /** * Created by pfurio on 05/06/17. */ -public class ClinicalAnalysisManager extends ResourceManager { +public class ClinicalAnalysisManager extends AnnotationSetManager { public static final QueryOptions INCLUDE_CLINICAL_IDS = new QueryOptions(QueryOptions.INCLUDE, Arrays.asList( ClinicalAnalysisDBAdaptor.QueryParams.ID.key(), ClinicalAnalysisDBAdaptor.QueryParams.UID.key(), @@ -204,9 +212,10 @@ public DBIterator iterator(String studyStr, Query query, Query options = ParamUtils.defaultObject(options, QueryOptions::new); String userId = catalogManager.getUserManager().getUserId(sessionId); - Study study = catalogManager.getStudyManager().resolveId(studyStr, userId); + Study study = catalogManager.getStudyManager().resolveId(studyStr, userId, StudyManager.INCLUDE_VARIABLE_SET); fixQueryObject(study, query, userId, sessionId); + AnnotationUtils.fixQueryOptionAnnotation(options); query.append(ClinicalAnalysisDBAdaptor.QueryParams.STUDY_UID.key(), study.getUid()); return clinicalDBAdaptor.iterator(study.getUid(), query, options, userId); @@ -222,7 +231,7 @@ public OpenCGAResult create(String studyStr, ClinicalAnalysis Boolean skipCreateDefaultInterpretation, QueryOptions options, String token) throws CatalogException { String userId = catalogManager.getUserManager().getUserId(token); - Study study = catalogManager.getStudyManager().resolveId(studyStr, userId, StudyManager.INCLUDE_CONFIGURATION); + Study study = catalogManager.getStudyManager().resolveId(studyStr, userId, StudyManager.INCLUDE_VARIABLE_SET_AND_CONFIGURATION); ObjectMap auditParams = new ObjectMap() .append("study", studyStr) @@ -258,6 +267,7 @@ public OpenCGAResult create(String studyStr, ClinicalAnalysis clinicalAnalysis.setQualityControl(ParamUtils.defaultObject(clinicalAnalysis.getQualityControl(), ClinicalAnalysisQualityControl::new)); clinicalAnalysis.setPanels(ParamUtils.defaultObject(clinicalAnalysis.getPanels(), Collections.emptyList())); + clinicalAnalysis.setAnnotationSets(ParamUtils.defaultObject(clinicalAnalysis.getAnnotationSets(), Collections.emptyList())); if (clinicalAnalysis.getQualityControl().getComments() != null) { for (ClinicalComment comment : clinicalAnalysis.getQualityControl().getComments()) { @@ -561,7 +571,8 @@ public OpenCGAResult create(String studyStr, ClinicalAnalysis clinicalAuditList.add(new ClinicalAudit(userId, ClinicalAudit.Action.CREATE_CLINICAL_ANALYSIS, "Create ClinicalAnalysis '" + clinicalAnalysis.getId() + "'", TimeUtils.getTime())); - OpenCGAResult insert = clinicalDBAdaptor.insert(study.getUid(), clinicalAnalysis, clinicalAuditList, options); + OpenCGAResult insert = clinicalDBAdaptor.insert(study.getUid(), clinicalAnalysis, study.getVariableSets(), + clinicalAuditList, options); insert.addEvents(events); auditManager.auditCreate(userId, Enums.Resource.CLINICAL_ANALYSIS, clinicalAnalysis.getId(), clinicalAnalysis.getUuid(), @@ -966,7 +977,7 @@ public OpenCGAResult update(String studyStr, Query query, Clin public OpenCGAResult update(String studyStr, Query query, ClinicalAnalysisUpdateParams updateParams, boolean ignoreException, QueryOptions options, String token) throws CatalogException { String userId = userManager.getUserId(token); - Study study = studyManager.resolveId(studyStr, userId, StudyManager.INCLUDE_CONFIGURATION); + Study study = studyManager.resolveId(studyStr, userId, StudyManager.INCLUDE_VARIABLE_SET_AND_CONFIGURATION); String operationId = UuidUtils.generateOpenCgaUuid(UuidUtils.Entity.AUDIT); @@ -988,6 +999,7 @@ public OpenCGAResult update(String studyStr, Query query, Clin DBIterator iterator; try { fixQueryObject(study, query, userId, token); + AnnotationUtils.fixQueryOptionAnnotation(options); query.append(ClinicalAnalysisDBAdaptor.QueryParams.STUDY_UID.key(), study.getUid()); iterator = clinicalDBAdaptor.iterator(study.getUid(), query, new QueryOptions(), userId); } catch (CatalogException e) { @@ -1026,7 +1038,7 @@ public OpenCGAResult update(String studyStr, Query query, Clin public OpenCGAResult update(String studyStr, String clinicalId, ClinicalAnalysisUpdateParams updateParams, QueryOptions options, String token) throws CatalogException { String userId = userManager.getUserId(token); - Study study = studyManager.resolveId(studyStr, userId, StudyManager.INCLUDE_CONFIGURATION); + Study study = studyManager.resolveId(studyStr, userId, StudyManager.INCLUDE_VARIABLE_SET_AND_CONFIGURATION); String operationId = UuidUtils.generateOpenCgaUuid(UuidUtils.Entity.AUDIT); @@ -1097,7 +1109,7 @@ public OpenCGAResult update(String studyStr, List clin public OpenCGAResult update(String studyStr, List clinicalIds, ClinicalAnalysisUpdateParams updateParams, boolean ignoreException, QueryOptions options, String token) throws CatalogException { String userId = userManager.getUserId(token); - Study study = studyManager.resolveId(studyStr, userId, StudyManager.INCLUDE_CONFIGURATION); + Study study = studyManager.resolveId(studyStr, userId, StudyManager.INCLUDE_VARIABLE_SET_AND_CONFIGURATION); String operationId = UuidUtils.generateOpenCgaUuid(UuidUtils.Entity.AUDIT); @@ -1157,6 +1169,25 @@ public OpenCGAResult update(String studyStr, List clin private OpenCGAResult update(Study study, ClinicalAnalysis clinicalAnalysis, ClinicalAnalysisUpdateParams updateParams, String userId, QueryOptions options) throws CatalogException { + ClinicalAnalysisUpdateParams updateParamsClone; + try { + updateParamsClone = JacksonUtils.copy(updateParams, ClinicalAnalysisUpdateParams.class); + } catch (IOException e) { + throw new CatalogException("Could not clone ClinicalAnalysisUpdateParams object"); + } + + ObjectMap parameters; + if (updateParamsClone != null) { + try { + parameters = updateParamsClone.getUpdateMap(); + } catch (JsonProcessingException e) { + throw new CatalogException("Could not parse ClinicalUpdateParams object: " + e.getMessage(), e); + } + } else { + throw new CatalogException("Empty update parameters. Nothing to update."); + } + ParamUtils.checkUpdateParametersMap(parameters); + options = ParamUtils.defaultObject(options, QueryOptions::new); if (study.getInternal() == null || study.getInternal().getConfiguration() == null || study.getInternal().getConfiguration().getClinical() == null) { @@ -1164,10 +1195,30 @@ private OpenCGAResult update(Study study, ClinicalAnalysis cli } ClinicalAnalysisStudyConfiguration clinicalConfiguration = study.getInternal().getConfiguration().getClinical(); - authorizationManager.checkClinicalAnalysisPermission(study.getUid(), clinicalAnalysis.getUid(), userId, - ClinicalAnalysisPermissions.WRITE); - List events = new LinkedList<>(); + // Check permissions... + // Only check write annotation permissions if the user wants to update the annotation sets + if (updateParamsClone.getAnnotationSets() != null) { + authorizationManager.checkClinicalAnalysisPermission(study.getUid(), clinicalAnalysis.getUid(), userId, + ClinicalAnalysisPermissions.WRITE_ANNOTATIONS); + } + // Only check update permissions if the user wants to update anything apart from the annotation sets + if ((parameters.size() == 1 && !parameters.containsKey(SampleDBAdaptor.QueryParams.ANNOTATION_SETS.key())) + || parameters.size() > 1) { + authorizationManager.checkClinicalAnalysisPermission(study.getUid(), clinicalAnalysis.getUid(), userId, + ClinicalAnalysisPermissions.WRITE); + } + + if (parameters.containsKey(ClinicalAnalysisDBAdaptor.QueryParams.ANNOTATION_SETS.key())) { + Map actionMap = options.getMap(Constants.ACTIONS, new HashMap<>()); + if (!actionMap.containsKey(AnnotationSetManager.ANNOTATION_SETS) + && !actionMap.containsKey(AnnotationSetManager.ANNOTATIONS)) { + logger.warn("Assuming the user wants to add the list of annotation sets provided"); + actionMap.put(AnnotationSetManager.ANNOTATION_SETS, ParamUtils.BasicUpdateAction.ADD); + options.put(Constants.ACTIONS, actionMap); + } + } + List events = new LinkedList<>(); if (StringUtils.isNotEmpty(clinicalAnalysis.getCreationDate())) { ParamUtils.checkDateFormat(clinicalAnalysis.getCreationDate(), ClinicalAnalysisDBAdaptor.QueryParams.CREATION_DATE.key()); } @@ -1176,29 +1227,17 @@ private OpenCGAResult update(Study study, ClinicalAnalysis cli ClinicalAnalysisDBAdaptor.QueryParams.MODIFICATION_DATE.key()); } - ObjectMap parameters; - if (updateParams != null) { - try { - parameters = updateParams.getUpdateMap(); - } catch (JsonProcessingException e) { - throw new CatalogException("Could not parse ClinicalUpdateParams object: " + e.getMessage(), e); - } - } else { - throw new CatalogException("Empty update parameters. Nothing to update."); - } - ParamUtils.checkUpdateParametersMap(parameters); - Map actionMap = options.getMap(Constants.ACTIONS); - if (updateParams.getId() != null) { - ParamUtils.checkIdentifier(updateParams.getId(), ClinicalAnalysisDBAdaptor.QueryParams.ID.key()); + if (updateParamsClone.getId() != null) { + ParamUtils.checkIdentifier(updateParamsClone.getId(), ClinicalAnalysisDBAdaptor.QueryParams.ID.key()); } - if (StringUtils.isNotEmpty(updateParams.getDueDate()) && TimeUtils.toDate(updateParams.getDueDate()) == null) { + if (StringUtils.isNotEmpty(updateParamsClone.getDueDate()) && TimeUtils.toDate(updateParamsClone.getDueDate()) == null) { throw new CatalogException("Unrecognised due date. Accepted format is: yyyyMMddHHmmss"); } - if (updateParams.getComments() != null && !updateParams.getComments().isEmpty()) { - List comments = new ArrayList<>(updateParams.getComments().size()); + if (updateParamsClone.getComments() != null && !updateParamsClone.getComments().isEmpty()) { + List comments = new ArrayList<>(updateParamsClone.getComments().size()); ParamUtils.AddRemoveReplaceAction action = ParamUtils.AddRemoveReplaceAction.from(actionMap, ClinicalAnalysisDBAdaptor.QueryParams.COMMENTS.key(), ParamUtils.AddRemoveReplaceAction.ADD); @@ -1207,7 +1246,7 @@ private OpenCGAResult update(Study study, ClinicalAnalysis cli case ADD: // Ensure each comment has a different milisecond Calendar calendar = Calendar.getInstance(); - for (ClinicalCommentParam comment : updateParams.getComments()) { + for (ClinicalCommentParam comment : updateParamsClone.getComments()) { comments.add(new ClinicalComment(userId, comment.getMessage(), comment.getTags(), TimeUtils.getTimeMillis(calendar.getTime()))); calendar.add(Calendar.MILLISECOND, 1); @@ -1215,7 +1254,7 @@ private OpenCGAResult update(Study study, ClinicalAnalysis cli break; case REMOVE: case REPLACE: - for (ClinicalCommentParam comment : updateParams.getComments()) { + for (ClinicalCommentParam comment : updateParamsClone.getComments()) { if (StringUtils.isEmpty(comment.getDate())) { throw new CatalogException("Missing mandatory 'date' field. This field is mandatory when action is '" + action + "'."); @@ -1231,13 +1270,13 @@ private OpenCGAResult update(Study study, ClinicalAnalysis cli } if (parameters.get(InterpretationDBAdaptor.QueryParams.ANALYST.key()) != null) { - if (StringUtils.isNotEmpty(updateParams.getAnalyst().getId())) { + if (StringUtils.isNotEmpty(updateParamsClone.getAnalyst().getId())) { QueryOptions userOptions = new QueryOptions(QueryOptions.INCLUDE, Arrays.asList(UserDBAdaptor.QueryParams.ID.key(), UserDBAdaptor.QueryParams.NAME.key(), UserDBAdaptor.QueryParams.EMAIL.key())); // Check user exists - OpenCGAResult userResult = userDBAdaptor.get(updateParams.getAnalyst().getId(), userOptions); + OpenCGAResult userResult = userDBAdaptor.get(updateParamsClone.getAnalyst().getId(), userOptions); if (userResult.getNumResults() == 0) { - throw new CatalogException("User '" + updateParams.getAnalyst().getId() + "' not found"); + throw new CatalogException("User '" + updateParamsClone.getAnalyst().getId() + "' not found"); } parameters.put(InterpretationDBAdaptor.QueryParams.ANALYST.key(), new ClinicalAnalyst(userResult.first().getId(), @@ -1249,7 +1288,7 @@ private OpenCGAResult update(Study study, ClinicalAnalysis cli } } if (parameters.get(ClinicalAnalysisDBAdaptor.QueryParams.QUALITY_CONTROL.key()) != null) { - ClinicalAnalysisQualityControl qualityControl = updateParams.getQualityControl().toClinicalQualityControl(); + ClinicalAnalysisQualityControl qualityControl = updateParamsClone.getQualityControl().toClinicalQualityControl(); if (qualityControl.getComments() != null) { for (ClinicalComment comment : qualityControl.getComments()) { comment.setDate(TimeUtils.getTime()); @@ -1259,27 +1298,28 @@ private OpenCGAResult update(Study study, ClinicalAnalysis cli parameters.put(ClinicalAnalysisDBAdaptor.QueryParams.QUALITY_CONTROL.key(), qualityControl); } - if (updateParams.getFiles() != null && !updateParams.getFiles().isEmpty()) { - clinicalAnalysis.setFiles(updateParams.getFiles().stream().map(FileReferenceParam::toFile).collect(Collectors.toList())); + if (updateParamsClone.getFiles() != null && !updateParamsClone.getFiles().isEmpty()) { + clinicalAnalysis.setFiles(updateParamsClone.getFiles().stream().map(FileReferenceParam::toFile).collect(Collectors.toList())); // Validate files validateFiles(study, clinicalAnalysis, userId); } - if (CollectionUtils.isNotEmpty(updateParams.getPanels()) && updateParams.getPanelLock() != null && updateParams.getPanelLock()) { + if (CollectionUtils.isNotEmpty(updateParamsClone.getPanels()) && updateParamsClone.getPanelLock() != null + && updateParamsClone.getPanelLock()) { throw new CatalogException("Updating the list of panels and setting 'panelLock' to true at the same time is not allowed."); } - if (CollectionUtils.isNotEmpty(updateParams.getPanels())) { - if (clinicalAnalysis.isPanelLock() && (updateParams.getPanelLock() == null || updateParams.getPanelLock())) { + if (CollectionUtils.isNotEmpty(updateParamsClone.getPanels())) { + if (clinicalAnalysis.isPanelLock() && (updateParamsClone.getPanelLock() == null || updateParamsClone.getPanelLock())) { throw new CatalogException("Cannot update panels from ClinicalAnalysis '" + clinicalAnalysis.getId() + "'. " + "'panelLocked' field from ClinicalAnalysis is set to true."); } // Validate and get panels - List panelIds = updateParams.getPanels().stream().map(PanelReferenceParam::getId).collect(Collectors.toList()); + List panelIds = updateParamsClone.getPanels().stream().map(PanelReferenceParam::getId).collect(Collectors.toList()); Query query = new Query(PanelDBAdaptor.QueryParams.ID.key(), panelIds); - OpenCGAResult panelResult = + OpenCGAResult panelResult = panelDBAdaptor.get(study.getUid(), query, PanelManager.INCLUDE_PANEL_IDS, userId); if (panelResult.getNumResults() < panelIds.size()) { throw new CatalogException("Some panels were not found or user doesn't have permissions to see them."); @@ -1288,7 +1328,7 @@ private OpenCGAResult update(Study study, ClinicalAnalysis cli parameters.put(ClinicalAnalysisDBAdaptor.QueryParams.PANELS.key(), panelResult.getResults()); } - if (updateParams.getPanelLock() != null && updateParams.getPanelLock() && !clinicalAnalysis.isPanelLock()) { + if (updateParamsClone.getPanelLock() != null && updateParamsClone.getPanelLock() && !clinicalAnalysis.isPanelLock()) { // if user wants to set panelLock to true // We need to check if the CA has interpretations. If so, the interpretations should contain at least one of the case panels // in order to set panelLock to true. Otherwise, that action is not allowed. @@ -1323,17 +1363,17 @@ private OpenCGAResult update(Study study, ClinicalAnalysis cli } } - if (updateParams.getFiles() != null && !updateParams.getFiles().isEmpty()) { + if (updateParamsClone.getFiles() != null && !updateParamsClone.getFiles().isEmpty()) { parameters.put(ClinicalAnalysisDBAdaptor.QueryParams.FILES.key(), clinicalAnalysis.getFiles()); } - if (CollectionUtils.isNotEmpty(updateParams.getPanels())) { + if (CollectionUtils.isNotEmpty(updateParamsClone.getPanels())) { // Get panels Query query = new Query(PanelDBAdaptor.QueryParams.ID.key(), - updateParams.getPanels().stream().map(PanelReferenceParam::getId).collect(Collectors.toList())); - OpenCGAResult panelResult = + updateParamsClone.getPanels().stream().map(PanelReferenceParam::getId).collect(Collectors.toList())); + OpenCGAResult panelResult = panelDBAdaptor.get(study.getUid(), query, PanelManager.INCLUDE_PANEL_IDS, userId); - if (panelResult.getNumResults() < updateParams.getPanels().size()) { + if (panelResult.getNumResults() < updateParamsClone.getPanels().size()) { throw new CatalogException("Some panels were not found or user doesn't have permissions to see them"); } @@ -1342,7 +1382,7 @@ private OpenCGAResult update(Study study, ClinicalAnalysis cli if (parameters.containsKey(ClinicalAnalysisDBAdaptor.QueryParams.DISORDER.key())) { // Assign the disorder to be updated to the clinicalAnalysis obtained from the DB so it can be checked in context - clinicalAnalysis.setDisorder(updateParams.getDisorder().toDisorder()); + clinicalAnalysis.setDisorder(updateParamsClone.getDisorder().toDisorder()); validateDisorder(clinicalAnalysis); // Fill parameter to be updated with complete disorder information parameters.put(ClinicalAnalysisDBAdaptor.QueryParams.DISORDER.key(), clinicalAnalysis.getDisorder()); @@ -1358,7 +1398,7 @@ private OpenCGAResult update(Study study, ClinicalAnalysis cli // Validate user-defined parameters if (parameters.containsKey(ClinicalAnalysisDBAdaptor.QueryParams.PRIORITY.key())) { - clinicalAnalysis.setPriority(updateParams.getPriority().toClinicalPriorityAnnotation()); + clinicalAnalysis.setPriority(updateParamsClone.getPriority().toClinicalPriorityAnnotation()); validateCustomPriorityParameters(clinicalAnalysis, clinicalConfiguration); parameters.put(ClinicalAnalysisDBAdaptor.QueryParams.PRIORITY.key(), clinicalAnalysis.getPriority()); } @@ -1368,7 +1408,8 @@ private OpenCGAResult update(Study study, ClinicalAnalysis cli currentFlags = clinicalAnalysis.getFlags().stream().map(FlagAnnotation::getId).collect(Collectors.toSet()); } - clinicalAnalysis.setFlags(updateParams.getFlags().stream().map(FlagValueParam::toFlagAnnotation).collect(Collectors.toList())); + clinicalAnalysis.setFlags(updateParamsClone.getFlags().stream().map(FlagValueParam::toFlagAnnotation) + .collect(Collectors.toList())); validateCustomFlagParameters(clinicalAnalysis, clinicalConfiguration); ParamUtils.BasicUpdateAction action = ParamUtils.BasicUpdateAction.from(actionMap, @@ -1389,22 +1430,22 @@ private OpenCGAResult update(Study study, ClinicalAnalysis cli parameters.put(ClinicalAnalysisDBAdaptor.QueryParams.FLAGS.key(), clinicalAnalysis.getFlags()); } if (parameters.containsKey(ClinicalAnalysisDBAdaptor.QueryParams.CONSENT.key())) { - clinicalAnalysis.setConsent(updateParams.getConsent().toClinicalConsentAnnotation()); + clinicalAnalysis.setConsent(updateParamsClone.getConsent().toClinicalConsentAnnotation()); validateCustomConsentParameters(clinicalAnalysis, clinicalConfiguration); parameters.put(ClinicalAnalysisDBAdaptor.QueryParams.CONSENT.key(), clinicalAnalysis.getConsent()); } if (parameters.containsKey(ClinicalAnalysisDBAdaptor.QueryParams.STATUS.key())) { - clinicalAnalysis.setStatus(updateParams.getStatus().toStatus()); + clinicalAnalysis.setStatus(updateParamsClone.getStatus().toStatus()); validateStatusParameter(clinicalAnalysis, clinicalConfiguration); parameters.put(ClinicalAnalysisDBAdaptor.QueryParams.STATUS.key(), clinicalAnalysis.getStatus()); - if (StringUtils.isNotEmpty(updateParams.getStatus().getId())) { + if (StringUtils.isNotEmpty(updateParamsClone.getStatus().getId())) { List clinicalStatusValues = clinicalConfiguration.getStatus().get(clinicalAnalysis.getType()); for (ClinicalStatusValue clinicalStatusValue : clinicalStatusValues) { - if (updateParams.getStatus().getId().equals(clinicalStatusValue.getId())) { + if (updateParamsClone.getStatus().getId().equals(clinicalStatusValue.getId())) { if (clinicalStatusValue.getType() == ClinicalStatusValue.ClinicalStatusType.CLOSED) { String msg = "User '" + userId + "' changed case '" + clinicalAnalysis.getId() + "' to status '" - + updateParams.getStatus().getId() + "', which is of type CLOSED. Automatically locking " + + updateParamsClone.getStatus().getId() + "', which is of type CLOSED. Automatically locking " + "ClinicalAnalysis"; logger.info(msg); parameters.put(ClinicalAnalysisDBAdaptor.QueryParams.LOCKED.key(), true); @@ -1415,9 +1456,11 @@ private OpenCGAResult update(Study study, ClinicalAnalysis cli } } + checkUpdateAnnotations(study, clinicalAnalysis, parameters, options, VariableSet.AnnotableDataModels.CLINICAL_ANALYSIS, + clinicalDBAdaptor, userId); ClinicalAudit clinicalAudit = new ClinicalAudit(userId, ClinicalAudit.Action.UPDATE_CLINICAL_ANALYSIS, "Update ClinicalAnalysis '" + clinicalAnalysis.getId() + "'", TimeUtils.getTime()); - OpenCGAResult update = clinicalDBAdaptor.update(clinicalAnalysis.getUid(), parameters, + OpenCGAResult update = clinicalDBAdaptor.update(clinicalAnalysis.getUid(), parameters, study.getVariableSets(), Collections.singletonList(clinicalAudit), options); update.addEvents(events); if (options.getBoolean(ParamConstants.INCLUDE_RESULT_PARAM)) { @@ -1494,9 +1537,11 @@ public OpenCGAResult search(String studyId, Query query, Query options = ParamUtils.defaultObject(options, QueryOptions::new); String userId = catalogManager.getUserManager().getUserId(token); - Study study = catalogManager.getStudyManager().resolveId(studyId, userId); + Study study = catalogManager.getStudyManager().resolveId(studyId, userId, StudyManager.INCLUDE_VARIABLE_SET); fixQueryObject(study, query, userId, token); + AnnotationUtils.fixQueryOptionAnnotation(options); + query.append(ClinicalAnalysisDBAdaptor.QueryParams.STUDY_UID.key(), study.getUid()); return clinicalDBAdaptor.get(study.getUid(), query, options, userId); @@ -1507,7 +1552,7 @@ public OpenCGAResult distinct(String studyId, List fields, Query quer query = ParamUtils.defaultObject(query, Query::new); String userId = userManager.getUserId(token); - Study study = catalogManager.getStudyManager().resolveId(studyId, userId); + Study study = catalogManager.getStudyManager().resolveId(studyId, userId, StudyManager.INCLUDE_VARIABLE_SET); ObjectMap auditParams = new ObjectMap() .append("studyId", studyId) @@ -1532,6 +1577,9 @@ public OpenCGAResult distinct(String studyId, List fields, Query quer } protected void fixQueryObject(Study study, Query query, String user, String token) throws CatalogException { + // Fix query if it contains any annotation + AnnotationUtils.fixQueryAnnotationSearch(study, query); + changeQueryId(query, ParamConstants.CLINICAL_DISORDER_PARAM, ClinicalAnalysisDBAdaptor.QueryParams.DISORDER.key()); changeQueryId(query, ParamConstants.CLINICAL_ANALYST_ID_PARAM, ClinicalAnalysisDBAdaptor.QueryParams.ANALYST_ID.key()); changeQueryId(query, ParamConstants.CLINICAL_PRIORITY_PARAM, ClinicalAnalysisDBAdaptor.QueryParams.PRIORITY_ID.key()); @@ -1689,7 +1737,7 @@ protected void fixQueryObject(Study study, Query query, String user, String toke public OpenCGAResult count(String studyId, Query query, String token) throws CatalogException { String userId = catalogManager.getUserManager().getUserId(token); - Study study = catalogManager.getStudyManager().resolveId(studyId, userId); + Study study = catalogManager.getStudyManager().resolveId(studyId, userId, StudyManager.INCLUDE_VARIABLE_SET); ObjectMap auditParams = new ObjectMap() .append("studyId", studyId) @@ -1837,7 +1885,7 @@ public OpenCGAResult delete(String studyStr, Query query, QueryOptions options, OpenCGAResult result = OpenCGAResult.empty(); String userId = catalogManager.getUserManager().getUserId(token); - Study study = catalogManager.getStudyManager().resolveId(studyStr, userId); + Study study = catalogManager.getStudyManager().resolveId(studyStr, userId, StudyManager.INCLUDE_VARIABLE_SET); String operationUuid = UuidUtils.generateOpenCgaUuid(UuidUtils.Entity.AUDIT); @@ -1855,6 +1903,7 @@ public OpenCGAResult delete(String studyStr, Query query, QueryOptions options, DBIterator iterator; try { fixQueryObject(study, finalQuery, userId, token); + AnnotationUtils.fixQueryOptionAnnotation(options); finalQuery.append(ClinicalAnalysisDBAdaptor.QueryParams.STUDY_UID.key(), study.getUid()); iterator = clinicalDBAdaptor.iterator(study.getUid(), finalQuery, INCLUDE_CLINICAL_INTERPRETATION_IDS, userId); @@ -1922,9 +1971,10 @@ public OpenCGAResult groupBy(@Nullable String studyStr, Query query, List updateAnnotations(String studyStr, String clinicalStr, String annotationSetId, + Map annotations, ParamUtils.CompleteUpdateAction action, + QueryOptions options, String token) throws CatalogException { + if (annotations == null || annotations.isEmpty()) { + throw new CatalogException("Missing array of annotations."); + } + ClinicalAnalysisUpdateParams clinicalUpdateParams = new ClinicalAnalysisUpdateParams() + .setAnnotationSets(Collections.singletonList(new AnnotationSet(annotationSetId, null, annotations))); + options = ParamUtils.defaultObject(options, QueryOptions::new); + options.put(Constants.ACTIONS, new ObjectMap(AnnotationSetManager.ANNOTATIONS, action)); + + return update(studyStr, clinicalStr, clinicalUpdateParams, options, token); + } + // ************************** ACLs ******************************** // public OpenCGAResult> getAcls( String studyStr, List clinicalList, String member, boolean ignoreException, String token) throws CatalogException { diff --git a/opencga-catalog/src/main/java/org/opencb/opencga/catalog/managers/StudyManager.java b/opencga-catalog/src/main/java/org/opencb/opencga/catalog/managers/StudyManager.java index e9e48ab01f4..184bbe18b67 100644 --- a/opencga-catalog/src/main/java/org/opencb/opencga/catalog/managers/StudyManager.java +++ b/opencga-catalog/src/main/java/org/opencb/opencga/catalog/managers/StudyManager.java @@ -110,9 +110,12 @@ public class StudyManager extends AbstractManager { public static final QueryOptions INCLUDE_STUDY_IDS = new QueryOptions(QueryOptions.INCLUDE, Arrays.asList( StudyDBAdaptor.QueryParams.UID.key(), StudyDBAdaptor.QueryParams.ID.key(), StudyDBAdaptor.QueryParams.UUID.key(), StudyDBAdaptor.QueryParams.FQN.key())); - static final QueryOptions INCLUDE_VARIABLE_SET = new QueryOptions(QueryOptions.INCLUDE, StudyDBAdaptor.QueryParams.VARIABLE_SET.key()); - static final QueryOptions INCLUDE_CONFIGURATION = - new QueryOptions(QueryOptions.INCLUDE, StudyDBAdaptor.QueryParams.INTERNAL_CONFIGURATION.key()); + static final QueryOptions INCLUDE_VARIABLE_SET = keepFieldInQueryOptions(INCLUDE_STUDY_IDS, + StudyDBAdaptor.QueryParams.VARIABLE_SET.key()); + static final QueryOptions INCLUDE_CONFIGURATION = keepFieldInQueryOptions(INCLUDE_STUDY_IDS, + StudyDBAdaptor.QueryParams.INTERNAL_CONFIGURATION.key()); + static final QueryOptions INCLUDE_VARIABLE_SET_AND_CONFIGURATION = keepFieldsInQueryOptions(INCLUDE_STUDY_IDS, + Arrays.asList(StudyDBAdaptor.QueryParams.INTERNAL_CONFIGURATION.key(), StudyDBAdaptor.QueryParams.VARIABLE_SET.key())); protected Logger logger; diff --git a/opencga-catalog/src/test/java/org/opencb/opencga/catalog/managers/AbstractManagerTest.java b/opencga-catalog/src/test/java/org/opencb/opencga/catalog/managers/AbstractManagerTest.java index d29de6b553a..fbce0a4576f 100644 --- a/opencga-catalog/src/test/java/org/opencb/opencga/catalog/managers/AbstractManagerTest.java +++ b/opencga-catalog/src/test/java/org/opencb/opencga/catalog/managers/AbstractManagerTest.java @@ -49,7 +49,7 @@ import java.util.List; @Category(MediumTests.class) -public class AbstractManagerTest extends GenericTest { +public class AbstractManagerTest extends GenericTest { @Rule public ExpectedException thrown = ExpectedException.none(); diff --git a/opencga-catalog/src/test/java/org/opencb/opencga/catalog/managers/ClinicalAnalysisManagerTest.java b/opencga-catalog/src/test/java/org/opencb/opencga/catalog/managers/ClinicalAnalysisManagerTest.java index d703b598e44..2f78a376527 100644 --- a/opencga-catalog/src/test/java/org/opencb/opencga/catalog/managers/ClinicalAnalysisManagerTest.java +++ b/opencga-catalog/src/test/java/org/opencb/opencga/catalog/managers/ClinicalAnalysisManagerTest.java @@ -52,6 +52,7 @@ import org.opencb.opencga.core.models.AclEntryList; import org.opencb.opencga.core.models.AclParams; import org.opencb.opencga.core.models.clinical.*; +import org.opencb.opencga.core.models.common.AnnotationSet; import org.opencb.opencga.core.models.common.FlagAnnotation; import org.opencb.opencga.core.models.common.FlagValue; import org.opencb.opencga.core.models.common.StatusParam; @@ -70,6 +71,8 @@ import org.opencb.opencga.core.models.sample.SamplePermissions; import org.opencb.opencga.core.models.sample.SampleUpdateParams; import org.opencb.opencga.core.models.study.Study; +import org.opencb.opencga.core.models.study.Variable; +import org.opencb.opencga.core.models.study.VariableSet; import org.opencb.opencga.core.models.study.configuration.ClinicalConsent; import org.opencb.opencga.core.models.study.configuration.*; import org.opencb.opencga.core.models.user.Account; @@ -3494,4 +3497,127 @@ public void fetchCasesWithSameProbandAndDifferentSample() throws CatalogExceptio assertEquals(1, result.getResults().get(1).getProband().getSamples().size()); assertEquals(proband.getSamples().get(1).getId(), result.getResults().get(1).getProband().getSamples().get(0).getId()); } + + // Annotation sets + @Test + public void searchByInternalAnnotationSetTest() throws CatalogException { + Set variables = new HashSet<>(); + variables.add(new Variable().setId("a").setType(Variable.VariableType.STRING)); + variables.add(new Variable().setId("b").setType(Variable.VariableType.MAP_INTEGER).setAllowedKeys(Arrays.asList("b1", "b2"))); + VariableSet variableSet = new VariableSet("myInternalVset", "", false, false, true, "", variables, null, 1, null); + catalogManager.getStudyManager().createVariableSet(STUDY, variableSet, sessionIdUser); + + Map annotations = new HashMap<>(); + annotations.put("a", "hello"); + annotations.put("b", new ObjectMap("b1", 2).append("b2", 3)); + AnnotationSet annotationSet = new AnnotationSet("annSet", variableSet.getId(), annotations); + + annotations = new HashMap<>(); + annotations.put("a", "bye"); + annotations.put("b", new ObjectMap("b1", Integer.MAX_VALUE + 1L).append("b2", 5)); + AnnotationSet annotationSet2 = new AnnotationSet("annSet2", variableSet.getId(), annotations); + + DataResult clinicalAnalysisDataResult = createDummyEnvironment(true, true); + ClinicalAnalysis clinicalAnalysis = catalogManager.getClinicalAnalysisManager().update(STUDY, clinicalAnalysisDataResult.first().getId(), + new ClinicalAnalysisUpdateParams().setAnnotationSets(Arrays.asList(annotationSet, annotationSet2)), INCLUDE_RESULT, sessionIdUser).first(); + assertEquals(0, clinicalAnalysis.getAnnotationSets().size()); + + // Create a different case with different annotations + annotations = new HashMap<>(); + annotations.put("a", "hi"); + annotations.put("b", new ObjectMap("b1", 12).append("b2", 13)); + annotationSet = new AnnotationSet("annSet", variableSet.getId(), annotations); + + annotations = new HashMap<>(); + annotations.put("a", "goodbye"); + annotations.put("b", new ObjectMap("b1", 14).append("b2", 15)); + annotationSet2 = new AnnotationSet("annSet2", variableSet.getId(), annotations); + + DataResult clinicalAnalysisDataResult2 = createDummyEnvironment(false, true); + ClinicalAnalysis clinicalAnalysis2 = catalogManager.getClinicalAnalysisManager().update(STUDY, clinicalAnalysisDataResult2.first().getId(), + new ClinicalAnalysisUpdateParams().setAnnotationSets(Arrays.asList(annotationSet, annotationSet2)), INCLUDE_RESULT, sessionIdUser).first(); + assertEquals(0, clinicalAnalysis2.getAnnotationSets().size()); + + // Query by one of the annotations + Query query = new Query(Constants.ANNOTATION, "myInternalVset:a=hello"); + assertEquals(1, catalogManager.getClinicalAnalysisManager().count(STUDY, query, sessionIdUser).getNumMatches()); + assertEquals(clinicalAnalysis.getId(), catalogManager.getClinicalAnalysisManager().search(STUDY, query, ClinicalAnalysisManager.INCLUDE_CLINICAL_IDS, sessionIdUser).first() + .getId()); + + query = new Query(Constants.ANNOTATION, "myInternalVset:b.b1=" + (Integer.MAX_VALUE + 1L)); + assertEquals(1, catalogManager.getClinicalAnalysisManager().count(STUDY, query, sessionIdUser).getNumMatches()); + assertEquals(clinicalAnalysis.getId(), catalogManager.getClinicalAnalysisManager().search(STUDY, query, ClinicalAnalysisManager.INCLUDE_CLINICAL_IDS, sessionIdUser).first() + .getId()); + + query = new Query(Constants.ANNOTATION, "b.b1=14"); + assertEquals(1, catalogManager.getClinicalAnalysisManager().count(STUDY, query, sessionIdUser).getNumMatches()); + assertEquals(clinicalAnalysis2.getId(), catalogManager.getClinicalAnalysisManager().search(STUDY, query, ClinicalAnalysisManager.INCLUDE_CLINICAL_IDS, sessionIdUser).first() + .getId()); + + query = new Query(Constants.ANNOTATION, "a=goodbye"); + assertEquals(1, catalogManager.getClinicalAnalysisManager().count(STUDY, query, sessionIdUser).getNumMatches()); + assertEquals(clinicalAnalysis2.getId(), catalogManager.getClinicalAnalysisManager().search(STUDY, query, ClinicalAnalysisManager.INCLUDE_CLINICAL_IDS, sessionIdUser).first() + .getId()); + + // Update sample annotation to be exactly the same as sample2 + ObjectMap action = new ObjectMap(ClinicalAnalysisDBAdaptor.QueryParams.ANNOTATION_SETS.key(), ParamUtils.BasicUpdateAction.SET); + QueryOptions options = new QueryOptions(Constants.ACTIONS, action); + catalogManager.getClinicalAnalysisManager().update(STUDY, clinicalAnalysis.getId(), + new ClinicalAnalysisUpdateParams().setAnnotationSets(Arrays.asList(annotationSet, annotationSet2)), options, sessionIdUser); + + query = new Query(Constants.ANNOTATION, "myInternalVset:a=hello"); + assertEquals(0, catalogManager.getClinicalAnalysisManager().count(STUDY, query, sessionIdUser).getNumMatches()); + + query = new Query(Constants.ANNOTATION, "myInternalVset:b.b1=4"); + assertEquals(0, catalogManager.getClinicalAnalysisManager().count(STUDY, query, sessionIdUser).getNumMatches()); + + query = new Query(Constants.ANNOTATION, "b.b1=14"); + assertEquals(2, catalogManager.getClinicalAnalysisManager().count(STUDY, query, sessionIdUser).getNumMatches()); + assertTrue(Arrays.asList(clinicalAnalysis.getId(), clinicalAnalysis2.getId()) + .containsAll(catalogManager.getClinicalAnalysisManager().search(STUDY, query, ClinicalAnalysisManager.INCLUDE_CLINICAL_IDS, sessionIdUser) + .getResults().stream().map(ClinicalAnalysis::getId).collect(Collectors.toList()))); + + query = new Query(Constants.ANNOTATION, "a=goodbye"); + assertEquals(2, catalogManager.getClinicalAnalysisManager().count(STUDY, query, sessionIdUser).getNumMatches()); + assertTrue(Arrays.asList(clinicalAnalysis.getId(), clinicalAnalysis2.getId()) + .containsAll(catalogManager.getClinicalAnalysisManager().search(STUDY, query, ClinicalAnalysisManager.INCLUDE_CLINICAL_IDS, sessionIdUser) + .getResults().stream().map(ClinicalAnalysis::getId).collect(Collectors.toList()))); + } + + @Test + public void testSearchAnnotation() throws CatalogException { + List variables = new ArrayList<>(); + variables.add(new Variable("var_name", "", "", Variable.VariableType.STRING, "", true, false, Collections.emptyList(), null, 0, "", + "", null, Collections.emptyMap())); + variables.add(new Variable("AGE", "", "", Variable.VariableType.INTEGER, "", false, false, Collections.emptyList(), null, 0, "", "", + null, Collections.emptyMap())); + variables.add(new Variable("HEIGHT", "", "", Variable.VariableType.DOUBLE, "", false, false, Collections.emptyList(), null, 0, "", + "", null, Collections.emptyMap())); + variables.add(new Variable("OTHER", "", "", Variable.VariableType.OBJECT, null, false, false, null, null, 1, "", "", null, + Collections.emptyMap())); + VariableSet vs1 = catalogManager.getStudyManager().createVariableSet(STUDY, "vs1", "vs1", false, false, "", null, variables, + Collections.singletonList(VariableSet.AnnotableDataModels.CLINICAL_ANALYSIS), sessionIdUser).first(); + + ObjectMap annotations = new ObjectMap() + .append("var_name", "Joe") + .append("AGE", 25) + .append("HEIGHT", 180); + AnnotationSet annotationSet = new AnnotationSet("annotation1", vs1.getId(), annotations); + + DataResult clinicalAnalysisDataResult = createDummyEnvironment(true, true); + createDummyEnvironment(false, true); + catalogManager.getClinicalAnalysisManager().update(STUDY, clinicalAnalysisDataResult.first().getId(), + new ClinicalAnalysisUpdateParams().setAnnotationSets(Collections.singletonList(annotationSet)), QueryOptions.empty(), + sessionIdUser); + + Query query = new Query(Constants.ANNOTATION, "var_name=Joe;" + vs1.getId() + ":AGE=25"); + DataResult annotDataResult = catalogManager.getClinicalAnalysisManager().search(STUDY, query, + QueryOptions.empty(), sessionIdUser); + assertEquals(1, annotDataResult.getNumResults()); + + query.put(Constants.ANNOTATION, "var_name=Joe;" + vs1.getId() + ":AGE=23"); + annotDataResult = catalogManager.getClinicalAnalysisManager().search(STUDY, query, QueryOptions.empty(), sessionIdUser); + assertEquals(0, annotDataResult.getNumResults()); + } + } diff --git a/opencga-core/src/main/java/org/opencb/opencga/core/models/clinical/ClinicalAnalysis.java b/opencga-core/src/main/java/org/opencb/opencga/core/models/clinical/ClinicalAnalysis.java index 1ba86bb4d1d..55ffc934572 100644 --- a/opencga-core/src/main/java/org/opencb/opencga/core/models/clinical/ClinicalAnalysis.java +++ b/opencga-core/src/main/java/org/opencb/opencga/core/models/clinical/ClinicalAnalysis.java @@ -24,7 +24,8 @@ import org.opencb.commons.annotations.DataClass; import org.opencb.commons.annotations.DataField; import org.opencb.opencga.core.api.FieldConstants; -import org.opencb.opencga.core.models.PrivateStudyUid; +import org.opencb.opencga.core.models.common.Annotable; +import org.opencb.opencga.core.models.common.AnnotationSet; import org.opencb.opencga.core.models.common.FlagAnnotation; import org.opencb.opencga.core.models.family.Family; import org.opencb.opencga.core.models.file.File; @@ -41,7 +42,7 @@ */ @DataClass(id = "ClinicalAnalysis", since = "1.0", description = "ClinicalAnalysis data model hosts information about any analysis.") -public class ClinicalAnalysis extends PrivateStudyUid { +public class ClinicalAnalysis extends Annotable { /** * ClinicalAnalysis ID is a mandatory parameter when creating a new ClinicalAnalysis, this ID cannot be changed at the moment. @@ -212,7 +213,7 @@ public ClinicalAnalysis(String id, String description, Type type, Disorder disor ClinicalReport report, ClinicalPriorityAnnotation priority, List flags, String creationDate, String modificationDate, String dueDate, int release, List comments, ClinicalAnalysisQualityControl qualityControl, List audit, ClinicalAnalysisInternal internal, - Map attributes, Status status) { + List annotationSets, Map attributes, Status status) { this.id = id; this.description = description; this.type = type; @@ -238,6 +239,7 @@ public ClinicalAnalysis(String id, String description, Type type, Disorder disor this.comments = comments; this.audit = audit; this.internal = internal; + this.annotationSets = annotationSets; this.attributes = attributes; this.status = status; } @@ -271,6 +273,7 @@ public String toString() { sb.append(", comments=").append(comments); sb.append(", audit=").append(audit); sb.append(", internal=").append(internal); + sb.append(", annotationSets=").append(annotationSets); sb.append(", attributes=").append(attributes); sb.append(", status=").append(status); sb.append('}'); @@ -514,6 +517,12 @@ public ClinicalAnalysis setInternal(ClinicalAnalysisInternal internal) { return this; } + @Override + public ClinicalAnalysis setAnnotationSets(List annotationSets) { + super.setAnnotationSets(annotationSets); + return this; + } + public Map getAttributes() { return attributes; } diff --git a/opencga-core/src/main/java/org/opencb/opencga/core/models/clinical/ClinicalAnalysisCreateParams.java b/opencga-core/src/main/java/org/opencb/opencga/core/models/clinical/ClinicalAnalysisCreateParams.java index cd0d5243f7b..9d91754d5be 100644 --- a/opencga-core/src/main/java/org/opencb/opencga/core/models/clinical/ClinicalAnalysisCreateParams.java +++ b/opencga-core/src/main/java/org/opencb/opencga/core/models/clinical/ClinicalAnalysisCreateParams.java @@ -18,6 +18,7 @@ import org.opencb.biodata.models.clinical.ClinicalAnalyst; import org.opencb.opencga.core.common.TimeUtils; +import org.opencb.opencga.core.models.common.AnnotationSet; import org.opencb.opencga.core.models.common.StatusParam; import org.opencb.opencga.core.models.family.Family; import org.opencb.opencga.core.models.file.File; @@ -61,6 +62,7 @@ public class ClinicalAnalysisCreateParams { private PriorityParam priority; private List flags; + private List annotationSets; private Map attributes; private StatusParam status; @@ -74,7 +76,8 @@ public ClinicalAnalysisCreateParams(String id, String description, ClinicalAnaly ClinicalConsentAnnotationParam consent, String creationDate, String modificationDate, String dueDate, List comments, ClinicalAnalysisQualityControlUpdateParam qualityControl, PriorityParam priority, - List flags, Map attributes, StatusParam status) { + List flags, List annotationSets, Map attributes, + StatusParam status) { this.id = id; this.description = description; this.type = type; @@ -95,6 +98,7 @@ public ClinicalAnalysisCreateParams(String id, String description, ClinicalAnaly this.qualityControl = qualityControl; this.priority = priority; this.flags = flags; + this.annotationSets = annotationSets; this.attributes = attributes; this.status = status; } @@ -128,6 +132,7 @@ public static ClinicalAnalysisCreateParams of(ClinicalAnalysis clinicalAnalysis) clinicalAnalysis.getFlags() != null ? clinicalAnalysis.getFlags().stream().map(FlagValueParam::of).collect(Collectors.toList()) : null, + clinicalAnalysis.getAnnotationSets(), clinicalAnalysis.getAttributes(), StatusParam.of(clinicalAnalysis.getStatus())); } @@ -154,6 +159,7 @@ public String toString() { sb.append(", comments=").append(comments); sb.append(", priority=").append(priority); sb.append(", flags=").append(flags); + sb.append(", annotationSets=").append(annotationSets); sb.append(", attributes=").append(attributes); sb.append(", status=").append(status); sb.append('}'); @@ -216,7 +222,7 @@ public ClinicalAnalysis toClinicalAnalysis() { flags != null ? flags.stream().map(FlagValueParam::toFlagAnnotation).collect(Collectors.toList()) : null, creationDate, modificationDate, dueDate, 1, comments != null ? comments.stream().map(ClinicalCommentParam::toClinicalComment).collect(Collectors.toList()) : null, qualityControl != null ? qualityControl.toClinicalQualityControl() : null, new LinkedList<>(), null, - attributes, status != null ? status.toStatus() : null); + annotationSets, attributes, status != null ? status.toStatus() : null); } public String getId() { @@ -399,6 +405,15 @@ public ClinicalAnalysisCreateParams setFlags(List flags) { return this; } + public List getAnnotationSets() { + return annotationSets; + } + + public ClinicalAnalysisCreateParams setAnnotationSets(List annotationSets) { + this.annotationSets = annotationSets; + return this; + } + public Map getAttributes() { return attributes; } diff --git a/opencga-core/src/main/java/org/opencb/opencga/core/models/clinical/ClinicalAnalysisPermissions.java b/opencga-core/src/main/java/org/opencb/opencga/core/models/clinical/ClinicalAnalysisPermissions.java index af45797dbf2..e0cdfadd0c0 100644 --- a/opencga-core/src/main/java/org/opencb/opencga/core/models/clinical/ClinicalAnalysisPermissions.java +++ b/opencga-core/src/main/java/org/opencb/opencga/core/models/clinical/ClinicalAnalysisPermissions.java @@ -6,7 +6,10 @@ public enum ClinicalAnalysisPermissions { NONE(Collections.emptyList()), VIEW(Collections.emptyList()), WRITE(Collections.singletonList(VIEW)), - DELETE(Arrays.asList(VIEW, WRITE)); + DELETE(Arrays.asList(VIEW, WRITE)), + VIEW_ANNOTATIONS(Collections.singletonList(VIEW)), + WRITE_ANNOTATIONS(Arrays.asList(VIEW_ANNOTATIONS, VIEW)), + DELETE_ANNOTATIONS(Arrays.asList(VIEW_ANNOTATIONS, WRITE_ANNOTATIONS, VIEW)); private final List implicitPermissions; diff --git a/opencga-core/src/main/java/org/opencb/opencga/core/models/clinical/ClinicalAnalysisUpdateParams.java b/opencga-core/src/main/java/org/opencb/opencga/core/models/clinical/ClinicalAnalysisUpdateParams.java index a30f469e7a6..1cec037fb1c 100644 --- a/opencga-core/src/main/java/org/opencb/opencga/core/models/clinical/ClinicalAnalysisUpdateParams.java +++ b/opencga-core/src/main/java/org/opencb/opencga/core/models/clinical/ClinicalAnalysisUpdateParams.java @@ -19,6 +19,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.core.JsonProcessingException; import org.opencb.commons.datastore.core.ObjectMap; +import org.opencb.opencga.core.models.common.AnnotationSet; import org.opencb.opencga.core.models.common.StatusParam; import org.opencb.opencga.core.models.file.FileReferenceParam; import org.opencb.opencga.core.models.panel.Panel; @@ -62,6 +63,7 @@ public class ClinicalAnalysisUpdateParams { private PriorityParam priority; // id private List flags; // id + private List annotationSets; private Map attributes; private StatusParam status; @@ -74,7 +76,8 @@ public ClinicalAnalysisUpdateParams(String id, String description, ClinicalAnaly ClinicalReport report, ClinicalAnalysisQualityControlUpdateParam qualityControl, ClinicalConsentAnnotationParam consent, String creationDate, String modificationDate, String dueDate, List comments, PriorityParam priority, - List flags, Map attributes, StatusParam status) { + List flags, List annotationSets, Map attributes, + StatusParam status) { this.id = id; this.description = description; this.type = type; @@ -95,6 +98,7 @@ public ClinicalAnalysisUpdateParams(String id, String description, ClinicalAnaly this.comments = comments; this.priority = priority; this.flags = flags; + this.annotationSets = annotationSets; this.attributes = attributes; this.status = status; } @@ -120,7 +124,8 @@ public ClinicalAnalysis toClinicalAnalysis() { flags != null ? flags.stream().map(FlagValueParam::toFlagAnnotation).collect(Collectors.toList()) : null, creationDate, modificationDate, dueDate, 1, comments != null ? comments.stream().map(ClinicalCommentParam::toClinicalComment).collect(Collectors.toList()) : null, - qualityControl != null ? qualityControl.toClinicalQualityControl() : null, null, null, attributes, status != null ? status.toStatus() : null); + qualityControl != null ? qualityControl.toClinicalQualityControl() : null, null, null, annotationSets, attributes, + status != null ? status.toStatus() : null); } @Override @@ -146,6 +151,7 @@ public String toString() { sb.append(", comments=").append(comments); sb.append(", priority=").append(priority); sb.append(", flags=").append(flags); + sb.append(", annotationSets=").append(annotationSets); sb.append(", attributes=").append(attributes); sb.append(", status=").append(status); sb.append('}'); @@ -323,6 +329,15 @@ public ClinicalAnalysisUpdateParams setFlags(List flags) { return this; } + public List getAnnotationSets() { + return annotationSets; + } + + public ClinicalAnalysisUpdateParams setAnnotationSets(List annotationSets) { + this.annotationSets = annotationSets; + return this; + } + public Map getAttributes() { return attributes; } diff --git a/opencga-core/src/main/java/org/opencb/opencga/core/models/study/StudyPermissions.java b/opencga-core/src/main/java/org/opencb/opencga/core/models/study/StudyPermissions.java index 3eefb1a5c63..059af8182ab 100644 --- a/opencga-core/src/main/java/org/opencb/opencga/core/models/study/StudyPermissions.java +++ b/opencga-core/src/main/java/org/opencb/opencga/core/models/study/StudyPermissions.java @@ -103,7 +103,13 @@ public enum Permissions { WRITE_CLINICAL_ANALYSIS(Collections.singletonList(VIEW_CLINICAL_ANALYSIS), ClinicalAnalysisPermissions.WRITE.name(), CLINICAL_ANALYSIS), DELETE_CLINICAL_ANALYSIS(Arrays.asList(VIEW_CLINICAL_ANALYSIS, WRITE_CLINICAL_ANALYSIS), - ClinicalAnalysisPermissions.DELETE.name(), CLINICAL_ANALYSIS); + ClinicalAnalysisPermissions.DELETE.name(), CLINICAL_ANALYSIS), + VIEW_CLINICAL_ANNOTATIONS(Collections.singletonList(VIEW_CLINICAL_ANALYSIS), ClinicalAnalysisPermissions.VIEW_ANNOTATIONS.name(), + CLINICAL_ANALYSIS), + WRITE_CLINICAL_ANNOTATIONS(Arrays.asList(VIEW_CLINICAL_ANALYSIS, VIEW_CLINICAL_ANNOTATIONS), + ClinicalAnalysisPermissions.WRITE_ANNOTATIONS.name(), CLINICAL_ANALYSIS), + DELETE_CLINICAL_ANNOTATIONS(Arrays.asList(VIEW_CLINICAL_ANALYSIS, VIEW_CLINICAL_ANNOTATIONS, WRITE_CLINICAL_ANNOTATIONS), + ClinicalAnalysisPermissions.DELETE_ANNOTATIONS.name(), CLINICAL_ANALYSIS); private final static Map map; diff --git a/opencga-core/src/main/java/org/opencb/opencga/core/models/study/VariableSet.java b/opencga-core/src/main/java/org/opencb/opencga/core/models/study/VariableSet.java index 7ffdb8a460c..c2ac1f3ba43 100644 --- a/opencga-core/src/main/java/org/opencb/opencga/core/models/study/VariableSet.java +++ b/opencga-core/src/main/java/org/opencb/opencga/core/models/study/VariableSet.java @@ -45,7 +45,8 @@ public enum AnnotableDataModels { COHORT, INDIVIDUAL, FAMILY, - FILE + FILE, + CLINICAL_ANALYSIS } public VariableSet() { diff --git a/opencga-master/src/main/java/org/opencb/opencga/master/monitor/daemons/ExecutionDaemon.java b/opencga-master/src/main/java/org/opencb/opencga/master/monitor/daemons/ExecutionDaemon.java index e7920c53303..b014cce49ec 100644 --- a/opencga-master/src/main/java/org/opencb/opencga/master/monitor/daemons/ExecutionDaemon.java +++ b/opencga-master/src/main/java/org/opencb/opencga/master/monitor/daemons/ExecutionDaemon.java @@ -26,6 +26,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.analysis.clinical.ClinicalTsvAnnotationLoader; import org.opencb.opencga.analysis.clinical.exomiser.ExomiserInterpretationAnalysis; import org.opencb.opencga.analysis.clinical.rga.AuxiliarRgaAnalysis; import org.opencb.opencga.analysis.clinical.rga.RgaAnalysis; @@ -242,6 +243,7 @@ public class ExecutionDaemon extends MonitorParentDaemon { put(RgaAnalysis.ID, "clinical " + RgaAnalysis.ID + "-run"); put(AuxiliarRgaAnalysis.ID, "clinical " + AuxiliarRgaAnalysis.ID + "-run"); + put(ClinicalTsvAnnotationLoader.ID, "clinical tsv-load"); put(JulieTool.ID, "variant julie-run"); diff --git a/opencga-server/src/main/java/org/opencb/opencga/server/rest/analysis/ClinicalWebService.java b/opencga-server/src/main/java/org/opencb/opencga/server/rest/analysis/ClinicalWebService.java index 7906588ad23..5c33dd532b2 100644 --- a/opencga-server/src/main/java/org/opencb/opencga/server/rest/analysis/ClinicalWebService.java +++ b/opencga-server/src/main/java/org/opencb/opencga/server/rest/analysis/ClinicalWebService.java @@ -21,6 +21,7 @@ import org.opencb.biodata.models.clinical.interpretation.ClinicalVariant; import org.opencb.commons.datastore.core.*; import org.opencb.opencga.analysis.clinical.ClinicalInterpretationManager; +import org.opencb.opencga.analysis.clinical.ClinicalTsvAnnotationLoader; import org.opencb.opencga.analysis.clinical.exomiser.ExomiserInterpretationAnalysis; import org.opencb.opencga.analysis.clinical.rga.AuxiliarRgaAnalysis; import org.opencb.opencga.analysis.clinical.rga.RgaAnalysis; @@ -43,7 +44,9 @@ import org.opencb.opencga.core.models.AclParams; import org.opencb.opencga.core.models.analysis.knockout.*; import org.opencb.opencga.core.models.clinical.*; +import org.opencb.opencga.core.models.common.TsvAnnotationParams; import org.opencb.opencga.core.models.job.Job; +import org.opencb.opencga.core.models.sample.Sample; import org.opencb.opencga.core.models.study.configuration.ClinicalAnalysisStudyConfiguration; import org.opencb.opencga.core.tools.annotations.*; @@ -212,9 +215,14 @@ public Response update( @QueryParam("filesAction") ParamUtils.BasicUpdateAction filesAction, @ApiParam(value = "Action to be performed if the array of panels is being updated.", allowableValues = "ADD,SET,REMOVE", defaultValue = "ADD") @QueryParam("panelsAction") ParamUtils.BasicUpdateAction panelsAction, + @ApiParam(value = "Action to be performed if the array of annotationSets is being updated.", allowableValues = "ADD,SET,REMOVE", defaultValue = "ADD") + @QueryParam("annotationSetsAction") ParamUtils.BasicUpdateAction annotationSetsAction, @ApiParam(value = ParamConstants.INCLUDE_RESULT_DESCRIPTION, defaultValue = "false") @QueryParam(ParamConstants.INCLUDE_RESULT_PARAM) boolean includeResult, @ApiParam(name = "body", value = "JSON containing clinical analysis information", required = true) ClinicalAnalysisUpdateParams params) { try { + if (annotationSetsAction == null) { + annotationSetsAction = ParamUtils.BasicUpdateAction.ADD; + } if (commentsAction == null) { commentsAction = ParamUtils.AddRemoveReplaceAction.ADD; } @@ -229,6 +237,7 @@ public Response update( } Map actionMap = new HashMap<>(); + actionMap.put(ClinicalAnalysisDBAdaptor.QueryParams.ANNOTATION_SETS.key(), annotationSetsAction); actionMap.put(ClinicalAnalysisDBAdaptor.QueryParams.COMMENTS.key(), commentsAction); actionMap.put(ClinicalAnalysisDBAdaptor.QueryParams.FLAGS.key(), flagsAction); actionMap.put(ClinicalAnalysisDBAdaptor.QueryParams.FILES.key(), filesAction); @@ -241,6 +250,55 @@ public Response update( } } + @POST + @Path("/annotationSets/load") + @Consumes(MediaType.APPLICATION_JSON) + @ApiOperation(value = "Load annotation sets from a TSV file", response = Job.class) + public Response loadTsvAnnotations( + @ApiParam(value = ParamConstants.STUDY_DESCRIPTION) @QueryParam(ParamConstants.STUDY_PARAM) String studyStr, + @ApiParam(value = ParamConstants.VARIABLE_SET_DESCRIPTION, required = true) @QueryParam("variableSetId") String variableSetId, + @ApiParam(value = "Path where the TSV file is located in OpenCGA or where it should be located.", required = true) + @QueryParam("path") String path, + @ApiParam(value = "Flag indicating whether to create parent directories if they don't exist (only when TSV file was not " + + "previously associated).") + @DefaultValue("false") @QueryParam("parents") boolean parents, + @ApiParam(value = "Annotation set id. If not provided, variableSetId will be used.") @QueryParam("annotationSetId") String annotationSetId, + @ApiParam(value = ParamConstants.TSV_ANNOTATION_DESCRIPTION) TsvAnnotationParams params) { + try { + ObjectMap additionalParams = new ObjectMap() + .append("parents", parents) + .append("annotationSetId", annotationSetId); + + return createOkResponse(catalogManager.getClinicalAnalysisManager().loadTsvAnnotations(studyStr, variableSetId, path, params, + additionalParams, ClinicalTsvAnnotationLoader.ID, token)); + } catch (Exception e) { + return createErrorResponse(e); + } + } + + @POST + @Path("/{clinicalAnalysis}/annotationSets/{annotationSet}/annotations/update") + @Consumes(MediaType.APPLICATION_JSON) + @ApiOperation(value = "Update annotations from an annotationSet", response = Sample.class) + public Response updateAnnotations( + @ApiParam(value = "Clinical analysis ID") @PathParam("clinicalAnalysis") String clinicalId, + @ApiParam(value = ParamConstants.STUDY_DESCRIPTION) @QueryParam(ParamConstants.STUDY_PARAM) String studyStr, + @ApiParam(value = ParamConstants.ANNOTATION_SET_ID) @PathParam("annotationSet") String annotationSetId, + @ApiParam(value = ParamConstants.ANNOTATION_SET_UPDATE_ACTION_DESCRIPTION, allowableValues = "ADD,SET,REMOVE,RESET,REPLACE", + defaultValue = "ADD") + @QueryParam("action") ParamUtils.CompleteUpdateAction action, + @ApiParam(value = ParamConstants.ANNOTATION_SET_UPDATE_PARAMS_DESCRIPTION) Map updateParams) { + try { + if (action == null) { + action = ParamUtils.CompleteUpdateAction.ADD; + } + return createOkResponse(catalogManager.getClinicalAnalysisManager().updateAnnotations(studyStr, clinicalId, annotationSetId, + updateParams, action, queryOptions, token)); + } catch (Exception e) { + return createErrorResponse(e); + } + } + @DELETE @Path("/{clinicalAnalyses}/delete") @ApiOperation(value = "Delete clinical analyses", response = ClinicalAnalysis.class) @@ -263,7 +321,9 @@ public Response delete( @ApiImplicitParam(name = QueryOptions.INCLUDE, value = ParamConstants.INCLUDE_DESCRIPTION, example = "name,attributes", dataType = "string", paramType = "query"), @ApiImplicitParam(name = QueryOptions.EXCLUDE, value = ParamConstants.EXCLUDE_DESCRIPTION, - example = "id,status", dataType = "string", paramType = "query") + example = "id,status", dataType = "string", paramType = "query"), + @ApiImplicitParam(name = ParamConstants.FLATTEN_ANNOTATIONS, value = "Flatten the annotations?", defaultValue = "false", + dataType = "boolean", paramType = "query") }) public Response info( @ApiParam(value = ParamConstants.CLINICAL_ANALYSES_DESCRIPTION) @PathParam(value = "clinicalAnalysis") String clinicalAnalysisStr, @@ -289,7 +349,9 @@ public Response info( @ApiImplicitParam(name = QueryOptions.EXCLUDE, value = ParamConstants.EXCLUDE_DESCRIPTION, example = "id,status", dataType = "string", paramType = "query"), @ApiImplicitParam(name = QueryOptions.LIMIT, value = ParamConstants.LIMIT_DESCRIPTION, dataType = "integer", paramType = "query"), @ApiImplicitParam(name = QueryOptions.SKIP, value = ParamConstants.SKIP_DESCRIPTION, dataType = "integer", paramType = "query"), - @ApiImplicitParam(name = QueryOptions.COUNT, value = ParamConstants.COUNT_DESCRIPTION, defaultValue = "false", dataType = "boolean", paramType = "query") + @ApiImplicitParam(name = QueryOptions.COUNT, value = ParamConstants.COUNT_DESCRIPTION, defaultValue = "false", dataType = "boolean", paramType = "query"), + @ApiImplicitParam(name = ParamConstants.FLATTEN_ANNOTATIONS, value = "Flatten the annotations?", defaultValue = "false", + dataType = "boolean", paramType = "query") }) public Response search( @ApiParam(value = ParamConstants.STUDY_DESCRIPTION) @QueryParam(ParamConstants.STUDY_PARAM) String studyStr, @@ -317,6 +379,7 @@ public Response search( @ApiParam(value = ParamConstants.CLINICAL_RELEASE_DESCRIPTION) @QueryParam(ParamConstants.CLINICAL_RELEASE_PARAM) String release, @ApiParam(value = ParamConstants.CLINICAL_STATUS_DESCRIPTION) @QueryParam(ParamConstants.CLINICAL_STATUS_PARAM) String status, @ApiParam(value = ParamConstants.CLINICAL_INTERNAL_STATUS_DESCRIPTION) @QueryParam(ParamConstants.CLINICAL_INTERNAL_STATUS_PARAM) String internalStatus, + @ApiParam(value = ParamConstants.ANNOTATION_DESCRIPTION) @QueryParam(Constants.ANNOTATION) String annotation, @ApiParam(value = ParamConstants.DELETED_DESCRIPTION) @QueryParam(ParamConstants.DELETED_PARAM) boolean deleted) { try { query.remove(ParamConstants.STUDY_PARAM); @@ -356,6 +419,7 @@ public Response distinct( @ApiParam(value = ParamConstants.CLINICAL_RELEASE_DESCRIPTION) @QueryParam(ParamConstants.CLINICAL_RELEASE_PARAM) String release, @ApiParam(value = ParamConstants.CLINICAL_STATUS_DESCRIPTION) @QueryParam(ParamConstants.CLINICAL_STATUS_PARAM) String status, @ApiParam(value = ParamConstants.CLINICAL_INTERNAL_STATUS_DESCRIPTION) @QueryParam(ParamConstants.CLINICAL_INTERNAL_STATUS_PARAM) String internalStatus, + @ApiParam(value = ParamConstants.ANNOTATION_DESCRIPTION) @QueryParam(Constants.ANNOTATION) String annotation, @ApiParam(value = ParamConstants.DELETED_DESCRIPTION) @QueryParam(ParamConstants.DELETED_PARAM) boolean deleted, @ApiParam(value = ParamConstants.DISTINCT_FIELD_DESCRIPTION, required = true) @QueryParam(ParamConstants.DISTINCT_FIELD_PARAM) String field) { try { From 6b9c5ecb7a6749721c01d2793ae81bb1c76b4c63 Mon Sep 17 00:00:00 2001 From: pfurio Date: Thu, 16 Nov 2023 16:32:28 +0100 Subject: [PATCH 12/25] app: add annotationset migration for cases, #TASK-5198 --- .../AddAnnotationSetsInClinicalAnalysis.java | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 opencga-app/src/main/java/org/opencb/opencga/app/migrations/v2_12_0/catalog/AddAnnotationSetsInClinicalAnalysis.java diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/migrations/v2_12_0/catalog/AddAnnotationSetsInClinicalAnalysis.java b/opencga-app/src/main/java/org/opencb/opencga/app/migrations/v2_12_0/catalog/AddAnnotationSetsInClinicalAnalysis.java new file mode 100644 index 00000000000..d61a6cb8a09 --- /dev/null +++ b/opencga-app/src/main/java/org/opencb/opencga/app/migrations/v2_12_0/catalog/AddAnnotationSetsInClinicalAnalysis.java @@ -0,0 +1,41 @@ +package org.opencb.opencga.app.migrations.v2_12_0.catalog; + + +import com.mongodb.client.MongoCollection; +import com.mongodb.client.model.Filters; +import org.bson.Document; +import org.bson.conversions.Bson; +import org.opencb.opencga.catalog.db.mongodb.AnnotationMongoDBAdaptor; +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.Arrays; +import java.util.Collections; + +@Migration(id = "add_annotation_sets_to_clinical_analysis" , + description = "Add private annotation fields to ClinicalAnalysis documents", + version = "2.12.0", + domain = Migration.MigrationDomain.CATALOG, + language = Migration.MigrationLanguage.JAVA, + date = 20231116 +) +public class AddAnnotationSetsInClinicalAnalysis extends MigrationTool { + + @Override + protected void run() throws Exception { + Bson query = Filters.exists(AnnotationMongoDBAdaptor.AnnotationSetParams.ANNOTATION_SETS.key(), false); + Document update = new Document("$set", new Document() + .append(AnnotationMongoDBAdaptor.AnnotationSetParams.ANNOTATION_SETS.key(), Collections.emptyList()) + .append(AnnotationMongoDBAdaptor.AnnotationSetParams.INTERNAL_ANNOTATION_SETS.key(), Collections.emptyList()) + .append(AnnotationMongoDBAdaptor.AnnotationSetParams.PRIVATE_VARIABLE_SET_MAP.key(), Collections.emptyMap()) + .append(AnnotationMongoDBAdaptor.AnnotationSetParams.PRIVATE_INTERNAL_VARIABLE_SET_MAP.key(), Collections.emptyMap()) + ); + // Initialise private fields in all Clinical Analysis documents + for (String collection : Arrays.asList(MongoDBAdaptorFactory.CLINICAL_ANALYSIS_COLLECTION, + MongoDBAdaptorFactory.DELETED_CLINICAL_ANALYSIS_COLLECTION)) { + MongoCollection mongoCollection = getMongoCollection(collection); + mongoCollection.updateMany(query, update); + } + } +} From 31fdc712bf118f620334dbd2fa364ebfb9ef5e5d Mon Sep 17 00:00:00 2001 From: pfurio Date: Fri, 17 Nov 2023 11:01:49 +0100 Subject: [PATCH 13/25] app: log the documents updated, #TASK-5198 --- .../v2_12_0/catalog/AddAnnotationSetsInClinicalAnalysis.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/migrations/v2_12_0/catalog/AddAnnotationSetsInClinicalAnalysis.java b/opencga-app/src/main/java/org/opencb/opencga/app/migrations/v2_12_0/catalog/AddAnnotationSetsInClinicalAnalysis.java index d61a6cb8a09..018b0cc28e7 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/migrations/v2_12_0/catalog/AddAnnotationSetsInClinicalAnalysis.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/migrations/v2_12_0/catalog/AddAnnotationSetsInClinicalAnalysis.java @@ -3,6 +3,7 @@ import com.mongodb.client.MongoCollection; import com.mongodb.client.model.Filters; +import com.mongodb.client.result.UpdateResult; import org.bson.Document; import org.bson.conversions.Bson; import org.opencb.opencga.catalog.db.mongodb.AnnotationMongoDBAdaptor; @@ -35,7 +36,8 @@ protected void run() throws Exception { for (String collection : Arrays.asList(MongoDBAdaptorFactory.CLINICAL_ANALYSIS_COLLECTION, MongoDBAdaptorFactory.DELETED_CLINICAL_ANALYSIS_COLLECTION)) { MongoCollection mongoCollection = getMongoCollection(collection); - mongoCollection.updateMany(query, update); + UpdateResult updateResult = mongoCollection.updateMany(query, update); + logger.info("{} clinical analysis documents updated from the {} collection", updateResult.getModifiedCount(), collection); } } } From a3efd9a32ed68d2ef7745fd5d82526b02895e7b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20T=C3=A1rraga=20Gim=C3=A9nez?= Date: Fri, 27 Oct 2023 13:47:52 +0200 Subject: [PATCH 14/25] analysis: add exomiser analysis YML file, #TASK-5190 --- .../ExomiserWrapperAnalysisExecutor.java | 14 +++- .../ExomiserInterpretationAnalysisTest.java | 5 +- .../variant/OpenCGATestExternalResource.java | 10 +++ .../analysis/exomiser/exomiser-analysis.yml | 70 +++++++++++++++++++ 4 files changed, 94 insertions(+), 5 deletions(-) create mode 100644 opencga-app/app/analysis/exomiser/exomiser-analysis.yml diff --git a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/wrappers/exomiser/ExomiserWrapperAnalysisExecutor.java b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/wrappers/exomiser/ExomiserWrapperAnalysisExecutor.java index 099d3c6c7db..86bb3760b3c 100644 --- a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/wrappers/exomiser/ExomiserWrapperAnalysisExecutor.java +++ b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/wrappers/exomiser/ExomiserWrapperAnalysisExecutor.java @@ -147,7 +147,15 @@ public void run() throws ToolException { Path openCgaHome = getOpencgaHomePath(); Path exomiserDataPath = getAnalysisDataPath(ExomiserWrapperAnalysis.ID); - // And copy the application.properties + // Copy the analysis + try { + FileUtils.copyFile(openCgaHome.resolve("analysis/exomiser/" + EXOMISER_ANALYSIS_TEMPLATE_FILENAME).toFile(), + getOutDir().resolve(EXOMISER_ANALYSIS_TEMPLATE_FILENAME).toFile()); + } catch (IOException e) { + throw new ToolException("Error copying Exomiser analysis file", e); + } + + // Copy the application.properties try { FileUtils.copyFile(openCgaHome.resolve("analysis/exomiser/" + EXOMISER_PROPERTIES_TEMPLATE_FILENAME).toFile(), getOutDir().resolve(EXOMISER_PROPERTIES_TEMPLATE_FILENAME).toFile()); @@ -155,7 +163,7 @@ public void run() throws ToolException { throw new ToolException("Error copying Exomiser properties file", e); } - // And copy the output options + // Copy the output options try { FileUtils.copyFile(openCgaHome.resolve("analysis/exomiser/" + EXOMISER_OUTPUT_OPTIONS_FILENAME).toFile(), getOutDir().resolve(EXOMISER_OUTPUT_OPTIONS_FILENAME).toFile()); @@ -174,7 +182,7 @@ public void run() throws ToolException { appendCommand("", sb); // Append input file params -// sb.append(" --analysis /jobdir/").append(EXOMISER_ANALYSIS_TEMPLATE_FILENAME) + sb.append(" --analysis /jobdir/").append(EXOMISER_ANALYSIS_TEMPLATE_FILENAME); sb.append(" --sample /jobdir/").append(sampleFile.getName()); if (pedigreeFile != null && pedigreeFile.exists()) { sb.append(" --ped /jobdir/").append(pedigreeFile.getName()); diff --git a/opencga-analysis/src/test/java/org/opencb/opencga/analysis/clinical/exomiser/ExomiserInterpretationAnalysisTest.java b/opencga-analysis/src/test/java/org/opencb/opencga/analysis/clinical/exomiser/ExomiserInterpretationAnalysisTest.java index 9889af6e563..001e44792cf 100644 --- a/opencga-analysis/src/test/java/org/opencb/opencga/analysis/clinical/exomiser/ExomiserInterpretationAnalysisTest.java +++ b/opencga-analysis/src/test/java/org/opencb/opencga/analysis/clinical/exomiser/ExomiserInterpretationAnalysisTest.java @@ -31,6 +31,7 @@ import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; import static org.junit.Assume.assumeThat; @Category(MediumTests.class) @@ -93,7 +94,7 @@ public void singleExomiserAnalysis() throws IOException, CatalogException, ToolE clinicalAnalysis = clinicalTest.catalogManager.getClinicalAnalysisManager() .get(clinicalTest.studyFqn, clinicalTest.CA_ID2, QueryOptions.empty(), clinicalTest.token).first(); assertEquals(1, clinicalAnalysis.getSecondaryInterpretations().size()); - assertEquals(22, clinicalAnalysis.getSecondaryInterpretations().get(0).getPrimaryFindings().size()); + assertTrue(clinicalAnalysis.getSecondaryInterpretations().get(0).getPrimaryFindings().size() > 0); } @Test @@ -119,7 +120,7 @@ public void familyExomiserAnalysis() throws IOException, CatalogException, ToolE clinicalAnalysis = clinicalTest.catalogManager.getClinicalAnalysisManager() .get(clinicalTest.studyFqn, clinicalTest.CA_ID3, QueryOptions.empty(), clinicalTest.token).first(); assertEquals(1, clinicalAnalysis.getSecondaryInterpretations().size()); - assertEquals(2, clinicalAnalysis.getSecondaryInterpretations().get(0).getPrimaryFindings().size()); + assertTrue(clinicalAnalysis.getSecondaryInterpretations().get(0).getPrimaryFindings().size() > 0); System.out.println("results at out dir = " + outDir.toAbsolutePath()); } diff --git a/opencga-analysis/src/test/java/org/opencb/opencga/analysis/variant/OpenCGATestExternalResource.java b/opencga-analysis/src/test/java/org/opencb/opencga/analysis/variant/OpenCGATestExternalResource.java index 95f0ef297d5..38782aef1f0 100644 --- a/opencga-analysis/src/test/java/org/opencb/opencga/analysis/variant/OpenCGATestExternalResource.java +++ b/opencga-analysis/src/test/java/org/opencb/opencga/analysis/variant/OpenCGATestExternalResource.java @@ -49,7 +49,9 @@ import java.nio.file.Paths; import java.nio.file.StandardCopyOption; import java.text.SimpleDateFormat; +import java.util.Arrays; import java.util.Date; +import java.util.List; import java.util.Map; /** @@ -260,6 +262,14 @@ public Path isolateOpenCGA() throws IOException { inputStream = new FileInputStream("../opencga-app/app/analysis/pedigree-graph/ped.R"); Files.copy(inputStream, analysisPath.resolve("ped.R"), StandardCopyOption.REPLACE_EXISTING); + // Exomiser analysis files + analysisPath = Files.createDirectories(opencgaHome.resolve("analysis/exomiser")).toAbsolutePath(); + List exomiserFiles = Arrays.asList("application.properties", "exomiser-analysis.yml", "output.yml"); + for (String exomiserFile : exomiserFiles) { + inputStream = new FileInputStream("../opencga-app/app/analysis/exomiser/" + exomiserFile); + Files.copy(inputStream, analysisPath.resolve(exomiserFile), StandardCopyOption.REPLACE_EXISTING); + } + return opencgaHome; } diff --git a/opencga-app/app/analysis/exomiser/exomiser-analysis.yml b/opencga-app/app/analysis/exomiser/exomiser-analysis.yml new file mode 100644 index 00000000000..5ec7d93d508 --- /dev/null +++ b/opencga-app/app/analysis/exomiser/exomiser-analysis.yml @@ -0,0 +1,70 @@ +--- +analysisMode: PASS_ONLY +inheritanceModes: { + AUTOSOMAL_DOMINANT: 0.1, + AUTOSOMAL_RECESSIVE_HOM_ALT: 0.1, + AUTOSOMAL_RECESSIVE_COMP_HET: 2.0, + X_DOMINANT: 0.1, + X_RECESSIVE_HOM_ALT: 0.1, + X_RECESSIVE_COMP_HET: 2.0, + MITOCHONDRIAL: 0.2 +} +frequencySources: [ + THOUSAND_GENOMES, + TOPMED, + UK10K, + + ESP_AFRICAN_AMERICAN, ESP_EUROPEAN_AMERICAN, ESP_ALL, + + EXAC_AFRICAN_INC_AFRICAN_AMERICAN, EXAC_AMERICAN, + EXAC_SOUTH_ASIAN, EXAC_EAST_ASIAN, + EXAC_FINNISH, EXAC_NON_FINNISH_EUROPEAN, + EXAC_OTHER, + + GNOMAD_E_AFR, + GNOMAD_E_AMR, + # GNOMAD_E_ASJ, + GNOMAD_E_EAS, + GNOMAD_E_FIN, + GNOMAD_E_NFE, + GNOMAD_E_OTH, + GNOMAD_E_SAS, + + GNOMAD_G_AFR, + GNOMAD_G_AMR, + # GNOMAD_G_ASJ, + GNOMAD_G_EAS, + GNOMAD_G_FIN, + GNOMAD_G_NFE, + GNOMAD_G_OTH, + GNOMAD_G_SAS +] +# Possible pathogenicitySources: (POLYPHEN, MUTATION_TASTER, SIFT), (REVEL, MVP), CADD, REMM +# REMM is trained on non-coding regulatory regions +# *WARNING* if you enable CADD or REMM ensure that you have downloaded and installed the CADD/REMM tabix files +# and updated their location in the application.properties. Exomiser will not run without this. +pathogenicitySources: [ REVEL, MVP ] +#this is the standard exomiser order. +steps: [ + failedVariantFilter: { }, + variantEffectFilter: { + remove: [ + FIVE_PRIME_UTR_EXON_VARIANT, + FIVE_PRIME_UTR_INTRON_VARIANT, + THREE_PRIME_UTR_EXON_VARIANT, + THREE_PRIME_UTR_INTRON_VARIANT, + NON_CODING_TRANSCRIPT_EXON_VARIANT, + NON_CODING_TRANSCRIPT_INTRON_VARIANT, + CODING_TRANSCRIPT_INTRON_VARIANT, + UPSTREAM_GENE_VARIANT, + DOWNSTREAM_GENE_VARIANT, + INTERGENIC_VARIANT, + REGULATORY_REGION_VARIANT + ] + }, + frequencyFilter: { maxFrequency: 2.0 }, + pathogenicityFilter: { keepNonPathogenic: true }, + inheritanceFilter: { }, + omimPrioritiser: { }, + hiPhivePrioritiser: { } +] From 72ebe63e5bfe5444e116c4c47d94e57271022715 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20T=C3=A1rraga=20Gim=C3=A9nez?= Date: Fri, 17 Nov 2023 16:58:04 +0100 Subject: [PATCH 15/25] analysis: take into account the assembly when executing genome/circos plot analysis, #TASK-5113 --- .../analysis/variant/circos/CircosAnalysis.java | 6 ++++++ .../circos/CircosLocalAnalysisExecutor.java | 8 ++++++++ .../variant/genomePlot/GenomePlotAnalysis.java | 5 +++++ .../GenomePlotLocalAnalysisExecutor.java | 13 +++++++++---- .../core/tools/variant/CircosAnalysisExecutor.java | 10 ++++++++++ .../tools/variant/GenomePlotAnalysisExecutor.java | 14 +++++++++++++- .../server/rest/analysis/VariantWebService.java | 6 ++++-- 7 files changed, 55 insertions(+), 7 deletions(-) diff --git a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/circos/CircosAnalysis.java b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/circos/CircosAnalysis.java index 2ed3cf65913..9def10b1bb6 100644 --- a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/circos/CircosAnalysis.java +++ b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/circos/CircosAnalysis.java @@ -16,6 +16,7 @@ package org.opencb.opencga.analysis.variant.circos; +import org.opencb.opencga.analysis.ResourceUtils; import org.opencb.opencga.analysis.tools.OpenCgaTool; import org.opencb.opencga.core.exceptions.ToolException; import org.opencb.opencga.core.models.common.Enums; @@ -34,6 +35,8 @@ public class CircosAnalysis extends OpenCgaTool { private String study; private CircosAnalysisParams circosParams; + private String assembly; + @Override protected void check() throws Exception { super.check(); @@ -58,6 +61,8 @@ protected void check() throws Exception { // } // // addAttribute("sampleName", sampleName); + + assembly = ResourceUtils.getAssembly(catalogManager, study, token); } @Override @@ -65,6 +70,7 @@ protected void run() throws ToolException { step(getId(), () -> { getToolExecutor(CircosAnalysisExecutor.class) .setStudy(study) + .setAssembly(assembly) .setCircosParams(circosParams) .execute(); }); diff --git a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/circos/CircosLocalAnalysisExecutor.java b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/circos/CircosLocalAnalysisExecutor.java index 40f829ecd6c..d87b46c8858 100644 --- a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/circos/CircosLocalAnalysisExecutor.java +++ b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/circos/CircosLocalAnalysisExecutor.java @@ -138,10 +138,18 @@ public void run() throws ToolException, IOException { AbstractMap.SimpleEntry outputBinding = new AbstractMap.SimpleEntry<>(getOutDir() .toAbsolutePath().toString(), DOCKER_OUTPUT_PATH); + + // Get genome version + String genomeVersion = "hg38"; + if (StringUtils.isNotEmpty(getAssembly()) && getAssembly().toUpperCase(Locale.ROOT).equals("GRCH37")) { + genomeVersion = "hg19"; + } + String scriptParams = "R CMD Rscript --vanilla " + DOCKER_INPUT_PATH + "/circos.R" + (plotCopynumber ? "" : " --no_copynumber") + (plotIndels ? "" : " --no_indels") + (plotRearrangements ? "" : " --no_rearrangements") + + " --genome_version " + genomeVersion + " --out_path " + DOCKER_OUTPUT_PATH + " " + DOCKER_OUTPUT_PATH + "/" + snvsFile.getName() + " " + DOCKER_OUTPUT_PATH + "/" + indelsFile.getName() diff --git a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/genomePlot/GenomePlotAnalysis.java b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/genomePlot/GenomePlotAnalysis.java index f7f63f37706..56c3feb0b57 100644 --- a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/genomePlot/GenomePlotAnalysis.java +++ b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/genomePlot/GenomePlotAnalysis.java @@ -21,6 +21,7 @@ import org.opencb.biodata.models.clinical.qc.GenomePlotConfig; import org.opencb.commons.datastore.core.QueryOptions; import org.opencb.opencga.analysis.AnalysisUtils; +import org.opencb.opencga.analysis.ResourceUtils; import org.opencb.opencga.analysis.tools.OpenCgaToolScopeStudy; import org.opencb.opencga.core.common.JacksonUtils; import org.opencb.opencga.core.exceptions.ToolException; @@ -51,6 +52,7 @@ public class GenomePlotAnalysis extends OpenCgaToolScopeStudy { private GenomePlotAnalysisParams genomePlotParams = new GenomePlotAnalysisParams(); private java.io.File configFile; + private String assembly; @Override protected void check() throws Exception { @@ -71,6 +73,8 @@ protected void check() throws Exception { if (!configFile.exists()) { throw new ToolException("Invalid parameters: genome plot configuration file does not exist (" + configFile + ")"); } + + assembly = ResourceUtils.getAssembly(catalogManager, study, token); } @Override @@ -78,6 +82,7 @@ protected void run() throws ToolException { step(getId(), () -> { getToolExecutor(GenomePlotAnalysisExecutor.class) .setStudy(study) + .setAssembly(assembly) .setConfigFile(configFile) .execute(); diff --git a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/genomePlot/GenomePlotLocalAnalysisExecutor.java b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/genomePlot/GenomePlotLocalAnalysisExecutor.java index 4246e142d55..bcbc6b77599 100644 --- a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/genomePlot/GenomePlotLocalAnalysisExecutor.java +++ b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/genomePlot/GenomePlotLocalAnalysisExecutor.java @@ -46,10 +46,7 @@ import java.io.File; import java.io.IOException; import java.io.PrintWriter; -import java.util.AbstractMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; +import java.util.*; import java.util.concurrent.*; import static org.opencb.opencga.analysis.wrappers.executors.DockerWrapperAnalysisExecutor.DOCKER_INPUT_PATH; @@ -125,10 +122,18 @@ public void run() throws ToolException, IOException { inputBindings.add(new AbstractMap.SimpleEntry<>(rScriptPath, DOCKER_INPUT_PATH)); AbstractMap.SimpleEntry outputBinding = new AbstractMap.SimpleEntry<>(getOutDir() .toAbsolutePath().toString(), DOCKER_OUTPUT_PATH); + + // Get genome version + String genomeVersion = "hg38"; + if (StringUtils.isNotEmpty(getAssembly()) && getAssembly().toUpperCase(Locale.ROOT).equals("GRCH37")) { + genomeVersion = "hg19"; + } + String scriptParams = "R CMD Rscript --vanilla " + DOCKER_INPUT_PATH + "/circos.R" + (plotCopynumber ? "" : " --no_copynumber") + (plotIndels ? "" : " --no_indels") + (plotRearrangements ? "" : " --no_rearrangements") + + " --genome_version " + genomeVersion + " --out_path " + DOCKER_OUTPUT_PATH + " " + DOCKER_OUTPUT_PATH + "/" + snvsFile.getName() + " " + DOCKER_OUTPUT_PATH + "/" + indelsFile.getName() diff --git a/opencga-core/src/main/java/org/opencb/opencga/core/tools/variant/CircosAnalysisExecutor.java b/opencga-core/src/main/java/org/opencb/opencga/core/tools/variant/CircosAnalysisExecutor.java index 89f1b7cc569..c23dce7931a 100644 --- a/opencga-core/src/main/java/org/opencb/opencga/core/tools/variant/CircosAnalysisExecutor.java +++ b/opencga-core/src/main/java/org/opencb/opencga/core/tools/variant/CircosAnalysisExecutor.java @@ -22,6 +22,7 @@ public abstract class CircosAnalysisExecutor extends OpenCgaToolExecutor { private String study; + private String assembly; private CircosAnalysisParams circosParams; public CircosAnalysisExecutor() { @@ -41,6 +42,15 @@ public CircosAnalysisExecutor setStudy(String study) { return this; } + public String getAssembly() { + return assembly; + } + + public CircosAnalysisExecutor setAssembly(String assembly) { + this.assembly = assembly; + return this; + } + public CircosAnalysisParams getCircosParams() { return circosParams; } diff --git a/opencga-core/src/main/java/org/opencb/opencga/core/tools/variant/GenomePlotAnalysisExecutor.java b/opencga-core/src/main/java/org/opencb/opencga/core/tools/variant/GenomePlotAnalysisExecutor.java index 2205143c670..a7d6b7a7ca8 100644 --- a/opencga-core/src/main/java/org/opencb/opencga/core/tools/variant/GenomePlotAnalysisExecutor.java +++ b/opencga-core/src/main/java/org/opencb/opencga/core/tools/variant/GenomePlotAnalysisExecutor.java @@ -23,13 +23,15 @@ public abstract class GenomePlotAnalysisExecutor extends OpenCgaToolExecutor { private String study; + private String assembly; private File configFile; public GenomePlotAnalysisExecutor() { } - public GenomePlotAnalysisExecutor(String study, File configFile) { + public GenomePlotAnalysisExecutor(String study, String assembly, File configFile) { this.study = study; + this.assembly = assembly; this.configFile = configFile; } @@ -37,6 +39,7 @@ public GenomePlotAnalysisExecutor(String study, File configFile) { public String toString() { final StringBuilder sb = new StringBuilder("GenomePlotAnalysisExecutor{"); sb.append("study='").append(study).append('\''); + sb.append("assembly='").append(assembly).append('\''); sb.append(", configFile=").append(configFile); sb.append('}'); return sb.toString(); @@ -51,6 +54,15 @@ public GenomePlotAnalysisExecutor setStudy(String study) { return this; } + public String getAssembly() { + return assembly; + } + + public GenomePlotAnalysisExecutor setAssembly(String assembly) { + this.assembly = assembly; + return this; + } + public File getConfigFile() { return configFile; } diff --git a/opencga-server/src/main/java/org/opencb/opencga/server/rest/analysis/VariantWebService.java b/opencga-server/src/main/java/org/opencb/opencga/server/rest/analysis/VariantWebService.java index 6ac26bbb92e..29bae7fe514 100644 --- a/opencga-server/src/main/java/org/opencb/opencga/server/rest/analysis/VariantWebService.java +++ b/opencga-server/src/main/java/org/opencb/opencga/server/rest/analysis/VariantWebService.java @@ -30,6 +30,7 @@ import org.opencb.commons.annotations.DataField; import org.opencb.commons.datastore.core.*; import org.opencb.opencga.analysis.AnalysisUtils; +import org.opencb.opencga.analysis.ResourceUtils; import org.opencb.opencga.analysis.family.qc.FamilyQcAnalysis; import org.opencb.opencga.analysis.individual.qc.IndividualQcAnalysis; import org.opencb.opencga.analysis.individual.qc.IndividualQcUtils; @@ -1333,6 +1334,7 @@ public Response circos( // Create and set up Circos executor CircosLocalAnalysisExecutor executor = new CircosLocalAnalysisExecutor(study, params, variantManager); + executor.setAssembly(ResourceUtils.getAssembly(catalogManager, study, token)); ObjectMap executorParams = new ObjectMap(); executorParams.put("opencgaHome", opencgaHome); @@ -1361,13 +1363,13 @@ public Response circos( } else { return createErrorResponse(new Exception("Error plotting Circos graph")); } - } catch (ToolException | IOException e) { + } catch (ToolException | IOException | CatalogException e) { return createErrorResponse(e); } finally { if (outDir != null) { // Delete temporal directory try { - if (outDir.exists() && !params.getTitle().startsWith("no.delete.")) { + if (outDir.exists()) { FileUtils.deleteDirectory(outDir); } } catch (IOException e) { From 3d309d4c3e27bd5ee545ad614b5681f0b870621b Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Tue, 21 Nov 2023 15:54:49 +0100 Subject: [PATCH 16/25] Prepare Port Patch 1.6.6 -> 1.10.1 #TASK-5279 --- opencga-analysis/pom.xml | 2 +- opencga-app/pom.xml | 2 +- opencga-catalog/pom.xml | 2 +- opencga-client/pom.xml | 2 +- opencga-clinical/pom.xml | 2 +- opencga-core/pom.xml | 2 +- opencga-master/pom.xml | 2 +- opencga-server/pom.xml | 2 +- opencga-storage/opencga-storage-app/pom.xml | 2 +- opencga-storage/opencga-storage-benchmark/pom.xml | 2 +- opencga-storage/opencga-storage-core/pom.xml | 2 +- .../opencga-storage-hadoop/opencga-storage-hadoop-core/pom.xml | 2 +- .../opencga-storage-hadoop-deps-emr6.1/pom.xml | 2 +- .../opencga-storage-hadoop-deps-hdp2.6/pom.xml | 2 +- .../opencga-storage-hadoop-deps-hdp3.1/pom.xml | 2 +- .../opencga-storage-hadoop/opencga-storage-hadoop-deps/pom.xml | 2 +- opencga-storage/opencga-storage-hadoop/pom.xml | 2 +- opencga-storage/opencga-storage-server/pom.xml | 2 +- opencga-storage/pom.xml | 2 +- opencga-test/pom.xml | 2 +- pom.xml | 2 +- 21 files changed, 21 insertions(+), 21 deletions(-) diff --git a/opencga-analysis/pom.xml b/opencga-analysis/pom.xml index d0c275a1018..881cd411faa 100644 --- a/opencga-analysis/pom.xml +++ b/opencga-analysis/pom.xml @@ -22,7 +22,7 @@ org.opencb.opencga opencga - 2.8.5 + 2.12.1-SNAPSHOT ../pom.xml diff --git a/opencga-app/pom.xml b/opencga-app/pom.xml index 25666510d61..e9f0e6bb071 100644 --- a/opencga-app/pom.xml +++ b/opencga-app/pom.xml @@ -22,7 +22,7 @@ org.opencb.opencga opencga - 2.8.5 + 2.12.1-SNAPSHOT ../pom.xml diff --git a/opencga-catalog/pom.xml b/opencga-catalog/pom.xml index 38fc83e954b..64697f47df3 100644 --- a/opencga-catalog/pom.xml +++ b/opencga-catalog/pom.xml @@ -23,7 +23,7 @@ org.opencb.opencga opencga - 2.8.5 + 2.12.1-SNAPSHOT ../pom.xml diff --git a/opencga-client/pom.xml b/opencga-client/pom.xml index 433bb6fd1b2..8084e557ad3 100644 --- a/opencga-client/pom.xml +++ b/opencga-client/pom.xml @@ -22,7 +22,7 @@ org.opencb.opencga opencga - 2.8.5 + 2.12.1-SNAPSHOT ../pom.xml diff --git a/opencga-clinical/pom.xml b/opencga-clinical/pom.xml index 8036793b3ed..1dfa023780f 100644 --- a/opencga-clinical/pom.xml +++ b/opencga-clinical/pom.xml @@ -5,7 +5,7 @@ org.opencb.opencga opencga - 2.8.5 + 2.12.1-SNAPSHOT ../pom.xml 4.0.0 diff --git a/opencga-core/pom.xml b/opencga-core/pom.xml index 33315ba11c1..4f882040e5a 100644 --- a/opencga-core/pom.xml +++ b/opencga-core/pom.xml @@ -22,7 +22,7 @@ org.opencb.opencga opencga - 2.8.5 + 2.12.1-SNAPSHOT ../pom.xml diff --git a/opencga-master/pom.xml b/opencga-master/pom.xml index b3be1aea114..cf2c9e0013b 100644 --- a/opencga-master/pom.xml +++ b/opencga-master/pom.xml @@ -22,7 +22,7 @@ opencga org.opencb.opencga - 2.8.5 + 2.12.1-SNAPSHOT ../pom.xml diff --git a/opencga-server/pom.xml b/opencga-server/pom.xml index c186a98f496..193843b8d0e 100644 --- a/opencga-server/pom.xml +++ b/opencga-server/pom.xml @@ -22,7 +22,7 @@ org.opencb.opencga opencga - 2.8.5 + 2.12.1-SNAPSHOT ../pom.xml diff --git a/opencga-storage/opencga-storage-app/pom.xml b/opencga-storage/opencga-storage-app/pom.xml index be44ddec7cf..2a1b27e6e81 100644 --- a/opencga-storage/opencga-storage-app/pom.xml +++ b/opencga-storage/opencga-storage-app/pom.xml @@ -22,7 +22,7 @@ org.opencb.opencga opencga-storage - 2.8.5 + 2.12.1-SNAPSHOT ../pom.xml diff --git a/opencga-storage/opencga-storage-benchmark/pom.xml b/opencga-storage/opencga-storage-benchmark/pom.xml index 0b332bdb89a..59af932fbce 100644 --- a/opencga-storage/opencga-storage-benchmark/pom.xml +++ b/opencga-storage/opencga-storage-benchmark/pom.xml @@ -22,7 +22,7 @@ opencga-storage org.opencb.opencga - 2.8.5 + 2.12.1-SNAPSHOT ../pom.xml diff --git a/opencga-storage/opencga-storage-core/pom.xml b/opencga-storage/opencga-storage-core/pom.xml index cc4f4fa7496..e9032ab9051 100644 --- a/opencga-storage/opencga-storage-core/pom.xml +++ b/opencga-storage/opencga-storage-core/pom.xml @@ -25,7 +25,7 @@ org.opencb.opencga opencga-storage - 2.8.5 + 2.12.1-SNAPSHOT ../pom.xml diff --git a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/pom.xml b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/pom.xml index c0f70ba8746..fa7a2067bc7 100644 --- a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/pom.xml +++ b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/pom.xml @@ -23,7 +23,7 @@ org.opencb.opencga opencga-storage-hadoop - 2.8.5 + 2.12.1-SNAPSHOT ../pom.xml diff --git a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/opencga-storage-hadoop-deps-emr6.1/pom.xml b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/opencga-storage-hadoop-deps-emr6.1/pom.xml index e5f67d7a6ca..3166bf65687 100644 --- a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/opencga-storage-hadoop-deps-emr6.1/pom.xml +++ b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/opencga-storage-hadoop-deps-emr6.1/pom.xml @@ -22,7 +22,7 @@ org.opencb.opencga opencga-storage-hadoop-deps - 2.8.5 + 2.12.1-SNAPSHOT ../pom.xml diff --git a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/opencga-storage-hadoop-deps-hdp2.6/pom.xml b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/opencga-storage-hadoop-deps-hdp2.6/pom.xml index b6c1bd893fb..617ef5f79a5 100644 --- a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/opencga-storage-hadoop-deps-hdp2.6/pom.xml +++ b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/opencga-storage-hadoop-deps-hdp2.6/pom.xml @@ -22,7 +22,7 @@ org.opencb.opencga opencga-storage-hadoop-deps - 2.8.5 + 2.12.1-SNAPSHOT ../pom.xml diff --git a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/opencga-storage-hadoop-deps-hdp3.1/pom.xml b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/opencga-storage-hadoop-deps-hdp3.1/pom.xml index 270a8977b7d..d19c4962810 100644 --- a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/opencga-storage-hadoop-deps-hdp3.1/pom.xml +++ b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/opencga-storage-hadoop-deps-hdp3.1/pom.xml @@ -22,7 +22,7 @@ org.opencb.opencga opencga-storage-hadoop-deps - 2.8.5 + 2.12.1-SNAPSHOT ../pom.xml diff --git a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/pom.xml b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/pom.xml index a2ea99fc31e..a0fb9edd278 100644 --- a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/pom.xml +++ b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/pom.xml @@ -50,7 +50,7 @@ org.opencb.opencga opencga-storage-hadoop - 2.8.5 + 2.12.1-SNAPSHOT ../pom.xml diff --git a/opencga-storage/opencga-storage-hadoop/pom.xml b/opencga-storage/opencga-storage-hadoop/pom.xml index 4c0e2ef0984..e0d4f2f7293 100644 --- a/opencga-storage/opencga-storage-hadoop/pom.xml +++ b/opencga-storage/opencga-storage-hadoop/pom.xml @@ -28,7 +28,7 @@ org.opencb.opencga opencga-storage - 2.8.5 + 2.12.1-SNAPSHOT ../pom.xml diff --git a/opencga-storage/opencga-storage-server/pom.xml b/opencga-storage/opencga-storage-server/pom.xml index fc833ae2a71..007994965fe 100644 --- a/opencga-storage/opencga-storage-server/pom.xml +++ b/opencga-storage/opencga-storage-server/pom.xml @@ -22,7 +22,7 @@ org.opencb.opencga opencga-storage - 2.8.5 + 2.12.1-SNAPSHOT ../pom.xml diff --git a/opencga-storage/pom.xml b/opencga-storage/pom.xml index 3d38521c1a8..06b35df3fd0 100644 --- a/opencga-storage/pom.xml +++ b/opencga-storage/pom.xml @@ -22,7 +22,7 @@ org.opencb.opencga opencga - 2.8.5 + 2.12.1-SNAPSHOT ../pom.xml diff --git a/opencga-test/pom.xml b/opencga-test/pom.xml index 013e3283386..56284b3469c 100644 --- a/opencga-test/pom.xml +++ b/opencga-test/pom.xml @@ -24,7 +24,7 @@ org.opencb.opencga opencga - 2.8.5 + 2.12.1-SNAPSHOT ../pom.xml diff --git a/pom.xml b/pom.xml index 958197fcda8..5e0a1fd4030 100644 --- a/pom.xml +++ b/pom.xml @@ -22,7 +22,7 @@ org.opencb.opencga opencga - 2.8.5 + 2.12.1-SNAPSHOT pom OpenCGA OenCGA projects implements a big data platform for genomic data analysis From f5dd58f59f1a1cdb4bab8eefe0fce89bd20ae5b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20T=C3=A1rraga=20Gim=C3=A9nez?= Date: Thu, 23 Nov 2023 09:52:30 +0100 Subject: [PATCH 17/25] analysis: add genome version when calling the R script to plot the Circos, #TASK-5113 --- .../analysis/variant/circos/CircosAnalysis.java | 1 - .../circos/CircosLocalAnalysisExecutor.java | 10 ++++++---- .../variant/genomePlot/GenomePlotAnalysis.java | 4 ---- .../GenomePlotLocalAnalysisExecutor.java | 7 +++++-- .../core/tools/variant/CircosAnalysisExecutor.java | 10 ---------- .../tools/variant/GenomePlotAnalysisExecutor.java | 14 +------------- .../server/rest/analysis/VariantWebService.java | 1 - 7 files changed, 12 insertions(+), 35 deletions(-) diff --git a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/circos/CircosAnalysis.java b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/circos/CircosAnalysis.java index 9def10b1bb6..96bf18034c0 100644 --- a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/circos/CircosAnalysis.java +++ b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/circos/CircosAnalysis.java @@ -70,7 +70,6 @@ protected void run() throws ToolException { step(getId(), () -> { getToolExecutor(CircosAnalysisExecutor.class) .setStudy(study) - .setAssembly(assembly) .setCircosParams(circosParams) .execute(); }); diff --git a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/circos/CircosLocalAnalysisExecutor.java b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/circos/CircosLocalAnalysisExecutor.java index d87b46c8858..356d53d1d84 100644 --- a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/circos/CircosLocalAnalysisExecutor.java +++ b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/circos/CircosLocalAnalysisExecutor.java @@ -28,8 +28,10 @@ import org.opencb.commons.datastore.core.Query; import org.opencb.commons.datastore.core.QueryOptions; import org.opencb.commons.utils.DockerUtils; +import org.opencb.opencga.analysis.ResourceUtils; import org.opencb.opencga.analysis.StorageToolExecutor; import org.opencb.opencga.analysis.variant.manager.VariantStorageManager; +import org.opencb.opencga.catalog.exceptions.CatalogException; import org.opencb.opencga.core.common.GitRepositoryState; import org.opencb.opencga.core.common.TimeUtils; import org.opencb.opencga.core.exceptions.ToolException; @@ -93,7 +95,7 @@ public VariantStorageManager getVariantStorageManager() throws ToolExecutorExcep } @Override - public void run() throws ToolException, IOException { + public void run() throws ToolException, IOException, CatalogException { // Create query Query query = new Query(); @@ -128,7 +130,6 @@ public void run() throws ToolException, IOException { throw new ToolException("Error launching threads when executing the Circos analysis", e); } - if (MapUtils.isEmpty(errors)) { // Execute R script // circos.R ./snvs.tsv ./indels.tsv ./cnvs.tsv ./rearrs.tsv SampleId @@ -141,8 +142,9 @@ public void run() throws ToolException, IOException { // Get genome version String genomeVersion = "hg38"; - if (StringUtils.isNotEmpty(getAssembly()) && getAssembly().toUpperCase(Locale.ROOT).equals("GRCH37")) { - genomeVersion = "hg19"; + String assembly = ResourceUtils.getAssembly(storageManager.getCatalogManager(), getStudy(), getToken()); + if (StringUtils.isNotEmpty(assembly) && assembly.toUpperCase(Locale.ROOT).equals("GRCH37")) { + genomeVersion = "hg19"; } String scriptParams = "R CMD Rscript --vanilla " + DOCKER_INPUT_PATH + "/circos.R" diff --git a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/genomePlot/GenomePlotAnalysis.java b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/genomePlot/GenomePlotAnalysis.java index 56c3feb0b57..04a5241623f 100644 --- a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/genomePlot/GenomePlotAnalysis.java +++ b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/genomePlot/GenomePlotAnalysis.java @@ -52,7 +52,6 @@ public class GenomePlotAnalysis extends OpenCgaToolScopeStudy { private GenomePlotAnalysisParams genomePlotParams = new GenomePlotAnalysisParams(); private java.io.File configFile; - private String assembly; @Override protected void check() throws Exception { @@ -73,8 +72,6 @@ protected void check() throws Exception { if (!configFile.exists()) { throw new ToolException("Invalid parameters: genome plot configuration file does not exist (" + configFile + ")"); } - - assembly = ResourceUtils.getAssembly(catalogManager, study, token); } @Override @@ -82,7 +79,6 @@ protected void run() throws ToolException { step(getId(), () -> { getToolExecutor(GenomePlotAnalysisExecutor.class) .setStudy(study) - .setAssembly(assembly) .setConfigFile(configFile) .execute(); diff --git a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/genomePlot/GenomePlotLocalAnalysisExecutor.java b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/genomePlot/GenomePlotLocalAnalysisExecutor.java index bcbc6b77599..a86cc797287 100644 --- a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/genomePlot/GenomePlotLocalAnalysisExecutor.java +++ b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/genomePlot/GenomePlotLocalAnalysisExecutor.java @@ -30,8 +30,10 @@ import org.opencb.commons.datastore.core.Query; import org.opencb.commons.datastore.core.QueryOptions; import org.opencb.commons.utils.DockerUtils; +import org.opencb.opencga.analysis.ResourceUtils; import org.opencb.opencga.analysis.StorageToolExecutor; import org.opencb.opencga.analysis.variant.manager.VariantStorageManager; +import org.opencb.opencga.catalog.exceptions.CatalogException; import org.opencb.opencga.core.common.GitRepositoryState; import org.opencb.opencga.core.common.JacksonUtils; import org.opencb.opencga.core.common.TimeUtils; @@ -76,7 +78,7 @@ public class GenomePlotLocalAnalysisExecutor extends GenomePlotAnalysisExecutor private Logger logger = LoggerFactory.getLogger(this.getClass()); @Override - public void run() throws ToolException, IOException { + public void run() throws ToolException, IOException, CatalogException { plotConfig = JacksonUtils.getDefaultObjectMapper().readerFor(GenomePlotConfig.class).readValue(getConfigFile()); @@ -125,7 +127,8 @@ public void run() throws ToolException, IOException { // Get genome version String genomeVersion = "hg38"; - if (StringUtils.isNotEmpty(getAssembly()) && getAssembly().toUpperCase(Locale.ROOT).equals("GRCH37")) { + String assembly = ResourceUtils.getAssembly(storageManager.getCatalogManager(), getStudy(), getToken()); + if (StringUtils.isNotEmpty(assembly) && assembly.toUpperCase(Locale.ROOT).equals("GRCH37")) { genomeVersion = "hg19"; } diff --git a/opencga-core/src/main/java/org/opencb/opencga/core/tools/variant/CircosAnalysisExecutor.java b/opencga-core/src/main/java/org/opencb/opencga/core/tools/variant/CircosAnalysisExecutor.java index c23dce7931a..89f1b7cc569 100644 --- a/opencga-core/src/main/java/org/opencb/opencga/core/tools/variant/CircosAnalysisExecutor.java +++ b/opencga-core/src/main/java/org/opencb/opencga/core/tools/variant/CircosAnalysisExecutor.java @@ -22,7 +22,6 @@ public abstract class CircosAnalysisExecutor extends OpenCgaToolExecutor { private String study; - private String assembly; private CircosAnalysisParams circosParams; public CircosAnalysisExecutor() { @@ -42,15 +41,6 @@ public CircosAnalysisExecutor setStudy(String study) { return this; } - public String getAssembly() { - return assembly; - } - - public CircosAnalysisExecutor setAssembly(String assembly) { - this.assembly = assembly; - return this; - } - public CircosAnalysisParams getCircosParams() { return circosParams; } diff --git a/opencga-core/src/main/java/org/opencb/opencga/core/tools/variant/GenomePlotAnalysisExecutor.java b/opencga-core/src/main/java/org/opencb/opencga/core/tools/variant/GenomePlotAnalysisExecutor.java index a7d6b7a7ca8..2205143c670 100644 --- a/opencga-core/src/main/java/org/opencb/opencga/core/tools/variant/GenomePlotAnalysisExecutor.java +++ b/opencga-core/src/main/java/org/opencb/opencga/core/tools/variant/GenomePlotAnalysisExecutor.java @@ -23,15 +23,13 @@ public abstract class GenomePlotAnalysisExecutor extends OpenCgaToolExecutor { private String study; - private String assembly; private File configFile; public GenomePlotAnalysisExecutor() { } - public GenomePlotAnalysisExecutor(String study, String assembly, File configFile) { + public GenomePlotAnalysisExecutor(String study, File configFile) { this.study = study; - this.assembly = assembly; this.configFile = configFile; } @@ -39,7 +37,6 @@ public GenomePlotAnalysisExecutor(String study, String assembly, File configFile public String toString() { final StringBuilder sb = new StringBuilder("GenomePlotAnalysisExecutor{"); sb.append("study='").append(study).append('\''); - sb.append("assembly='").append(assembly).append('\''); sb.append(", configFile=").append(configFile); sb.append('}'); return sb.toString(); @@ -54,15 +51,6 @@ public GenomePlotAnalysisExecutor setStudy(String study) { return this; } - public String getAssembly() { - return assembly; - } - - public GenomePlotAnalysisExecutor setAssembly(String assembly) { - this.assembly = assembly; - return this; - } - public File getConfigFile() { return configFile; } diff --git a/opencga-server/src/main/java/org/opencb/opencga/server/rest/analysis/VariantWebService.java b/opencga-server/src/main/java/org/opencb/opencga/server/rest/analysis/VariantWebService.java index 29bae7fe514..0d7a5b0a51f 100644 --- a/opencga-server/src/main/java/org/opencb/opencga/server/rest/analysis/VariantWebService.java +++ b/opencga-server/src/main/java/org/opencb/opencga/server/rest/analysis/VariantWebService.java @@ -1334,7 +1334,6 @@ public Response circos( // Create and set up Circos executor CircosLocalAnalysisExecutor executor = new CircosLocalAnalysisExecutor(study, params, variantManager); - executor.setAssembly(ResourceUtils.getAssembly(catalogManager, study, token)); ObjectMap executorParams = new ObjectMap(); executorParams.put("opencgaHome", opencgaHome); From 1e99097b35e63efc26425c3ce8c55952031ae2a2 Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Thu, 23 Nov 2023 19:34:34 +0100 Subject: [PATCH 18/25] pom: Delete scope test of commons-io #5300 --- opencga-app/pom.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/opencga-app/pom.xml b/opencga-app/pom.xml index 7a3f1198825..7e86ac13394 100644 --- a/opencga-app/pom.xml +++ b/opencga-app/pom.xml @@ -221,7 +221,6 @@ commons-io commons-io - test junit @@ -612,6 +611,9 @@ * + + * + From f79c126b99d5b8b4b5c5b1665b3b67f6ca8091ec Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Mon, 27 Nov 2023 16:57:57 +0100 Subject: [PATCH 19/25] OpencgaCommandExecutor: code refactor #TASK-5160 --- .../app/cli/main/executors/OpencgaCommandExecutor.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/OpencgaCommandExecutor.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/OpencgaCommandExecutor.java index b46e5f387ab..8f935c36ff8 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/OpencgaCommandExecutor.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/OpencgaCommandExecutor.java @@ -225,7 +225,7 @@ public OpencgaCommandExecutor setOpenCGAClient(OpenCGAClient openCGAClient) { } public String getObjectAsJSON(String objectCategory, String objectPath) throws Exception { - String jsonInString = "\n"; + StringBuilder jsonInString = new StringBuilder("\n"); try { ObjectMap queryParams = new ObjectMap(); queryParams.putIfNotEmpty("category", objectCategory); @@ -241,11 +241,11 @@ public String getObjectAsJSON(String objectCategory, String objectPath) throws E //jsonInString += parameter.getName()+":"+parameter.getAllowedValues()+"\n"; if (parameter.getData() != null) { enc = true; - jsonInString += printBody(parameter.getData(), ""); + jsonInString.append(printBody(parameter.getData(), "")); } } if (!enc) { - jsonInString += "No model available"; + jsonInString.append("No model available"); } // } @@ -253,10 +253,10 @@ public String getObjectAsJSON(String objectCategory, String objectPath) throws E } } } catch (Exception e) { - jsonInString = "Data model not found."; + jsonInString = new StringBuilder("Data model not found."); CommandLineUtils.error(e); } - return jsonInString; + return jsonInString.toString(); } private String printBody(List data, String tabs) { From 67fe7a2b1004fd0ab321e997c02c7b033a1edd24 Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Tue, 28 Nov 2023 14:21:23 +0100 Subject: [PATCH 20/25] cli: Autogenerated CLI and clients for release 2.12.1 --- .../opencga/app/cli/main/OpenCgaCompleter.java | 2 +- .../app/cli/main/OpencgaCliOptionsParser.java | 2 +- opencga-client/src/main/R/R/Admin-methods.R | 2 +- opencga-client/src/main/R/R/Alignment-methods.R | 2 +- opencga-client/src/main/R/R/AllGenerics.R | 16 ++++++++-------- opencga-client/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 | 2 +- opencga-client/src/main/R/R/Individual-methods.R | 4 ++-- opencga-client/src/main/R/R/Job-methods.R | 4 ++-- opencga-client/src/main/R/R/Meta-methods.R | 2 +- opencga-client/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 | 2 +- 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 | 2 +- opencga-client/src/main/R/R/Variant-methods.R | 2 +- .../opencga/client/rest/clients/AdminClient.java | 2 +- .../client/rest/clients/AlignmentClient.java | 2 +- .../rest/clients/ClinicalAnalysisClient.java | 2 +- .../client/rest/clients/CohortClient.java | 2 +- .../client/rest/clients/DiseasePanelClient.java | 2 +- .../client/rest/clients/FamilyClient.java | 2 +- .../opencga/client/rest/clients/FileClient.java | 2 +- .../opencga/client/rest/clients/GA4GHClient.java | 2 +- .../client/rest/clients/IndividualClient.java | 2 +- .../opencga/client/rest/clients/JobClient.java | 2 +- .../opencga/client/rest/clients/MetaClient.java | 2 +- .../client/rest/clients/ProjectClient.java | 2 +- .../client/rest/clients/SampleClient.java | 2 +- .../opencga/client/rest/clients/StudyClient.java | 2 +- .../opencga/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 +- opencga-client/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 +- opencga-client/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 +- .../pyopencga/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 +- .../python/pyopencga/rest_clients/file_client.py | 2 +- .../pyopencga/rest_clients/ga4gh_client.py | 2 +- .../pyopencga/rest_clients/individual_client.py | 2 +- .../python/pyopencga/rest_clients/job_client.py | 2 +- .../python/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 +- .../python/pyopencga/rest_clients/user_client.py | 2 +- .../pyopencga/rest_clients/variant_client.py | 2 +- .../rest_clients/variant_operation_client.py | 2 +- 71 files changed, 86 insertions(+), 86 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 b80af90ba5e..4044ac48785 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-11-21 OpenCB +* Copyright 2015-2023-11-28 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 a02dfa83516..cd4539d7081 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-11-21 OpenCB +* Copyright 2015-2023-11-28 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-client/src/main/R/R/Admin-methods.R b/opencga-client/src/main/R/R/Admin-methods.R index ae477210b1e..7edd463fead 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-11-21 +# Autogenerated on: 2023-11-28 # # 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 8560a244847..8135945335d 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-11-21 +# Autogenerated on: 2023-11-28 # # 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 b0068c9950b..80478a6a723 100644 --- a/opencga-client/src/main/R/R/AllGenerics.R +++ b/opencga-client/src/main/R/R/AllGenerics.R @@ -10,37 +10,37 @@ setGeneric("projectClient", function(OpencgaR, projects, project, endpointName, # ############################################################################## ## StudyClient -setGeneric("studyClient", function(OpencgaR, templateId, members, studies, variableSet, study, group, endpointName, params=NULL, ...) +setGeneric("studyClient", function(OpencgaR, members, variableSet, group, studies, templateId, study, endpointName, params=NULL, ...) standardGeneric("studyClient")) # ############################################################################## ## FileClient -setGeneric("fileClient", function(OpencgaR, folder, members, file, annotationSet, files, endpointName, params=NULL, ...) +setGeneric("fileClient", function(OpencgaR, annotationSet, members, folder, files, file, endpointName, params=NULL, ...) standardGeneric("fileClient")) # ############################################################################## ## JobClient -setGeneric("jobClient", function(OpencgaR, jobs, members, job, endpointName, params=NULL, ...) +setGeneric("jobClient", function(OpencgaR, members, job, jobs, endpointName, params=NULL, ...) standardGeneric("jobClient")) # ############################################################################## ## SampleClient -setGeneric("sampleClient", function(OpencgaR, annotationSet, members, samples, sample, endpointName, params=NULL, ...) +setGeneric("sampleClient", function(OpencgaR, annotationSet, sample, members, samples, endpointName, params=NULL, ...) standardGeneric("sampleClient")) # ############################################################################## ## IndividualClient -setGeneric("individualClient", function(OpencgaR, individual, members, individuals, annotationSet, endpointName, params=NULL, ...) +setGeneric("individualClient", function(OpencgaR, annotationSet, individual, members, individuals, endpointName, params=NULL, ...) standardGeneric("individualClient")) # ############################################################################## ## FamilyClient -setGeneric("familyClient", function(OpencgaR, family, members, families, annotationSet, endpointName, params=NULL, ...) +setGeneric("familyClient", function(OpencgaR, annotationSet, members, families, family, endpointName, params=NULL, ...) standardGeneric("familyClient")) # ############################################################################## ## CohortClient -setGeneric("cohortClient", function(OpencgaR, cohorts, members, cohort, annotationSet, endpointName, params=NULL, ...) +setGeneric("cohortClient", function(OpencgaR, annotationSet, cohort, members, cohorts, endpointName, params=NULL, ...) standardGeneric("cohortClient")) # ############################################################################## @@ -60,7 +60,7 @@ setGeneric("variantClient", function(OpencgaR, endpointName, params=NULL, ...) # ############################################################################## ## ClinicalClient -setGeneric("clinicalClient", function(OpencgaR, clinicalAnalysis, clinicalAnalyses, members, interpretation, interpretations, endpointName, params=NULL, ...) +setGeneric("clinicalClient", function(OpencgaR, interpretations, members, interpretation, clinicalAnalysis, clinicalAnalyses, endpointName, params=NULL, ...) standardGeneric("clinicalClient")) # ############################################################################## diff --git a/opencga-client/src/main/R/R/Clinical-methods.R b/opencga-client/src/main/R/R/Clinical-methods.R index fab63cdbd0a..497a2a4e445 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-11-21 +# Autogenerated on: 2023-11-28 # # 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, clinicalAnalysis, clinicalAnalyses, members, interpretation, interpretations, endpointName, params=NULL, ...) { +setMethod("clinicalClient", "OpencgaR", function(OpencgaR, interpretations, members, interpretation, clinicalAnalysis, clinicalAnalyses, 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 81c5bfaf062..6741defa9a8 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-11-21 +# Autogenerated on: 2023-11-28 # # 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, cohorts, members, cohort, annotationSet, endpointName, params=NULL, ...) { +setMethod("cohortClient", "OpencgaR", function(OpencgaR, annotationSet, cohort, members, 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 82c680e4aa1..0bc8e789cae 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-11-21 +# Autogenerated on: 2023-11-28 # # 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, family, members, families, annotationSet, endpointName, params=NULL, ...) { +setMethod("familyClient", "OpencgaR", function(OpencgaR, annotationSet, members, families, family, 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 224889cbec9..d8b546b1355 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-11-21 +# Autogenerated on: 2023-11-28 # # 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, folder, members, file, annotationSet, files, endpointName, params=NULL, ...) { +setMethod("fileClient", "OpencgaR", function(OpencgaR, annotationSet, members, folder, files, file, 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 26788aad18d..9519d1e4e0d 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-11-21 +# Autogenerated on: 2023-11-28 # # 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/Individual-methods.R b/opencga-client/src/main/R/R/Individual-methods.R index c2b5f47ee01..46cca7764b8 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-11-21 +# Autogenerated on: 2023-11-28 # # 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("individualClient", "OpencgaR", function(OpencgaR, individual, members, individuals, annotationSet, endpointName, params=NULL, ...) { +setMethod("individualClient", "OpencgaR", function(OpencgaR, annotationSet, individual, members, individuals, endpointName, params=NULL, ...) { switch(endpointName, #' @section Endpoint /{apiVersion}/individuals/acl/{members}/update: diff --git a/opencga-client/src/main/R/R/Job-methods.R b/opencga-client/src/main/R/R/Job-methods.R index ed99e482cc8..7f0068090ec 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-11-21 +# Autogenerated on: 2023-11-28 # # 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, jobs, members, job, endpointName, params=NULL, ...) { +setMethod("jobClient", "OpencgaR", function(OpencgaR, members, job, 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 dd5036d5550..a44217acaf5 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-11-21 +# Autogenerated on: 2023-11-28 # # 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 dd9eb327ea9..28b608bb78a 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-11-21 +# Autogenerated on: 2023-11-28 # # 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 541d68f22e9..5e341b9d767 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-11-21 +# Autogenerated on: 2023-11-28 # # 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 14d48a37e54..1509cf6470e 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-11-21 +# Autogenerated on: 2023-11-28 # # 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/Sample-methods.R b/opencga-client/src/main/R/R/Sample-methods.R index 43d03aec39d..2f1eb1494c3 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-11-21 +# Autogenerated on: 2023-11-28 # # 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, annotationSet, members, samples, sample, endpointName, params=NULL, ...) { +setMethod("sampleClient", "OpencgaR", function(OpencgaR, annotationSet, sample, members, samples, 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 5b77ac8bf5c..1121835fa7d 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-11-21 +# Autogenerated on: 2023-11-28 # # 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, templateId, members, studies, variableSet, study, group, endpointName, params=NULL, ...) { +setMethod("studyClient", "OpencgaR", function(OpencgaR, members, variableSet, group, studies, templateId, study, 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 0ded200ca86..43a27f93168 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-11-21 +# Autogenerated on: 2023-11-28 # # 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/Variant-methods.R b/opencga-client/src/main/R/R/Variant-methods.R index 6d2f29fe872..05d2a81c35f 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-11-21 +# Autogenerated on: 2023-11-28 # # 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 ea9053acf3e..f91feeafed7 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-11-21 +* Autogenerated on: 2023-11-28 * * 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 9c00f1476bc..292d2a1d7a7 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-11-21 +* Autogenerated on: 2023-11-28 * * 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 97d4dc4846c..bee2385969b 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-11-21 +* Autogenerated on: 2023-11-28 * * 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 8991b50f7b8..ee62858466e 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-11-21 +* Autogenerated on: 2023-11-28 * * 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 fc3bce5fd21..57f3e8020fc 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-11-21 +* Autogenerated on: 2023-11-28 * * 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 f0b96f0ad27..8bf553d4885 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-11-21 +* Autogenerated on: 2023-11-28 * * 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 26420fe0854..483ec904b76 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-11-21 +* Autogenerated on: 2023-11-28 * * 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 23247404844..2df19bf3ac2 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-11-21 +* Autogenerated on: 2023-11-28 * * 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 563387f83f9..4c5291d9592 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-11-21 +* Autogenerated on: 2023-11-28 * * 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 44c77b3ce80..1591b8722ce 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-11-21 +* Autogenerated on: 2023-11-28 * * 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 ef9f54e6ebe..8da55a76d03 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-11-21 +* Autogenerated on: 2023-11-28 * * 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 aae1fef2033..2a5f21b3ff5 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-11-21 +* Autogenerated on: 2023-11-28 * * 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 12346da3ee2..34dd6c9076a 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-11-21 +* Autogenerated on: 2023-11-28 * * 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 59756fd7d52..5e16287a2b2 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-11-21 +* Autogenerated on: 2023-11-28 * * 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 c90bfd45d6b..0bfcaa59932 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-11-21 +* Autogenerated on: 2023-11-28 * * 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 ca8635f527a..6ee33c331df 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-11-21 +* Autogenerated on: 2023-11-28 * * 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 0010eb4f421..2637e2ebeb3 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-11-21 +* Autogenerated on: 2023-11-28 * * 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 ae4ecad6de0..ef4a5ef42b9 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-11-21 + * Autogenerated on: 2023-11-28 * * 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 74e50dd5dfc..55672582aa7 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-11-21 + * Autogenerated on: 2023-11-28 * * 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 ed55809ab52..9359eff7999 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-11-21 + * Autogenerated on: 2023-11-28 * * 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 60b4352621f..1aba25258cd 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-11-21 + * Autogenerated on: 2023-11-28 * * 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 f6bbac654c9..a72675f7fcf 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-11-21 + * Autogenerated on: 2023-11-28 * * 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 0269e3aade4..85170821c51 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-11-21 + * Autogenerated on: 2023-11-28 * * 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 c1bc508be19..a83abdb15f6 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-11-21 + * Autogenerated on: 2023-11-28 * * 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 24a2b3549b7..1b018b3cad5 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-11-21 + * Autogenerated on: 2023-11-28 * * 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 e2379cf23c1..ac584fa65a2 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-11-21 + * Autogenerated on: 2023-11-28 * * 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 6ad0b13df0a..02b18815c69 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-11-21 + * Autogenerated on: 2023-11-28 * * 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 36ae34309b9..7553b05f43d 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-11-21 + * Autogenerated on: 2023-11-28 * * 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 b885aa0f47d..fd0de7a20c6 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-11-21 + * Autogenerated on: 2023-11-28 * * 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 df98105cf52..314c05f5726 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-11-21 + * Autogenerated on: 2023-11-28 * * 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 e49505ffb54..39d27e28279 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-11-21 + * Autogenerated on: 2023-11-28 * * 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 ce5c939d795..6768443952a 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-11-21 + * Autogenerated on: 2023-11-28 * * 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 c20587da1a2..07963160849 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-11-21 + * Autogenerated on: 2023-11-28 * * 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 1258093c63a..89fd13f071a 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-11-21 + * Autogenerated on: 2023-11-28 * * 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 4a5396ee94d..a9fab8bb5ca 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-11-21 + Autogenerated on: 2023-11-28 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 ddd22c8b5f6..262aa8310fa 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-11-21 + Autogenerated on: 2023-11-28 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 349eadc2182..eb5c777e105 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-11-21 + Autogenerated on: 2023-11-28 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 1de3e0ed592..e8dbcb72224 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-11-21 + Autogenerated on: 2023-11-28 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 60340ec0b23..bd716eec69d 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-11-21 + Autogenerated on: 2023-11-28 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 dc4009aec05..49dc4fda423 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-11-21 + Autogenerated on: 2023-11-28 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 3f5c805c15d..d8d5e48f981 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-11-21 + Autogenerated on: 2023-11-28 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 5abb3fe6d58..4f12022699d 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-11-21 + Autogenerated on: 2023-11-28 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 2b1fa810d9a..f93b1b7bc45 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-11-21 + Autogenerated on: 2023-11-28 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 ae188fd17cc..ac1beb600a7 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-11-21 + Autogenerated on: 2023-11-28 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 6b5eaca3dc0..69a0504d168 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-11-21 + Autogenerated on: 2023-11-28 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 7a80400e608..6061ee85a37 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-11-21 + Autogenerated on: 2023-11-28 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 6308e43511f..5158e8e6942 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-11-21 + Autogenerated on: 2023-11-28 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 5eba973d147..ed4f05a5533 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-11-21 + Autogenerated on: 2023-11-28 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 60d21d9ce9b..01a30231982 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-11-21 + Autogenerated on: 2023-11-28 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 08c8e1b19fb..b8bcda16371 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-11-21 + Autogenerated on: 2023-11-28 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 c07754aa34d..0f374b14d97 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-11-21 + Autogenerated on: 2023-11-28 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 e1ca92f2670ab71cfb6a70fa1368e1a6ba8b0bce Mon Sep 17 00:00:00 2001 From: pfurio Date: Tue, 28 Nov 2023 17:00:40 +0100 Subject: [PATCH 21/25] catalog: add new fields to Clinical report, #TASK-5198 --- ...ationSetsInClinicalAnalysisMigration.java} | 4 +- ...pleteClinicalReportDataModelMigration.java | 32 ++ .../db/api/ClinicalAnalysisDBAdaptor.java | 58 +++- .../ClinicalAnalysisMongoDBAdaptor.java | 42 ++- .../db/mongodb/StudyMongoDBAdaptor.java | 7 + .../converters/ClinicalAnalysisConverter.java | 47 ++- .../managers/ClinicalAnalysisManager.java | 306 +++++++++++++++--- .../opencga/catalog/managers/FileUtils.java | 3 + .../managers/ClinicalAnalysisManagerTest.java | 201 +++++++++++- .../opencga/core/api/FieldConstants.java | 7 +- .../models/clinical/ClinicalAnalysis.java | 58 +++- .../ClinicalAnalysisCreateParams.java | 66 +++- ...icalAnalysisQualityControlUpdateParam.java | 19 ++ .../ClinicalAnalysisUpdateParams.java | 48 ++- .../core/models/clinical/ClinicalReport.java | 52 ++- .../core/models/clinical/ClinicalRequest.java | 80 +++++ .../models/clinical/ClinicalResponsible.java | 115 +++++++ .../opencb/opencga/core/models/file/File.java | 1 + .../rest/analysis/ClinicalWebService.java | 6 + 19 files changed, 1032 insertions(+), 120 deletions(-) rename opencga-app/src/main/java/org/opencb/opencga/app/migrations/v2_12_0/catalog/{AddAnnotationSetsInClinicalAnalysis.java => AddAnnotationSetsInClinicalAnalysisMigration.java} (95%) create mode 100644 opencga-app/src/main/java/org/opencb/opencga/app/migrations/v2_12_0/catalog/CompleteClinicalReportDataModelMigration.java create mode 100644 opencga-core/src/main/java/org/opencb/opencga/core/models/clinical/ClinicalRequest.java create mode 100644 opencga-core/src/main/java/org/opencb/opencga/core/models/clinical/ClinicalResponsible.java diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/migrations/v2_12_0/catalog/AddAnnotationSetsInClinicalAnalysis.java b/opencga-app/src/main/java/org/opencb/opencga/app/migrations/v2_12_0/catalog/AddAnnotationSetsInClinicalAnalysisMigration.java similarity index 95% rename from opencga-app/src/main/java/org/opencb/opencga/app/migrations/v2_12_0/catalog/AddAnnotationSetsInClinicalAnalysis.java rename to opencga-app/src/main/java/org/opencb/opencga/app/migrations/v2_12_0/catalog/AddAnnotationSetsInClinicalAnalysisMigration.java index 018b0cc28e7..0ab4fceb81a 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/migrations/v2_12_0/catalog/AddAnnotationSetsInClinicalAnalysis.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/migrations/v2_12_0/catalog/AddAnnotationSetsInClinicalAnalysisMigration.java @@ -15,13 +15,13 @@ import java.util.Collections; @Migration(id = "add_annotation_sets_to_clinical_analysis" , - description = "Add private annotation fields to ClinicalAnalysis documents", + description = "Add private annotation fields to ClinicalAnalysis documents #TASK-5198", version = "2.12.0", domain = Migration.MigrationDomain.CATALOG, language = Migration.MigrationLanguage.JAVA, date = 20231116 ) -public class AddAnnotationSetsInClinicalAnalysis extends MigrationTool { +public class AddAnnotationSetsInClinicalAnalysisMigration extends MigrationTool { @Override protected void run() throws Exception { diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/migrations/v2_12_0/catalog/CompleteClinicalReportDataModelMigration.java b/opencga-app/src/main/java/org/opencb/opencga/app/migrations/v2_12_0/catalog/CompleteClinicalReportDataModelMigration.java new file mode 100644 index 00000000000..b4fa490c90a --- /dev/null +++ b/opencga-app/src/main/java/org/opencb/opencga/app/migrations/v2_12_0/catalog/CompleteClinicalReportDataModelMigration.java @@ -0,0 +1,32 @@ +package org.opencb.opencga.app.migrations.v2_12_0.catalog; + +import com.mongodb.client.model.Filters; +import com.mongodb.client.model.Projections; +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.Arrays; +import java.util.Collections; + +@Migration(id = "complete_clinical_report_data_model" , + description = "Complete Clinical Report data model #TASK-5198", + version = "2.12.0", + domain = Migration.MigrationDomain.CATALOG, + language = Migration.MigrationLanguage.JAVA, + date = 20231128 +) +public class CompleteClinicalReportDataModelMigration extends MigrationTool { + + @Override + protected void run() throws Exception { + migrateCollection( + Arrays.asList(MongoDBAdaptorFactory.CLINICAL_ANALYSIS_COLLECTION, MongoDBAdaptorFactory.DELETED_CLINICAL_ANALYSIS_COLLECTION), + Filters.exists("analyst"), + Projections.include(Collections.singletonList("analyst")), + (document, bulk) -> { + + }); + } + +} diff --git a/opencga-catalog/src/main/java/org/opencb/opencga/catalog/db/api/ClinicalAnalysisDBAdaptor.java b/opencga-catalog/src/main/java/org/opencb/opencga/catalog/db/api/ClinicalAnalysisDBAdaptor.java index ac30c48e9d2..a4b3d8f19b4 100644 --- a/opencga-catalog/src/main/java/org/opencb/opencga/catalog/db/api/ClinicalAnalysisDBAdaptor.java +++ b/opencga-catalog/src/main/java/org/opencb/opencga/catalog/db/api/ClinicalAnalysisDBAdaptor.java @@ -69,10 +69,14 @@ enum QueryParams implements QueryParam { CONSENT("consent", OBJECT, ""), PRIORITY("priority", OBJECT, ""), PRIORITY_ID("priority.id", TEXT, ""), - ANALYST("analyst", TEXT_ARRAY, ""), - ANALYST_ID("analyst.id", TEXT, ""), - ANALYST_ASSIGNED_BY("analyst.assignedBy", TEXT, ""), + ANALYSTS("analysts", TEXT_ARRAY, ""), + ANALYSTS_ID("analysts.id", TEXT, ""), + ANALYSTS_ASSIGNED_BY("analysts.assignedBy", TEXT, ""), REPORT("report", OBJECT, ""), + REPORT_SUPPORTING_EVIDENCES("report.supportingEvidences", TEXT_ARRAY, ""), + REPORT_FILES("report.files", TEXT_ARRAY, ""), + REQUEST("request", OBJECT, ""), + RESPONSIBLE("responsible", OBJECT, ""), FLAGS("flags", OBJECT, ""), FLAGS_ID("flags.id", TEXT, ""), RELEASE("release", INTEGER, ""), @@ -160,6 +164,54 @@ public static QueryParams getParam(String key) { } } + enum ReportQueryParams implements QueryParam { + COMMENTS("comments", OBJECT, ""), + SUPPORTING_EVIDENCES("supportingEvidences", TEXT_ARRAY, ""), + FILES("files", TEXT_ARRAY, ""); + + private static Map map; + + static { + map = new LinkedMap(); + for (ReportQueryParams params : ReportQueryParams.values()) { + map.put(params.key(), params); + } + } + + private final String key; + private Type type; + private String description; + + ReportQueryParams(String key, Type type, String description) { + this.key = key; + this.type = type; + this.description = description; + } + + @Override + public String key() { + return key; + } + + @Override + public Type type() { + return type; + } + + @Override + public String description() { + return description; + } + + public static Map getMap() { + return map; + } + + public static ReportQueryParams getParam(String key) { + return map.get(key); + } + } + default boolean exists(long clinicalAnalysisId) throws CatalogDBException, CatalogParameterException, CatalogAuthorizationException { return count(new Query(QueryParams.UID.key(), clinicalAnalysisId)).getNumMatches() > 0; } diff --git a/opencga-catalog/src/main/java/org/opencb/opencga/catalog/db/mongodb/ClinicalAnalysisMongoDBAdaptor.java b/opencga-catalog/src/main/java/org/opencb/opencga/catalog/db/mongodb/ClinicalAnalysisMongoDBAdaptor.java index 67f9a035aa0..996a7eaac48 100644 --- a/opencga-catalog/src/main/java/org/opencb/opencga/catalog/db/mongodb/ClinicalAnalysisMongoDBAdaptor.java +++ b/opencga-catalog/src/main/java/org/opencb/opencga/catalog/db/mongodb/ClinicalAnalysisMongoDBAdaptor.java @@ -25,6 +25,7 @@ import org.apache.commons.lang3.time.StopWatch; import org.bson.Document; import org.bson.conversions.Bson; +import org.opencb.biodata.models.clinical.ClinicalAnalyst; import org.opencb.biodata.models.clinical.ClinicalAudit; import org.opencb.biodata.models.clinical.ClinicalComment; import org.opencb.commons.datastore.core.*; @@ -155,6 +156,20 @@ static void fixFilesForRemoval(ObjectMap parameters) { parameters.put(FILES.key(), fileParamList); } + static void fixAnalystsForRemoval(ObjectMap parameters) { + if (parameters.get(ANALYSTS.key()) == null) { + return; + } + + List analystParamList = new LinkedList<>(); + for (Object analyst : parameters.getAsList(ANALYSTS.key())) { + if (analyst instanceof ClinicalAnalyst) { + analystParamList.add(new Document("id", ((ClinicalAnalyst) analyst).getId())); + } + } + parameters.put(ANALYSTS.key(), analystParamList); + } + @Override public OpenCGAResult getAnnotationSet(long id, @Nullable String annotationSetName) throws CatalogDBException, CatalogParameterException, CatalogAuthorizationException { @@ -382,8 +397,8 @@ UpdateDocument parseAndValidateUpdateParams(ObjectMap parameters, List actionMap = queryOptions.getMap(Constants.ACTIONS, new HashMap<>()); @@ -420,8 +436,26 @@ UpdateDocument parseAndValidateUpdateParams(ObjectMap parameters, List variableSetList) { + Document document = super.convertToStorageType(clinicalAnalysis, variableSetList); document.put(ClinicalAnalysisDBAdaptor.QueryParams.UID.key(), clinicalAnalysis.getUid()); document.put(ClinicalAnalysisDBAdaptor.QueryParams.STUDY_UID.key(), clinicalAnalysis.getStudyUid()); @@ -56,6 +55,24 @@ public void validateDocumentToUpdate(Document document) { validateProbandToUpdate(document); validatePanelsToUpdate(document); validateFilesToUpdate(document); + validateReportToUpdate(document); + } + + public void validateReportToUpdate(Document document) { + Document report = document.get(ClinicalAnalysisDBAdaptor.QueryParams.REPORT.key(), Document.class); + if (report != null) { + List files = report.getList(ClinicalAnalysisDBAdaptor.ReportQueryParams.SUPPORTING_EVIDENCES.key(), Document.class); + if (CollectionUtils.isNotEmpty(files)) { + List filteredFiles = getReducedFileDocuments(files); + report.put(ClinicalAnalysisDBAdaptor.ReportQueryParams.SUPPORTING_EVIDENCES.key(), filteredFiles); + } + + files = report.getList(ClinicalAnalysisDBAdaptor.ReportQueryParams.FILES.key(), Document.class); + if (CollectionUtils.isNotEmpty(files)) { + List filteredFiles = getReducedFileDocuments(files); + report.put(ClinicalAnalysisDBAdaptor.ReportQueryParams.FILES.key(), filteredFiles); + } + } } public void validateInterpretationToUpdate(Document document) { @@ -141,6 +158,11 @@ public void validatePanelsToUpdate(Document document) { public void validateFilesToUpdate(Document document) { List files = (List) document.get(ClinicalAnalysisDBAdaptor.QueryParams.FILES.key()); + List reducedFiles = getReducedFileDocuments(files); + document.put(ClinicalAnalysisDBAdaptor.QueryParams.FILES.key(), reducedFiles); + } + + private static List getReducedFileDocuments(List files) { if (files != null) { // We make sure we don't store duplicates Map fileMap = new HashMap<>(); @@ -154,12 +176,13 @@ public void validateFilesToUpdate(Document document) { } } - document.put(ClinicalAnalysisDBAdaptor.QueryParams.FILES.key(), - fileMap.entrySet().stream() - .map(entry -> new Document() - .append(FileDBAdaptor.QueryParams.PATH.key(), entry.getValue().getPath()) - .append(FileDBAdaptor.QueryParams.UID.key(), entry.getValue().getUid())) - .collect(Collectors.toList())); + return fileMap.values().stream() + .map(file -> new Document() + .append(FileDBAdaptor.QueryParams.PATH.key(), file.getPath()) + .append(FileDBAdaptor.QueryParams.UID.key(), file.getUid())) + .collect(Collectors.toList()); + } else { + return Collections.emptyList(); } } diff --git a/opencga-catalog/src/main/java/org/opencb/opencga/catalog/managers/ClinicalAnalysisManager.java b/opencga-catalog/src/main/java/org/opencb/opencga/catalog/managers/ClinicalAnalysisManager.java index 63a0ca46dd6..069a8e25d4e 100644 --- a/opencga-catalog/src/main/java/org/opencb/opencga/catalog/managers/ClinicalAnalysisManager.java +++ b/opencga-catalog/src/main/java/org/opencb/opencga/catalog/managers/ClinicalAnalysisManager.java @@ -37,10 +37,7 @@ import org.opencb.opencga.catalog.exceptions.CatalogException; import org.opencb.opencga.catalog.exceptions.CatalogParameterException; import org.opencb.opencga.catalog.models.InternalGetDataResult; -import org.opencb.opencga.catalog.utils.AnnotationUtils; -import org.opencb.opencga.catalog.utils.Constants; -import org.opencb.opencga.catalog.utils.ParamUtils; -import org.opencb.opencga.catalog.utils.UuidUtils; +import org.opencb.opencga.catalog.utils.*; import org.opencb.opencga.core.api.ParamConstants; import org.opencb.opencga.core.common.JacksonUtils; import org.opencb.opencga.core.common.TimeUtils; @@ -268,6 +265,25 @@ public OpenCGAResult create(String studyStr, ClinicalAnalysis ClinicalAnalysisQualityControl::new)); clinicalAnalysis.setPanels(ParamUtils.defaultObject(clinicalAnalysis.getPanels(), Collections.emptyList())); clinicalAnalysis.setAnnotationSets(ParamUtils.defaultObject(clinicalAnalysis.getAnnotationSets(), Collections.emptyList())); + clinicalAnalysis.setResponsible(ParamUtils.defaultObject(clinicalAnalysis.getResponsible(), ClinicalResponsible::new)); + clinicalAnalysis.setRequest(ParamUtils.defaultObject(clinicalAnalysis.getRequest(), ClinicalRequest::new)); + + // ---------- Check and init report fields + validateAndInitReport(study, clinicalAnalysis.getReport(), userId); + + // ---------- Check and init responsible fields + ClinicalResponsible responsible = clinicalAnalysis.getResponsible(); + if (StringUtils.isEmpty(responsible.getId())) { + responsible.setId(userId); + } + fillResponsible(responsible); + + // ---------- Check and init request fields + ClinicalRequest request = clinicalAnalysis.getRequest(); + if (StringUtils.isNotEmpty(request.getId())) { + request.setDate(ParamUtils.checkDateOrGetCurrentDate(request.getDate(), "request.date")); + fillResponsible(request.getResponsible()); + } if (clinicalAnalysis.getQualityControl().getComments() != null) { for (ClinicalComment comment : clinicalAnalysis.getQualityControl().getComments()) { @@ -301,20 +317,29 @@ public OpenCGAResult create(String studyStr, ClinicalAnalysis } // Analyst + List userList; QueryOptions userInclude = new QueryOptions(QueryOptions.INCLUDE, Arrays.asList(UserDBAdaptor.QueryParams.ID.key(), UserDBAdaptor.QueryParams.NAME.key(), UserDBAdaptor.QueryParams.EMAIL.key())); - User user; - if (clinicalAnalysis.getAnalyst() == null || StringUtils.isEmpty(clinicalAnalysis.getAnalyst().getId())) { - user = userDBAdaptor.get(userId, userInclude).first(); + if (clinicalAnalysis.getAnalysts() == null) { + userList = userDBAdaptor.get(userId, userInclude).getResults(); } else { - // Validate user - OpenCGAResult result = userDBAdaptor.get(clinicalAnalysis.getAnalyst().getId(), userInclude); - if (result.getNumResults() == 0) { - throw new CatalogException("User '" + clinicalAnalysis.getAnalyst().getId() + "' not found"); + // Validate users + Set userIds = new HashSet<>(); + for (ClinicalAnalyst analyst : clinicalAnalysis.getAnalysts()) { + userIds.add(analyst.getId()); + } + Query query = new Query(UserDBAdaptor.QueryParams.ID.key(), userIds); + OpenCGAResult result = userDBAdaptor.get(query, userInclude); + if (result.getNumResults() < userIds.size()) { + throw new CatalogException("Some clinical analysts could not be found."); } - user = result.first(); + userList = result.getResults(); } - clinicalAnalysis.setAnalyst(new ClinicalAnalyst(user.getId(), user.getName(), user.getEmail(), userId, TimeUtils.getTime())); + List clinicalAnalystList = new ArrayList<>(userList.size()); + for (User user : userList) { + clinicalAnalystList.add(new ClinicalAnalyst(user.getId(), user.getName(), user.getEmail(), userId, TimeUtils.getTime())); + } + clinicalAnalysis.setAnalysts(clinicalAnalystList); if (TimeUtils.toDate(clinicalAnalysis.getDueDate()) == null) { throw new CatalogException("Unrecognised due date. Accepted format is: yyyyMMddHHmmss"); @@ -511,10 +536,17 @@ public OpenCGAResult create(String studyStr, ClinicalAnalysis } } } + List files = obtainFiles(study, clinicalAnalysis, userId); if (clinicalAnalysis.getFiles() != null && !clinicalAnalysis.getFiles().isEmpty()) { - validateFiles(study, clinicalAnalysis, userId); + Set fileIds = clinicalAnalysis.getFiles().stream().map(File::getId).collect(Collectors.toSet()); + String notFoundFiles = files.stream().map(File::getId).filter(f -> !fileIds.contains(f)).collect(Collectors.joining(", ")); + if (StringUtils.isNotEmpty(notFoundFiles)) { + throw new CatalogException("Files '" + notFoundFiles + "' not found or do not belong to any participant."); + } + List filteredFiles = files.stream().filter(f -> fileIds.contains(f.getId())).collect(Collectors.toList()); + clinicalAnalysis.setFiles(filteredFiles); } else { - obtainFiles(study, clinicalAnalysis, userId); + clinicalAnalysis.setFiles(files); } clinicalAnalysis.setCreationDate(ParamUtils.checkDateOrGetCurrentDate(clinicalAnalysis.getCreationDate(), @@ -593,6 +625,43 @@ public OpenCGAResult create(String studyStr, ClinicalAnalysis } } + private void validateAndInitReport(Study study, ClinicalReport report, String userId) throws CatalogException { + if (report == null) { + return; + } + if (StringUtils.isNotEmpty(report.getTitle()) || StringUtils.isNotEmpty(report.getOverview())) { + report.setDate(ParamUtils.checkDateOrGetCurrentDate(report.getDate(), "report.date")); + } + if (report.getComments() != null) { + for (ClinicalComment comment : report.getComments()) { + comment.setDate(TimeUtils.getTime()); + comment.setAuthor(userId); + } + } + if (CollectionUtils.isNotEmpty(report.getFiles())) { + List files = obtainFiles(study, userId, report.getFiles()); + report.setFiles(files); + } + if (CollectionUtils.isNotEmpty(report.getSupportingEvidences())) { + List files = obtainFiles(study, userId, report.getSupportingEvidences()); + report.setSupportingEvidences(files); + } + } + + private void fillResponsible(ClinicalResponsible responsible) throws CatalogException { + if (responsible == null) { + return; + } + QueryOptions userInclude = new QueryOptions(QueryOptions.INCLUDE, Arrays.asList(UserDBAdaptor.QueryParams.ID.key(), + UserDBAdaptor.QueryParams.NAME.key(), UserDBAdaptor.QueryParams.EMAIL.key())); + OpenCGAResult result = userDBAdaptor.get(responsible.getId(), userInclude); + if (result.getNumResults() == 0) { + throw new CatalogException("Responsible user '" + responsible.getId() + "' not found."); + } + responsible.setName(ParamUtils.defaultString(responsible.getName(), result.first().getName())); + responsible.setEmail(ParamUtils.defaultString(responsible.getEmail(), result.first().getEmail())); + } + private void validateStatusParameter(ClinicalAnalysis clinicalAnalysis, ClinicalAnalysisStudyConfiguration clinicalConfiguration) throws CatalogException { // Status @@ -758,7 +827,7 @@ private void validateDisorder(ClinicalAnalysis clinicalAnalysis) throws CatalogE } } - private void obtainFiles(Study study, ClinicalAnalysis clinicalAnalysis, String userId) throws CatalogException { + private List obtainFiles(Study study, ClinicalAnalysis clinicalAnalysis, String userId) throws CatalogException { Set sampleSet = new HashSet<>(); if (clinicalAnalysis.getFamily() != null && clinicalAnalysis.getFamily().getMembers() != null) { for (Individual member : clinicalAnalysis.getFamily().getMembers()) { @@ -783,8 +852,18 @@ private void obtainFiles(Study study, ClinicalAnalysis clinicalAnalysis, String .append(FileDBAdaptor.QueryParams.SAMPLE_IDS.key(), new ArrayList<>(sampleSet)) .append(FileDBAdaptor.QueryParams.BIOFORMAT.key(), Arrays.asList(File.Bioformat.ALIGNMENT, File.Bioformat.VARIANT)); OpenCGAResult fileResults = fileDBAdaptor.get(study.getUid(), query, FileManager.INCLUDE_FILE_URI_PATH, userId); - clinicalAnalysis.setFiles(fileResults.getResults()); + return fileResults.getResults(); } + return Collections.emptyList(); + } + + private List obtainFiles(Study study, String userId, List files) throws CatalogException { + Query query = new Query(FileDBAdaptor.QueryParams.ID.key(), files.stream().map(File::getId).collect(Collectors.toSet())); + List results = fileDBAdaptor.get(study.getUid(), query, FileManager.INCLUDE_FILE_URI_PATH, userId).getResults(); + if (results.size() < files.size()) { + throw new CatalogException("Some of the files were not found"); + } + return results; } private void validateFiles(Study study, ClinicalAnalysis clinicalAnalysis, String userId) throws CatalogException { @@ -855,6 +934,103 @@ private void validateFiles(Study study, ClinicalAnalysis clinicalAnalysis, Strin // } } +// private void obtainFiles(Study study, ClinicalAnalysis clinicalAnalysis, String userId) throws CatalogException { +// Set sampleSet = new HashSet<>(); +// if (clinicalAnalysis.getFamily() != null && clinicalAnalysis.getFamily().getMembers() != null) { +// for (Individual member : clinicalAnalysis.getFamily().getMembers()) { +// if (member.getSamples() != null) { +// for (Sample sample : member.getSamples()) { +// sampleSet.add(sample.getId()); +// } +// } +// } +// } else if (clinicalAnalysis.getProband() != null && clinicalAnalysis.getProband().getSamples() != null) { +// for (Sample sample : clinicalAnalysis.getProband().getSamples()) { +// sampleSet.add(sample.getId()); +// } +// } +// +// if (clinicalAnalysis.getFiles() != null && !clinicalAnalysis.getFiles().isEmpty()) { +// throw new CatalogException("Cannot obtain map of files if this is already provided"); +// } +// +// if (!sampleSet.isEmpty()) { +// Query query = new Query() +// .append(FileDBAdaptor.QueryParams.SAMPLE_IDS.key(), new ArrayList<>(sampleSet)) +// .append(FileDBAdaptor.QueryParams.BIOFORMAT.key(), Arrays.asList(File.Bioformat.ALIGNMENT, File.Bioformat.VARIANT)); +// OpenCGAResult fileResults = fileDBAdaptor.get(study.getUid(), query, FileManager.INCLUDE_FILE_URI_PATH, userId); +// clinicalAnalysis.setFiles(fileResults.getResults()); +// } +// } + +// private void validateFiles(Study study, ClinicalAnalysis clinicalAnalysis, String userId) throws CatalogException { +// Map sampleMap = new HashMap<>(); +// if (clinicalAnalysis.getFamily() != null && clinicalAnalysis.getFamily().getMembers() != null) { +// for (Individual member : clinicalAnalysis.getFamily().getMembers()) { +// if (member.getSamples() != null) { +// for (Sample sample : member.getSamples()) { +// sampleMap.put(sample.getId(), sample.getUid()); +// } +// } +// } +// } else if (clinicalAnalysis.getProband() != null && clinicalAnalysis.getProband().getSamples() != null) { +// for (Sample sample : clinicalAnalysis.getProband().getSamples()) { +// sampleMap.put(sample.getId(), sample.getUid()); +// } +// } +// +// if (clinicalAnalysis.getFiles() == null || clinicalAnalysis.getFiles().isEmpty()) { +// throw new CatalogException("Found empty map of files"); +// } +// +// // Look for all the samples associated to the files +// Query query = new Query(FileDBAdaptor.QueryParams.ID.key(), +// clinicalAnalysis.getFiles().stream().map(File::getId).collect(Collectors.toList())); +// QueryOptions fileOptions = keepFieldInQueryOptions(FileManager.INCLUDE_FILE_URI_PATH, FileDBAdaptor.QueryParams.SAMPLE_IDS.key()); +// OpenCGAResult fileResults = fileDBAdaptor.get(study.getUid(), query, fileOptions, userId); +// +// if (fileResults.getNumResults() != clinicalAnalysis.getFiles().size()) { +// Set fileIds = clinicalAnalysis.getFiles().stream().map(File::getId).collect(Collectors.toSet()); +// String notFoundFiles = fileResults.getResults().stream().map(File::getId).filter(f -> !fileIds.contains(f)) +// .collect(Collectors.joining(", ")); +// throw new CatalogException("Files '" + notFoundFiles + "' not found"); +// } +// +// // Complete file information +// clinicalAnalysis.setFiles(fileResults.getResults()); +// +// // Validate the file ids passed are related to the samples +// for (File file : clinicalAnalysis.getFiles()) { +// if (CollectionUtils.isNotEmpty(file.getSampleIds())) { +// boolean found = false; +// for (String sampleId : file.getSampleIds()) { +// if (sampleMap.containsKey(sampleId)) { +// found = true; +// break; +// } +// } +// if (!found) { +// throw new CatalogException("Clinical analysis file (" + file.getId() + ") contains sample ids not related to any " +// + "member/proband"); +// } +// } +// } +// +//// for (File caFile : clinicalAnalysis.getFiles()) { +//// List fileIds = caFile.getFiles().stream().map(File::getId).collect(Collectors.toList()); +//// InternalGetDataResult fileResult = catalogManager.getFileManager().internalGet(study.getUid(), fileIds, new Query(), +//// new QueryOptions(), userId, false); +//// // Validate sample id belongs to files +//// for (File file : fileResult.getResults()) { +//// if (!file.getSamples().stream().map(Sample::getUid).collect(Collectors.toSet()) +//// .contains(sampleMap.get(caFile.getSampleId()))) { +//// throw new CatalogException("Associated file '" + file.getPath() + "' seems not to be related to sample '" +//// + caFile.getSampleId() + "'."); +//// } +//// } +//// } +// } + private Family getFullValidatedFamily(Family family, Study study, String sessionId) throws CatalogException { if (family == null) { return null; @@ -1175,16 +1351,30 @@ private OpenCGAResult update(Study study, ClinicalAnalysis cli } catch (IOException e) { throw new CatalogException("Could not clone ClinicalAnalysisUpdateParams object"); } + if (updateParamsClone == null) { + throw new CatalogException("Empty update parameters. Nothing to update."); + } + + validateAndInitReport(study, updateParamsClone.getReport(), userId); + + // ---------- Check and init responsible fields + ClinicalResponsible responsible = updateParamsClone.getResponsible(); + if (responsible != null && StringUtils.isNotEmpty(responsible.getId())) { + fillResponsible(responsible); + } + + // ---------- Check and init request fields + ClinicalRequest request = updateParamsClone.getRequest(); + if (request != null && StringUtils.isNotEmpty(request.getId())) { + request.setDate(ParamUtils.checkDateOrGetCurrentDate(request.getDate(), "request.date")); + fillResponsible(request.getResponsible()); + } ObjectMap parameters; - if (updateParamsClone != null) { - try { - parameters = updateParamsClone.getUpdateMap(); - } catch (JsonProcessingException e) { - throw new CatalogException("Could not parse ClinicalUpdateParams object: " + e.getMessage(), e); - } - } else { - throw new CatalogException("Empty update parameters. Nothing to update."); + try { + parameters = updateParamsClone.getUpdateMap(); + } catch (JsonProcessingException e) { + throw new CatalogException("Could not parse ClinicalUpdateParams object: " + e.getMessage(), e); } ParamUtils.checkUpdateParametersMap(parameters); @@ -1269,22 +1459,44 @@ private OpenCGAResult update(Study study, ClinicalAnalysis cli parameters.put(ClinicalAnalysisDBAdaptor.QueryParams.COMMENTS.key(), comments); } - if (parameters.get(InterpretationDBAdaptor.QueryParams.ANALYST.key()) != null) { - if (StringUtils.isNotEmpty(updateParamsClone.getAnalyst().getId())) { - QueryOptions userOptions = new QueryOptions(QueryOptions.INCLUDE, Arrays.asList(UserDBAdaptor.QueryParams.ID.key(), - UserDBAdaptor.QueryParams.NAME.key(), UserDBAdaptor.QueryParams.EMAIL.key())); - // Check user exists - OpenCGAResult userResult = userDBAdaptor.get(updateParamsClone.getAnalyst().getId(), userOptions); - if (userResult.getNumResults() == 0) { - throw new CatalogException("User '" + updateParamsClone.getAnalyst().getId() + "' not found"); - } + if (parameters.get(ClinicalAnalysisDBAdaptor.QueryParams.ANALYSTS.key()) != null) { + ParamUtils.BasicUpdateAction action = ParamUtils.BasicUpdateAction.from(actionMap, + ClinicalAnalysisDBAdaptor.QueryParams.ANALYSTS.key(), ParamUtils.BasicUpdateAction.ADD); + List analystList = updateParamsClone.getAnalysts(); + switch (action) { + case ADD: + case SET: + QueryOptions userOptions = new QueryOptions(QueryOptions.INCLUDE, Arrays.asList(UserDBAdaptor.QueryParams.ID.key(), + UserDBAdaptor.QueryParams.NAME.key(), UserDBAdaptor.QueryParams.EMAIL.key())); - parameters.put(InterpretationDBAdaptor.QueryParams.ANALYST.key(), new ClinicalAnalyst(userResult.first().getId(), - userResult.first().getName(), userResult.first().getEmail(), userId, TimeUtils.getTime())); - } else { - // Remove assignee - parameters.put(InterpretationDBAdaptor.QueryParams.ANALYST.key(), new ClinicalAnalyst("", "", "", userId, - TimeUtils.getTime())); + Set analystIdList = new HashSet<>(); + for (ClinicalAnalystParam clinicalAnalystParam : analystList) { + analystIdList.add(clinicalAnalystParam.getId()); + } + + List clinicalAnalystList = new ArrayList<>(analystIdList.size()); + // Check analysts exist + if (!analystIdList.isEmpty()) { + Query query = new Query(UserDBAdaptor.QueryParams.ID.key(), analystIdList); + OpenCGAResult userResult = userDBAdaptor.get(query, userOptions); + if (userResult.getNumResults() < analystIdList.size()) { + throw new CatalogException("Some analysts were not found."); + } + for (User user : userResult.getResults()) { + clinicalAnalystList.add(new ClinicalAnalyst(user.getId(), user.getName(), user.getEmail(), userId, + TimeUtils.getTime())); + } + } + parameters.put(ClinicalAnalysisDBAdaptor.QueryParams.ANALYSTS.key(), clinicalAnalystList); + break; + case REMOVE: + // Directly add those analysts. No need to check + List analysts = analystList.stream().map(ClinicalAnalystParam::toClinicalAnalyst) + .collect(Collectors.toList()); + parameters.put(ClinicalAnalysisDBAdaptor.QueryParams.ANALYSTS.key(), analysts); + break; + default: + throw new IllegalStateException("Unknown analysts action " + action); } } if (parameters.get(ClinicalAnalysisDBAdaptor.QueryParams.QUALITY_CONTROL.key()) != null) { @@ -1298,11 +1510,19 @@ private OpenCGAResult update(Study study, ClinicalAnalysis cli parameters.put(ClinicalAnalysisDBAdaptor.QueryParams.QUALITY_CONTROL.key(), qualityControl); } + if (updateParamsClone.getReport() != null && CollectionUtils.isNotEmpty(updateParamsClone.getReport().getFiles())) { + parameters.putNested(ClinicalAnalysisDBAdaptor.QueryParams.REPORT_FILES.key(), updateParamsClone.getReport().getFiles(), false); + } + if (updateParamsClone.getReport() != null && CollectionUtils.isNotEmpty(updateParamsClone.getReport().getSupportingEvidences())) { + parameters.putNested(ClinicalAnalysisDBAdaptor.QueryParams.REPORT_SUPPORTING_EVIDENCES.key(), + updateParamsClone.getReport().getSupportingEvidences(), false); + } if (updateParamsClone.getFiles() != null && !updateParamsClone.getFiles().isEmpty()) { clinicalAnalysis.setFiles(updateParamsClone.getFiles().stream().map(FileReferenceParam::toFile).collect(Collectors.toList())); // Validate files validateFiles(study, clinicalAnalysis, userId); + parameters.put(ClinicalAnalysisDBAdaptor.QueryParams.FILES.key(), clinicalAnalysis.getFiles()); } if (CollectionUtils.isNotEmpty(updateParamsClone.getPanels()) && updateParamsClone.getPanelLock() != null @@ -1363,10 +1583,6 @@ private OpenCGAResult update(Study study, ClinicalAnalysis cli } } - if (updateParamsClone.getFiles() != null && !updateParamsClone.getFiles().isEmpty()) { - parameters.put(ClinicalAnalysisDBAdaptor.QueryParams.FILES.key(), clinicalAnalysis.getFiles()); - } - if (CollectionUtils.isNotEmpty(updateParamsClone.getPanels())) { // Get panels Query query = new Query(PanelDBAdaptor.QueryParams.ID.key(), @@ -1581,7 +1797,7 @@ protected void fixQueryObject(Study study, Query query, String user, String toke AnnotationUtils.fixQueryAnnotationSearch(study, query); changeQueryId(query, ParamConstants.CLINICAL_DISORDER_PARAM, ClinicalAnalysisDBAdaptor.QueryParams.DISORDER.key()); - changeQueryId(query, ParamConstants.CLINICAL_ANALYST_ID_PARAM, ClinicalAnalysisDBAdaptor.QueryParams.ANALYST_ID.key()); + changeQueryId(query, ParamConstants.CLINICAL_ANALYST_ID_PARAM, ClinicalAnalysisDBAdaptor.QueryParams.ANALYSTS_ID.key()); changeQueryId(query, ParamConstants.CLINICAL_PRIORITY_PARAM, ClinicalAnalysisDBAdaptor.QueryParams.PRIORITY_ID.key()); changeQueryId(query, ParamConstants.CLINICAL_FLAGS_PARAM, ClinicalAnalysisDBAdaptor.QueryParams.FLAGS_ID.key()); changeQueryId(query, ParamConstants.CLINICAL_QUALITY_CONTROL_SUMMARY_PARAM, diff --git a/opencga-catalog/src/main/java/org/opencb/opencga/catalog/managers/FileUtils.java b/opencga-catalog/src/main/java/org/opencb/opencga/catalog/managers/FileUtils.java index 46423ef9a2f..02f5cae855b 100644 --- a/opencga-catalog/src/main/java/org/opencb/opencga/catalog/managers/FileUtils.java +++ b/opencga-catalog/src/main/java/org/opencb/opencga/catalog/managers/FileUtils.java @@ -261,6 +261,7 @@ public static File.Bioformat detectBioformat(URI uri, File.Format format, File.C case BINARY: case UNKNOWN: case XML: + case PDF: return File.Bioformat.NONE; default: break; @@ -398,6 +399,8 @@ public static File.Format detectFormat(URI uri) { case "jpeg": case "tif": return File.Format.IMAGE; + case "pdf": + return File.Format.PDF; default: break; } diff --git a/opencga-catalog/src/test/java/org/opencb/opencga/catalog/managers/ClinicalAnalysisManagerTest.java b/opencga-catalog/src/test/java/org/opencb/opencga/catalog/managers/ClinicalAnalysisManagerTest.java index 2f78a376527..400c85e23af 100644 --- a/opencga-catalog/src/test/java/org/opencb/opencga/catalog/managers/ClinicalAnalysisManagerTest.java +++ b/opencga-catalog/src/test/java/org/opencb/opencga/catalog/managers/ClinicalAnalysisManagerTest.java @@ -24,10 +24,7 @@ import org.junit.Test; import org.junit.experimental.categories.Category; import org.junit.rules.ExpectedException; -import org.opencb.biodata.models.clinical.ClinicalAudit; -import org.opencb.biodata.models.clinical.ClinicalComment; -import org.opencb.biodata.models.clinical.ClinicalDiscussion; -import org.opencb.biodata.models.clinical.Disorder; +import org.opencb.biodata.models.clinical.*; import org.opencb.biodata.models.clinical.interpretation.ClinicalVariant; import org.opencb.biodata.models.clinical.interpretation.ClinicalVariantEvidence; import org.opencb.biodata.models.clinical.interpretation.InterpretationMethod; @@ -59,10 +56,7 @@ import org.opencb.opencga.core.models.family.Family; import org.opencb.opencga.core.models.family.FamilyPermissions; import org.opencb.opencga.core.models.family.FamilyUpdateParams; -import org.opencb.opencga.core.models.file.File; -import org.opencb.opencga.core.models.file.FileLinkParams; -import org.opencb.opencga.core.models.file.FileReferenceParam; -import org.opencb.opencga.core.models.file.FileUpdateParams; +import org.opencb.opencga.core.models.file.*; import org.opencb.opencga.core.models.individual.Individual; import org.opencb.opencga.core.models.individual.IndividualPermissions; import org.opencb.opencga.core.models.panel.Panel; @@ -76,6 +70,7 @@ import org.opencb.opencga.core.models.study.configuration.ClinicalConsent; import org.opencb.opencga.core.models.study.configuration.*; import org.opencb.opencga.core.models.user.Account; +import org.opencb.opencga.core.models.user.User; import org.opencb.opencga.core.response.OpenCGAResult; import org.opencb.opencga.core.testclassification.duration.MediumTests; @@ -292,6 +287,196 @@ public void createMultipleCasesSameFamily() throws CatalogException { } } + @Test + public void updateClinicalAnalystsTest() throws CatalogException { + ClinicalAnalysis case1 = createDummyEnvironment(true, true).first(); + + catalogManager.getUserManager().create(new User().setId("u1").setName("u1").setAccount(new Account()), TestParamConstants.PASSWORD, opencgaToken); + catalogManager.getUserManager().create(new User().setId("u2").setName("u2").setAccount(new Account()), TestParamConstants.PASSWORD, opencgaToken); + + // Add analysts + OpenCGAResult result = catalogManager.getClinicalAnalysisManager().update(STUDY, case1.getId(), + new ClinicalAnalysisUpdateParams().setAnalysts( + Arrays.asList(new ClinicalAnalystParam("u1"), new ClinicalAnalystParam("u2"))), INCLUDE_RESULT, sessionIdUser); + assertEquals(3, result.first().getAnalysts().size()); + assertTrue(result.first().getAnalysts().stream().map(ClinicalAnalyst::getId).collect(Collectors.toSet()).containsAll(Arrays.asList("u1", "u2"))); + + // Check analyst params + for (ClinicalAnalyst analyst : result.first().getAnalysts()) { + assertNotNull(analyst.getId()); + assertNotNull(analyst.getName()); + assertNotNull(analyst.getDate()); + assertEquals("user", analyst.getAssignedBy()); + } + + // Remove analysts + Map actionMap = new HashMap<>(); + actionMap.put(ClinicalAnalysisDBAdaptor.QueryParams.ANALYSTS.key(), ParamUtils.BasicUpdateAction.REMOVE); + QueryOptions options = new QueryOptions() + .append(Constants.ACTIONS, actionMap) + .append(ParamConstants.INCLUDE_RESULT_PARAM, true); + result = catalogManager.getClinicalAnalysisManager().update(STUDY, case1.getId(), + new ClinicalAnalysisUpdateParams().setAnalysts( + Arrays.asList(new ClinicalAnalystParam("u1"), new ClinicalAnalystParam("u2"))), options, sessionIdUser); + assertEquals(1, result.first().getAnalysts().size()); + assertTrue(result.first().getAnalysts().stream().map(ClinicalAnalyst::getId).noneMatch(x -> Arrays.asList("u1", "u2").contains(x))); + + // Set analysts + actionMap.put(ClinicalAnalysisDBAdaptor.QueryParams.ANALYSTS.key(), ParamUtils.BasicUpdateAction.SET); + options = new QueryOptions() + .append(Constants.ACTIONS, actionMap) + .append(ParamConstants.INCLUDE_RESULT_PARAM, true); + result = catalogManager.getClinicalAnalysisManager().update(STUDY, case1.getId(), + new ClinicalAnalysisUpdateParams().setAnalysts( + Arrays.asList(new ClinicalAnalystParam("u1"), new ClinicalAnalystParam("u2"))), options, sessionIdUser); + assertEquals(2, result.first().getAnalysts().size()); + assertTrue(result.first().getAnalysts().stream().map(ClinicalAnalyst::getId).allMatch(x -> Arrays.asList("u1", "u2").contains(x))); + + thrown.expect(CatalogException.class); + thrown.expectMessage("not found"); + catalogManager.getClinicalAnalysisManager().update(STUDY, case1.getId(), + new ClinicalAnalysisUpdateParams().setAnalysts( + Arrays.asList(new ClinicalAnalystParam("unknown"), new ClinicalAnalystParam("u2"))), options, sessionIdUser); + } + + @Test + public void updateClinicalAnalysisRequest() throws CatalogException { + ClinicalAnalysis case1 = createDummyEnvironment(true, true).first(); + assertTrue(StringUtils.isEmpty(case1.getRequest().getId())); + + catalogManager.getUserManager().create(new User().setId("u1").setName("u1").setEmail("mail@mail.com").setAccount(new Account()), + TestParamConstants.PASSWORD, opencgaToken); + + ClinicalRequest request = new ClinicalRequest("requestId", "bla", null, new ClinicalResponsible().setId("u1"), new HashMap<>()); + + // Change request + OpenCGAResult result = catalogManager.getClinicalAnalysisManager().update(STUDY, case1.getId(), + new ClinicalAnalysisUpdateParams().setRequest(request), INCLUDE_RESULT, sessionIdUser); + assertNotNull(result.first().getRequest()); + assertTrue(StringUtils.isNotEmpty(result.first().getRequest().getDate())); + assertEquals("requestId", result.first().getRequest().getId()); + assertEquals("u1", result.first().getRequest().getResponsible().getId()); + assertEquals("u1", result.first().getRequest().getResponsible().getName()); + assertEquals("mail@mail.com", result.first().getRequest().getResponsible().getEmail()); + + // Remove request responsible + request.setResponsible(null); + result = catalogManager.getClinicalAnalysisManager().update(STUDY, case1.getId(), + new ClinicalAnalysisUpdateParams().setRequest(request), INCLUDE_RESULT, sessionIdUser); + assertNotNull(result.first().getRequest()); + assertTrue(StringUtils.isNotEmpty(result.first().getRequest().getDate())); + assertEquals("requestId", result.first().getRequest().getId()); + assertNull(result.first().getRequest().getResponsible()); + + // Add non existing request responsible user id + request.setResponsible(new ClinicalResponsible().setId("unknown")); + thrown.expect(CatalogException.class); + thrown.expectMessage("not found"); + catalogManager.getClinicalAnalysisManager().update(STUDY, case1.getId(), + new ClinicalAnalysisUpdateParams().setRequest(request), INCLUDE_RESULT, sessionIdUser); + } + + @Test + public void updateClinicalAnalysisResponsible() throws CatalogException { + ClinicalAnalysis case1 = createDummyEnvironment(true, true).first(); + assertEquals("user", case1.getResponsible().getId()); + + catalogManager.getUserManager().create(new User().setId("u1").setName("u1").setEmail("mail@mail.com").setAccount(new Account()), + TestParamConstants.PASSWORD, opencgaToken); + + ClinicalResponsible responsible = new ClinicalResponsible().setId("u1"); + + // Change responsible + OpenCGAResult result = catalogManager.getClinicalAnalysisManager().update(STUDY, case1.getId(), + new ClinicalAnalysisUpdateParams().setResponsible(responsible), INCLUDE_RESULT, sessionIdUser); + assertNotNull(result.first().getResponsible()); + assertEquals("u1", result.first().getResponsible().getId()); + assertEquals("u1", result.first().getResponsible().getName()); + assertEquals("mail@mail.com", result.first().getResponsible().getEmail()); + + // Change to non existing request responsible user id + responsible.setId("unknown"); + thrown.expect(CatalogException.class); + thrown.expectMessage("not found"); + catalogManager.getClinicalAnalysisManager().update(STUDY, case1.getId(), + new ClinicalAnalysisUpdateParams().setResponsible(responsible), INCLUDE_RESULT, sessionIdUser); + } + + @Test + public void updateClinicalAnalysisReport() throws CatalogException { + ClinicalAnalysis case1 = createDummyEnvironment(true, true).first(); + assertNull(case1.getReport()); + + ClinicalReport report = new ClinicalReport() + .setTitle("my report") + .setComments(Arrays.asList(new ClinicalComment("author", "msg", null, null), new ClinicalComment("author2", "msg", null, null))); + + // Change report + OpenCGAResult result = catalogManager.getClinicalAnalysisManager().update(STUDY, case1.getId(), + new ClinicalAnalysisUpdateParams().setReport(report), INCLUDE_RESULT, sessionIdUser); + assertNotNull(result.first().getReport()); + assertEquals(report.getTitle(), result.first().getReport().getTitle()); + assertEquals(2, result.first().getReport().getComments().size()); + for (ClinicalComment comment : result.first().getReport().getComments()) { + assertEquals("user", comment.getAuthor()); + assertTrue(StringUtils.isNotEmpty(comment.getDate())); + } + + // Add files + catalogManager.getFileManager().create(STUDY, + new FileCreateParams() + .setContent(RandomStringUtils.randomAlphanumeric(1000)) + .setPath("/data/file1.txt") + .setType(File.Type.FILE), + true, sessionIdUser); + catalogManager.getFileManager().create(STUDY, + new FileCreateParams() + .setContent(RandomStringUtils.randomAlphanumeric(1000)) + .setPath("/data/file2.txt") + .setType(File.Type.FILE), + true, sessionIdUser); + + List fileList = Arrays.asList(new File().setId("data:file1.txt"), new File().setId("data:file2.txt")); + report.setSupportingEvidences(fileList); + result = catalogManager.getClinicalAnalysisManager().update(STUDY, case1.getId(), + new ClinicalAnalysisUpdateParams().setReport(report), INCLUDE_RESULT, sessionIdUser); + assertNotNull(result.first().getReport()); + assertEquals(report.getTitle(), result.first().getReport().getTitle()); + assertEquals(2, result.first().getReport().getComments().size()); + for (ClinicalComment comment : result.first().getReport().getComments()) { + assertEquals("user", comment.getAuthor()); + assertTrue(StringUtils.isNotEmpty(comment.getDate())); + } + assertEquals(2, result.first().getReport().getSupportingEvidences().size()); + assertEquals("data/file1.txt", result.first().getReport().getSupportingEvidences().get(0).getPath()); + assertEquals("data/file2.txt", result.first().getReport().getSupportingEvidences().get(1).getPath()); + assertNull(result.first().getReport().getFiles()); + + report.setFiles(fileList); + result = catalogManager.getClinicalAnalysisManager().update(STUDY, case1.getId(), + new ClinicalAnalysisUpdateParams().setReport(report), INCLUDE_RESULT, sessionIdUser); + assertNotNull(result.first().getReport()); + assertEquals(report.getTitle(), result.first().getReport().getTitle()); + assertEquals(2, result.first().getReport().getComments().size()); + for (ClinicalComment comment : result.first().getReport().getComments()) { + assertEquals("user", comment.getAuthor()); + assertTrue(StringUtils.isNotEmpty(comment.getDate())); + } + assertEquals(2, result.first().getReport().getSupportingEvidences().size()); + assertEquals("data/file1.txt", result.first().getReport().getSupportingEvidences().get(0).getPath()); + assertEquals("data/file2.txt", result.first().getReport().getSupportingEvidences().get(1).getPath()); + assertEquals(2, result.first().getReport().getFiles().size()); + assertEquals("data/file1.txt", result.first().getReport().getFiles().get(0).getPath()); + assertEquals("data/file2.txt", result.first().getReport().getFiles().get(1).getPath()); + + // Provide non existing file + report.setFiles(Collections.singletonList(new File().setId("nonexisting.txt"))); + thrown.expect(CatalogException.class); + thrown.expectMessage("not found"); + catalogManager.getClinicalAnalysisManager().update(STUDY, case1.getId(), + new ClinicalAnalysisUpdateParams().setReport(report), INCLUDE_RESULT, sessionIdUser); + } + @Test public void createAndUpdateClinicalAnalysisWithQualityControl() throws CatalogException, InterruptedException { Individual individual = new Individual().setId("child1").setSamples(Arrays.asList(new Sample().setId("sample2"))); diff --git a/opencga-core/src/main/java/org/opencb/opencga/core/api/FieldConstants.java b/opencga-core/src/main/java/org/opencb/opencga/core/api/FieldConstants.java index 4cccaaae80b..36fce194f36 100644 --- a/opencga-core/src/main/java/org/opencb/opencga/core/api/FieldConstants.java +++ b/opencga-core/src/main/java/org/opencb/opencga/core/api/FieldConstants.java @@ -187,8 +187,10 @@ public class FieldConstants { public static final String CLINICAL_ANALYSIS_INTERPRETATION = "Interpretation of the clinical analysis."; public static final String CLINICAL_ANALYSIS_SECONDARY_INTERPRETATION = "List of Interpretations containing the second and consecutive."; public static final String CLINICAL_ANALYSIS_CONSENT = "Object contains consent annotations of clinical analysis."; - public static final String CLINICAL_ANALYSIS_ANALYST = "The analyst of the clinical analysis."; + public static final String CLINICAL_ANALYSIS_ANALYST = "The analysts of the clinical analysis."; public static final String CLINICAL_ANALYSIS_REPORT = "Report of the clinical analysis."; + public static final String CLINICAL_ANALYSIS_REQUEST = "Request of the clinical analysis."; + public static final String CLINICAL_ANALYSIS_RESPONSIBLE = "Responsible of the clinical analysis."; public static final String CLINICAL_ANALYSIS_PRIORITY = "Priority of the clinical analysis."; public static final String CLINICAL_ANALYSIS_FLAGS = "List of flags for the clinical analysis."; public static final String CLINICAL_ANALYSIS_DUE_DATE_DESCRIPTION = "Due date of the clinical analysis."; @@ -212,6 +214,9 @@ public class FieldConstants { public static final String CLINICAL_REPORT_SIGNED_BY = "Indicates who has signed the report."; public static final String CLINICAL_REPORT_SIGNATURE = "Report signature."; public static final String CLINICAL_REPORT_DATE = "Report date."; + public static final String CLINICAL_REPORT_COMMENTS = "Report comments."; + public static final String CLINICAL_REPORT_SUPPORTING_EVIDENCES = "Report supporting evidences."; + public static final String CLINICAL_REPORT_FILES = "Report files."; //ClinicalPriorityAnnotation public static final String CLINICAL_PRIORITY_ANNOTATION_RANK_DESCRIPTION = "ClinicalPriorityAnnotation rank."; diff --git a/opencga-core/src/main/java/org/opencb/opencga/core/models/clinical/ClinicalAnalysis.java b/opencga-core/src/main/java/org/opencb/opencga/core/models/clinical/ClinicalAnalysis.java index 55ffc934572..1c9ffd04027 100644 --- a/opencga-core/src/main/java/org/opencb/opencga/core/models/clinical/ClinicalAnalysis.java +++ b/opencga-core/src/main/java/org/opencb/opencga/core/models/clinical/ClinicalAnalysis.java @@ -117,14 +117,22 @@ public class ClinicalAnalysis extends Annotable { description = FieldConstants.CLINICAL_ANALYSIS_CONSENT) private ClinicalConsentAnnotation consent; - @DataField(id = "analyst", indexed = true, + @DataField(id = "analysts", indexed = true, description = FieldConstants.CLINICAL_ANALYSIS_ANALYST) - private ClinicalAnalyst analyst; + private List analysts; @DataField(id = "report", indexed = true, description = FieldConstants.CLINICAL_ANALYSIS_REPORT) private ClinicalReport report; + @DataField(id = "request", since = "2.12.0", + description = FieldConstants.CLINICAL_ANALYSIS_REPORT) + private ClinicalRequest request; + + @DataField(id = "responsible", since = "2.12.0", + description = FieldConstants.CLINICAL_ANALYSIS_RESPONSIBLE) + private ClinicalResponsible responsible; + @DataField(id = "priority", indexed = true, description = FieldConstants.CLINICAL_ANALYSIS_PRIORITY) private ClinicalPriorityAnnotation priority; @@ -209,11 +217,12 @@ public ClinicalAnalysis() { public ClinicalAnalysis(String id, String description, Type type, Disorder disorder, List files, Individual proband, Family family, List panels, boolean panelLock, boolean locked, Interpretation interpretation, - List secondaryInterpretations, ClinicalConsentAnnotation consent, ClinicalAnalyst analyst, - ClinicalReport report, ClinicalPriorityAnnotation priority, List flags, String creationDate, - String modificationDate, String dueDate, int release, List comments, - ClinicalAnalysisQualityControl qualityControl, List audit, ClinicalAnalysisInternal internal, - List annotationSets, Map attributes, Status status) { + List secondaryInterpretations, ClinicalConsentAnnotation consent, + List analysts, ClinicalReport report, ClinicalRequest request, ClinicalResponsible responsible, + ClinicalPriorityAnnotation priority, List flags, String creationDate, String modificationDate, + String dueDate, int release, List comments, ClinicalAnalysisQualityControl qualityControl, + List audit, ClinicalAnalysisInternal internal, List annotationSets, + Map attributes, Status status) { this.id = id; this.description = description; this.type = type; @@ -227,8 +236,10 @@ public ClinicalAnalysis(String id, String description, Type type, Disorder disor this.interpretation = interpretation; this.secondaryInterpretations = secondaryInterpretations; this.consent = consent; - this.analyst = analyst; + this.analysts = analysts; this.report = report; + this.request = request; + this.responsible = responsible; this.priority = priority; this.flags = flags; this.creationDate = creationDate; @@ -261,8 +272,10 @@ public String toString() { sb.append(", interpretation=").append(interpretation); sb.append(", secondaryInterpretations=").append(secondaryInterpretations); sb.append(", consent=").append(consent); - sb.append(", analyst=").append(analyst); + sb.append(", analysts=").append(analysts); sb.append(", report=").append(report); + sb.append(", request=").append(request); + sb.append(", responsible=").append(responsible); sb.append(", priority=").append(priority); sb.append(", flags=").append(flags); sb.append(", creationDate='").append(creationDate).append('\''); @@ -273,7 +286,6 @@ public String toString() { sb.append(", comments=").append(comments); sb.append(", audit=").append(audit); sb.append(", internal=").append(internal); - sb.append(", annotationSets=").append(annotationSets); sb.append(", attributes=").append(attributes); sb.append(", status=").append(status); sb.append('}'); @@ -409,12 +421,12 @@ public ClinicalAnalysis setConsent(ClinicalConsentAnnotation consent) { return this; } - public ClinicalAnalyst getAnalyst() { - return analyst; + public List getAnalysts() { + return analysts; } - public ClinicalAnalysis setAnalyst(ClinicalAnalyst analyst) { - this.analyst = analyst; + public ClinicalAnalysis setAnalysts(List analysts) { + this.analysts = analysts; return this; } @@ -427,6 +439,24 @@ public ClinicalAnalysis setReport(ClinicalReport report) { return this; } + public ClinicalRequest getRequest() { + return request; + } + + public ClinicalAnalysis setRequest(ClinicalRequest request) { + this.request = request; + return this; + } + + public ClinicalResponsible getResponsible() { + return responsible; + } + + public ClinicalAnalysis setResponsible(ClinicalResponsible responsible) { + this.responsible = responsible; + return this; + } + public ClinicalPriorityAnnotation getPriority() { return priority; } diff --git a/opencga-core/src/main/java/org/opencb/opencga/core/models/clinical/ClinicalAnalysisCreateParams.java b/opencga-core/src/main/java/org/opencb/opencga/core/models/clinical/ClinicalAnalysisCreateParams.java index 9d91754d5be..301db1b3b54 100644 --- a/opencga-core/src/main/java/org/opencb/opencga/core/models/clinical/ClinicalAnalysisCreateParams.java +++ b/opencga-core/src/main/java/org/opencb/opencga/core/models/clinical/ClinicalAnalysisCreateParams.java @@ -48,8 +48,10 @@ public class ClinicalAnalysisCreateParams { private List panels; private Boolean panelLock; - private ClinicalAnalystParam analyst; + private List analysts; private ClinicalReport report; + private ClinicalRequest request; + private ClinicalResponsible responsible; private InterpretationCreateParams interpretation; private ClinicalAnalysisQualityControlUpdateParam qualityControl; @@ -71,10 +73,10 @@ public ClinicalAnalysisCreateParams() { public ClinicalAnalysisCreateParams(String id, String description, ClinicalAnalysis.Type type, DisorderReferenceParam disorder, List files, ProbandParam proband, FamilyParam family, - List panels, Boolean panelLock, ClinicalAnalystParam analyst, - ClinicalReport report, InterpretationCreateParams interpretation, - ClinicalConsentAnnotationParam consent, String creationDate, String modificationDate, - String dueDate, List comments, + List panels, Boolean panelLock, List analysts, + ClinicalReport report, ClinicalRequest request, ClinicalResponsible responsible, + InterpretationCreateParams interpretation, ClinicalConsentAnnotationParam consent, + String creationDate, String modificationDate, String dueDate, List comments, ClinicalAnalysisQualityControlUpdateParam qualityControl, PriorityParam priority, List flags, List annotationSets, Map attributes, StatusParam status) { @@ -88,7 +90,9 @@ public ClinicalAnalysisCreateParams(String id, String description, ClinicalAnaly this.panels = panels; this.panelLock = panelLock; this.report = report; - this.analyst = analyst; + this.request = request; + this.responsible = responsible; + this.analysts = analysts; this.interpretation = interpretation; this.consent = consent; this.creationDate = creationDate; @@ -115,8 +119,10 @@ public static ClinicalAnalysisCreateParams of(ClinicalAnalysis clinicalAnalysis) ? clinicalAnalysis.getPanels().stream().map(p -> new PanelReferenceParam(p.getId())).collect(Collectors.toList()) : null, clinicalAnalysis.isPanelLock(), - clinicalAnalysis.getAnalyst() != null ? ClinicalAnalystParam.of(clinicalAnalysis.getAnalyst()) : null, - clinicalAnalysis.getReport(), + clinicalAnalysis.getAnalysts() != null + ? clinicalAnalysis.getAnalysts().stream().map(ClinicalAnalystParam::of).collect(Collectors.toList()) + : null, + clinicalAnalysis.getReport(), clinicalAnalysis.getRequest(), clinicalAnalysis.getResponsible(), clinicalAnalysis.getInterpretation() != null ? InterpretationCreateParams.of(clinicalAnalysis.getInterpretation()) : null, @@ -148,8 +154,10 @@ public String toString() { sb.append(", family=").append(family); sb.append(", panels=").append(panels); sb.append(", panelLock=").append(panelLock); - sb.append(", analyst=").append(analyst); + sb.append(", analysts=").append(analysts); sb.append(", report=").append(report); + sb.append(", request=").append(request); + sb.append(", responsible=").append(responsible); sb.append(", interpretation=").append(interpretation); sb.append(", qualityControl=").append(qualityControl); sb.append(", consent=").append(consent); @@ -198,7 +206,13 @@ public ClinicalAnalysis toClinicalAnalysis() { Interpretation primaryInterpretation = interpretation != null ? interpretation.toClinicalInterpretation() : null; - String assignee = analyst != null ? analyst.getId() : ""; + List clinicalAnalystList = null; + if (analysts != null) { + clinicalAnalystList = new ArrayList<>(analysts.size()); + for (ClinicalAnalystParam analyst : analysts) { + clinicalAnalystList.add(new ClinicalAnalyst(analyst.getId(), analyst.getId(), "", "", TimeUtils.getTime())); + } + } List caFiles = new LinkedList<>(); if (files != null) { @@ -217,11 +231,11 @@ public ClinicalAnalysis toClinicalAnalysis() { return new ClinicalAnalysis(id, description, type, disorder != null ? disorder.toDisorder() : null, caFiles, individual, f, diseasePanelList, panelLock != null ? panelLock : false, false, primaryInterpretation, new LinkedList<>(), consent != null ? consent.toClinicalConsentAnnotation() : null, - new ClinicalAnalyst(assignee, assignee, "", "", TimeUtils.getTime()), report, - priority != null ? priority.toClinicalPriorityAnnotation() : null, + clinicalAnalystList, report, request, responsible, priority != null ? priority.toClinicalPriorityAnnotation() : null, flags != null ? flags.stream().map(FlagValueParam::toFlagAnnotation).collect(Collectors.toList()) : null, creationDate, modificationDate, dueDate, 1, - comments != null ? comments.stream().map(ClinicalCommentParam::toClinicalComment).collect(Collectors.toList()) : null, qualityControl != null ? qualityControl.toClinicalQualityControl() : null, new LinkedList<>(), null, + comments != null ? comments.stream().map(ClinicalCommentParam::toClinicalComment).collect(Collectors.toList()) : null, + qualityControl != null ? qualityControl.toClinicalQualityControl() : null, new LinkedList<>(), null, annotationSets, attributes, status != null ? status.toStatus() : null); } @@ -306,12 +320,12 @@ public ClinicalAnalysisCreateParams setPanelLock(Boolean panelLock) { return this; } - public ClinicalAnalystParam getAnalyst() { - return analyst; + public List getAnalysts() { + return analysts; } - public ClinicalAnalysisCreateParams setAnalyst(ClinicalAnalystParam analyst) { - this.analyst = analyst; + public ClinicalAnalysisCreateParams setAnalysts(List analysts) { + this.analysts = analysts; return this; } @@ -324,6 +338,24 @@ public ClinicalAnalysisCreateParams setReport(ClinicalReport report) { return this; } + public ClinicalRequest getRequest() { + return request; + } + + public ClinicalAnalysisCreateParams setRequest(ClinicalRequest request) { + this.request = request; + return this; + } + + public ClinicalResponsible getResponsible() { + return responsible; + } + + public ClinicalAnalysisCreateParams setResponsible(ClinicalResponsible responsible) { + this.responsible = responsible; + return this; + } + public InterpretationCreateParams getInterpretation() { return interpretation; } diff --git a/opencga-core/src/main/java/org/opencb/opencga/core/models/clinical/ClinicalAnalysisQualityControlUpdateParam.java b/opencga-core/src/main/java/org/opencb/opencga/core/models/clinical/ClinicalAnalysisQualityControlUpdateParam.java index d2634228641..98e957bc234 100644 --- a/opencga-core/src/main/java/org/opencb/opencga/core/models/clinical/ClinicalAnalysisQualityControlUpdateParam.java +++ b/opencga-core/src/main/java/org/opencb/opencga/core/models/clinical/ClinicalAnalysisQualityControlUpdateParam.java @@ -49,6 +49,7 @@ public String toString() { final StringBuilder sb = new StringBuilder("ClinicalAnalysisQualityControlUpdateParam{"); sb.append("summary=").append(summary); sb.append(", comments=").append(comments); + sb.append(", files=").append(files); sb.append('}'); return sb.toString(); } @@ -61,4 +62,22 @@ public ClinicalAnalysisQualityControlUpdateParam setSummary(ClinicalAnalysisQual this.summary = summary; return this; } + + public List getComments() { + return comments; + } + + public ClinicalAnalysisQualityControlUpdateParam setComments(List comments) { + this.comments = comments; + return this; + } + + public List getFiles() { + return files; + } + + public ClinicalAnalysisQualityControlUpdateParam setFiles(List files) { + this.files = files; + return this; + } } diff --git a/opencga-core/src/main/java/org/opencb/opencga/core/models/clinical/ClinicalAnalysisUpdateParams.java b/opencga-core/src/main/java/org/opencb/opencga/core/models/clinical/ClinicalAnalysisUpdateParams.java index 1cec037fb1c..b32711af25b 100644 --- a/opencga-core/src/main/java/org/opencb/opencga/core/models/clinical/ClinicalAnalysisUpdateParams.java +++ b/opencga-core/src/main/java/org/opencb/opencga/core/models/clinical/ClinicalAnalysisUpdateParams.java @@ -48,9 +48,10 @@ public class ClinicalAnalysisUpdateParams { private FamilyParam family; private Boolean locked; - private ClinicalAnalystParam analyst; + private List analysts; private ClinicalReport report; - + private ClinicalRequest request; + private ClinicalResponsible responsible; private ClinicalAnalysisQualityControlUpdateParam qualityControl; @@ -72,8 +73,9 @@ public ClinicalAnalysisUpdateParams() { public ClinicalAnalysisUpdateParams(String id, String description, ClinicalAnalysis.Type type, DisorderReferenceParam disorder, List files, ProbandParam proband, FamilyParam family, - List panels, Boolean panelLock, Boolean locked, ClinicalAnalystParam analyst, - ClinicalReport report, ClinicalAnalysisQualityControlUpdateParam qualityControl, + List panels, Boolean panelLock, Boolean locked, + List analysts, ClinicalReport report, ClinicalRequest request, + ClinicalResponsible responsible, ClinicalAnalysisQualityControlUpdateParam qualityControl, ClinicalConsentAnnotationParam consent, String creationDate, String modificationDate, String dueDate, List comments, PriorityParam priority, List flags, List annotationSets, Map attributes, @@ -88,8 +90,10 @@ public ClinicalAnalysisUpdateParams(String id, String description, ClinicalAnaly this.panels = panels; this.panelLock = panelLock; this.locked = locked; - this.analyst = analyst; + this.analysts = analysts; this.report = report; + this.request = request; + this.responsible = responsible; this.qualityControl = qualityControl; this.consent = consent; this.creationDate = creationDate; @@ -119,7 +123,10 @@ public ClinicalAnalysis toClinicalAnalysis() { locked != null && locked, null, null, consent != null ? consent.toClinicalConsentAnnotation() : null, - analyst != null ? analyst.toClinicalAnalyst() : null, report, + analysts != null + ? analysts.stream().map(ClinicalAnalystParam::toClinicalAnalyst).collect(Collectors.toList()) + : null, + report, request, responsible, priority != null ? priority.toClinicalPriorityAnnotation() : null, flags != null ? flags.stream().map(FlagValueParam::toFlagAnnotation).collect(Collectors.toList()) : null, creationDate, modificationDate, dueDate, 1, @@ -141,8 +148,10 @@ public String toString() { sb.append(", proband=").append(proband); sb.append(", family=").append(family); sb.append(", locked=").append(locked); - sb.append(", analyst=").append(analyst); + sb.append(", analysts=").append(analysts); sb.append(", report=").append(report); + sb.append(", request=").append(request); + sb.append(", responsible=").append(responsible); sb.append(", qualityControl=").append(qualityControl); sb.append(", consent=").append(consent); sb.append(", creationDate='").append(creationDate).append('\''); @@ -248,12 +257,12 @@ public ClinicalAnalysisUpdateParams setLocked(Boolean locked) { return this; } - public ClinicalAnalystParam getAnalyst() { - return analyst; + public List getAnalysts() { + return analysts; } - public ClinicalAnalysisUpdateParams setAnalyst(ClinicalAnalystParam analyst) { - this.analyst = analyst; + public ClinicalAnalysisUpdateParams setAnalysts(List analysts) { + this.analysts = analysts; return this; } @@ -365,4 +374,21 @@ public ClinicalAnalysisUpdateParams setReport(ClinicalReport report) { return this; } + public ClinicalRequest getRequest() { + return request; + } + + public ClinicalAnalysisUpdateParams setRequest(ClinicalRequest request) { + this.request = request; + return this; + } + + public ClinicalResponsible getResponsible() { + return responsible; + } + + public ClinicalAnalysisUpdateParams setResponsible(ClinicalResponsible responsible) { + this.responsible = responsible; + return this; + } } diff --git a/opencga-core/src/main/java/org/opencb/opencga/core/models/clinical/ClinicalReport.java b/opencga-core/src/main/java/org/opencb/opencga/core/models/clinical/ClinicalReport.java index 8303fdc7a1b..fca6fd5c418 100644 --- a/opencga-core/src/main/java/org/opencb/opencga/core/models/clinical/ClinicalReport.java +++ b/opencga-core/src/main/java/org/opencb/opencga/core/models/clinical/ClinicalReport.java @@ -1,8 +1,12 @@ package org.opencb.opencga.core.models.clinical; +import org.opencb.biodata.models.clinical.ClinicalComment; import org.opencb.biodata.models.clinical.ClinicalDiscussion; import org.opencb.commons.annotations.DataField; import org.opencb.opencga.core.api.FieldConstants; +import org.opencb.opencga.core.models.file.File; + +import java.util.List; public class ClinicalReport { @@ -34,11 +38,20 @@ public class ClinicalReport { description = FieldConstants.CLINICAL_REPORT_DATE) private String date; + @DataField(id = "comments", description = FieldConstants.CLINICAL_REPORT_COMMENTS, since = "2.12.0") + private List comments; + + @DataField(id = "supportingEvidences", description = FieldConstants.CLINICAL_REPORT_SUPPORTING_EVIDENCES, since = "2.12.0") + private List supportingEvidences; + + @DataField(id = "files", description = FieldConstants.CLINICAL_REPORT_FILES, since = "2.12.0") + private List files; + public ClinicalReport() { } - public ClinicalReport(String title, String overview, ClinicalDiscussion discussion, String logo, String signedBy, - String signature, String date) { + public ClinicalReport(String title, String overview, ClinicalDiscussion discussion, String logo, String signedBy, String signature, + String date, List comments, List supportingEvidences, List files) { this.title = title; this.overview = overview; this.discussion = discussion; @@ -46,6 +59,9 @@ public ClinicalReport(String title, String overview, ClinicalDiscussion discussi this.signedBy = signedBy; this.signature = signature; this.date = date; + this.comments = comments; + this.supportingEvidences = supportingEvidences; + this.files = files; } @Override @@ -53,11 +69,14 @@ public String toString() { final StringBuilder sb = new StringBuilder("ClinicalReport{"); sb.append("title='").append(title).append('\''); sb.append(", overview='").append(overview).append('\''); - sb.append(", discussion='").append(discussion).append('\''); + sb.append(", discussion=").append(discussion); sb.append(", logo='").append(logo).append('\''); sb.append(", signedBy='").append(signedBy).append('\''); sb.append(", signature='").append(signature).append('\''); sb.append(", date='").append(date).append('\''); + sb.append(", comments=").append(comments); + sb.append(", supportingEvidences=").append(supportingEvidences); + sb.append(", files=").append(files); sb.append('}'); return sb.toString(); } @@ -124,4 +143,31 @@ public ClinicalReport setDate(String date) { this.date = date; return this; } + + public List getComments() { + return comments; + } + + public ClinicalReport setComments(List comments) { + this.comments = comments; + return this; + } + + public List getSupportingEvidences() { + return supportingEvidences; + } + + public ClinicalReport setSupportingEvidences(List supportingEvidences) { + this.supportingEvidences = supportingEvidences; + return this; + } + + public List getFiles() { + return files; + } + + public ClinicalReport setFiles(List files) { + this.files = files; + return this; + } } diff --git a/opencga-core/src/main/java/org/opencb/opencga/core/models/clinical/ClinicalRequest.java b/opencga-core/src/main/java/org/opencb/opencga/core/models/clinical/ClinicalRequest.java new file mode 100644 index 00000000000..38998b4bb0d --- /dev/null +++ b/opencga-core/src/main/java/org/opencb/opencga/core/models/clinical/ClinicalRequest.java @@ -0,0 +1,80 @@ +package org.opencb.opencga.core.models.clinical; + +import java.util.Map; + +public class ClinicalRequest { + + private String id; + private String justification; + private String date; + private ClinicalResponsible responsible; + private Map attributes; + + public ClinicalRequest() { + } + + public ClinicalRequest(String id, String justification, String date, ClinicalResponsible responsible, Map attributes) { + this.id = id; + this.justification = justification; + this.date = date; + this.responsible = responsible; + this.attributes = attributes; + } + + @Override + public String toString() { + final StringBuilder sb = new StringBuilder("ClinicalRequest{"); + sb.append("id='").append(id).append('\''); + sb.append(", justification='").append(justification).append('\''); + sb.append(", date='").append(date).append('\''); + sb.append(", responsible=").append(responsible); + sb.append(", attributes=").append(attributes); + sb.append('}'); + return sb.toString(); + } + + public String getId() { + return id; + } + + public ClinicalRequest setId(String id) { + this.id = id; + return this; + } + + public String getJustification() { + return justification; + } + + public ClinicalRequest setJustification(String justification) { + this.justification = justification; + return this; + } + + public String getDate() { + return date; + } + + public ClinicalRequest setDate(String date) { + this.date = date; + return this; + } + + public ClinicalResponsible getResponsible() { + return responsible; + } + + public ClinicalRequest setResponsible(ClinicalResponsible responsible) { + this.responsible = responsible; + return this; + } + + public Map getAttributes() { + return attributes; + } + + public ClinicalRequest setAttributes(Map attributes) { + this.attributes = attributes; + return this; + } +} diff --git a/opencga-core/src/main/java/org/opencb/opencga/core/models/clinical/ClinicalResponsible.java b/opencga-core/src/main/java/org/opencb/opencga/core/models/clinical/ClinicalResponsible.java new file mode 100644 index 00000000000..3e8967b552a --- /dev/null +++ b/opencga-core/src/main/java/org/opencb/opencga/core/models/clinical/ClinicalResponsible.java @@ -0,0 +1,115 @@ +package org.opencb.opencga.core.models.clinical; + +public class ClinicalResponsible { + + private String id; + private String name; + private String email; + private String organization; + private String department; + private String address; + private String city; + private String postcode; + + public ClinicalResponsible() { + } + + public ClinicalResponsible(String id, String name, String email, String organization, String department, String address, String city, + String postcode) { + this.id = id; + this.name = name; + this.email = email; + this.organization = organization; + this.department = department; + this.address = address; + this.city = city; + this.postcode = postcode; + } + + @Override + public String toString() { + final StringBuilder sb = new StringBuilder("ClinicalResponsible{"); + sb.append("id='").append(id).append('\''); + sb.append(", name='").append(name).append('\''); + sb.append(", email='").append(email).append('\''); + sb.append(", organization='").append(organization).append('\''); + sb.append(", department='").append(department).append('\''); + sb.append(", address='").append(address).append('\''); + sb.append(", city='").append(city).append('\''); + sb.append(", postcode='").append(postcode).append('\''); + sb.append('}'); + return sb.toString(); + } + + public String getId() { + return id; + } + + public ClinicalResponsible setId(String id) { + this.id = id; + return this; + } + + public String getName() { + return name; + } + + public ClinicalResponsible setName(String name) { + this.name = name; + return this; + } + + public String getEmail() { + return email; + } + + public ClinicalResponsible setEmail(String email) { + this.email = email; + return this; + } + + public String getOrganization() { + return organization; + } + + public ClinicalResponsible setOrganization(String organization) { + this.organization = organization; + return this; + } + + public String getDepartment() { + return department; + } + + public ClinicalResponsible setDepartment(String department) { + this.department = department; + return this; + } + + public String getAddress() { + return address; + } + + public ClinicalResponsible setAddress(String address) { + this.address = address; + return this; + } + + public String getCity() { + return city; + } + + public ClinicalResponsible setCity(String city) { + this.city = city; + return this; + } + + public String getPostcode() { + return postcode; + } + + public ClinicalResponsible setPostcode(String postcode) { + this.postcode = postcode; + return this; + } +} diff --git a/opencga-core/src/main/java/org/opencb/opencga/core/models/file/File.java b/opencga-core/src/main/java/org/opencb/opencga/core/models/file/File.java index 28a2a05980f..581cc6d6dd1 100644 --- a/opencga-core/src/main/java/org/opencb/opencga/core/models/file/File.java +++ b/opencga-core/src/main/java/org/opencb/opencga/core/models/file/File.java @@ -562,6 +562,7 @@ public enum Format { TAB_SEPARATED_VALUES, COMMA_SEPARATED_VALUES, XML, PROTOCOL_BUFFER, JSON, AVRO, PARQUET, //Serialization formats + PDF, IMAGE, PLAIN, BINARY, diff --git a/opencga-server/src/main/java/org/opencb/opencga/server/rest/analysis/ClinicalWebService.java b/opencga-server/src/main/java/org/opencb/opencga/server/rest/analysis/ClinicalWebService.java index 5c33dd532b2..fdaa1e84449 100644 --- a/opencga-server/src/main/java/org/opencb/opencga/server/rest/analysis/ClinicalWebService.java +++ b/opencga-server/src/main/java/org/opencb/opencga/server/rest/analysis/ClinicalWebService.java @@ -211,6 +211,8 @@ public Response update( @QueryParam("commentsAction") ParamUtils.AddRemoveReplaceAction commentsAction, @ApiParam(value = "Action to be performed if the array of flags is being updated.", allowableValues = "ADD,SET,REMOVE", defaultValue = "ADD") @QueryParam("flagsAction") ParamUtils.BasicUpdateAction flagsAction, + @ApiParam(value = "Action to be performed if the array of analysts is being updated.", allowableValues = "ADD,SET,REMOVE", defaultValue = "ADD") + @QueryParam("analystsAction") ParamUtils.BasicUpdateAction analystsAction, @ApiParam(value = "Action to be performed if the array of files is being updated.", allowableValues = "ADD,SET,REMOVE", defaultValue = "ADD") @QueryParam("filesAction") ParamUtils.BasicUpdateAction filesAction, @ApiParam(value = "Action to be performed if the array of panels is being updated.", allowableValues = "ADD,SET,REMOVE", defaultValue = "ADD") @@ -235,6 +237,9 @@ public Response update( if (panelsAction == null) { panelsAction = ParamUtils.BasicUpdateAction.ADD; } + if (analystsAction == null) { + analystsAction = ParamUtils.BasicUpdateAction.ADD; + } Map actionMap = new HashMap<>(); actionMap.put(ClinicalAnalysisDBAdaptor.QueryParams.ANNOTATION_SETS.key(), annotationSetsAction); @@ -242,6 +247,7 @@ public Response update( actionMap.put(ClinicalAnalysisDBAdaptor.QueryParams.FLAGS.key(), flagsAction); actionMap.put(ClinicalAnalysisDBAdaptor.QueryParams.FILES.key(), filesAction); actionMap.put(ClinicalAnalysisDBAdaptor.QueryParams.PANELS.key(), panelsAction); + actionMap.put(ClinicalAnalysisDBAdaptor.QueryParams.ANALYSTS.key(), analystsAction); queryOptions.put(Constants.ACTIONS, actionMap); return createOkResponse(clinicalManager.update(studyStr, getIdList(clinicalAnalysisStr), params, true, queryOptions, token)); From afe43bbf2dd548c60c7bd1176ccb3917b8d125fe Mon Sep 17 00:00:00 2001 From: pfurio Date: Wed, 29 Nov 2023 10:44:10 +0100 Subject: [PATCH 22/25] app: add data model migration, #TASK-5198 --- ...pleteClinicalReportDataModelMigration.java | 34 +++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/migrations/v2_12_0/catalog/CompleteClinicalReportDataModelMigration.java b/opencga-app/src/main/java/org/opencb/opencga/app/migrations/v2_12_0/catalog/CompleteClinicalReportDataModelMigration.java index b4fa490c90a..f7e6123b223 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/migrations/v2_12_0/catalog/CompleteClinicalReportDataModelMigration.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/migrations/v2_12_0/catalog/CompleteClinicalReportDataModelMigration.java @@ -2,6 +2,9 @@ import com.mongodb.client.model.Filters; import com.mongodb.client.model.Projections; +import com.mongodb.client.model.UpdateOneModel; +import org.bson.Document; +import org.opencb.opencga.catalog.db.mongodb.MongoDBAdaptor; import org.opencb.opencga.catalog.db.mongodb.MongoDBAdaptorFactory; import org.opencb.opencga.catalog.migration.Migration; import org.opencb.opencga.catalog.migration.MigrationTool; @@ -9,6 +12,8 @@ import java.util.Arrays; import java.util.Collections; +import static com.mongodb.client.model.Filters.eq; + @Migration(id = "complete_clinical_report_data_model" , description = "Complete Clinical Report data model #TASK-5198", version = "2.12.0", @@ -23,10 +28,35 @@ protected void run() throws Exception { migrateCollection( Arrays.asList(MongoDBAdaptorFactory.CLINICAL_ANALYSIS_COLLECTION, MongoDBAdaptorFactory.DELETED_CLINICAL_ANALYSIS_COLLECTION), Filters.exists("analyst"), - Projections.include(Collections.singletonList("analyst")), + Projections.include(Arrays.asList("analyst", "report")), (document, bulk) -> { + Document analyst = document.get("analyst", Document.class); + analyst.remove("assignedBy"); + analyst.remove("date"); + + Document report = document.get("report", Document.class); + if (report != null) { + report.put("comments", Collections.emptyList()); + report.put("supportingEvidences", Collections.emptyList()); + report.put("files", Collections.emptyList()); + } + MongoDBAdaptor.UpdateDocument updateDocument = new MongoDBAdaptor.UpdateDocument(); + updateDocument.getSet().put("report", report); + updateDocument.getSet().put("request", new Document()); + updateDocument.getSet().put("responsible", new Document() + .append("id", analyst.get("id")) + .append("name", analyst.get("name")) + .append("email", analyst.get("email")) + ); + updateDocument.getSet().put("analysts", Collections.singletonList(analyst)); + updateDocument.getUnset().add("analyst"); + + bulk.add(new UpdateOneModel<>( + eq("_id", document.get("_id")), + updateDocument.toFinalUpdateDocument() + ) + ); }); } - } From e46d9ba2c44b871746bb6b6cde7c6cf892671913 Mon Sep 17 00:00:00 2001 From: pfurio Date: Wed, 29 Nov 2023 12:40:14 +0100 Subject: [PATCH 23/25] catalog: fix biodata changes, #TASK-5198 --- .../analysis/clinical/ClinicalInterpretationManager.java | 2 +- .../opencga/catalog/managers/ClinicalAnalysisManager.java | 4 ++-- .../opencga/catalog/managers/InterpretationManager.java | 6 +++--- .../catalog/managers/ClinicalAnalysisManagerTest.java | 4 ++-- .../core/models/clinical/ClinicalAnalysisCreateParams.java | 3 +-- .../opencga/core/models/clinical/ClinicalAnalystParam.java | 5 +++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/clinical/ClinicalInterpretationManager.java b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/clinical/ClinicalInterpretationManager.java index 50e6d32da75..3ca18fe0eb9 100644 --- a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/clinical/ClinicalInterpretationManager.java +++ b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/clinical/ClinicalInterpretationManager.java @@ -824,7 +824,7 @@ public ClinicalAnalyst getAnalyst(String token) throws ToolException { OpenCGAResult userQueryResult = catalogManager.getUserManager().get(userId, new QueryOptions(QueryOptions.INCLUDE, Arrays.asList(UserDBAdaptor.QueryParams.EMAIL.key(), UserDBAdaptor.QueryParams.ORGANIZATION.key())), token); User user = userQueryResult.first(); - return new ClinicalAnalyst(userId, user.getName(), user.getEmail(), "", ""); + return new ClinicalAnalyst(userId, user.getName(), user.getEmail(), "", Collections.emptyMap()); } catch (CatalogException e) { throw new ToolException(e); } diff --git a/opencga-catalog/src/main/java/org/opencb/opencga/catalog/managers/ClinicalAnalysisManager.java b/opencga-catalog/src/main/java/org/opencb/opencga/catalog/managers/ClinicalAnalysisManager.java index 069a8e25d4e..13be28039cc 100644 --- a/opencga-catalog/src/main/java/org/opencb/opencga/catalog/managers/ClinicalAnalysisManager.java +++ b/opencga-catalog/src/main/java/org/opencb/opencga/catalog/managers/ClinicalAnalysisManager.java @@ -337,7 +337,7 @@ public OpenCGAResult create(String studyStr, ClinicalAnalysis } List clinicalAnalystList = new ArrayList<>(userList.size()); for (User user : userList) { - clinicalAnalystList.add(new ClinicalAnalyst(user.getId(), user.getName(), user.getEmail(), userId, TimeUtils.getTime())); + clinicalAnalystList.add(new ClinicalAnalyst(user.getId(), user.getName(), user.getEmail(), userId, Collections.emptyMap())); } clinicalAnalysis.setAnalysts(clinicalAnalystList); @@ -1484,7 +1484,7 @@ private OpenCGAResult update(Study study, ClinicalAnalysis cli } for (User user : userResult.getResults()) { clinicalAnalystList.add(new ClinicalAnalyst(user.getId(), user.getName(), user.getEmail(), userId, - TimeUtils.getTime())); + Collections.emptyMap())); } } parameters.put(ClinicalAnalysisDBAdaptor.QueryParams.ANALYSTS.key(), clinicalAnalystList); diff --git a/opencga-catalog/src/main/java/org/opencb/opencga/catalog/managers/InterpretationManager.java b/opencga-catalog/src/main/java/org/opencb/opencga/catalog/managers/InterpretationManager.java index 4294998ca19..0ab582184d0 100644 --- a/opencga-catalog/src/main/java/org/opencb/opencga/catalog/managers/InterpretationManager.java +++ b/opencga-catalog/src/main/java/org/opencb/opencga/catalog/managers/InterpretationManager.java @@ -388,7 +388,7 @@ void validateNewInterpretation(Study study, Interpretation interpretation, Clini } user = result.first(); } - interpretation.setAnalyst(new ClinicalAnalyst(user.getId(), user.getName(), user.getEmail(), userId, TimeUtils.getTime())); + interpretation.setAnalyst(new ClinicalAnalyst(user.getId(), user.getName(), user.getEmail(), userId, Collections.emptyMap())); } public OpenCGAResult clear(String studyStr, String clinicalAnalysisId, List interpretationList, String token) @@ -984,11 +984,11 @@ private OpenCGAResult update(Study study, Interpretation interpretation, Interpr throw new CatalogException("User '" + updateParams.getAnalyst().getId() + "' not found"); } parameters.put(InterpretationDBAdaptor.QueryParams.ANALYST.key(), new ClinicalAnalyst(userResult.first().getId(), - userResult.first().getName(), userResult.first().getEmail(), userId, TimeUtils.getTime())); + userResult.first().getName(), userResult.first().getEmail(), userId, Collections.emptyMap())); } else { // Remove assignee parameters.put(InterpretationDBAdaptor.QueryParams.ANALYST.key(), new ClinicalAnalyst("", "", "", userId, - TimeUtils.getTime())); + Collections.emptyMap())); } } diff --git a/opencga-catalog/src/test/java/org/opencb/opencga/catalog/managers/ClinicalAnalysisManagerTest.java b/opencga-catalog/src/test/java/org/opencb/opencga/catalog/managers/ClinicalAnalysisManagerTest.java index 400c85e23af..e07d53338b9 100644 --- a/opencga-catalog/src/test/java/org/opencb/opencga/catalog/managers/ClinicalAnalysisManagerTest.java +++ b/opencga-catalog/src/test/java/org/opencb/opencga/catalog/managers/ClinicalAnalysisManagerTest.java @@ -305,8 +305,8 @@ public void updateClinicalAnalystsTest() throws CatalogException { for (ClinicalAnalyst analyst : result.first().getAnalysts()) { assertNotNull(analyst.getId()); assertNotNull(analyst.getName()); - assertNotNull(analyst.getDate()); - assertEquals("user", analyst.getAssignedBy()); + assertNotNull(analyst.getRole()); + assertNotNull(analyst.getAttributes()); } // Remove analysts diff --git a/opencga-core/src/main/java/org/opencb/opencga/core/models/clinical/ClinicalAnalysisCreateParams.java b/opencga-core/src/main/java/org/opencb/opencga/core/models/clinical/ClinicalAnalysisCreateParams.java index 301db1b3b54..ee4ab6d703b 100644 --- a/opencga-core/src/main/java/org/opencb/opencga/core/models/clinical/ClinicalAnalysisCreateParams.java +++ b/opencga-core/src/main/java/org/opencb/opencga/core/models/clinical/ClinicalAnalysisCreateParams.java @@ -17,7 +17,6 @@ package org.opencb.opencga.core.models.clinical; import org.opencb.biodata.models.clinical.ClinicalAnalyst; -import org.opencb.opencga.core.common.TimeUtils; import org.opencb.opencga.core.models.common.AnnotationSet; import org.opencb.opencga.core.models.common.StatusParam; import org.opencb.opencga.core.models.family.Family; @@ -210,7 +209,7 @@ public ClinicalAnalysis toClinicalAnalysis() { if (analysts != null) { clinicalAnalystList = new ArrayList<>(analysts.size()); for (ClinicalAnalystParam analyst : analysts) { - clinicalAnalystList.add(new ClinicalAnalyst(analyst.getId(), analyst.getId(), "", "", TimeUtils.getTime())); + clinicalAnalystList.add(new ClinicalAnalyst(analyst.getId(), analyst.getId(), "", "", Collections.emptyMap())); } } diff --git a/opencga-core/src/main/java/org/opencb/opencga/core/models/clinical/ClinicalAnalystParam.java b/opencga-core/src/main/java/org/opencb/opencga/core/models/clinical/ClinicalAnalystParam.java index 91861b29d0b..ad3a3cd13f7 100644 --- a/opencga-core/src/main/java/org/opencb/opencga/core/models/clinical/ClinicalAnalystParam.java +++ b/opencga-core/src/main/java/org/opencb/opencga/core/models/clinical/ClinicalAnalystParam.java @@ -1,7 +1,8 @@ package org.opencb.opencga.core.models.clinical; import org.opencb.biodata.models.clinical.ClinicalAnalyst; -import org.opencb.opencga.core.common.TimeUtils; + +import java.util.Collections; public class ClinicalAnalystParam { @@ -23,7 +24,7 @@ public static ClinicalAnalystParam of(ClinicalAnalyst clinicalAnalyst) { } public ClinicalAnalyst toClinicalAnalyst() { - return new ClinicalAnalyst(id != null ? id : "", "", "", "", TimeUtils.getTime()); + return new ClinicalAnalyst(id != null ? id : "", "", "", "", Collections.emptyMap()); } @Override From 0c6871351f9aaec3e51c1886b32bdcfe97d5a685 Mon Sep 17 00:00:00 2001 From: pfurio Date: Wed, 29 Nov 2023 13:01:41 +0100 Subject: [PATCH 24/25] storage: ignore test --- .../variant/annotation/annotators/VariantAnnotatorTest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 02b84fc38a9..ecc48098006 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,20 +1,19 @@ 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.Ignore; import org.junit.Rule; import org.junit.Test; import org.junit.experimental.categories.Category; import org.junit.rules.ExpectedException; 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.core.result.CellBaseDataResult; import org.opencb.commons.datastore.core.ObjectMap; +import org.opencb.opencga.core.config.storage.StorageConfiguration; 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.variant.VariantStorageOptions; import org.opencb.opencga.storage.core.variant.annotation.VariantAnnotatorException; @@ -111,6 +110,7 @@ public void testErrorVariant() throws VariantAnnotatorException { testAnnotator.annotate(Arrays.asList(new Variant("10:999:A:C"), new Variant("10:1000:A:C"), new Variant("10:1001:A:C"))); } + @Ignore @Test public void useCellBaseApiKeys() throws VariantAnnotatorException { storageConfiguration.getCellbase().setUrl("https://uk.ws.zettagenomics.com/cellbase/"); From 712855484c04670024219023ce99b4ee29e4716d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20T=C3=A1rraga=20Gim=C3=A9nez?= Date: Mon, 4 Dec 2023 10:57:59 +0100 Subject: [PATCH 25/25] server: use permissions 777 for tmp directory when running circos plot, #TASK-5113 --- .../opencb/opencga/server/rest/analysis/VariantWebService.java | 1 + 1 file changed, 1 insertion(+) diff --git a/opencga-server/src/main/java/org/opencb/opencga/server/rest/analysis/VariantWebService.java b/opencga-server/src/main/java/org/opencb/opencga/server/rest/analysis/VariantWebService.java index 0d7a5b0a51f..761426a0b9a 100644 --- a/opencga-server/src/main/java/org/opencb/opencga/server/rest/analysis/VariantWebService.java +++ b/opencga-server/src/main/java/org/opencb/opencga/server/rest/analysis/VariantWebService.java @@ -1331,6 +1331,7 @@ public Response circos( if (!outDir.exists()) { return createErrorResponse(new Exception("Error creating temporal directory for Circos analysis")); } + Runtime.getRuntime().exec("chmod 777 " + outDir.getAbsolutePath()); // Create and set up Circos executor CircosLocalAnalysisExecutor executor = new CircosLocalAnalysisExecutor(study, params, variantManager);