diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 93b011f556f..86bcb471976 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,7 +23,7 @@ jobs: uses: opencb/java-common-libs/.github/workflows/deploy-docker-hub-workflow.yml@develop needs: build with: - cli: python3 ./build/cloud/docker/docker-build.py push --images base,init + cli: python3 ./build/cloud/docker/docker-build.py push --images base,init --tag ${{ needs.build.outputs.version }} secrets: inherit deploy-python: diff --git a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/AnalysisUtils.java b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/AnalysisUtils.java index 5db2a91f0a7..ec0206e8695 100644 --- a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/AnalysisUtils.java +++ b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/AnalysisUtils.java @@ -12,7 +12,9 @@ import org.opencb.opencga.core.models.job.Job; import org.opencb.opencga.core.response.OpenCGAResult; -import java.io.*; +import java.io.BufferedReader; +import java.io.FileReader; +import java.io.IOException; import java.nio.file.Path; import java.util.*; @@ -46,6 +48,26 @@ public static File getBamFileBySampleId(String sampleId, String studyId, FileMan return (fileQueryResult.getNumResults() == 0) ? null : fileQueryResult.first(); } + public static File getBwFileBySampleId(String sampleId, String studyId, FileManager fileManager, String token) throws ToolException { + // Look for the bam file for each sample + OpenCGAResult fileQueryResult; + + Query query = new Query(FileDBAdaptor.QueryParams.FORMAT.key(), File.Format.BIGWIG) + .append(FileDBAdaptor.QueryParams.SAMPLE_IDS.key(), sampleId); + try { + fileQueryResult = fileManager.search(studyId, query, QueryOptions.empty(), token); + } catch (CatalogException e) { + throw new ToolException(e); + } + + // Sanity check + if (fileQueryResult.getNumResults() > 1) { + throw new ToolException("Found more than one BIGWIG files (" + fileQueryResult.getNumResults() + ") for sample " + sampleId); + } + + return (fileQueryResult.getNumResults() == 0) ? null : fileQueryResult.first(); + } + public static File getBamFile(String filename, String sampleId, String studyId, FileManager fileManager, String token) throws ToolException { // Look for the bam file for each sample OpenCGAResult fileQueryResult; diff --git a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/alignment/AlignmentAnalysisUtils.java b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/alignment/AlignmentAnalysisUtils.java new file mode 100644 index 00000000000..c1933c0e65d --- /dev/null +++ b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/alignment/AlignmentAnalysisUtils.java @@ -0,0 +1,63 @@ +/* + * 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.alignment; + +import org.opencb.opencga.catalog.exceptions.CatalogException; +import org.opencb.opencga.catalog.managers.CatalogManager; +import org.opencb.opencga.core.exceptions.ToolException; +import org.opencb.opencga.core.models.file.*; +import org.opencb.opencga.core.response.OpenCGAResult; + +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.Collections; + +public class AlignmentAnalysisUtils { + + public static File linkAndUpdate(File bamCatalogFile, Path outPath, String jobId, String study, CatalogManager catalogManager, String token) + throws CatalogException, ToolException { + // Link BW file and update sample info + FileLinkParams fileLinkParams = new FileLinkParams() + .setUri(outPath.toString()) + .setPath(Paths.get(jobId).resolve(outPath.getFileName()).toString()); + OpenCGAResult fileResult = catalogManager.getFileManager().link(study, fileLinkParams, true, token); + if (fileResult.getNumResults() != 1) { + throw new ToolException("It could not link OpenCGA file catalog file for '" + outPath + "'"); + } + File outCatalogFile = fileResult.first(); + + // Updating file: samples, related file + FileUpdateParams updateParams = new FileUpdateParams() + .setSampleIds(bamCatalogFile.getSampleIds()) + .setRelatedFiles(Collections.singletonList(new SmallRelatedFileParams() + .setFile(bamCatalogFile.getId()) + .setRelation(FileRelatedFile.Relation.ALIGNMENT))); + try { + OpenCGAResult updateResult = catalogManager.getFileManager().update(study, outCatalogFile.getId(), updateParams, null, + token); + if (updateResult.getNumUpdated() != 1) { + catalogManager.getFileManager().unlink(study, outCatalogFile.getId(), token); + throw new ToolException("It could not update OpenCGA file catalog (" + outCatalogFile.getId() + + ") from alignment file ID '" + bamCatalogFile.getId() + "'"); + } + } catch (CatalogException e) { + catalogManager.getFileManager().unlink(study, outCatalogFile.getId(), token); + throw e; + } + return outCatalogFile; + } +} diff --git a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/alignment/AlignmentConstants.java b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/alignment/AlignmentConstants.java new file mode 100644 index 00000000000..5b14d140a3b --- /dev/null +++ b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/alignment/AlignmentConstants.java @@ -0,0 +1,26 @@ +/* + * 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.alignment; + +public class AlignmentConstants { + + public static final String BAM_EXTENSION = ".bam"; + public static final String BAI_EXTENSION = ".bai"; + public static final String CRAM_EXTENSION = ".cram"; + public static final String CRAI_EXTENSION = ".crai"; + public static final String BIGWIG_EXTENSION = ".bw"; +} diff --git a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/alignment/AlignmentCoverageAnalysis.java b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/alignment/AlignmentCoverageAnalysis.java index fca5b6a8b16..2712d22b8f3 100644 --- a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/alignment/AlignmentCoverageAnalysis.java +++ b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/alignment/AlignmentCoverageAnalysis.java @@ -16,21 +16,18 @@ package org.opencb.opencga.analysis.alignment; -import org.apache.commons.io.FileUtils; import org.apache.commons.lang3.StringUtils; -import org.opencb.commons.datastore.core.ObjectMap; import org.opencb.commons.datastore.core.QueryOptions; import org.opencb.opencga.analysis.tools.OpenCgaToolScopeStudy; import org.opencb.opencga.analysis.wrappers.deeptools.DeeptoolsWrapperAnalysisExecutor; -import org.opencb.opencga.catalog.exceptions.CatalogException; import org.opencb.opencga.core.exceptions.ToolException; import org.opencb.opencga.core.models.alignment.CoverageIndexParams; import org.opencb.opencga.core.models.common.Enums; import org.opencb.opencga.core.models.file.File; -import org.opencb.opencga.core.response.OpenCGAResult; import org.opencb.opencga.core.tools.annotations.Tool; import org.opencb.opencga.core.tools.annotations.ToolParams; +import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.util.HashMap; @@ -42,18 +39,17 @@ @Tool(id = AlignmentCoverageAnalysis.ID, resource = Enums.Resource.ALIGNMENT, description = "Alignment coverage analysis.") public class AlignmentCoverageAnalysis extends OpenCgaToolScopeStudy { - public final static String ID = "coverage-index-run"; - public final static String DESCRIPTION = "Compute the coverage from a given alignment file, e.g., create a .bw file from a .bam file"; + public static final String ID = "coverage-index-run"; + public static final String DESCRIPTION = "Compute the coverage from a given alignment file, e.g., create a " + + AlignmentConstants.BIGWIG_EXTENSION + " file from a " + AlignmentConstants.BAM_EXTENSION + " file"; @ToolParams protected final CoverageIndexParams coverageParams = new CoverageIndexParams(); private File bamCatalogFile; - private Path inputPath; - - private Path bwCatalogPath; - private Path outputPath; + private File baiCatalogFile; + @Override protected void check() throws Exception { super.check(); @@ -62,42 +58,58 @@ protected void check() throws Exception { throw new ToolException("Missing study when computing alignment coverage"); } - OpenCGAResult fileResult; + // Checking BAM file ID try { - logger.info("{}: checking file {}", ID, coverageParams.getFile()); - fileResult = catalogManager.getFileManager().get(getStudy(), coverageParams.getFile(), QueryOptions.empty(), getToken()); - } catch (CatalogException e) { - throw new ToolException("Error accessing file '" + coverageParams.getFile() + "' of the study " + getStudy() + "'", e); + bamCatalogFile = catalogManager.getFileManager().get(getStudy(), coverageParams.getBamFileId(), QueryOptions.empty(), + getToken()).first(); + if (bamCatalogFile == null) { + throw new ToolException("Could not find BAM file from ID '" + coverageParams.getBamFileId() + "'"); + } + } catch (Exception e) { + throw new ToolException("Could not get BAM file from ID " + coverageParams.getBamFileId()); } - if (fileResult.getNumResults() <= 0) { - throw new ToolException("File '" + coverageParams.getFile() + "' not found in study '" + getStudy() + "'"); + + // Check if the input file is .bam + if (!bamCatalogFile.getName().endsWith(AlignmentConstants.BAM_EXTENSION)) { + throw new ToolException("Invalid input alignment file '" + coverageParams.getBamFileId() + "' (" + bamCatalogFile.getName() + + "): it must be in BAM format"); } - bamCatalogFile = fileResult.getResults().get(0); - inputPath = Paths.get(bamCatalogFile.getUri()); - String filename = inputPath.getFileName().toString(); + // Getting BAI file + String baiFileId = coverageParams.getBaiFileId(); + if (StringUtils.isEmpty(baiFileId)) { + // BAI file ID was not provided, looking for it + logger.info("BAI file ID was not provided, getting it from the internal alignment index of the BAM file ID {}", + bamCatalogFile.getId()); + try { + baiFileId = bamCatalogFile.getInternal().getAlignment().getIndex().getFileId(); + } catch (Exception e) { + throw new ToolException("Could not get internal alignment index file Id from BAM file ID '" + bamCatalogFile.getId()); + } + } + try { + baiCatalogFile = catalogManager.getFileManager().get(getStudy(), baiFileId, QueryOptions.empty(), getToken()).first(); + if (baiCatalogFile == null) { + throw new ToolException("Could not find BAI file from ID '" + coverageParams.getBaiFileId() + "'"); + } + } catch (Exception e) { + throw new ToolException("Could not get BAI file from file ID " + baiFileId); + } - // Check if the input file is .bam - if (!filename.endsWith(".bam")) { - throw new ToolException("Invalid input alignment file '" + coverageParams.getFile() + "': it must be in BAM format"); + logger.info("BAI file ID = {}; path = {}", baiCatalogFile.getId(), Paths.get(baiCatalogFile.getUri())); + + // Checking filenames + if (!baiCatalogFile.getName().equals(bamCatalogFile.getName() + AlignmentConstants.BAI_EXTENSION)) { + throw new ToolException("Filenames mismatch, BAI file name must consist of BAM file name plus the extension " + + AlignmentConstants.BAI_EXTENSION + "; BAM filename = " + bamCatalogFile.getName() + ", BAI filename = " + + baiCatalogFile.getName()); } // Sanity check: window size - logger.info("{}: checking window size {}", ID, coverageParams.getWindowSize()); + logger.info("Checking window size {}", coverageParams.getWindowSize()); if (coverageParams.getWindowSize() <= 0) { coverageParams.setWindowSize(Integer.parseInt(COVERAGE_WINDOW_SIZE_DEFAULT)); - logger.info("{}: window size is set to {}", ID, coverageParams.getWindowSize()); - } - - // Path where the BW file will be created - outputPath = getOutDir().resolve(filename + ".bw"); - - // Check if BW exists already, and then check the flag 'overwrite' - bwCatalogPath = Paths.get(inputPath.toFile().getParent()).resolve(outputPath.getFileName()); - if (bwCatalogPath.toFile().exists() && !coverageParams.isOverwrite()) { - // Nothing to do - throw new ToolException("Nothing to do: coverage file (" + bwCatalogPath + ") already exists and you set the flag 'overwrite'" - + " to false"); + logger.info("Window size is set to {}", coverageParams.getWindowSize()); } } @@ -105,12 +117,30 @@ protected void check() throws Exception { protected void run() throws Exception { setUpStorageEngineExecutor(study); - logger.info("{}: running with parameters {}", ID, coverageParams); + logger.info("Running with parameters {}", coverageParams); step(() -> { + + // Path where the BW file will be created + Path bwPath = getOutDir().resolve(bamCatalogFile.getName() + AlignmentConstants.BIGWIG_EXTENSION); + + // In order to run "deeptools bamCoverage", both BAM and BAI files must be located in the same folder + // Check if both BAM and BAI files are located in the same folder otherwise these files will symbolic-link temporarily + // in the job dir to compute the BW file; then BAM and BAI symbolic links will be deleted from the job dir + Path bamPath = Paths.get(bamCatalogFile.getUri()).toAbsolutePath(); + Path baiPath = Paths.get(baiCatalogFile.getUri()).toAbsolutePath(); + if (!bamPath.getParent().toString().equals(baiPath.getParent().toString())) { + logger.info("BAM and BAI files must be symbolic-linked in the job dir since they are in different directories: {} and {}", + bamPath, baiPath); + bamPath = getOutDir().resolve(bamCatalogFile.getName()).toAbsolutePath(); + baiPath = getOutDir().resolve(baiCatalogFile.getName()).toAbsolutePath(); + Files.createSymbolicLink(bamPath, Paths.get(bamCatalogFile.getUri()).toAbsolutePath()); + Files.createSymbolicLink(baiPath, Paths.get(baiCatalogFile.getUri()).toAbsolutePath()); + } + Map bamCoverageParams = new HashMap<>(); - bamCoverageParams.put("b", inputPath.toAbsolutePath().toString()); - bamCoverageParams.put("o", outputPath.toAbsolutePath().toString()); + bamCoverageParams.put("b", bamPath.toString()); + bamCoverageParams.put("o", bwPath.toAbsolutePath().toString()); bamCoverageParams.put("binSize", String.valueOf(coverageParams.getWindowSize())); bamCoverageParams.put("outFileFormat", "bigwig"); bamCoverageParams.put("minMappingQuality", "20"); @@ -124,38 +154,39 @@ protected void run() throws Exception { .setCommand("bamCoverage") .execute(); - // Check execution result - if (!outputPath.toFile().exists()) { - new ToolException("Something wrong happened running a coverage: BigWig file (" + outputPath.toFile().getName() - + ") was not create, please, check log files."); + // Remove symbolic links if necessary + if (getOutDir().resolve(bamCatalogFile.getName()).toFile().exists()) { + Files.delete(getOutDir().resolve(bamCatalogFile.getName())); + } + if (getOutDir().resolve(baiCatalogFile.getName()).toFile().exists()) { + Files.delete(getOutDir().resolve(baiCatalogFile.getName())); } - // Move the BW file to the same directory where the BAM file is located - logger.info("{}: moving coverage file {} to the same directory where the BAM file is located", ID, - bwCatalogPath.toFile().getName()); - if (bwCatalogPath.toFile().exists()) { - bwCatalogPath.toFile().delete(); + // Check execution result + if (!bwPath.toFile().exists()) { + throw new ToolException("Something wrong happened running a coverage: BigWig file (" + bwPath.toFile().getName() + + ") was not create, please, check log files."); } - FileUtils.moveFile(outputPath.toFile(), bwCatalogPath.toFile()); - // And finally, link the BW file is necessary - boolean isLinked = true; - Path outputCatalogPath = Paths.get(bamCatalogFile.getPath()).getParent().resolve(outputPath.getFileName()); - OpenCGAResult fileResult; + // Try to copy the BW file into the BAM file directory + Path targetPath = Paths.get(bamCatalogFile.getUri()).getParent().resolve(bwPath.getFileName()); try { - fileResult = catalogManager.getFileManager().get(getStudy(), outputCatalogPath.toString(), QueryOptions.empty(), - getToken()); - if (fileResult.getNumResults() <= 0) { - isLinked = false; - } - } catch (CatalogException e) { - isLinked = false; + Files.move(bwPath, targetPath); + } catch (Exception e) { + // Do nothing + logger.info("Moving from {} to {}: {}", bwPath, targetPath, e.getMessage()); } - if (!isLinked) { - logger.info("{}: linking file {} in catalog", ID, bwCatalogPath.toFile().getName()); - catalogManager.getFileManager().link(getStudy(), bwCatalogPath.toUri(), outputCatalogPath.getParent().toString(), - new ObjectMap("parents", true), getToken()); + + if (targetPath.toFile().exists()) { + bwPath = targetPath; + logger.info("Coverage file was copied into the BAM folder: {}", bwPath); + } else { + logger.info("Couldn't copy the coverage file into the BAM folder. The coverage file is in the job folder instead: {}", + bwPath); } + + // Link generated BIGWIG file and update samples info + AlignmentAnalysisUtils.linkAndUpdate(bamCatalogFile, bwPath, getJobId(), study, catalogManager, token); }); } } diff --git a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/alignment/AlignmentIndexOperation.java b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/alignment/AlignmentIndexOperation.java index 723ca02e16e..f21986c2174 100644 --- a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/alignment/AlignmentIndexOperation.java +++ b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/alignment/AlignmentIndexOperation.java @@ -16,35 +16,35 @@ package org.opencb.opencga.analysis.alignment; -import org.apache.commons.io.FileUtils; import org.opencb.biodata.tools.alignment.BamManager; -import org.opencb.commons.datastore.core.ObjectMap; import org.opencb.commons.datastore.core.QueryOptions; import org.opencb.opencga.analysis.tools.OpenCgaTool; import org.opencb.opencga.catalog.exceptions.CatalogException; import org.opencb.opencga.core.exceptions.ToolException; import org.opencb.opencga.core.models.common.Enums; -import org.opencb.opencga.core.models.file.File; +import org.opencb.opencga.core.models.common.InternalStatus; +import org.opencb.opencga.core.models.file.*; import org.opencb.opencga.core.response.OpenCGAResult; import org.opencb.opencga.core.tools.annotations.Tool; +import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; @Tool(id = AlignmentIndexOperation.ID, resource = Enums.Resource.ALIGNMENT, description = "Index alignment.") public class AlignmentIndexOperation extends OpenCgaTool { - public final static String ID = "alignment-index-run"; - public final static String DESCRIPTION = "Index a given alignment file, e.g., create a .bai file from a .bam file"; + public static final String ID = "alignment-index-run"; + public static final String DESCRIPTION = "Index a given alignment file, e.g., create a .bai file from a .bam file"; private String study; private String inputFile; - private boolean overwrite; private File inputCatalogFile; private Path inputPath; private Path outputPath; + @Override protected void check() throws Exception { super.check(); @@ -63,50 +63,52 @@ protected void check() throws Exception { String filename = inputPath.getFileName().toString(); // Check if the input file is .bam or .cram - if (!filename.endsWith(".bam") && !filename.endsWith(".cram")) { + if (!filename.endsWith(AlignmentConstants.BAM_EXTENSION) && !filename.endsWith(AlignmentConstants.CRAM_EXTENSION)) { throw new ToolException("Invalid input alignment file '" + inputFile + "': it must be in BAM or CRAM format"); } - outputPath = getOutDir().resolve(filename + (filename.endsWith(".bam") ? ".bai" : ".crai")); + outputPath = getOutDir().resolve(filename + (filename.endsWith(AlignmentConstants.BAM_EXTENSION) + ? AlignmentConstants.BAI_EXTENSION : AlignmentConstants.CRAI_EXTENSION)); } @Override protected void run() throws Exception { step(ID, () -> { - - Path indexPath = Paths.get(inputPath.toFile().getParent()).resolve(outputPath.getFileName()); - if (overwrite || !indexPath.toFile().exists()) { - // Compute index if necessary - BamManager bamManager = new BamManager(inputPath); - bamManager.createIndex(outputPath); - bamManager.close(); - - if (!outputPath.toFile().exists()) { - throw new ToolException("Something wrong happened when computing index file for '" + inputFile + "'"); - } - - if (indexPath.toFile().exists()) { - indexPath.toFile().delete(); - } - FileUtils.moveFile(outputPath.toFile(), indexPath.toFile()); + // Compute index if necessary + logger.info("Computing alignment index for {}", inputPath); + BamManager bamManager = new BamManager(inputPath); + bamManager.createIndex(outputPath); + bamManager.close(); + + if (!outputPath.toFile().exists()) { + throw new ToolException("Something wrong happened when computing index file for '" + inputFile + "'"); } - boolean isLinked = true; - Path outputCatalogPath = Paths.get(inputCatalogFile.getPath()).getParent().resolve(outputPath.getFileName()); - OpenCGAResult fileResult; + // Try to copy the BAI file into the BAM file directory + Path targetPath = inputPath.getParent().resolve(outputPath.getFileName()); try { - fileResult = catalogManager.getFileManager().get(getStudy(), outputCatalogPath.toString(), QueryOptions.empty(), token); - if (fileResult.getNumResults() <= 0) { - isLinked = false; - } - } catch (CatalogException e) { - isLinked = false; + Files.move(outputPath, targetPath); + } catch (Exception e) { + // Do nothing + logger.info("Moving from {} to {}: {}", outputPath, targetPath, e.getMessage()); } - if (!isLinked) { - catalogManager.getFileManager().link(getStudy(), indexPath.toUri(), outputCatalogPath.getParent().toString(), - new ObjectMap("parents", true), token); + + if (targetPath.toFile().exists()) { + outputPath = targetPath; + logger.info("Alignment index file was copied into the BAM folder: {}", outputPath); + } else { + logger.info("Couldn't copy the alignment index file into the BAM folder. The index file is in the job folder instead: {}", + outputPath); } + + // Link generated BAI file and update samples info, related file + File baiCatalogFile = AlignmentAnalysisUtils.linkAndUpdate(inputCatalogFile, outputPath, getJobId(), study, catalogManager, token); + + // Update BAM file internal in order to set the alignment index (BAI) + FileInternalAlignmentIndex fileAlignmentIndex = new FileInternalAlignmentIndex(new InternalStatus(InternalStatus.READY), + baiCatalogFile.getId(), "HTSJDK library"); + catalogManager.getFileManager().updateFileInternalAlignmentIndex(study, inputCatalogFile, fileAlignmentIndex, token); }); } @@ -127,13 +129,4 @@ public AlignmentIndexOperation setInputFile(String inputFile) { this.inputFile = inputFile; return this; } - - public boolean isOverwrite() { - return overwrite; - } - - public AlignmentIndexOperation setOverwrite(boolean overwrite) { - this.overwrite = overwrite; - return this; - } } diff --git a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/alignment/AlignmentStorageManager.java b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/alignment/AlignmentStorageManager.java index 3f75b28abbb..7c3396cb48e 100644 --- a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/alignment/AlignmentStorageManager.java +++ b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/alignment/AlignmentStorageManager.java @@ -92,7 +92,7 @@ public AlignmentStorageManager(CatalogManager catalogManager, StorageEngineFacto // INDEX //------------------------------------------------------------------------- - public void index(String study, String inputFile, boolean overwrite, String outdir, String token) throws ToolException { + public void index(String study, String inputFile, String outdir, String token) throws ToolException { ObjectMap params = new ObjectMap(); AlignmentIndexOperation indexOperation = new AlignmentIndexOperation(); @@ -100,7 +100,6 @@ public void index(String study, String inputFile, boolean overwrite, String outd indexOperation.setStudy(study); indexOperation.setInputFile(inputFile); - indexOperation.setOverwrite(overwrite); indexOperation.start(); } diff --git a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/family/qc/FamilyQcAnalysis.java b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/family/qc/FamilyQcAnalysis.java index 1fc2f5bfb5e..febc214e9e7 100644 --- a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/family/qc/FamilyQcAnalysis.java +++ b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/family/qc/FamilyQcAnalysis.java @@ -24,6 +24,7 @@ import org.opencb.opencga.analysis.variant.relatedness.RelatednessAnalysis; import org.opencb.opencga.catalog.exceptions.CatalogException; import org.opencb.opencga.catalog.utils.CatalogFqn; + import org.opencb.opencga.core.exceptions.ToolException; import org.opencb.opencga.core.models.JwtPayload; import org.opencb.opencga.core.models.common.Enums; diff --git a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/individual/qc/IndividualQcAnalysis.java b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/individual/qc/IndividualQcAnalysis.java index e6c20fba373..b8eb489031d 100644 --- a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/individual/qc/IndividualQcAnalysis.java +++ b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/individual/qc/IndividualQcAnalysis.java @@ -20,15 +20,18 @@ import org.apache.commons.lang3.StringUtils; import org.opencb.biodata.models.clinical.qc.InferredSexReport; import org.opencb.commons.datastore.core.QueryOptions; -import org.opencb.opencga.analysis.AnalysisUtils; import org.opencb.opencga.analysis.tools.OpenCgaTool; +import org.opencb.opencga.analysis.variant.inferredSex.InferredSexAnalysis; import org.opencb.opencga.catalog.exceptions.CatalogException; + +import org.opencb.opencga.catalog.managers.CatalogManager; + import org.opencb.opencga.catalog.utils.CatalogFqn; + import org.opencb.opencga.core.common.JacksonUtils; import org.opencb.opencga.core.exceptions.ToolException; import org.opencb.opencga.core.models.JwtPayload; import org.opencb.opencga.core.models.common.Enums; -import org.opencb.opencga.core.models.file.File; import org.opencb.opencga.core.models.individual.Individual; import org.opencb.opencga.core.models.individual.IndividualQualityControl; import org.opencb.opencga.core.models.individual.IndividualUpdateParams; @@ -66,11 +69,11 @@ public class IndividualQcAnalysis extends OpenCgaTool { private Sample sample; private String motherSampleId; private String fatherSampleId; - private Map karyotypicSexThresholds; private IndividualQualityControl qualityControl; private IndividualQcAnalysisExecutor executor; public IndividualQcAnalysis() { + super(); } @Override @@ -82,6 +85,11 @@ protected void check() throws Exception { throw new ToolException("Missing study ID."); } + // Set default inferred sex method, if empty + if (StringUtils.isEmpty(inferredSexMethod)) { + inferredSexMethod = COVERAGE_RATIO_INFERRED_SEX_METHOD; + } + // Check permissions try { Study study = catalogManager.getStudyManager().get(studyId, QueryOptions.empty(), token).first(); @@ -95,10 +103,10 @@ protected void check() throws Exception { throw new ToolException(e); } + // Main check (this function is shared with the endpoint individual/qc/run) + checkParameters(individualId, sampleId, inferredSexMethod, studyId, catalogManager, token); + // Get individual - if (StringUtils.isEmpty(individualId)) { - throw new ToolException("Missing individual ID."); - } individual = IndividualQcUtils.getIndividualById(studyId, individualId, catalogManager, token); // Get samples of that individual, but only germline samples @@ -109,22 +117,18 @@ protected void check() throws Exception { throw new ToolException("Germline sample not found for individual '" + individualId + "'"); } - if (childGermlineSamples.size() > 1) { - if (StringUtils.isNotEmpty(sampleId)) { - for (Sample germlineSample : childGermlineSamples) { - if (sampleId.equals(germlineSample.getId())) { - sample = germlineSample; - break; - } - } - if (sample == null) { - throw new ToolException("The provided sample '" + sampleId + "' not found in the individual '" + individualId + "'"); + if (StringUtils.isNotEmpty(sampleId)) { + for (Sample germlineSample : childGermlineSamples) { + if (sampleId.equals(germlineSample.getId())) { + sample = germlineSample; + break; } - } else { - // If multiple germline samples, we take the first one - sample = childGermlineSamples.get(0); + } + if (sample == null) { + throw new ToolException("The provided sample '" + sampleId + "' not found in the individual '" + individualId + "'"); } } else { + // If multiple germline samples, we take the first one sample = childGermlineSamples.get(0); } @@ -143,10 +147,6 @@ protected void check() throws Exception { fatherSampleId = fatherGermlineSamples.get(0).getId(); } } - - if (StringUtils.isEmpty(inferredSexMethod)) { - inferredSexMethod = COVERAGE_RATIO_INFERRED_SEX_METHOD; - } } @Override @@ -181,8 +181,8 @@ protected void run() throws ToolException { .setInferredSexMethod(inferredSexMethod) .setQualityControl(qualityControl); - step(INFERRED_SEX_STEP, () -> runInferredSex()); - step(MENDELIAN_ERRORS_STEP, () -> runMendelianError()); + step(INFERRED_SEX_STEP, this::runInferredSex); + step(MENDELIAN_ERRORS_STEP, this::runMendelianError); // Finally, update individual quality control try { @@ -201,38 +201,23 @@ private void runInferredSex() throws ToolException { if (CollectionUtils.isNotEmpty(qualityControl.getInferredSexReports())) { for (InferredSexReport inferredSexReport : qualityControl.getInferredSexReports()) { if (inferredSexReport.getMethod().equals(inferredSexMethod)) { - addWarning("Skipping inferred sex: it was already computed using method '" + inferredSexMethod + "'"); + String msg = "Skipping inferred sex: it was already computed using method '" + inferredSexMethod + "'"; + logger.warn(msg); + addWarning(msg); return; } } } - if (!COVERAGE_RATIO_INFERRED_SEX_METHOD.equals(inferredSexMethod)) { - addWarning("Skipping inferred sex: unknown inferred sex method '" + inferredSexMethod + "'. Please, use '" - + COVERAGE_RATIO_INFERRED_SEX_METHOD + "'"); - return; - } - - File inferredSexBamFile; - try { - inferredSexBamFile = AnalysisUtils.getBamFileBySampleId(sample.getId(), studyId, - getVariantStorageManager().getCatalogManager().getFileManager(), getToken()); - } catch (ToolException e) { - throw new ToolException(e); - } - - if (inferredSexBamFile == null) { - addWarning("Skipping inferred sex: BAM file not found for sample '" + sample.getId() + "' of individual '" + - individual.getId() + "'"); - return; - } - + Map karyotypicSexThresholds; + Path thresholdsPath = getOpencgaHome().resolve("analysis").resolve(ID).resolve("karyotypic_sex_thresholds.json"); try { - Path thresholdsPath = getOpencgaHome().resolve("analysis").resolve(ID).resolve("karyotypic_sex_thresholds.json"); karyotypicSexThresholds = JacksonUtils.getDefaultNonNullObjectMapper().readerFor(Map.class).readValue(thresholdsPath.toFile()); } catch (IOException e) { - addWarning("Skipping inferred sex: something wrong happened when loading the karyotypic sex thresholds file" - + " (karyotypic_sex_thresholds.json)"); + String msg = "Skipping inferred sex: something wrong happened when loading the karyotypic sex thresholds file: " + + thresholdsPath.toAbsolutePath(); + logger.warn(msg); + addWarning(msg); return; } executor.setQcType(IndividualQcAnalysisExecutor.QcType.INFERRED_SEX) @@ -242,25 +227,54 @@ private void runInferredSex() throws ToolException { private void runMendelianError() throws ToolException { if (CollectionUtils.isNotEmpty(qualityControl.getMendelianErrorReports())) { - addWarning("Skipping mendelian error: it was already computed"); + String msg = "Skipping mendelian error: it was already computed"; + logger.warn(msg); + addWarning(msg); return; } // Sanity check if (sample == null || StringUtils.isEmpty(sample.getId())) { - addWarning("Skipping mendelian error: missing child sample ID."); + String msg = "Skipping mendelian error: missing child sample ID"; + logger.warn(msg); + addWarning(msg); return; } if (StringUtils.isEmpty(motherSampleId) && StringUtils.isEmpty(fatherSampleId)) { - addWarning("Skipping mendelian error: both mother and father sample IDs are empty but in order to compute mendelian" - + " errors at least one of them has to be not empty."); + String msg = "Skipping mendelian error: both mother and father sample IDs are empty but in order to compute mendelian" + + " errors at least one of them has to be not empty"; + logger.warn(msg); + addWarning(msg); return; } executor.setQcType(IndividualQcAnalysisExecutor.QcType.MENDELIAN_ERRORS).execute(); } + public static void checkParameters(String individualId, String sampleId, String inferredSexMethod, String studyId, + CatalogManager catalogManager, String token) throws ToolException, CatalogException { + // Check permissions + try { + Study study = catalogManager.getStudyManager().get(studyId, QueryOptions.empty(), token).first(); + JwtPayload jwtPayload = catalogManager.getUserManager().validateToken(token); + CatalogFqn studyFqn = CatalogFqn.extractFqnFromStudy(studyId, jwtPayload); + String organizationId = studyFqn.getOrganizationId(); + String userId = jwtPayload.getUserId(organizationId); + catalogManager.getAuthorizationManager().checkStudyPermission(organizationId, study.getUid(), userId, WRITE_INDIVIDUALS); + } catch (CatalogException e) { + throw new ToolException(e); + } + + if (StringUtils.isNotEmpty(inferredSexMethod) && !inferredSexMethod.equals(COVERAGE_RATIO_INFERRED_SEX_METHOD)) { + throw new ToolException("Unknown inferred sex method: '" + inferredSexMethod + "'. Valid values: " + + COVERAGE_RATIO_INFERRED_SEX_METHOD); + } + + // Check inferred sex analysis parameters + InferredSexAnalysis.checkParameters(individualId, sampleId, studyId, catalogManager, token); + } + public String getStudyId() { return studyId; } diff --git a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/individual/qc/IndividualQcLocalAnalysisExecutor.java b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/individual/qc/IndividualQcLocalAnalysisExecutor.java index 26540fc5e05..362d5a25a89 100644 --- a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/individual/qc/IndividualQcLocalAnalysisExecutor.java +++ b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/individual/qc/IndividualQcLocalAnalysisExecutor.java @@ -16,8 +16,6 @@ package org.opencb.opencga.analysis.individual.qc; -import com.fasterxml.jackson.core.JsonGenerationException; -import com.fasterxml.jackson.databind.JsonMappingException; import org.apache.commons.collections4.MapUtils; import org.opencb.biodata.models.clinical.qc.InferredSexReport; import org.opencb.biodata.models.clinical.qc.MendelianErrorReport; @@ -54,26 +52,28 @@ public void run() throws ToolException { runInferredSex(); break; } - case MENDELIAN_ERRORS: { runMendelianErrors(); break; } + default: { + throw new ToolException("Unknown individual QC: '" + qcType + "'"); + } } } private void runInferredSex() throws ToolException { - File inferredSexBamFile; + File bwFile; try { - inferredSexBamFile = AnalysisUtils.getBamFileBySampleId(sampleId, studyId, - getVariantStorageManager().getCatalogManager().getFileManager(), getToken()); + bwFile = AnalysisUtils.getBwFileBySampleId(sampleId, studyId, getVariantStorageManager().getCatalogManager().getFileManager(), + getToken()); } catch (ToolException e) { addWarning("Skipping inferred sex: " + e.getMessage()); return; } - if (inferredSexBamFile == null) { - addWarning("Skipping inferred sex: BAM file not found for sample '" + sampleId + "' of individual '" + + if (bwFile == null) { + addWarning("Skipping inferred sex: BIGWIG file not found for sample '" + sampleId + "' of individual '" + individual.getId() + "'"); return; } @@ -91,7 +91,7 @@ private void runInferredSex() throws ToolException { // Infer the sex for that sample // Compute ratios: X-chrom / autosomic-chroms and Y-chrom / autosomic-chroms - double[] ratios = InferredSexComputation.computeRatios(studyId, inferredSexBamFile, assembly, alignmentStorageManager, getToken()); + double[] ratios = InferredSexComputation.computeRatios(studyId, bwFile, assembly, alignmentStorageManager, getToken()); // Infer sex from ratios double xAuto = ratios[0]; @@ -109,8 +109,8 @@ private void runInferredSex() throws ToolException { values.put("ratioY", yAuto); // Set inferred sex report (individual fields will be set later) - qualityControl.getInferredSexReports().add(new InferredSexReport(sampleId, "CoverageRatio", inferredKaryotypicSex, values, - Collections.emptyList())); + qualityControl.getInferredSexReports().add(new InferredSexReport(sampleId, COVERAGE_RATIO_INFERRED_SEX_METHOD, + inferredKaryotypicSex, values, Collections.singletonList(bwFile.getId()))); } private void runMendelianErrors() throws ToolException { @@ -129,7 +129,6 @@ private void runMendelianErrors() throws ToolException { qualityControl.setMendelianErrorReports(Collections.singletonList(mendelianErrorReport)); } catch (ToolException | IOException e) { addWarning("Skipping mendelian errors: " + e.getMessage()); - return; } } } diff --git a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/individual/qc/InferredSexComputation.java b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/individual/qc/InferredSexComputation.java index e643ddda871..770b75e9c68 100644 --- a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/individual/qc/InferredSexComputation.java +++ b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/individual/qc/InferredSexComputation.java @@ -18,46 +18,42 @@ import org.opencb.biodata.models.alignment.RegionCoverage; import org.opencb.biodata.models.core.Region; -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.alignment.AlignmentStorageManager; import org.opencb.opencga.analysis.variant.mutationalSignature.MutationalSignatureLocalAnalysisExecutor; -import org.opencb.opencga.catalog.db.api.FileDBAdaptor; -import org.opencb.opencga.catalog.exceptions.CatalogException; -import org.opencb.opencga.catalog.managers.FileManager; import org.opencb.opencga.core.exceptions.ToolException; import org.opencb.opencga.core.models.file.File; -import org.opencb.opencga.core.response.OpenCGAResult; import java.io.IOException; import java.nio.file.Path; -import java.util.*; +import java.util.AbstractMap; +import java.util.List; +import java.util.Map; import static org.opencb.opencga.core.tools.variant.InferredSexAnalysisExecutor.GRCH37_CHROMOSOMES; import static org.opencb.opencga.core.tools.variant.InferredSexAnalysisExecutor.GRCH38_CHROMOSOMES; public class InferredSexComputation { - public static double[] computeRatios(String study, File bamFile, String assembly, AlignmentStorageManager alignmentStorageManager, + public static double[] computeRatios(String study, File bwFile, String assembly, AlignmentStorageManager alignmentStorageManager, String token) throws ToolException { // Compute coverage for each chromosome for each BAM file - // TODO get chromosomes from cellbase Map chromosomes; - if (assembly.toLowerCase().equals("grch37")) { + if (assembly.equalsIgnoreCase("grch37")) { chromosomes = GRCH37_CHROMOSOMES; } else { chromosomes = GRCH38_CHROMOSOMES; } double[] means = new double[]{0d, 0d, 0d}; - for (String chrom : chromosomes.keySet()) { - int chromSize = chromosomes.get(chrom); + for (Map.Entry entry : chromosomes.entrySet()) { + String chrom = entry.getKey(); + int chromSize = entry.getValue(); Region region = new Region(chrom, 1, chromSize); try { - List regionCoverages = alignmentStorageManager.coverageQuery(study, bamFile.getUuid(), region, 0, + List regionCoverages = alignmentStorageManager.coverageQuery(study, bwFile.getId(), region, 0, Integer.MAX_VALUE, chromSize, token).getResults(); double meanCoverage = 0d; @@ -98,8 +94,7 @@ public static java.io.File plot(File inputFile, Path outDir) throws ToolExceptio "/data/output"); String rParams = "R CMD Rscript --vanilla /data/input/" + inputFile.getName(); try { - String cmdline = DockerUtils.run(MutationalSignatureLocalAnalysisExecutor.R_DOCKER_IMAGE, null, outputBinding, rParams, null); - System.out.println("Docker command line: " + cmdline); + DockerUtils.run(MutationalSignatureLocalAnalysisExecutor.R_DOCKER_IMAGE, null, outputBinding, rParams, null); } catch (IOException e) { throw new ToolException(e); } diff --git a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/inferredSex/InferredSexAnalysis.java b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/inferredSex/InferredSexAnalysis.java index 5af0792ac38..9e766accb7a 100644 --- a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/inferredSex/InferredSexAnalysis.java +++ b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/inferredSex/InferredSexAnalysis.java @@ -16,19 +16,28 @@ package org.opencb.opencga.analysis.variant.inferredSex; +import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.opencb.biodata.models.clinical.qc.InferredSexReport; +import org.opencb.commons.datastore.core.QueryOptions; import org.opencb.opencga.analysis.AnalysisUtils; +import org.opencb.opencga.analysis.alignment.AlignmentConstants; +import org.opencb.opencga.analysis.individual.qc.IndividualQcUtils; import org.opencb.opencga.analysis.tools.OpenCgaTool; import org.opencb.opencga.catalog.exceptions.CatalogException; +import org.opencb.opencga.catalog.managers.CatalogManager; import org.opencb.opencga.core.common.JacksonUtils; import org.opencb.opencga.core.exceptions.ToolException; import org.opencb.opencga.core.models.common.Enums; import org.opencb.opencga.core.models.file.File; +import org.opencb.opencga.core.models.individual.Individual; +import org.opencb.opencga.core.models.sample.Sample; +import org.opencb.opencga.core.response.OpenCGAResult; import org.opencb.opencga.core.tools.annotations.Tool; import org.opencb.opencga.core.tools.variant.InferredSexAnalysisExecutor; import java.io.IOException; +import java.util.List; @Tool(id = InferredSexAnalysis.ID, resource = Enums.Resource.VARIANT, description = InferredSexAnalysis.DESCRIPTION) public class InferredSexAnalysis extends OpenCgaTool { @@ -38,27 +47,13 @@ public class InferredSexAnalysis extends OpenCgaTool { private String studyId; private String individualId; + private String sampleId; - public InferredSexAnalysis() { - } + // Internal members + private Individual individual; + private Sample sample; - /** - * Study of the samples. - * @param studyId Study ID - * @return this - */ - public InferredSexAnalysis setStudyId(String studyId) { - this.studyId = studyId; - return this; - } - - public String getIndividualId() { - return individualId; - } - - public InferredSexAnalysis setIndividualId(String individualId) { - this.individualId = individualId; - return this; + public InferredSexAnalysis() { } @Override @@ -76,18 +71,33 @@ protected void check() throws Exception { throw new ToolException(e); } - // Check individual and sample - if (StringUtils.isEmpty(individualId)) { - throw new ToolException("Missing individual ID."); - } + // Main check (this function is shared with the endpoint individual/qc/run) + checkParameters(individualId, sampleId, studyId, catalogManager, token); + + // Get individual + individual = IndividualQcUtils.getIndividualById(studyId, individualId, catalogManager, token); - // Check BAM and BW files for that individual/sample - File bamFile = AnalysisUtils.getBamFileBySampleId(individualId, studyId, getCatalogManager().getFileManager(), getToken()); - if (bamFile == null) { - throw new ToolException("BAM file not found for individual/sample '" + individualId + "'"); + // Get samples of that individual, but only germline samples + sample = null; + List childGermlineSamples = IndividualQcUtils.getValidGermlineSamplesByIndividualId(studyId, individualId, catalogManager, + token); + if (CollectionUtils.isEmpty(childGermlineSamples)) { + throw new ToolException("Germline sample not found for individual '" + individualId + "'"); } - if (!new java.io.File(bamFile.getUri().getPath() + ".bw").exists()) { - throw new ToolException("BigWig (BW) file not found for individual/sample '" + individualId + "'"); + + if (StringUtils.isNotEmpty(sampleId)) { + for (Sample germlineSample : childGermlineSamples) { + if (sampleId.equals(germlineSample.getId())) { + sample = germlineSample; + break; + } + } + if (sample == null) { + throw new ToolException("The provided sample '" + sampleId + "' not found in the individual '" + individualId + "'"); + } + } else { + // If multiple germline samples, we take the first one + sample = childGermlineSamples.get(0); } } @@ -98,7 +108,8 @@ protected void run() throws ToolException { InferredSexAnalysisExecutor inferredSexExecutor = getToolExecutor(InferredSexAnalysisExecutor.class); inferredSexExecutor.setStudyId(studyId) - .setIndividualId(individualId) + .setIndividualId(individual.getId()) + .setSampleId(sample.getId()) .execute(); // Get inferred sex report @@ -112,4 +123,90 @@ protected void run() throws ToolException { } }); } + + public static void checkParameters(String individualId, String sampleId, String studyId, CatalogManager catalogManager, String token) throws ToolException, CatalogException { + // Check individual and sample + if (StringUtils.isEmpty(individualId)) { + throw new ToolException("Missing individual ID"); + } + Individual individual = IndividualQcUtils.getIndividualById(studyId, individualId, catalogManager, token); + + // Get samples of that individual, but only germline samples + List childGermlineSamples = IndividualQcUtils.getValidGermlineSamplesByIndividualId(studyId, individualId, catalogManager, + token); + if (CollectionUtils.isEmpty(childGermlineSamples)) { + throw new ToolException("Germline sample not found for individual '" + individualId + "'"); + } + + Sample sample = null; + if (StringUtils.isNotEmpty(sampleId)) { + for (Sample germlineSample : childGermlineSamples) { + if (sampleId.equals(germlineSample.getId())) { + sample = germlineSample; + break; + } + } + if (sample == null) { + throw new ToolException("The provided sample '" + sampleId + "' not found in the individual '" + individualId + "'"); + } + } else { + // Taking the first sample + sample = childGermlineSamples.get(0); + } + + // Checking sample file BIGWIG required to compute inferred-sex + String bwFileId = null; + for (String fileId : sample.getFileIds()) { + if (fileId.endsWith(AlignmentConstants.BIGWIG_EXTENSION)) { + if (bwFileId != null) { + throw new ToolException("Multiple BIGWIG files found for individual/sample (" + individual.getId() + "/" + + sample.getId() + ")"); + } + bwFileId = fileId; + } + } + checkSampleFile(bwFileId, "BIGWIG", sample, individual, studyId, catalogManager, token); + } + + private static void checkSampleFile(String fileId, String label, Sample sample, Individual individual, String studyId, + CatalogManager catalogManager, String token) + throws ToolException, CatalogException { + if (StringUtils.isEmpty(fileId)) { + throw new ToolException("None " + label + " file registered for individual/sample (" + individual.getId() + "/" + + sample.getId() + ")"); + } else { + OpenCGAResult fileResult = catalogManager.getFileManager().get(studyId, fileId, QueryOptions.empty(), token); + if (fileResult.getNumResults() == 0) { + throw new ToolException(label + " file ID '" + fileId + "' not found in OpenCGA catalog for individual/sample (" + + individual.getId() + "/" + sample.getId() + ")"); + } + } + } + /** + * Study of the samples. + * @param studyId Study ID + * @return this + */ + public InferredSexAnalysis setStudyId(String studyId) { + this.studyId = studyId; + return this; + } + + public String getIndividualId() { + return individualId; + } + + public InferredSexAnalysis setIndividualId(String individualId) { + this.individualId = individualId; + return this; + } + + public String getSampleId() { + return sampleId; + } + + public InferredSexAnalysis setSampleId(String sampleId) { + this.sampleId = sampleId; + return this; + } } diff --git a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/inferredSex/InferredSexLocalAnalysisExecutor.java b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/inferredSex/InferredSexLocalAnalysisExecutor.java index 8f773912f1b..228024dff15 100644 --- a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/inferredSex/InferredSexLocalAnalysisExecutor.java +++ b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/inferredSex/InferredSexLocalAnalysisExecutor.java @@ -25,8 +25,6 @@ import org.opencb.opencga.analysis.individual.qc.IndividualQcUtils; import org.opencb.opencga.analysis.individual.qc.InferredSexComputation; import org.opencb.opencga.catalog.exceptions.CatalogException; -import org.opencb.opencga.catalog.managers.CatalogManager; -import org.opencb.opencga.catalog.managers.FileManager; import org.opencb.opencga.core.common.JacksonUtils; import org.opencb.opencga.core.exceptions.ToolException; import org.opencb.opencga.core.models.file.File; @@ -36,68 +34,66 @@ import java.io.IOException; import java.nio.file.Path; import java.nio.file.Paths; -import java.util.ArrayList; +import java.util.Collections; import java.util.HashMap; -import java.util.List; import java.util.Map; +import static org.opencb.opencga.core.tools.variant.IndividualQcAnalysisExecutor.COVERAGE_RATIO_INFERRED_SEX_METHOD; + @ToolExecutor(id = "opencga-local", tool = InferredSexAnalysis.ID, framework = ToolExecutor.Framework.LOCAL, source = ToolExecutor.Source.STORAGE) public class InferredSexLocalAnalysisExecutor extends InferredSexAnalysisExecutor implements StorageToolExecutor { @Override public void run() throws ToolException { - // IMPORTANT: we assume sample and individual have the same ID - AlignmentStorageManager alignmentStorageManager = getAlignmentStorageManager(); - CatalogManager catalogManager = alignmentStorageManager.getCatalogManager(); - FileManager fileManager = catalogManager.getFileManager(); - String assembly; + File bwFile = AnalysisUtils.getBwFileBySampleId(sampleId, getStudyId(), getVariantStorageManager().getCatalogManager().getFileManager(), + getToken()); - // Get alignment file by individual - File inferredSexBamFile = AnalysisUtils.getBamFileBySampleId(getIndividualId(), getStudyId(), fileManager, getToken()); - if (inferredSexBamFile == null) { - throw new ToolException("Alignment file not found for the individual/sample '" + getIndividualId() + "'"); + if (bwFile == null) { + throw new ToolException("BIGWIG file not found for sample '" + sampleId + "' of individual '" + individualId + "'"); } - // Ge assembly + // Get managers + AlignmentStorageManager alignmentStorageManager = getAlignmentStorageManager(); + + // Get assembly + String assembly; try { assembly = IndividualQcUtils.getAssembly(getStudyId(), alignmentStorageManager.getCatalogManager(), getToken()); } catch (CatalogException e) { throw new ToolException(e); } + // Infer the sex for that sample // Compute ratios: X-chrom / autosomic-chroms and Y-chrom / autosomic-chroms - double[] ratios = InferredSexComputation.computeRatios(getStudyId(), inferredSexBamFile, assembly, alignmentStorageManager, - getToken()); + double[] ratios = InferredSexComputation.computeRatios(studyId, bwFile, assembly, alignmentStorageManager, getToken()); + // Infer sex from ratios double xAuto = ratios[0]; double yAuto = ratios[1]; - // Read the karyotypic sex tyhresholds - String inferredKaryotypicSex = "UNKNOWN"; Map karyotypicSexThresholds = new HashMap<>(); + String opencgaHome = getExecutorParams().getString("opencgaHome"); + Path thresholdsPath = Paths.get(opencgaHome).resolve("analysis").resolve(IndividualQcAnalysis.ID) + .resolve("karyotypic_sex_thresholds.json"); try { - String opencgaHome = getExecutorParams().getString("opencgaHome"); - Path thresholdsPath = Paths.get(opencgaHome).resolve("analysis").resolve(IndividualQcAnalysis.ID) - .resolve("karyotypic_sex_thresholds.json"); karyotypicSexThresholds = JacksonUtils.getDefaultNonNullObjectMapper().readerFor(Map.class).readValue(thresholdsPath.toFile()); } catch (IOException e) { - addWarning("Skipping inferring karyotypic sex: something wrong happened when loading the karyotypic sex thresholds file" - + " (karyotypic_sex_thresholds.json)"); + throw new ToolException("Skipping inferring karyotypic sex: something wrong happened when loading the karyotypic sex" + + " thresholds file: " + thresholdsPath); } - if (MapUtils.isNotEmpty(karyotypicSexThresholds)) { - inferredKaryotypicSex = InferredSexComputation.inferKaryotypicSex(xAuto, yAuto, karyotypicSexThresholds); + if (MapUtils.isEmpty(karyotypicSexThresholds)) { + throw new ToolException("Impossible to infer karyotypic sex beacause sex thresholds are empty: " + thresholdsPath); } + String inferredKaryotypicSex = InferredSexComputation.inferKaryotypicSex(xAuto, yAuto, karyotypicSexThresholds); - // Set inferred sex report: ratios and files + // Set coverage ratio Map values = new HashMap<>(); values.put("ratioX", xAuto); values.put("ratioY", yAuto); - List reportedFiles = new ArrayList<>(); - reportedFiles.add(inferredSexBamFile.getName()); - reportedFiles.add(inferredSexBamFile.getName() + ".bw"); - - setInferredSexReport(new InferredSexReport(getIndividualId(), "CoverageRatio", inferredKaryotypicSex, values, reportedFiles)); + // Set inferred sex report (individual fields will be set later) + inferredSexReport = new InferredSexReport(sampleId, COVERAGE_RATIO_INFERRED_SEX_METHOD, inferredKaryotypicSex, values, + Collections.singletonList(bwFile.getId())); } } diff --git a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/operations/VariantFileIndexJobLauncherTool.java b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/operations/VariantFileIndexJobLauncherTool.java index c548f0fbbca..1178c9a8081 100644 --- a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/operations/VariantFileIndexJobLauncherTool.java +++ b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/operations/VariantFileIndexJobLauncherTool.java @@ -1,5 +1,6 @@ package org.opencb.opencga.analysis.variant.operations; +import org.apache.commons.lang3.RandomStringUtils; import org.apache.commons.lang3.StringUtils; import org.opencb.commons.datastore.core.ObjectMap; import org.opencb.commons.datastore.core.Query; @@ -35,10 +36,15 @@ public class VariantFileIndexJobLauncherTool extends OpenCgaToolScopeStudy { public static final String ID = "variant-index-job-launcher"; public static final String DESCRIPTION = "Detect non-indexed VCF files in the study, and submit a job for indexing them."; + public static final String SUBMITTED_JOBS_ATTRIBUTE = "submittedJobs"; + public static final String SCANNED_FILES_ATTRIBUTE = "scannedFiles"; + public static final String JOB_TAGS_ATTRIBUTE = "jobTags"; @ToolParams protected final VariantFileIndexJobLauncherParams toolParams = new VariantFileIndexJobLauncherParams(); + private List jobTags = new ArrayList<>(); + @Override protected void check() throws Exception { super.check(); @@ -48,6 +54,17 @@ protected void check() throws Exception { toolParams.setDirectory(directory + "/"); } } + String jobId = getJobId(); + if (!StringUtils.isEmpty(jobId)) { + Job parentJob = catalogManager.getJobManager().get(getStudyFqn(), jobId, new QueryOptions(), getToken()).first(); + if (parentJob.getTags() != null) { + jobTags.addAll(parentJob.getTags()); + } + jobTags.add(ID + ":" + parentJob.getId()); + } else { + jobTags.add(ID + ":" + TimeUtils.getTime() + "-" + RandomStringUtils.randomAlphanumeric(5)); + } + addAttribute(JOB_TAGS_ATTRIBUTE, jobTags); } @Override @@ -125,7 +142,7 @@ protected void run() throws Exception { String jobId = buildJobId(file); Job job = catalogManager.getJobManager().submit(getStudy(), VariantIndexOperationTool.ID, Enums.Priority.MEDIUM, indexParams.toParams(new ObjectMap(ParamConstants.STUDY_PARAM, study)), jobId, "Job generated by " + getId(), - Collections.emptyList(), Collections.emptyList(), getToken()).first(); + Collections.emptyList(), jobTags, getToken()).first(); submittedJobs++; logger.info("[{}] Create variant-index job '{}' for file '{}'{}", submittedJobs, @@ -139,8 +156,8 @@ protected void run() throws Exception { } } - addAttribute("submittedJobs", submittedJobs); - addAttribute("scannedFiles", scannedFiles); + addAttribute(SUBMITTED_JOBS_ATTRIBUTE, submittedJobs); + addAttribute(SCANNED_FILES_ATTRIBUTE, scannedFiles); if (scannedFiles == 0) { addWarning("No files found. Nothing to do"); } diff --git a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/wrappers/deeptools/DeeptoolsWrapperAnalysisExecutor.java b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/wrappers/deeptools/DeeptoolsWrapperAnalysisExecutor.java index b4825b7dc1e..1c730f10e7a 100644 --- a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/wrappers/deeptools/DeeptoolsWrapperAnalysisExecutor.java +++ b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/wrappers/deeptools/DeeptoolsWrapperAnalysisExecutor.java @@ -1,8 +1,10 @@ package org.opencb.opencga.analysis.wrappers.deeptools; +import org.apache.commons.collections4.MapUtils; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.tuple.ImmutablePair; import org.apache.commons.lang3.tuple.Pair; +import org.opencb.opencga.analysis.alignment.AlignmentConstants; import org.opencb.opencga.analysis.wrappers.executors.DockerWrapperAnalysisExecutor; import org.opencb.opencga.core.exceptions.ToolException; import org.opencb.opencga.core.tools.annotations.ToolExecutor; @@ -10,6 +12,10 @@ import org.slf4j.LoggerFactory; import java.io.File; +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; import java.util.*; @ToolExecutor(id = DeeptoolsWrapperAnalysisExecutor.ID, @@ -50,6 +56,47 @@ public void run() throws ToolException { private void runBamCommonCommand() throws ToolException { StringBuilder sb = initCommandLine(); + // Check symbolic links to be appended + if (MapUtils.isNotEmpty(getExecutorParams())) { + Set fileParamNames = DeeptoolsWrapperAnalysis.getFileParamNames(command); + Set symbolicPaths = new HashSet<>(); + for (String paramName : getExecutorParams().keySet()) { + if (skipParameter(paramName)) { + continue; + } + + if (fileParamNames.contains(paramName)) { + Path filePath = Paths.get(getExecutorParams().getString(paramName)); + if ( Files.isSymbolicLink(filePath)) { + try { + Path target = Files.readSymbolicLink(filePath); + if (!symbolicPaths.contains(target.getParent())) { + symbolicPaths.add(target.getParent()); + } + // If it is BAM file, we have to check the BAI file (that is not present in the input parameters but it is + // located in the same folder) + if (filePath.toString().endsWith(AlignmentConstants.BAM_EXTENSION)) { + Path baiPath = Paths.get(filePath.toAbsolutePath() + AlignmentConstants.BAI_EXTENSION); + if (baiPath.toFile().exists()) { + if (Files.isSymbolicLink(baiPath)) { + Path baiTarget = Files.readSymbolicLink(baiPath); + if (!symbolicPaths.contains(baiTarget.getParent())) { + symbolicPaths.add(baiTarget.getParent()); + } + } + } + } + } catch (IOException e) { + throw new ToolException("Error processing symbolic links", e); + } + } + } + } + for (Path symbolicPath : symbolicPaths) { + sb.append(" --mount type=bind,source=\"").append(symbolicPath).append("\",target=\"").append(symbolicPath).append("\" "); + } + } + // Append mounts List> inputFilenames = DockerWrapperAnalysisExecutor.getInputFilenames(null, DeeptoolsWrapperAnalysis.getFileParamNames(command), getExecutorParams()); diff --git a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/wrappers/executors/DockerWrapperAnalysisExecutor.java b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/wrappers/executors/DockerWrapperAnalysisExecutor.java index 21f619cc5a4..ae2b5072473 100644 --- a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/wrappers/executors/DockerWrapperAnalysisExecutor.java +++ b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/wrappers/executors/DockerWrapperAnalysisExecutor.java @@ -7,6 +7,7 @@ import org.apache.commons.lang3.tuple.Pair; import org.opencb.commons.datastore.core.ObjectMap; import org.opencb.commons.exec.Command; +import org.opencb.opencga.analysis.wrappers.deeptools.DeeptoolsWrapperAnalysis; import org.opencb.opencga.core.common.GitRepositoryState; import org.opencb.opencga.core.exceptions.ToolException; import org.opencb.opencga.core.tools.OpenCgaToolExecutor; @@ -17,6 +18,9 @@ import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; import java.util.*; public abstract class DockerWrapperAnalysisExecutor extends OpenCgaToolExecutor { diff --git a/opencga-analysis/src/test/java/org/opencb/opencga/analysis/variant/manager/operations/PlatinumFileIndexerTest.java b/opencga-analysis/src/test/java/org/opencb/opencga/analysis/variant/manager/operations/PlatinumFileIndexerTest.java index f6082bea5d2..4396a3d6e99 100644 --- a/opencga-analysis/src/test/java/org/opencb/opencga/analysis/variant/manager/operations/PlatinumFileIndexerTest.java +++ b/opencga-analysis/src/test/java/org/opencb/opencga/analysis/variant/manager/operations/PlatinumFileIndexerTest.java @@ -26,10 +26,13 @@ import org.opencb.opencga.analysis.tools.ToolRunner; import org.opencb.opencga.analysis.variant.operations.VariantFileIndexJobLauncherTool; import org.opencb.opencga.analysis.variant.operations.VariantIndexOperationTool; +import org.opencb.opencga.catalog.db.api.JobDBAdaptor; import org.opencb.opencga.catalog.exceptions.CatalogException; import org.opencb.opencga.core.api.ParamConstants; import org.opencb.opencga.core.exceptions.ToolException; +import org.opencb.opencga.core.models.common.Enums; import org.opencb.opencga.core.models.file.File; +import org.opencb.opencga.core.models.job.Job; import org.opencb.opencga.core.models.variant.VariantFileIndexJobLauncherParams; import org.opencb.opencga.core.models.variant.VariantIndexParams; import org.opencb.opencga.core.testclassification.duration.MediumTests; @@ -49,6 +52,7 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; +import static org.opencb.opencga.core.api.ParamConstants.STUDY_PARAM; /** * Created on 15/07/16 @@ -201,11 +205,48 @@ public void testBatchBySteps() throws Exception { @Test public void testLauncher() throws CatalogException, IOException, ToolException { ToolRunner toolRunner = new ToolRunner(opencga.getOpencgaHome().toString(), catalogManager, StorageEngineFactory.get(variantManager.getStorageConfiguration())); + int numFiles = 0; for (int i = 77; i <= 93; i++) { create("platinum/1K.end.platinum-genomes-vcf-NA128" + i + "_S1.genome.vcf.gz"); + numFiles++; } - toolRunner.execute(VariantFileIndexJobLauncherTool.class, studyFqn, new VariantFileIndexJobLauncherParams().setDirectory("data/vcfs"), - Paths.get(opencga.createTmpOutdir(studyId, "_LOAD_", sessionId)), "", sessionId); + VariantFileIndexJobLauncherParams params = new VariantFileIndexJobLauncherParams().setDirectory("data/vcfs"); + List tags = Arrays.asList("tag1", "tag2"); + Job job = catalogManager.getJobManager().submit(studyFqn, VariantFileIndexJobLauncherTool.ID, Enums.Priority.HIGH, + params.toParams(STUDY_PARAM, studyFqn), null, null, null, tags, sessionId).first(); + ExecutionResult result = toolRunner.execute(job, Paths.get(opencga.createTmpOutdir(studyId, "_LOAD_", sessionId)), sessionId); + + List tagsFromResult = result.getAttributes().getAsStringList(VariantFileIndexJobLauncherTool.JOB_TAGS_ATTRIBUTE); + assertTrue(tagsFromResult.containsAll(tags)); + for (String tag : tagsFromResult) { + List results = catalogManager.getJobManager().search(studyFqn, + new Query() + .append(JobDBAdaptor.QueryParams.TOOL_ID.key(), VariantIndexOperationTool.ID) + .append(JobDBAdaptor.QueryParams.TAGS.key(), tag), + new QueryOptions(), sessionId).getResults(); + assertEquals(numFiles, results.size()); + } + assertEquals(numFiles, result.getAttributes().getInt(VariantFileIndexJobLauncherTool.SUBMITTED_JOBS_ATTRIBUTE)); + assertEquals(numFiles, result.getAttributes().getInt(VariantFileIndexJobLauncherTool.SCANNED_FILES_ATTRIBUTE)); + + //// Execute again, no new jobs should be submitted + tags = Arrays.asList("tag10", "tag20"); + job = catalogManager.getJobManager().submit(studyFqn, VariantFileIndexJobLauncherTool.ID, Enums.Priority.HIGH, + params.toParams(STUDY_PARAM, studyFqn), null, null, null, tags, sessionId).first(); + result = toolRunner.execute(job, Paths.get(opencga.createTmpOutdir(studyId, "_LOAD_", sessionId)), sessionId); + + tagsFromResult = result.getAttributes().getAsStringList(VariantFileIndexJobLauncherTool.JOB_TAGS_ATTRIBUTE); + assertTrue(tagsFromResult.containsAll(tags)); + for (String tag : tagsFromResult) { + List results = catalogManager.getJobManager().search(studyFqn, + new Query() + .append(JobDBAdaptor.QueryParams.TOOL_ID.key(), VariantIndexOperationTool.ID) + .append(JobDBAdaptor.QueryParams.TAGS.key(), tag), + new QueryOptions(), sessionId).getResults(); + assertEquals(0, results.size()); + } + assertEquals(0, result.getAttributes().getInt(VariantFileIndexJobLauncherTool.SUBMITTED_JOBS_ATTRIBUTE)); + assertEquals(numFiles, result.getAttributes().getInt(VariantFileIndexJobLauncherTool.SCANNED_FILES_ATTRIBUTE)); } } diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/CommandExecutor.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/CommandExecutor.java index cd532449d4e..ee5c57c3cbc 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/CommandExecutor.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/CommandExecutor.java @@ -45,7 +45,10 @@ import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; +import java.util.Collections; +import java.util.HashMap; import java.util.List; +import java.util.Map; /** * Created by imedina on 19/04/16. @@ -291,7 +294,6 @@ public CommandExecutor setSessionManager(SessionManager sessionManager) { return this; } - public String getObjectAsJSON(String objectCategory, String objectPath, OpenCGAClient openCGAClient) throws Exception { StringBuilder jsonInString = new StringBuilder("\n"); try { @@ -299,27 +301,26 @@ public String getObjectAsJSON(String objectCategory, String objectPath, OpenCGAC queryParams.putIfNotEmpty("category", objectCategory); RestResponse response = openCGAClient.getMetaClient().api(queryParams); ObjectMapper jsonObjectMapper = new ObjectMapper(); + boolean found = false; 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())) { - boolean enc = false; for (RestParameter parameter : endpoint.getParameters()) { - //jsonInString += parameter.getName()+":"+parameter.getAllowedValues()+"\n"; if (parameter.getData() != null) { - enc = true; - jsonInString.append(printBody(parameter.getData(), "")); + found = true; + Map map = getExampleBody(parameter.getData()); + jsonInString.append(jsonObjectMapper.writerWithDefaultPrettyPrinter().writeValueAsString(map)); } } - if (!enc) { - jsonInString.append("No model available"); - } - // } } } } + if (!found) { + jsonInString.append("No model available"); + } } catch (Exception e) { jsonInString = new StringBuilder("Data model not found."); CommandLineUtils.error(e); @@ -327,36 +328,27 @@ public String getObjectAsJSON(String objectCategory, String objectPath, OpenCGAC return jsonInString.toString(); } - private String printBody(List data, String tabs) { - String res = ""; - res += "{\n"; - String tab = " " + tabs; + private Map getExampleBody(List data) { + Map result = new HashMap<>(); for (RestParameter parameter : data) { if (parameter.getData() == null) { - res += printParameter(parameter, tab); + result.put(parameter.getName(), getParameterExampleValue(parameter)); } else { - res += tab + "\"" +parameter.getName() + "\"" + ": [" + printBody(parameter.getData(), tab) + "],\n"; + result.put(parameter.getName(), getExampleBody(parameter.getData())); } } - res += tabs + "}"; - return res; - - } - - private String printParameter(RestParameter parameter, String tab) { - - return tab + "\"" + parameter.getName() + "\"" + ":" + printParameterValue(parameter) + ",\n"; + return result; } - private String printParameterValue(RestParameter parameter) { - + private Object getParameterExampleValue(RestParameter parameter) { if(!StringUtils.isEmpty(parameter.getAllowedValues())){ return parameter.getAllowedValues().replace(" ", "|"); } + switch (parameter.getType()) { case "Boolean": case "java.lang.Boolean": - return "false"; + return false; case "Long": case "Float": case "Double": @@ -365,21 +357,21 @@ private String printParameterValue(RestParameter parameter) { case "double": case "float": case "long": - return "0"; + return 0; case "List": - return "[\"\"]"; + return Collections.singletonList(""); case "Date": - return "\"dd/mm/yyyy\""; + return "dd/mm/yyyy"; case "Map": - return "{\"key\": \"value\"}"; + return Collections.singletonMap("key", "value"); case "String": - return "\"\""; + return ""; default: - return "\"-\""; + logger.debug("Unknown type: " + parameter.getType() + " for parameter: " + parameter.getName()); + return "-"; } } - public Logger getLogger() { return logger; } diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/internal/executors/AlignmentCommandExecutor.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/internal/executors/AlignmentCommandExecutor.java index 3553384e71a..07ed1b36c1f 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/internal/executors/AlignmentCommandExecutor.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/internal/executors/AlignmentCommandExecutor.java @@ -121,7 +121,7 @@ private void indexRun() throws Exception { AlignmentStorageManager alignmentManager = new AlignmentStorageManager(catalogManager, storageEngineFactory, alignmentCommandOptions.internalJobOptions.jobId); - alignmentManager.index(cliOptions.study, cliOptions.file, cliOptions.overwrite, cliOptions.outdir, cliOptions.commonOptions.token); + alignmentManager.index(cliOptions.study, cliOptions.file, cliOptions.outdir, cliOptions.commonOptions.token); } @@ -234,9 +234,9 @@ private void coverageRun() throws ToolException { AlignmentCommandOptions.CoverageAlignmentCommandOptions cliOptions = alignmentCommandOptions.coverageAlignmentCommandOptions; ObjectMap params = new CoverageIndexParams( - cliOptions.file, - cliOptions.windowSize, - cliOptions.overwrite + cliOptions.bamFileId, + cliOptions.baiFileId, + cliOptions.windowSize ).toObjectMap(cliOptions.commonOptions.params).append(ParamConstants.STUDY_PARAM, cliOptions.study); toolRunner.execute(AlignmentCoverageAnalysis.class, params, Paths.get(cliOptions.outdir), jobId, token); diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/internal/executors/VariantInternalCommandExecutor.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/internal/executors/VariantInternalCommandExecutor.java index 7d3f514a745..e502850d9ee 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/internal/executors/VariantInternalCommandExecutor.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/internal/executors/VariantInternalCommandExecutor.java @@ -887,6 +887,7 @@ private void inferredSex() throws Exception { variantCommandOptions.internalJobOptions.jobId, token); inferredSexAnalysis.setStudyId(cliOptions.study) .setIndividualId(cliOptions.individual) + .setSampleId(cliOptions.sample) .start(); } diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/internal/options/AlignmentCommandOptions.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/internal/options/AlignmentCommandOptions.java index f97a435aa15..99f09597f4b 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/internal/options/AlignmentCommandOptions.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/internal/options/AlignmentCommandOptions.java @@ -107,9 +107,6 @@ public class IndexAlignmentCommandOptions extends GeneralCliOptions.StudyOption @Parameter(names = {"--file"}, description = FILE_ID_DESCRIPTION, required = true, arity = 1) public String file; - @Parameter(names = {"--overwrite"}, description = "Overwrite index file", arity = 0) - public boolean overwrite = false; - @Parameter(names = {"-o", "--outdir"}, description = OUTPUT_DIRECTORY_DESCRIPTION) public String outdir; } @@ -335,15 +332,15 @@ public class CoverageAlignmentCommandOptions extends GeneralCliOptions.StudyOpti @ParametersDelegate public Object internalJobOptions = internalJobOptionsObject; - @Parameter(names = {"--file"}, description = FILE_ID_DESCRIPTION, required = true, arity = 1) - public String file; + @Parameter(names = {"--bam-file-id"}, description = "BAM file ID", required = true, arity = 1) + public String bamFileId; + + @Parameter(names = {"--bai-file-id"}, description = "BAI file ID; if not provided, it will search the most recent one", arity = 1) + public String baiFileId; @Parameter(names = {"--window-size"}, description = COVERAGE_WINDOW_SIZE_DESCRIPTION, arity = 1) public int windowSize = 1; - @Parameter(names = {"--overwrite"}, description = "Overwrite coverage file", arity = 0) - public boolean overwrite = false; - @Parameter(names = {"-o", "--outdir"}, description = OUTPUT_DIRECTORY_DESCRIPTION) public String outdir; } 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 0f009f6ab08..140e5c0f8c2 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-2024-03-06 OpenCB +* Copyright 2015-2024-03-12 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 cde7fcb1c81..02e2876bf2e 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-2024-03-06 OpenCB +* Copyright 2015-2024-03-12 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 fcbbfdfc789..217b7421f32 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 @@ -178,9 +178,9 @@ private RestResponse runCoverageIndex() throws Exception { .readValue(new java.io.File(commandOptions.jsonFile), CoverageIndexParams.class); } else { ObjectMap beanParams = new ObjectMap(); - putNestedIfNotEmpty(beanParams, "file",commandOptions.file, true); + putNestedIfNotEmpty(beanParams, "bamFileId",commandOptions.bamFileId, true); + putNestedIfNotEmpty(beanParams, "baiFileId",commandOptions.baiFileId, true); putNestedIfNotNull(beanParams, "windowSize",commandOptions.windowSize, true); - putNestedIfNotNull(beanParams, "overwrite",commandOptions.overwrite, true); coverageIndexParams = JacksonUtils.getDefaultObjectMapper().copy() .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, true) diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/options/AnalysisAlignmentCommandOptions.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/options/AnalysisAlignmentCommandOptions.java index 007da0c4131..46abae24683 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/options/AnalysisAlignmentCommandOptions.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/options/AnalysisAlignmentCommandOptions.java @@ -142,15 +142,15 @@ public class RunCoverageIndexCommandOptions { @Parameter(names = {"--job-tags"}, description = "Job tags", required = false, arity = 1) public String jobTags; - @Parameter(names = {"--file"}, description = "The body web service file parameter", required = false, arity = 1) - public String file; + @Parameter(names = {"--bam-file-id"}, description = "The body web service bamFileId parameter", required = false, arity = 1) + public String bamFileId; + + @Parameter(names = {"--bai-file-id"}, description = "The body web service baiFileId parameter", required = false, arity = 1) + public String baiFileId; @Parameter(names = {"--window-size"}, description = "The body web service windowSize parameter", required = false, arity = 1) public Integer windowSize; - @Parameter(names = {"--overwrite"}, description = "The body web service overwrite parameter", required = false, help = true, arity = 0) - public boolean overwrite = false; - } @Parameters(commandNames = {"coverage-qc-genecoveragestats-run"}, commandDescription ="Compute gene coverage stats for a given alignment file and a list of genes") diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/options/AnalysisVariantCommandOptions.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/options/AnalysisVariantCommandOptions.java index 526f961225d..82b9edc17a4 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/options/AnalysisVariantCommandOptions.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/options/AnalysisVariantCommandOptions.java @@ -1174,16 +1174,16 @@ public class RunIndividualQcCommandOptions { @Parameter(names = {"--job-tags"}, description = "Job tags", required = false, arity = 1) public String jobTags; - @Parameter(names = {"--individual"}, description = "The body web service individual parameter", required = false, arity = 1) + @Parameter(names = {"--individual"}, description = "Individual ID", required = false, arity = 1) public String individual; - @Parameter(names = {"--sample"}, description = "The body web service sample parameter", required = false, arity = 1) + @Parameter(names = {"--sample"}, description = "Sample ID (required when the individual has multiple samples)", required = false, arity = 1) public String sample; - @Parameter(names = {"--inferred-sex-method"}, description = "The body web service inferredSexMethod parameter", required = false, arity = 1) - public String inferredSexMethod; + @Parameter(names = {"--inferred-sex-method"}, description = "Inferred sex method. Valid values: CoverageRatio", required = false, arity = 1) + public String inferredSexMethod = "CoverageRatio"; - @Parameter(names = {"--outdir"}, description = "The body web service outdir parameter", required = false, arity = 1) + @Parameter(names = {"--outdir"}, description = "Output dir for the job.", required = false, arity = 1) public String outdir; } @@ -1215,13 +1215,13 @@ public class RunInferredSexCommandOptions { @Parameter(names = {"--job-tags"}, description = "Job tags", required = false, arity = 1) public String jobTags; - @Parameter(names = {"--individual"}, description = "The body web service individual parameter", required = false, arity = 1) + @Parameter(names = {"--individual"}, description = "Individual ID", required = false, arity = 1) public String individual; - @Parameter(names = {"--sample"}, description = "The body web service sample parameter", required = false, arity = 1) + @Parameter(names = {"--sample"}, description = "Sample ID (required when the individual has multiple samples)", required = false, arity = 1) public String sample; - @Parameter(names = {"--outdir"}, description = "The body web service outdir parameter", required = false, arity = 1) + @Parameter(names = {"--outdir"}, description = "Output dir for the job.", required = false, arity = 1) public String outdir; } diff --git a/opencga-client/src/main/R/R/Admin-methods.R b/opencga-client/src/main/R/R/Admin-methods.R index 43589f23862..6bf61415c9b 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: 2024-03-06 +# Autogenerated on: 2024-03-12 # # Manual changes to this file may cause unexpected 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 a4737b602d6..69c82c573a3 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: 2024-03-06 +# Autogenerated on: 2024-03-12 # # Manual changes to this file may cause unexpected 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 46e1629cd2e..1b566838bf7 100644 --- a/opencga-client/src/main/R/R/AllGenerics.R +++ b/opencga-client/src/main/R/R/AllGenerics.R @@ -5,7 +5,7 @@ setGeneric("organizationClient", function(OpencgaR, organization, endpointName, # ############################################################################## ## UserClient -setGeneric("userClient", function(OpencgaR, user, filterId, users, endpointName, params=NULL, ...) +setGeneric("userClient", function(OpencgaR, filterId, users, user, endpointName, params=NULL, ...) standardGeneric("userClient")) # ############################################################################## @@ -15,37 +15,37 @@ setGeneric("projectClient", function(OpencgaR, projects, project, endpointName, # ############################################################################## ## StudyClient -setGeneric("studyClient", function(OpencgaR, group, variableSet, studies, templateId, study, members, endpointName, params=NULL, ...) +setGeneric("studyClient", function(OpencgaR, studies, variableSet, members, templateId, group, study, endpointName, params=NULL, ...) standardGeneric("studyClient")) # ############################################################################## ## FileClient -setGeneric("fileClient", function(OpencgaR, files, folder, file, members, annotationSet, endpointName, params=NULL, ...) +setGeneric("fileClient", function(OpencgaR, folder, files, members, annotationSet, file, endpointName, params=NULL, ...) standardGeneric("fileClient")) # ############################################################################## ## JobClient -setGeneric("jobClient", function(OpencgaR, jobs, job, members, endpointName, params=NULL, ...) +setGeneric("jobClient", function(OpencgaR, members, job, jobs, endpointName, params=NULL, ...) standardGeneric("jobClient")) # ############################################################################## ## SampleClient -setGeneric("sampleClient", function(OpencgaR, annotationSet, sample, samples, members, endpointName, params=NULL, ...) +setGeneric("sampleClient", function(OpencgaR, samples, annotationSet, sample, members, endpointName, params=NULL, ...) standardGeneric("sampleClient")) # ############################################################################## ## IndividualClient -setGeneric("individualClient", function(OpencgaR, individuals, individual, annotationSet, members, endpointName, params=NULL, ...) +setGeneric("individualClient", function(OpencgaR, annotationSet, individuals, members, individual, endpointName, params=NULL, ...) standardGeneric("individualClient")) # ############################################################################## ## FamilyClient -setGeneric("familyClient", function(OpencgaR, annotationSet, families, family, members, endpointName, params=NULL, ...) +setGeneric("familyClient", function(OpencgaR, annotationSet, family, members, families, endpointName, params=NULL, ...) standardGeneric("familyClient")) # ############################################################################## ## CohortClient -setGeneric("cohortClient", function(OpencgaR, annotationSet, cohort, cohorts, members, endpointName, params=NULL, ...) +setGeneric("cohortClient", function(OpencgaR, cohort, annotationSet, cohorts, members, endpointName, params=NULL, ...) standardGeneric("cohortClient")) # ############################################################################## @@ -65,7 +65,7 @@ setGeneric("variantClient", function(OpencgaR, endpointName, params=NULL, ...) # ############################################################################## ## ClinicalClient -setGeneric("clinicalClient", function(OpencgaR, interpretation, clinicalAnalyses, interpretations, members, annotationSet, clinicalAnalysis, endpointName, params=NULL, ...) +setGeneric("clinicalClient", function(OpencgaR, clinicalAnalysis, members, annotationSet, interpretation, interpretations, clinicalAnalyses, endpointName, params=NULL, ...) standardGeneric("clinicalClient")) # ############################################################################## @@ -80,7 +80,7 @@ setGeneric("metaClient", function(OpencgaR, endpointName, params=NULL, ...) # ############################################################################## ## GA4GHClient -setGeneric("ga4ghClient", function(OpencgaR, study, file, endpointName, params=NULL, ...) +setGeneric("ga4ghClient", function(OpencgaR, file, study, endpointName, params=NULL, ...) standardGeneric("ga4ghClient")) # ############################################################################## diff --git a/opencga-client/src/main/R/R/Clinical-methods.R b/opencga-client/src/main/R/R/Clinical-methods.R index 344b137d60b..f807bde4301 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: 2024-03-06 +# Autogenerated on: 2024-03-12 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. @@ -62,7 +62,7 @@ #' [*]: Required parameter #' @export -setMethod("clinicalClient", "OpencgaR", function(OpencgaR, interpretation, clinicalAnalyses, interpretations, members, annotationSet, clinicalAnalysis, endpointName, params=NULL, ...) { +setMethod("clinicalClient", "OpencgaR", function(OpencgaR, clinicalAnalysis, members, annotationSet, 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 3ce27c32038..99482a604c9 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: 2024-03-06 +# Autogenerated on: 2024-03-12 # # Manual 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("cohortClient", "OpencgaR", function(OpencgaR, annotationSet, cohort, cohorts, members, endpointName, params=NULL, ...) { +setMethod("cohortClient", "OpencgaR", function(OpencgaR, cohort, annotationSet, cohorts, 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 dbcce8bb0f4..f41421db5a1 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: 2024-03-06 +# Autogenerated on: 2024-03-12 # # Manual 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 @@ #' [*]: Required parameter #' @export -setMethod("familyClient", "OpencgaR", function(OpencgaR, annotationSet, families, family, members, endpointName, params=NULL, ...) { +setMethod("familyClient", "OpencgaR", function(OpencgaR, annotationSet, family, members, 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 eef565b95bd..8b8e60cf054 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: 2024-03-06 +# Autogenerated on: 2024-03-12 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. @@ -53,7 +53,7 @@ #' [*]: Required parameter #' @export -setMethod("fileClient", "OpencgaR", function(OpencgaR, files, folder, file, members, annotationSet, endpointName, params=NULL, ...) { +setMethod("fileClient", "OpencgaR", function(OpencgaR, folder, files, members, 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 17d147c2798..a176ca0951d 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: 2024-03-06 +# Autogenerated on: 2024-03-12 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. @@ -31,7 +31,7 @@ #' [*]: Required parameter #' @export -setMethod("ga4ghClient", "OpencgaR", function(OpencgaR, study, file, endpointName, params=NULL, ...) { +setMethod("ga4ghClient", "OpencgaR", function(OpencgaR, file, study, endpointName, params=NULL, ...) { switch(endpointName, #' @section Endpoint /{apiVersion}/ga4gh/reads/search: diff --git a/opencga-client/src/main/R/R/Individual-methods.R b/opencga-client/src/main/R/R/Individual-methods.R index a30c8ceea99..3a9e4d0710d 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: 2024-03-06 +# Autogenerated on: 2024-03-12 # # Manual 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("individualClient", "OpencgaR", function(OpencgaR, individuals, individual, annotationSet, members, endpointName, params=NULL, ...) { +setMethod("individualClient", "OpencgaR", function(OpencgaR, annotationSet, individuals, 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 160c20df412..1d033cbc80a 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: 2024-03-06 +# Autogenerated on: 2024-03-12 # # Manual 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("jobClient", "OpencgaR", function(OpencgaR, jobs, job, members, 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 fcc109a5112..975200c2b12 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: 2024-03-06 +# Autogenerated on: 2024-03-12 # # Manual changes to this file may cause unexpected 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 c737760155a..bd6884c6906 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: 2024-03-06 +# Autogenerated on: 2024-03-12 # # Manual changes to this file may cause unexpected 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/Organization-methods.R b/opencga-client/src/main/R/R/Organization-methods.R index 1b95ae54c73..0260f97f9df 100644 --- a/opencga-client/src/main/R/R/Organization-methods.R +++ b/opencga-client/src/main/R/R/Organization-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2024-03-06 +# Autogenerated on: 2024-03-12 # # Manual changes to this file may cause unexpected 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 4cd2e9a9026..887ec48d5b0 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: 2024-03-06 +# Autogenerated on: 2024-03-12 # # Manual changes to this file may cause unexpected 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 893fbbb0b03..3a136539be5 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: 2024-03-06 +# Autogenerated on: 2024-03-12 # # Manual changes to this file may cause unexpected 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 b224bd8f5bb..39ceaba71d4 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: 2024-03-06 +# Autogenerated on: 2024-03-12 # # Manual 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("sampleClient", "OpencgaR", function(OpencgaR, annotationSet, sample, samples, members, endpointName, params=NULL, ...) { +setMethod("sampleClient", "OpencgaR", function(OpencgaR, samples, annotationSet, sample, 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 afd4f0b0ac8..5ff6deccb29 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: 2024-03-06 +# Autogenerated on: 2024-03-12 # # Manual 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 @@ #' [*]: Required parameter #' @export -setMethod("studyClient", "OpencgaR", function(OpencgaR, group, variableSet, studies, templateId, study, members, endpointName, params=NULL, ...) { +setMethod("studyClient", "OpencgaR", function(OpencgaR, studies, variableSet, members, templateId, group, 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 25617309de6..921e466d5e4 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: 2024-03-06 +# Autogenerated on: 2024-03-12 # # Manual 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("userClient", "OpencgaR", function(OpencgaR, user, filterId, users, endpointName, params=NULL, ...) { +setMethod("userClient", "OpencgaR", function(OpencgaR, filterId, users, user, endpointName, params=NULL, ...) { switch(endpointName, #' @section Endpoint /{apiVersion}/users/anonymous: diff --git a/opencga-client/src/main/R/R/Variant-methods.R b/opencga-client/src/main/R/R/Variant-methods.R index 264763867fa..f03c5b00d9d 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: 2024-03-06 +# Autogenerated on: 2024-03-12 # # Manual changes to this file may cause unexpected 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 cece90a3732..dd0251bd427 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 @@ -37,7 +37,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2024-03-06 +* Autogenerated on: 2024-03-12 * * Manual 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 Admin webservices. - * Client version: 3.0.0-SNAPSHOT + * Client version: 3.1.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 14eea5a5950..3efdbd23bb1 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: 2024-03-06 +* Autogenerated on: 2024-03-12 * * Manual 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: 3.0.0-SNAPSHOT + * Client version: 3.1.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 1b7b219afe9..050f9e9ca68 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 @@ -55,7 +55,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2024-03-06 +* Autogenerated on: 2024-03-12 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. @@ -64,7 +64,7 @@ /** * This class contains methods for the ClinicalAnalysis webservices. - * Client version: 3.0.0-SNAPSHOT + * Client version: 3.1.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 db414f80780..4dd5000180b 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 @@ -36,7 +36,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2024-03-06 +* Autogenerated on: 2024-03-12 * * Manual 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 Cohort webservices. - * Client version: 3.0.0-SNAPSHOT + * Client version: 3.1.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 f196e712076..b9967e99b99 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: 2024-03-06 +* Autogenerated on: 2024-03-12 * * Manual 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: 3.0.0-SNAPSHOT + * Client version: 3.1.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 0687b39811e..11c95587092 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 @@ -35,7 +35,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2024-03-06 +* Autogenerated on: 2024-03-12 * * Manual 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 Family webservices. - * Client version: 3.0.0-SNAPSHOT + * Client version: 3.1.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 680e134178f..537d9f525c5 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 @@ -42,7 +42,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2024-03-06 +* Autogenerated on: 2024-03-12 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. @@ -51,7 +51,7 @@ /** * This class contains methods for the File webservices. - * Client version: 3.0.0-SNAPSHOT + * Client version: 3.1.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 f60884bfc32..1a94000c0a8 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: 2024-03-06 +* Autogenerated on: 2024-03-12 * * Manual 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: 3.0.0-SNAPSHOT + * Client version: 3.1.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 2377d530fb4..261eb7b7659 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 @@ -35,7 +35,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2024-03-06 +* Autogenerated on: 2024-03-12 * * Manual 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 Individual webservices. - * Client version: 3.0.0-SNAPSHOT + * Client version: 3.1.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 eec7ad233d3..69536b9f108 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 @@ -36,7 +36,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2024-03-06 +* Autogenerated on: 2024-03-12 * * Manual 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 Job webservices. - * Client version: 3.0.0-SNAPSHOT + * Client version: 3.1.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 edc9bfa3dd7..cec88c6b456 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: 2024-03-06 +* Autogenerated on: 2024-03-12 * * Manual 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: 3.0.0-SNAPSHOT + * Client version: 3.1.0-SNAPSHOT * PATH: meta */ public class MetaClient extends AbstractParentClient { diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/OrganizationClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/OrganizationClient.java index 55330d49dcc..5caccab45d2 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/OrganizationClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/OrganizationClient.java @@ -30,7 +30,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2024-03-06 +* Autogenerated on: 2024-03-12 * * Manual 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 @@ /** * This class contains methods for the Organization webservices. - * Client version: 3.0.0-SNAPSHOT + * Client version: 3.1.0-SNAPSHOT * PATH: organizations */ public class OrganizationClient 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 878a3d679e9..10e1ad23a81 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 @@ -31,7 +31,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2024-03-06 +* Autogenerated on: 2024-03-12 * * Manual 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 @@ /** * This class contains methods for the Project webservices. - * Client version: 3.0.0-SNAPSHOT + * Client version: 3.1.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 3426ea51565..9e557189f2d 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 @@ -35,7 +35,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2024-03-06 +* Autogenerated on: 2024-03-12 * * Manual 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 Sample webservices. - * Client version: 3.0.0-SNAPSHOT + * Client version: 3.1.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 81a4a7bbc85..5afd9ea399e 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 @@ -44,7 +44,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2024-03-06 +* Autogenerated on: 2024-03-12 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. @@ -53,7 +53,7 @@ /** * This class contains methods for the Study webservices. - * Client version: 3.0.0-SNAPSHOT + * Client version: 3.1.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 b2e525f244b..ab798ce82f0 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: 2024-03-06 +* Autogenerated on: 2024-03-12 * * Manual 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: 3.0.0-SNAPSHOT + * Client version: 3.1.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 fbd8a7f28f3..1a528519366 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: 2024-03-06 +* Autogenerated on: 2024-03-12 * * Manual 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: 3.0.0-SNAPSHOT + * Client version: 3.1.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 9dea80db8ff..1aae70260a3 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: 2024-03-06 +* Autogenerated on: 2024-03-12 * * Manual 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: 3.0.0-SNAPSHOT + * Client version: 3.1.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 5997bed882d..3ab8837cfde 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: 2024-03-06 + * Autogenerated on: 2024-03-12 * * Manual changes to this file may cause unexpected 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 9173d6738dc..550e528c9d0 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: 2024-03-06 + * Autogenerated on: 2024-03-12 * * Manual changes to this file may cause unexpected 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 2d47cced785..0a4a554b1e7 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: 2024-03-06 + * Autogenerated on: 2024-03-12 * * Manual changes to this file may cause unexpected 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 237d874af6f..a8beab20022 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: 2024-03-06 + * Autogenerated on: 2024-03-12 * * Manual changes to this file may cause unexpected 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 44b47ec7d9f..e109c595a4e 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: 2024-03-06 + * Autogenerated on: 2024-03-12 * * Manual changes to this file may cause unexpected 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 028113d98b3..f9dc5c48dac 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: 2024-03-06 + * Autogenerated on: 2024-03-12 * * Manual changes to this file may cause unexpected 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 4419c507e8e..68a977dc9a3 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: 2024-03-06 + * Autogenerated on: 2024-03-12 * * Manual changes to this file may cause unexpected 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 b06055721c4..1c8bc3aec74 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: 2024-03-06 + * Autogenerated on: 2024-03-12 * * Manual changes to this file may cause unexpected 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 a3307d522da..893ad686998 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: 2024-03-06 + * Autogenerated on: 2024-03-12 * * Manual changes to this file may cause unexpected 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 b83184040e6..6b59792e2be 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: 2024-03-06 + * Autogenerated on: 2024-03-12 * * Manual changes to this file may cause unexpected 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 7028dd5ea71..20aa39d36d3 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: 2024-03-06 + * Autogenerated on: 2024-03-12 * * Manual changes to this file may cause unexpected 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/Organization.js b/opencga-client/src/main/javascript/Organization.js index 3884dc598da..848305cb541 100644 --- a/opencga-client/src/main/javascript/Organization.js +++ b/opencga-client/src/main/javascript/Organization.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2024-03-06 + * Autogenerated on: 2024-03-12 * * Manual changes to this file may cause unexpected 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 3767afc6bca..96fd5d76d5b 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: 2024-03-06 + * Autogenerated on: 2024-03-12 * * Manual changes to this file may cause unexpected 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 1d4f379fa33..2bff7c6c805 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: 2024-03-06 + * Autogenerated on: 2024-03-12 * * Manual changes to this file may cause unexpected 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 b170fbf1c16..9cba17724a2 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: 2024-03-06 + * Autogenerated on: 2024-03-12 * * Manual changes to this file may cause unexpected 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 c5c7544c653..ca89e9c6cd8 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: 2024-03-06 + * Autogenerated on: 2024-03-12 * * Manual changes to this file may cause unexpected 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 98d42a16fd2..b2b717f2733 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: 2024-03-06 + * Autogenerated on: 2024-03-12 * * Manual changes to this file may cause unexpected 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 9ceb02dd57d..9bc29ecfedd 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: 2024-03-06 + * Autogenerated on: 2024-03-12 * * Manual changes to this file may cause unexpected 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 85bf0da3b3e..5c7acf23a1b 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: 2024-03-06 + Autogenerated on: 2024-03-12 Manual 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: 3.0.0-SNAPSHOT + Client version: 3.1.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 34e898b9f67..3f88bb0d464 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: 2024-03-06 + Autogenerated on: 2024-03-12 Manual 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: 3.0.0-SNAPSHOT + Client version: 3.1.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 0cdeeda33d7..5ad28af0295 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: 2024-03-06 + Autogenerated on: 2024-03-12 Manual 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: 3.0.0-SNAPSHOT + Client version: 3.1.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 d0081675985..ac75391b6ab 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: 2024-03-06 + Autogenerated on: 2024-03-12 Manual 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: 3.0.0-SNAPSHOT + Client version: 3.1.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 ad7fc8a94a5..0392ebc1ff7 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: 2024-03-06 + Autogenerated on: 2024-03-12 Manual 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: 3.0.0-SNAPSHOT + Client version: 3.1.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 a2d849ec0b7..d40660bdc72 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: 2024-03-06 + Autogenerated on: 2024-03-12 Manual 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: 3.0.0-SNAPSHOT + Client version: 3.1.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 b9b998ba72f..6ec39174d2d 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: 2024-03-06 + Autogenerated on: 2024-03-12 Manual 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: 3.0.0-SNAPSHOT + Client version: 3.1.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 01f77db3bac..937c64be1c7 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: 2024-03-06 + Autogenerated on: 2024-03-12 Manual 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: 3.0.0-SNAPSHOT + Client version: 3.1.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 7243a4f0865..bf1a2279d8b 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: 2024-03-06 + Autogenerated on: 2024-03-12 Manual 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: 3.0.0-SNAPSHOT + Client version: 3.1.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 e37e64878e3..33704a42321 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: 2024-03-06 + Autogenerated on: 2024-03-12 Manual 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: 3.0.0-SNAPSHOT + Client version: 3.1.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 515d9c60bcd..55180c56871 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: 2024-03-06 + Autogenerated on: 2024-03-12 Manual 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: 3.0.0-SNAPSHOT + Client version: 3.1.0-SNAPSHOT PATH: /{apiVersion}/meta """ diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/organization_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/organization_client.py index cac13370617..535c4e21d87 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/organization_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/organization_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2024-03-06 + Autogenerated on: 2024-03-12 Manual 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 Organization(_ParentRestClient): """ This class contains methods for the 'Organizations' webservices - Client version: 3.0.0-SNAPSHOT + Client version: 3.1.0-SNAPSHOT PATH: /{apiVersion}/organizations """ 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 5e403ca5027..8f869340bd8 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: 2024-03-06 + Autogenerated on: 2024-03-12 Manual 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: 3.0.0-SNAPSHOT + Client version: 3.1.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 e9307f29656..9c0a698ee52 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: 2024-03-06 + Autogenerated on: 2024-03-12 Manual 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: 3.0.0-SNAPSHOT + Client version: 3.1.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 5c2907ee8e4..8b68612d1d8 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: 2024-03-06 + Autogenerated on: 2024-03-12 Manual 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: 3.0.0-SNAPSHOT + Client version: 3.1.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 12e2c801ea7..0cb21ab37ac 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: 2024-03-06 + Autogenerated on: 2024-03-12 Manual 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: 3.0.0-SNAPSHOT + Client version: 3.1.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 99976a5ae1b..e459f95847d 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: 2024-03-06 + Autogenerated on: 2024-03-12 Manual 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: 3.0.0-SNAPSHOT + Client version: 3.1.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 9a9a5fca230..33301600c61 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: 2024-03-06 + Autogenerated on: 2024-03-12 Manual 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: 3.0.0-SNAPSHOT + Client version: 3.1.0-SNAPSHOT PATH: /{apiVersion}/operation """ 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 1907663327b..7369ee33287 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 @@ -3,6 +3,7 @@ import org.opencb.opencga.core.models.alignment.AlignmentQcParams; import org.opencb.opencga.core.models.variant.MutationalSignatureAnalysisParams; import org.opencb.opencga.core.models.variant.SampleQcAnalysisParams; +import org.opencb.opencga.core.tools.variant.IndividualQcAnalysisExecutor; public class FieldConstants { @@ -165,11 +166,19 @@ public class FieldConstants { //FamilyQualityControl public static final String FAMILY_QUALITY_CONTROL_RELATEDNESS_DESCRIPTION = "Reports of family relationship."; + + + // Individual quality control + public static final String INDIVIDUAL_QC_INDIVIDUAL_ID_DESCRIPTION = "Individual ID"; + public static final String INDIVIDUAL_QC_SAMPLE_ID_DESCRIPTION = "Sample ID (required when the individual has multiple samples)"; + public static final String INFERRED_SEX_METHOD_DESCRIPTION = "Inferred sex method. Valid values: " + + IndividualQcAnalysisExecutor.COVERAGE_RATIO_INFERRED_SEX_METHOD; public static final String INDIVIDUAL_QUALITY_CONTROL_INFERRED_SEX_REPORT_DESCRIPTION = "List of inferred sex reports, it depends on" + " the method (currently by coverage ratio)."; public static final String INDIVIDUAL_QUALITY_CONTROL_SAMPLE_RELATEDNESS_REPORT_DESCRIPTION = "Reports of samples relatedness."; public static final String INDIVIDUAL_QUALITY_CONTROL_MENDELIAN_ERRORS_DESCRIPTION = "Mendelian errors."; + //Status public static final String STATUS_DATE_DESCRIPTION = "Date has setted the status."; public static final String STATUS_MESSAGE_DESCRIPTION = "Deprecated: Message describing the status."; diff --git a/opencga-core/src/main/java/org/opencb/opencga/core/api/ParamConstants.java b/opencga-core/src/main/java/org/opencb/opencga/core/api/ParamConstants.java index 3cbbe83f0bc..41c17e5a787 100644 --- a/opencga-core/src/main/java/org/opencb/opencga/core/api/ParamConstants.java +++ b/opencga-core/src/main/java/org/opencb/opencga/core/api/ParamConstants.java @@ -81,7 +81,7 @@ public class ParamConstants { public static final String CELLBASE_URL = "https://ws.zettagenomics.com/cellbase"; public static final String CELLBASE_VERSION = "v5.2"; - public static final String CELLBASE_DATA_RELEASE = "2"; + public static final String CELLBASE_DATA_RELEASE = "3"; public static final String CELLBASE_APIKEY = ""; public static final String POP_FREQ_1000G_CB_V4 = "1kG_phase3"; diff --git a/opencga-core/src/main/java/org/opencb/opencga/core/models/alignment/CoverageIndexParams.java b/opencga-core/src/main/java/org/opencb/opencga/core/models/alignment/CoverageIndexParams.java index 60250f19169..f655829625d 100644 --- a/opencga-core/src/main/java/org/opencb/opencga/core/models/alignment/CoverageIndexParams.java +++ b/opencga-core/src/main/java/org/opencb/opencga/core/models/alignment/CoverageIndexParams.java @@ -7,55 +7,55 @@ public class CoverageIndexParams extends ToolParams { public static final String DESCRIPTION = "Coverage computation parameters"; - private String file; + private String bamFileId; + private String baiFileId; @JsonProperty(defaultValue = "1") private int windowSize; - private boolean overwrite; public CoverageIndexParams() { } - public CoverageIndexParams(String file, int windowSize, boolean overwrite) { - this.file = file; + public CoverageIndexParams(String bamFileId, String baiFileId, int windowSize) { + this.bamFileId = bamFileId; + this.baiFileId = baiFileId; this.windowSize = windowSize; - this.overwrite = overwrite; } @Override public String toString() { final StringBuilder sb = new StringBuilder("CoverageIndexParams{"); - sb.append("file='").append(file).append('\''); + sb.append("bamFileId='").append(bamFileId).append('\''); + sb.append(", baiFileId='").append(baiFileId).append('\''); sb.append(", windowSize=").append(windowSize); - sb.append(", overwrite=").append(overwrite); sb.append('}'); return sb.toString(); } - public String getFile() { - return file; + public String getBamFileId() { + return bamFileId; } - public CoverageIndexParams setFile(String file) { - this.file = file; + public CoverageIndexParams setBamFileId(String bamFileId) { + this.bamFileId = bamFileId; return this; } - public int getWindowSize() { - return windowSize; + public String getBaiFileId() { + return baiFileId; } - public CoverageIndexParams setWindowSize(int windowSize) { - this.windowSize = windowSize; + public CoverageIndexParams setBaiFileId(String baiFileId) { + this.baiFileId = baiFileId; return this; } - public boolean isOverwrite() { - return overwrite; + public int getWindowSize() { + return windowSize; } - public CoverageIndexParams setOverwrite(boolean overwrite) { - this.overwrite = overwrite; + public CoverageIndexParams setWindowSize(int windowSize) { + this.windowSize = windowSize; return this; } } diff --git a/opencga-core/src/main/java/org/opencb/opencga/core/models/file/FileRelatedFile.java b/opencga-core/src/main/java/org/opencb/opencga/core/models/file/FileRelatedFile.java index 52d224d9855..822eb941168 100644 --- a/opencga-core/src/main/java/org/opencb/opencga/core/models/file/FileRelatedFile.java +++ b/opencga-core/src/main/java/org/opencb/opencga/core/models/file/FileRelatedFile.java @@ -29,7 +29,8 @@ public enum Relation { PRODUCED_FROM, PART_OF_PAIR, PEDIGREE, - REFERENCE_GENOME + REFERENCE_GENOME, + ALIGNMENT } public FileRelatedFile() { diff --git a/opencga-core/src/main/java/org/opencb/opencga/core/models/variant/IndividualQcAnalysisParams.java b/opencga-core/src/main/java/org/opencb/opencga/core/models/variant/IndividualQcAnalysisParams.java index 6f45eb6788c..e06fdf09b6e 100644 --- a/opencga-core/src/main/java/org/opencb/opencga/core/models/variant/IndividualQcAnalysisParams.java +++ b/opencga-core/src/main/java/org/opencb/opencga/core/models/variant/IndividualQcAnalysisParams.java @@ -16,14 +16,25 @@ package org.opencb.opencga.core.models.variant; +import org.opencb.commons.annotations.DataField; +import org.opencb.opencga.core.api.FieldConstants; import org.opencb.opencga.core.tools.ToolParams; +import org.opencb.opencga.core.tools.variant.IndividualQcAnalysisExecutor; public class IndividualQcAnalysisParams extends ToolParams { public static final String DESCRIPTION = "Individual QC analysis params"; + + @DataField(id = "individual", description = FieldConstants.INDIVIDUAL_QC_INDIVIDUAL_ID_DESCRIPTION) private String individual; + + @DataField(id = "sample", description = FieldConstants.INDIVIDUAL_QC_SAMPLE_ID_DESCRIPTION) private String sample; + + @DataField(id = "inferredSexMethod", description = FieldConstants.INFERRED_SEX_METHOD_DESCRIPTION, + defaultValue = IndividualQcAnalysisExecutor.COVERAGE_RATIO_INFERRED_SEX_METHOD) private String inferredSexMethod; + @DataField(id = "outdir", description = FieldConstants.JOB_OUT_DIR_DESCRIPTION) private String outdir; public IndividualQcAnalysisParams() { diff --git a/opencga-core/src/main/java/org/opencb/opencga/core/models/variant/InferredSexAnalysisParams.java b/opencga-core/src/main/java/org/opencb/opencga/core/models/variant/InferredSexAnalysisParams.java index bf3fda5bb97..f927fea73ae 100644 --- a/opencga-core/src/main/java/org/opencb/opencga/core/models/variant/InferredSexAnalysisParams.java +++ b/opencga-core/src/main/java/org/opencb/opencga/core/models/variant/InferredSexAnalysisParams.java @@ -16,14 +16,22 @@ package org.opencb.opencga.core.models.variant; +import org.opencb.commons.annotations.DataField; +import org.opencb.opencga.core.api.FieldConstants; import org.opencb.opencga.core.tools.ToolParams; import java.util.List; public class InferredSexAnalysisParams extends ToolParams { public static final String DESCRIPTION = "Inferred sex analysis params"; + + @DataField(id = "individual", description = FieldConstants.INDIVIDUAL_QC_INDIVIDUAL_ID_DESCRIPTION) private String individual; + + @DataField(id = "sample", description = FieldConstants.INDIVIDUAL_QC_SAMPLE_ID_DESCRIPTION) private String sample; + + @DataField(id = "outdir", description = FieldConstants.JOB_OUT_DIR_DESCRIPTION) private String outdir; public InferredSexAnalysisParams() { diff --git a/opencga-core/src/main/java/org/opencb/opencga/core/tools/variant/IndividualQcAnalysisExecutor.java b/opencga-core/src/main/java/org/opencb/opencga/core/tools/variant/IndividualQcAnalysisExecutor.java index 6547fb85889..a94e5ee8bcf 100644 --- a/opencga-core/src/main/java/org/opencb/opencga/core/tools/variant/IndividualQcAnalysisExecutor.java +++ b/opencga-core/src/main/java/org/opencb/opencga/core/tools/variant/IndividualQcAnalysisExecutor.java @@ -42,7 +42,7 @@ public enum QcType { protected IndividualQualityControl qualityControl; - public IndividualQcAnalysisExecutor() { + protected IndividualQcAnalysisExecutor() { } public String getStudyId() { diff --git a/opencga-core/src/main/java/org/opencb/opencga/core/tools/variant/InferredSexAnalysisExecutor.java b/opencga-core/src/main/java/org/opencb/opencga/core/tools/variant/InferredSexAnalysisExecutor.java index 945914de376..d8ac8b488f0 100644 --- a/opencga-core/src/main/java/org/opencb/opencga/core/tools/variant/InferredSexAnalysisExecutor.java +++ b/opencga-core/src/main/java/org/opencb/opencga/core/tools/variant/InferredSexAnalysisExecutor.java @@ -24,10 +24,11 @@ public abstract class InferredSexAnalysisExecutor extends OpenCgaToolExecutor { - private String studyId; - private String individualId; + protected String studyId; + protected String individualId; + protected String sampleId; - private InferredSexReport inferredSexReport; + protected InferredSexReport inferredSexReport; public InferredSexAnalysisExecutor() { } @@ -50,6 +51,15 @@ public InferredSexAnalysisExecutor setIndividualId(String individualId) { return this; } + public String getSampleId() { + return sampleId; + } + + public InferredSexAnalysisExecutor setSampleId(String sampleId) { + this.sampleId = sampleId; + return this; + } + public InferredSexReport getInferredSexReport() { return inferredSexReport; } diff --git a/opencga-core/src/test/java/org/opencb/opencga/core/cellbase/CellBaseValidatorTest.java b/opencga-core/src/test/java/org/opencb/opencga/core/cellbase/CellBaseValidatorTest.java index 933a27a8663..82535278561 100644 --- a/opencga-core/src/test/java/org/opencb/opencga/core/cellbase/CellBaseValidatorTest.java +++ b/opencga-core/src/test/java/org/opencb/opencga/core/cellbase/CellBaseValidatorTest.java @@ -22,27 +22,27 @@ public class CellBaseValidatorTest { @Test public void testValidateFixVersion() throws IOException { - CellBaseConfiguration c = CellBaseValidator.validate(new CellBaseConfiguration(ParamConstants.CELLBASE_URL, "5.1", "2", null), "hsapiens", "grch38", true); - Assert.assertEquals("v5.1", c.getVersion()); + CellBaseConfiguration c = CellBaseValidator.validate(new CellBaseConfiguration(ParamConstants.CELLBASE_URL, "5.2", "3", null), "hsapiens", "grch38", true); + Assert.assertEquals("v5.2", c.getVersion()); } @Test public void testValidateUndefinedDataRelease() throws IOException { - CellBaseConfiguration c = CellBaseValidator.validate(new CellBaseConfiguration(ParamConstants.CELLBASE_URL, "v5.1", null, null), "hsapiens", "grch38", true); - Assert.assertEquals("v5.1", c.getVersion()); + CellBaseConfiguration c = CellBaseValidator.validate(new CellBaseConfiguration(ParamConstants.CELLBASE_URL, "v5.2", null, null), "hsapiens", "grch38", true); + Assert.assertEquals("v5.2", c.getVersion()); Assert.assertNotNull(c.getDataRelease()); } @Test public void testInvalidUrlPath() throws IOException { thrown.expectMessage("Unable to access cellbase url"); - CellBaseValidator.validate(new CellBaseConfiguration(ParamConstants.CELLBASE_URL+"/NONEXISTING/", "v5.1", null, null), "green alien", "grch84", true); + CellBaseValidator.validate(new CellBaseConfiguration(ParamConstants.CELLBASE_URL+"/NONEXISTING/", "v5.2", null, null), "green alien", "grch84", true); } @Test public void testInvalidUrl() throws IOException { thrown.expectMessage("Unable to access cellbase url"); - CellBaseValidator.validate(new CellBaseConfiguration("https://ws.zettagenomics-NONEXISTING.com/cellbase/NONEXISTING/", "v5.1", null, null), "green alien", "grch84", true); + CellBaseValidator.validate(new CellBaseConfiguration("https://ws.zettagenomics-NONEXISTING.com/cellbase/NONEXISTING/", "v5.2", null, null), "green alien", "grch84", true); } @Test @@ -54,33 +54,33 @@ public void testInvalidVersion() throws IOException { @Test public void testInvalidSpecies() throws IOException { thrown.expectMessage("Species 'galien' not found in cellbase"); - CellBaseValidator.validate(new CellBaseConfiguration(ParamConstants.CELLBASE_URL, "v5.1", null, null), "green alien", "grch84", true); + CellBaseValidator.validate(new CellBaseConfiguration(ParamConstants.CELLBASE_URL, "v5.2", null, null), "green alien", "grch84", true); } @Test public void testInvalidAssembly() throws IOException { thrown.expectMessage("Assembly 'grch84' not found in cellbase"); thrown.expectMessage("Supported assemblies : [GRCh38, GRCh37]"); - CellBaseValidator.validate(new CellBaseConfiguration(ParamConstants.CELLBASE_URL, "v5.1", null, null), "homo sapiens", "grch84", true); + CellBaseValidator.validate(new CellBaseConfiguration(ParamConstants.CELLBASE_URL, "v5.2", null, null), "homo sapiens", "grch84", true); } @Test public void testInvalidDR() throws IOException { thrown.expectMessage("DataRelease 'INVALID_DR' not found on cellbase"); - CellBaseValidator.validate(new CellBaseConfiguration(ParamConstants.CELLBASE_URL, "v5.1", "INVALID_DR", null), "hsapiens", "grch38", true); + CellBaseValidator.validate(new CellBaseConfiguration(ParamConstants.CELLBASE_URL, "v5.2", "INVALID_DR", null), "hsapiens", "grch38", true); } @Test public void testNoActiveReleases() throws IOException { thrown.expectMessage("No active data releases found on cellbase"); - CellBaseValidator.validate(new CellBaseConfiguration(ParamConstants.CELLBASE_URL, "v5.1", null, null), "mmusculus", "GRCm38", true); + CellBaseValidator.validate(new CellBaseConfiguration(ParamConstants.CELLBASE_URL, "v5.2", null, null), "mmusculus", "GRCm38", true); } @Test public void testApiKey() throws IOException { String apiKey = System.getenv("CELLBASE_HGMD_APIKEY"); Assume.assumeTrue(StringUtils.isNotEmpty(apiKey)); - CellBaseConfiguration validated = CellBaseValidator.validate(new CellBaseConfiguration(ParamConstants.CELLBASE_URL, "v5.4", null, apiKey), "hsapiens", "grch38", true); + CellBaseConfiguration validated = CellBaseValidator.validate(new CellBaseConfiguration(ParamConstants.CELLBASE_URL, "v5.8", null, apiKey), "hsapiens", "grch38", true); Assert.assertNotNull(validated.getApiKey()); } @@ -89,14 +89,14 @@ public void testApiKeyNotSupported() throws IOException { String apiKey = System.getenv("CELLBASE_HGMD_APIKEY"); Assume.assumeTrue(StringUtils.isNotEmpty(apiKey)); thrown.expectMessage("API key not supported"); - CellBaseConfiguration validated = CellBaseValidator.validate(new CellBaseConfiguration(ParamConstants.CELLBASE_URL, "v5.1", null, apiKey), "hsapiens", "grch38", true); + CellBaseConfiguration validated = CellBaseValidator.validate(new CellBaseConfiguration(ParamConstants.CELLBASE_URL, "v5.2", null, apiKey), "hsapiens", "grch38", true); Assert.assertNotNull(validated.getApiKey()); } @Test public void testApiKeyEmpty() throws IOException { String apiKey = ""; - CellBaseConfiguration validated = CellBaseValidator.validate(new CellBaseConfiguration(ParamConstants.CELLBASE_URL, "v5.1", null, apiKey), "hsapiens", "grch38", true); + CellBaseConfiguration validated = CellBaseValidator.validate(new CellBaseConfiguration(ParamConstants.CELLBASE_URL, "v5.2", null, apiKey), "hsapiens", "grch38", true); Assert.assertNull(validated.getApiKey()); } @@ -104,7 +104,7 @@ public void testApiKeyEmpty() throws IOException { public void testMalformedApiKey() throws IOException { thrown.expectMessage("Malformed API key for cellbase"); String apiKey = "MALFORMED_API_KEY"; - CellBaseConfiguration validated = CellBaseValidator.validate(new CellBaseConfiguration(ParamConstants.CELLBASE_URL, "v5.4", null, apiKey), "hsapiens", "grch38", true); + CellBaseConfiguration validated = CellBaseValidator.validate(new CellBaseConfiguration(ParamConstants.CELLBASE_URL, "v5.8", null, apiKey), "hsapiens", "grch38", true); Assert.assertNotNull(validated.getApiKey()); } @@ -112,7 +112,7 @@ public void testMalformedApiKey() throws IOException { public void testUnsignedApiKey() throws IOException { thrown.expectMessage("Invalid API key for cellbase"); String apiKey = "eyJhbGciOiJIUzI1NiJ9.eyJzb3VyY2VzIjp7ImhnbWQiOjkyMjMzNzIwMzY4NTQ3NzU4MDd9LCJ2ZXJzaW9uIjoiMS4wIiwic3ViIjoiWkVUVEEiLCJpYXQiOjE2OTMyMTY5MDd9.invalidsignature"; - CellBaseConfiguration validated = CellBaseValidator.validate(new CellBaseConfiguration(ParamConstants.CELLBASE_URL, "v5.4", null, apiKey), "hsapiens", "grch38", true); + CellBaseConfiguration validated = CellBaseValidator.validate(new CellBaseConfiguration(ParamConstants.CELLBASE_URL, "v5.8", null, apiKey), "hsapiens", "grch38", true); Assert.assertNotNull(validated.getApiKey()); } diff --git a/opencga-server/pom.xml b/opencga-server/pom.xml index 94dc9cf9bf9..7632ed6d65f 100644 --- a/opencga-server/pom.xml +++ b/opencga-server/pom.xml @@ -193,17 +193,14 @@ org.glassfish.jersey.core jersey-client - test org.glassfish.jersey.containers jersey-container-servlet-core - test org.opencb.commons commons-datastore-mongodb - test junit diff --git a/opencga-server/src/main/java/org/opencb/opencga/server/generator/models/RestParameter.java b/opencga-server/src/main/java/org/opencb/opencga/server/generator/models/RestParameter.java index 59dad03d1a3..3d1414d3cbd 100644 --- a/opencga-server/src/main/java/org/opencb/opencga/server/generator/models/RestParameter.java +++ b/opencga-server/src/main/java/org/opencb/opencga/server/generator/models/RestParameter.java @@ -99,104 +99,117 @@ public String getName() { return name; } - public void setName(String name) { + public RestParameter setName(String name) { this.name = name; + return this; } public RestParamType getParam() { return param; } - public void setParam(RestParamType param) { + public RestParameter setParam(RestParamType param) { this.param = param; + return this; } public String getParentName() { return parentName; } - public void setParentName(String parentName) { + public RestParameter setParentName(String parentName) { this.parentName = parentName; + return this; } public String getType() { return type; } - public void setType(String type) { + public RestParameter setType(String type) { this.type = type; + return this; } public String getTypeClass() { return typeClass; } - public void setTypeClass(String typeClass) { + public RestParameter setTypeClass(String typeClass) { this.typeClass = typeClass; + return this; } public boolean isRequired() { return required; } - public void setRequired(boolean required) { + public RestParameter setRequired(boolean required) { this.required = required; + return this; } public String getDefaultValue() { return defaultValue; } - public void setDefaultValue(String defaultValue) { + public RestParameter setDefaultValue(String defaultValue) { this.defaultValue = defaultValue; + return this; } public String getDescription() { return description; } - public void setDescription(String description) { + public RestParameter setDescription(String description) { this.description = description; + return this; } public List getData() { return data; } - public void setData(List data) { + public RestParameter setData(List data) { this.data = data; + return this; } public String getAllowedValues() { return allowedValues; } - public void setAllowedValues(String allowedValues) { + public RestParameter setAllowedValues(String allowedValues) { this.allowedValues = allowedValues; + return this; } public boolean isComplex() { return complex; } - public void setComplex(boolean complex) { + public RestParameter setComplex(boolean complex) { this.complex = complex; + return this; } public String getGenericType() { return genericType; } - public void setGenericType(String genericType) { + public RestParameter setGenericType(String genericType) { this.genericType = genericType; + return this; } public boolean isInnerParam() { return innerParam; } - public void setInnerParam(boolean innerParam) { + public RestParameter setInnerParam(boolean innerParam) { this.innerParam = innerParam; + return this; } public boolean isEnum() { 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 f297b867702..a62b08e0413 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.datastore.core.*; import org.opencb.opencga.analysis.AnalysisUtils; import org.opencb.opencga.analysis.ResourceUtils; +import org.opencb.opencga.analysis.alignment.AlignmentConstants; import org.opencb.opencga.analysis.family.qc.FamilyQcAnalysis; import org.opencb.opencga.analysis.individual.qc.IndividualQcAnalysis; import org.opencb.opencga.analysis.individual.qc.IndividualQcUtils; @@ -1079,7 +1080,13 @@ public Response inferredSexRun( @ApiParam(value = ParamConstants.JOB_DEPENDS_ON_DESCRIPTION) @QueryParam(JOB_DEPENDS_ON) String dependsOn, @ApiParam(value = ParamConstants.JOB_TAGS_DESCRIPTION) @QueryParam(ParamConstants.JOB_TAGS) String jobTags, @ApiParam(value = InferredSexAnalysisParams.DESCRIPTION, required = true) InferredSexAnalysisParams params) { - return submitJob(InferredSexAnalysis.ID, study, params, jobName, jobDescription, dependsOn, jobTags); + return run(() -> { + // Check before submitting the job + InferredSexAnalysis.checkParameters(params.getIndividual(), params.getSample(), study, catalogManager, token); + + // Submit the inferred sex analysis + return submitJobRaw(InferredSexAnalysis.ID, null, study, params, jobName, jobDescription, dependsOn, jobTags); + }); } @POST @@ -1118,88 +1125,13 @@ public Response individualQcRun( @ApiParam(value = ParamConstants.JOB_DEPENDS_ON_DESCRIPTION) @QueryParam(JOB_DEPENDS_ON) String dependsOn, @ApiParam(value = ParamConstants.JOB_TAGS_DESCRIPTION) @QueryParam(ParamConstants.JOB_TAGS) String jobTags, @ApiParam(value = IndividualQcAnalysisParams.DESCRIPTION, required = true) IndividualQcAnalysisParams params) { - return run(() -> { - List dependsOnList = StringUtils.isEmpty(dependsOn) ? new ArrayList<>() : Arrays.asList(dependsOn.split(",")); - - Individual individual = IndividualQcUtils.getIndividualById(study, params.getIndividual(), catalogManager, token); - - // Get samples of that individual, but only germline samples - List childGermlineSamples = IndividualQcUtils.getValidGermlineSamplesByIndividualId(study, individual.getId(), + // Check before submitting the job + IndividualQcAnalysis.checkParameters(params.getIndividual(), params.getSample(), params.getInferredSexMethod(), study, catalogManager, token); - if (CollectionUtils.isEmpty(childGermlineSamples)) { - throw new ToolException("Germline sample not found for individual '" + params.getIndividual() + "'"); - } - - Sample sample = null; - if (StringUtils.isNotEmpty(params.getSample())) { - for (Sample germlineSample : childGermlineSamples) { - if (params.getSample().equals(germlineSample.getId())) { - sample = germlineSample; - break; - } - } - if (sample == null) { - throw new ToolException("The provided sample '" + params.getSample() + "' not found in the individual '" - + params.getIndividual() + "'"); - } - } else { - // If multiple germline samples, we take the first one - sample = childGermlineSamples.get(0); - } - - org.opencb.opencga.core.models.file.File catalogBamFile; - catalogBamFile = AnalysisUtils.getBamFileBySampleId(sample.getId(), study, catalogManager.getFileManager(), token); - - if (catalogBamFile != null) { - // Check if .bw (coverage file) exists - OpenCGAResult fileResult; - - Query query = new Query(FileDBAdaptor.QueryParams.ID.key(), catalogBamFile.getId() + ".bw"); - fileResult = catalogManager.getFileManager().search(study, query, QueryOptions.empty(), token); - Job deeptoolsJob = null; - if (fileResult.getNumResults() == 0) { - // Coverage file does not exit, a job must be submitted to create the .bw file - // but first, check if .bai (bam index file) exist - - query = new Query(FileDBAdaptor.QueryParams.ID.key(), catalogBamFile.getId() + ".bai"); - fileResult = catalogManager.getFileManager().search(study, query, QueryOptions.empty(), token); - - Job samtoolsJob = null; - if (fileResult.getNumResults() == 0) { - // BAM index file does not exit, a job must be submitted to create the .bai file - SamtoolsWrapperParams samtoolsParams = new SamtoolsWrapperParams() - .setCommand("index") - .setInputFile(catalogBamFile.getId()) - .setSamtoolsParams(new HashMap<>()); - - DataResult jobResult = submitJobRaw(SamtoolsWrapperAnalysis.ID, null, study, samtoolsParams, null, null, null, - null); - samtoolsJob = jobResult.first(); - } - - // Coverage file does not exit, a job must be submitted to create the .bw file - DeeptoolsWrapperParams deeptoolsParams = new DeeptoolsWrapperParams() - .setCommand("bamCoverage"); - - Map bamCoverageParams = new HashMap<>(); - bamCoverageParams.put("b", catalogBamFile.getId()); - bamCoverageParams.put("o", Paths.get(catalogBamFile.getUri()).getFileName() + ".bw"); - bamCoverageParams.put("binSize", "1"); - bamCoverageParams.put("outFileFormat", "bigwig"); - bamCoverageParams.put("minMappingQuality", "20"); - deeptoolsParams.setDeeptoolsParams(bamCoverageParams); - - DataResult jobResult = submitJobRaw(DeeptoolsWrapperAnalysis.ID, null, study, deeptoolsParams, null, null, - samtoolsJob == null ? null : samtoolsJob.getId(), null); - deeptoolsJob = jobResult.first(); - dependsOnList.add(deeptoolsJob.getId()); - } - } - - return submitJobRaw(IndividualQcAnalysis.ID, null, study, params, jobName, jobDescription, StringUtils.join(dependsOnList, ","), - jobTags); + // Submit the individual QC analysis + return submitJobRaw(IndividualQcAnalysis.ID, null, study, params, jobName, jobDescription, dependsOn, jobTags); }); } diff --git a/opencga-storage/opencga-storage-core/src/main/java/org/opencb/opencga/storage/core/variant/annotation/VariantAnnotationManager.java b/opencga-storage/opencga-storage-core/src/main/java/org/opencb/opencga/storage/core/variant/annotation/VariantAnnotationManager.java index 34c08b356e2..350f577f9a9 100644 --- a/opencga-storage/opencga-storage-core/src/main/java/org/opencb/opencga/storage/core/variant/annotation/VariantAnnotationManager.java +++ b/opencga-storage/opencga-storage-core/src/main/java/org/opencb/opencga/storage/core/variant/annotation/VariantAnnotationManager.java @@ -86,11 +86,12 @@ protected final VariantAnnotationMetadata checkCurrentAnnotation(ProjectMetadata current.setId(1); current.setName(CURRENT); } + boolean firstAnnotation = current.getAnnotator() == null; // Check using same annotator and same source version VariantAnnotatorProgram currentAnnotator = current.getAnnotator(); VariantAnnotatorProgram newAnnotator = newVariantAnnotationMetadata.getAnnotator(); - if (currentAnnotator != null && !currentAnnotator.equals(newAnnotator)) { + if (!firstAnnotation && !currentAnnotator.equals(newAnnotator)) { String currentVersion = removePatchFromVersion(currentAnnotator.getVersion()); String newVersion = removePatchFromVersion(newAnnotator.getVersion()); if (!currentAnnotator.getName().equals(newAnnotator.getName()) @@ -136,7 +137,7 @@ protected final VariantAnnotationMetadata checkCurrentAnnotation(ProjectMetadata if (newPrivateSources == null) { newPrivateSources = Collections.emptyList(); } - if (!new HashSet<>(currentPrivateSources).equals(new HashSet<>(newPrivateSources))) { + if (!firstAnnotation && !new HashSet<>(currentPrivateSources).equals(new HashSet<>(newPrivateSources))) { String msg = "Private sources has changed. " + "Existing annotation calculated with private sources " + currentPrivateSources + ", attempting to annotate with " + newPrivateSources; diff --git a/opencga-storage/opencga-storage-core/src/test/java/org/opencb/opencga/storage/core/utils/CellBaseUtilsTest.java b/opencga-storage/opencga-storage-core/src/test/java/org/opencb/opencga/storage/core/utils/CellBaseUtilsTest.java index 33f24bbbe4a..ce6dad773e7 100644 --- a/opencga-storage/opencga-storage-core/src/test/java/org/opencb/opencga/storage/core/utils/CellBaseUtilsTest.java +++ b/opencga-storage/opencga-storage-core/src/test/java/org/opencb/opencga/storage/core/utils/CellBaseUtilsTest.java @@ -55,20 +55,10 @@ public class CellBaseUtilsTest { @Parameters(name = "{0}{1}/?assembly={2}%dataRelease={3}") public static List data() { return Arrays.asList( - new Object[]{"http://ws.opencb.org/cellbase-4.7.3/", "v4", "grch37", null}, - new Object[]{"http://ws.opencb.org/cellbase-4.8.2/", "v4", "grch37", null}, -// new Object[]{"http://ws.opencb.org/cellbase-4.8.3/", "v4", "grch37", null}, -// new Object[]{"http://ws.opencb.org/cellbase-4.9.0/", "v4", "grch37", null}, -// new Object[]{"http://ws.opencb.org/cellbase/", "v4", "grch37", null}, - -// new Object[]{"https://uk.ws.zettagenomics.com/cellbase/", "v5.3", "grch37", "1"}, -// new Object[]{"https://uk.ws.zettagenomics.com/cellbase/", "v5.3", "grch38", "2"}, - new Object[]{"https://ws.zettagenomics.com/cellbase/", "v5", "grch38", null}, - new Object[]{"https://ws.zettagenomics.com/cellbase/", "v5.1", "grch38", "1"}, - new Object[]{"https://ws.zettagenomics.com/cellbase/", "v5.1", "grch38", "2"}, new Object[]{"https://uk.ws.zettagenomics.com/cellbase/", "v5.2", "grch37", "1"}, - new Object[]{"https://uk.ws.zettagenomics.com/cellbase/", "v5.2", "grch38", "2"}, - new Object[]{"https://uk.ws.zettagenomics.com/cellbase/", "v5.4", "grch38", "3"}); + new Object[]{"https://uk.ws.zettagenomics.com/cellbase/", "v5.2", "grch38", "3"}, + new Object[]{"https://uk.ws.zettagenomics.com/cellbase/", "v5.8", "grch37", "1"}, + new Object[]{"https://uk.ws.zettagenomics.com/cellbase/", "v5.8", "grch38", "3"}); } @Parameter(0) @@ -206,7 +196,6 @@ public void convertGeneToRegionFail() { @Test public void validateGeneNames() { - Assume.assumeTrue(!version.startsWith("v4")); Assume.assumeFalse("HGNC ids not supported in GRCH37", assembly.equalsIgnoreCase("grch37")); List validated = cellBaseUtils.validateGenes(Arrays.asList("BRCA2", "NonExistingGene", "HGNC:12363"), true); assertEquals(Arrays.asList("BRCA2", "TSC2"), validated); @@ -215,6 +204,7 @@ public void validateGeneNames() { @Test @Ignore public void testGetVariant() throws Exception { + Assume.assumeFalse(assembly.equalsIgnoreCase("grch37")); assertEquals(new Variant("19:44934489:G:A"), cellBaseUtils.getVariant("rs2571174")); assertEquals(Arrays.asList(new Variant("19:44934489:G:A"), new Variant("1:7797503:C:G")), cellBaseUtils.getVariants(Arrays.asList("rs2571174", "rs41278952"))); diff --git a/opencga-storage/opencga-storage-core/src/test/java/org/opencb/opencga/storage/core/variant/VariantStorageEngineSVTest.java b/opencga-storage/opencga-storage-core/src/test/java/org/opencb/opencga/storage/core/variant/VariantStorageEngineSVTest.java index a581ae3f2b0..fe7cebbd6a4 100644 --- a/opencga-storage/opencga-storage-core/src/test/java/org/opencb/opencga/storage/core/variant/VariantStorageEngineSVTest.java +++ b/opencga-storage/opencga-storage-core/src/test/java/org/opencb/opencga/storage/core/variant/VariantStorageEngineSVTest.java @@ -56,8 +56,8 @@ public void before() throws Exception { protected void loadFiles() throws Exception { variantStorageEngine.getConfiguration().getCellbase().setUrl(ParamConstants.CELLBASE_URL); - variantStorageEngine.getConfiguration().getCellbase().setVersion("v5.1"); - variantStorageEngine.getConfiguration().getCellbase().setDataRelease("2"); + variantStorageEngine.getConfiguration().getCellbase().setVersion("v5.2"); + variantStorageEngine.getConfiguration().getCellbase().setDataRelease("3"); variantStorageEngine.getOptions().put(VariantStorageOptions.ASSEMBLY.key(), "grch38"); variantStorageEngine.reloadCellbaseConfiguration(); diff --git a/opencga-storage/opencga-storage-core/src/test/java/org/opencb/opencga/storage/core/variant/annotation/VariantAnnotationManagerTest.java b/opencga-storage/opencga-storage-core/src/test/java/org/opencb/opencga/storage/core/variant/annotation/VariantAnnotationManagerTest.java index 26b5dcfad4f..dc2721882fa 100644 --- a/opencga-storage/opencga-storage-core/src/test/java/org/opencb/opencga/storage/core/variant/annotation/VariantAnnotationManagerTest.java +++ b/opencga-storage/opencga-storage-core/src/test/java/org/opencb/opencga/storage/core/variant/annotation/VariantAnnotationManagerTest.java @@ -1,6 +1,8 @@ package org.opencb.opencga.storage.core.variant.annotation; import org.apache.commons.io.FileUtils; +import org.apache.commons.lang.StringUtils; +import org.junit.Assume; import org.junit.Test; import org.opencb.biodata.models.variant.avro.VariantAnnotation; import org.opencb.commons.datastore.core.ObjectMap; @@ -88,12 +90,46 @@ public void testChangeAnnotatorFail() throws Exception { assertEquals("v2", variantStorageEngine.getMetadataManager().getProjectMetadata().getAnnotation().getCurrent().getAnnotator().getVersion()); } + @Test + public void testApiKey() throws Exception { + String cosmicApiKey = System.getenv("CELLBASE_COSMIC_APIKEY"); + String hgmdApiKey = System.getenv("CELLBASE_HGMD_APIKEY"); + Assume.assumeTrue(StringUtils.isNotEmpty(cosmicApiKey)); + Assume.assumeTrue(StringUtils.isNotEmpty(hgmdApiKey)); + + VariantStorageEngine variantStorageEngine = getVariantStorageEngine(); + variantStorageEngine.getConfiguration().getCellbase().setUrl(ParamConstants.CELLBASE_URL); + variantStorageEngine.getConfiguration().getCellbase().setVersion("v5.4"); + variantStorageEngine.getConfiguration().getCellbase().setDataRelease("3"); + variantStorageEngine.getConfiguration().getCellbase().setApiKey(cosmicApiKey); + variantStorageEngine.getOptions().put(VariantStorageOptions.ASSEMBLY.key(), "grch38"); + variantStorageEngine.reloadCellbaseConfiguration(); + variantStorageEngine.getCellBaseUtils().validate(); + + runDefaultETL(smallInputUri, variantStorageEngine, newStudyMetadata(), + new ObjectMap(VariantStorageOptions.ANNOTATE.key(), false)); + + variantStorageEngine.annotate(outputUri, new ObjectMap()); + + variantStorageEngine.getConfiguration().getCellbase().setApiKey(hgmdApiKey); + variantStorageEngine.reloadCellbaseConfiguration(); + variantStorageEngine.getCellBaseUtils().validate(); + + try { + variantStorageEngine.annotate(outputUri, new ObjectMap()); + fail("Expected to fail!"); + } catch (VariantAnnotatorException e) { + assertTrue(e.getMessage().contains("Existing annotation calculated with private sources [cosmic], attempting to annotate with [hgmd]")); + } + variantStorageEngine.annotate(outputUri, new ObjectMap(VariantStorageOptions.ANNOTATION_OVERWEITE.key(), true)); + } + @Test public void testChangeDataRelease() throws Exception { VariantStorageEngine variantStorageEngine = getVariantStorageEngine(); variantStorageEngine.getConfiguration().getCellbase().setUrl(ParamConstants.CELLBASE_URL); - variantStorageEngine.getConfiguration().getCellbase().setVersion("v5"); - variantStorageEngine.getConfiguration().getCellbase().setDataRelease(null); + variantStorageEngine.getConfiguration().getCellbase().setVersion("v5.2"); + variantStorageEngine.getConfiguration().getCellbase().setDataRelease("2"); variantStorageEngine.getOptions().put(VariantStorageOptions.ASSEMBLY.key(), "grch38"); variantStorageEngine.reloadCellbaseConfiguration(); variantStorageEngine.getCellBaseUtils().validate(); @@ -103,10 +139,10 @@ public void testChangeDataRelease() throws Exception { // First annotation. Should run ok. variantStorageEngine.annotate(outputUri, new ObjectMap()); - assertNull(variantStorageEngine.getMetadataManager().getProjectMetadata().getAnnotation().getCurrent().getDataRelease()); + assertEquals(2, variantStorageEngine.getMetadataManager().getProjectMetadata().getAnnotation().getCurrent().getDataRelease().getRelease()); - variantStorageEngine.getConfiguration().getCellbase().setVersion("v5.1"); - variantStorageEngine.getConfiguration().getCellbase().setDataRelease("1"); + variantStorageEngine.getConfiguration().getCellbase().setVersion("v5.8"); + variantStorageEngine.getConfiguration().getCellbase().setDataRelease("2"); variantStorageEngine.reloadCellbaseConfiguration(); // New annotator. Do not overwrite. Should fail. @@ -119,10 +155,10 @@ public void testChangeDataRelease() throws Exception { // New annotator. Overwrite. Should run ok. variantStorageEngine.annotate(outputUri, new ObjectMap(VariantStorageOptions.ANNOTATION_OVERWEITE.key(), true)); - assertEquals("1", String.valueOf(variantStorageEngine.getMetadataManager().getProjectMetadata().getAnnotation().getCurrent().getDataRelease().getRelease())); + assertEquals(2, variantStorageEngine.getMetadataManager().getProjectMetadata().getAnnotation().getCurrent().getDataRelease().getRelease()); - variantStorageEngine.getConfiguration().getCellbase().setDataRelease("2"); + variantStorageEngine.getConfiguration().getCellbase().setDataRelease("3"); variantStorageEngine.reloadCellbaseConfiguration(); // Same annotator, new datarelease. Do not overwrite. Should fail. @@ -131,16 +167,16 @@ public void testChangeDataRelease() throws Exception { fail("Should fail"); } catch (Exception e) { e.printStackTrace(); - assertEquals("DataRelease has changed. Existing annotation calculated with dataRelease 1, attempting to annotate with 2", e.getMessage()); + assertEquals("DataRelease has changed. Existing annotation calculated with dataRelease 2, attempting to annotate with 3", e.getMessage()); } // Same annotator, new datarelease. Overwrite. Should run ok. variantStorageEngine.annotate(outputUri, new ObjectMap(VariantStorageOptions.ANNOTATION_OVERWEITE.key(), true)); - assertEquals("2", String.valueOf(variantStorageEngine.getMetadataManager().getProjectMetadata().getAnnotation().getCurrent().getDataRelease().getRelease())); + assertEquals(3, variantStorageEngine.getMetadataManager().getProjectMetadata().getAnnotation().getCurrent().getDataRelease().getRelease()); - // Revert annotator to 5.0. Do not overwrite. Should fail. - variantStorageEngine.getConfiguration().getCellbase().setDataRelease(null); - variantStorageEngine.getConfiguration().getCellbase().setVersion("v5.0"); + // Revert annotator to 5.2. Do not overwrite. Should fail. + variantStorageEngine.getConfiguration().getCellbase().setDataRelease("3"); + variantStorageEngine.getConfiguration().getCellbase().setVersion("v5.2"); variantStorageEngine.reloadCellbaseConfiguration(); try { variantStorageEngine.annotate(outputUri, new ObjectMap(VariantStorageOptions.ANNOTATION_OVERWEITE.key(), false)); @@ -149,9 +185,9 @@ public void testChangeDataRelease() throws Exception { e.printStackTrace(); } - // Revert annotator to 5.0. Do not overwrite. Should run ok. + // Revert annotator to 5.2 Overwrite. Should run ok. variantStorageEngine.annotate(outputUri, new ObjectMap(VariantStorageOptions.ANNOTATION_OVERWEITE.key(), true)); - assertNull(variantStorageEngine.getMetadataManager().getProjectMetadata().getAnnotation().getCurrent().getDataRelease()); + assertEquals(3, variantStorageEngine.getMetadataManager().getProjectMetadata().getAnnotation().getCurrent().getDataRelease().getRelease()); } @Test diff --git a/opencga-storage/opencga-storage-core/src/test/java/org/opencb/opencga/storage/core/variant/annotation/annotators/VariantAnnotatorByApiKeyTest.java b/opencga-storage/opencga-storage-core/src/test/java/org/opencb/opencga/storage/core/variant/annotation/annotators/VariantAnnotatorByApiKeyTest.java index 455eaa5f071..6ece2f05138 100644 --- a/opencga-storage/opencga-storage-core/src/test/java/org/opencb/opencga/storage/core/variant/annotation/annotators/VariantAnnotatorByApiKeyTest.java +++ b/opencga-storage/opencga-storage-core/src/test/java/org/opencb/opencga/storage/core/variant/annotation/annotators/VariantAnnotatorByApiKeyTest.java @@ -38,11 +38,11 @@ public void setUp() throws Exception { String url = "https://uk.ws.zettagenomics.com/cellbase/"; storageConfiguration.getCellbase().setUrl(url); storageConfiguration.getCellbase().setDataRelease("3"); - storageConfiguration.getCellbase().setVersion("v5.4"); + storageConfiguration.getCellbase().setVersion("v5.8"); storageConfiguration.getCellbase().setApiKey(null); CellBaseUtils cellBaseUtils = new CellBaseUtils(new CellBaseClient(storageConfiguration.getCellbase().toClientConfiguration())); - Assume.assumeTrue(cellBaseUtils.isMinVersion("v5.4")); + Assume.assumeTrue(cellBaseUtils.isMinVersion("v5.8")); projectMetadata = new ProjectMetadata("hsapiens", "grch38", "3", 1, null, null, null); } 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 9e2e3a353fa..5f50c28828d 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 @@ -110,11 +110,10 @@ 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/"); - storageConfiguration.getCellbase().setVersion("v5.4"); + storageConfiguration.getCellbase().setVersion("v5.8"); storageConfiguration.getCellbase().setDataRelease("3"); VariantAnnotator variantAnnotator = null; diff --git a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/test/java/org/opencb/opencga/storage/hadoop/variant/index/family/FamilyIndexTest.java b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/test/java/org/opencb/opencga/storage/hadoop/variant/index/family/FamilyIndexTest.java index 034e676c1b4..ccafd14be63 100644 --- a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/test/java/org/opencb/opencga/storage/hadoop/variant/index/family/FamilyIndexTest.java +++ b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/test/java/org/opencb/opencga/storage/hadoop/variant/index/family/FamilyIndexTest.java @@ -66,8 +66,8 @@ public void before() throws Exception { if (!loaded) { HadoopVariantStorageEngine variantStorageEngine = getVariantStorageEngine(); variantStorageEngine.getConfiguration().getCellbase().setUrl(ParamConstants.CELLBASE_URL); - variantStorageEngine.getConfiguration().getCellbase().setVersion("v5.1"); - variantStorageEngine.getConfiguration().getCellbase().setDataRelease("2"); + variantStorageEngine.getConfiguration().getCellbase().setVersion("v5.2"); + variantStorageEngine.getConfiguration().getCellbase().setDataRelease("3"); variantStorageEngine.getOptions().put(VariantStorageOptions.ASSEMBLY.key(), "grch38"); variantStorageEngine.reloadCellbaseConfiguration(); URI outputUri = newOutputUri(); diff --git a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/test/java/org/opencb/opencga/storage/hadoop/variant/index/sample/SampleIndexTest.java b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/test/java/org/opencb/opencga/storage/hadoop/variant/index/sample/SampleIndexTest.java index 0e478690499..6267f8d8e23 100644 --- a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/test/java/org/opencb/opencga/storage/hadoop/variant/index/sample/SampleIndexTest.java +++ b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/test/java/org/opencb/opencga/storage/hadoop/variant/index/sample/SampleIndexTest.java @@ -222,13 +222,6 @@ public void load() throws Exception { // ---------------- Annotate -// variantStorageEngine.getConfiguration().getCellbase().setUrl(ParamConstants.CELLBASE_URL); -// variantStorageEngine.getConfiguration().getCellbase().setVersion("v5.1"); -// variantStorageEngine.getMetadataManager().updateProjectMetadata(projectMetadata -> { -// projectMetadata.setAssembly("grch38"); -// }); -// variantStorageEngine.getOptions().put(VariantStorageOptions.ASSEMBLY.key(), "grch38"); -// this.variantStorageEngine.reloadCellbaseConfiguration(); this.variantStorageEngine.annotate(outputUri, new QueryOptions()); engine.familyIndex(STUDY_NAME_3, triosPlatinum, new ObjectMap()); diff --git a/opencga-storage/pom.xml b/opencga-storage/pom.xml index 20db88ba519..c3f5166b7fd 100644 --- a/opencga-storage/pom.xml +++ b/opencga-storage/pom.xml @@ -101,7 +101,7 @@ analyze-only - true + false