Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* Copyright 2015-2024 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.client.rest.clients;
import java.lang.Object;
import org.opencb.commons.datastore.core.ObjectMap;
import org.opencb.opencga.client.config.ClientConfiguration;
import org.opencb.opencga.client.exceptions.ClientException;
import org.opencb.opencga.client.rest.*;
import org.opencb.opencga.core.models.common.TsvAnnotationParams;
import org.opencb.opencga.core.models.job.Job;
import org.opencb.opencga.core.models.sample.Sample;
import org.opencb.opencga.core.models.sample.SampleAclEntryList;
import org.opencb.opencga.core.models.sample.SampleAclUpdateParams;
import org.opencb.opencga.core.models.sample.SampleCreateParams;
import org.opencb.opencga.core.models.sample.SampleUpdateParams;
import org.opencb.opencga.core.response.RestResponse;
/*
* WARNING: AUTOGENERATED CODE
*
* This code was generated by a tool.
*
* Manual changes to this file may cause unexpected behavior in your application.
* Manual changes to this file will be overwritten if the code is regenerated.
*/
/**
* This class contains methods for the Sample webservices.
* PATH: samples
*/
public class SampleClient extends AbstractParentClient {
public SampleClient(String token, ClientConfiguration configuration) {
super(token, configuration);
}
/**
* Update the set of permissions granted for the member.
* @param members Comma separated list of user or group ids.
* @param action Action to be performed [ADD, SET, REMOVE or RESET].
* @param data JSON containing the parameters to update the permissions. If propagate flag is set to true, it will propagate the
* permissions defined to the individuals that are associated to the matching samples.
* @param params Map containing any of the following optional parameters.
* study: Study [[organization@]project:]study where study and project can be either the ID or UUID.
* @return a RestResponse object.
* @throws ClientException ClientException if there is any server error.
*/
public RestResponse updateAcl(String members, String action, SampleAclUpdateParams data, ObjectMap params)
throws ClientException {
params = params != null ? params : new ObjectMap();
params.putIfNotNull("action", action);
params.put("body", data);
return execute("samples", null, "acl", members, "update", params, POST, SampleAclEntryList.class);
}
/**
* Load annotation sets from a TSV file.
* @param variableSetId Variable set ID or name.
* @param path Path where the TSV file is located in OpenCGA or where it should be located.
* @param data JSON containing the 'content' of the TSV file if this has not yet been registered into OpenCGA.
* @param params Map containing any of the following optional parameters.
* study: Study [[organization@]project:]study where study and project can be either the ID or UUID.
* parents: Flag indicating whether to create parent directories if they don't exist (only when TSV file was not previously
* associated).
* annotationSetId: Annotation set id. If not provided, variableSetId will be used.
* @return a RestResponse object.
* @throws ClientException ClientException if there is any server error.
*/
public RestResponse loadAnnotationSets(String variableSetId, String path, TsvAnnotationParams data, ObjectMap params)
throws ClientException {
params = params != null ? params : new ObjectMap();
params.putIfNotNull("variableSetId", variableSetId);
params.putIfNotNull("path", path);
params.put("body", data);
return execute("samples", null, "annotationSets", null, "load", params, POST, Job.class);
}
/**
* Create sample.
* @param data JSON containing sample information.
* @param params Map containing any of the following optional parameters.
* include: Fields included in the response, whole JSON path must be provided.
* exclude: Fields excluded in the response, whole JSON path must be provided.
* study: Study [[organization@]project:]study where study and project can be either the ID or UUID.
* includeResult: Flag indicating to include the created or updated document result in the response.
* @return a RestResponse object.
* @throws ClientException ClientException if there is any server error.
*/
public RestResponse create(SampleCreateParams data, ObjectMap params) throws ClientException {
params = params != null ? params : new ObjectMap();
params.put("body", data);
return execute("samples", null, null, null, "create", params, POST, Sample.class);
}
/**
* Sample distinct method.
* @param field Comma separated list of fields for which to obtain the distinct values.
* @param params Map containing any of the following optional parameters.
* study: Study [[organization@]project:]study where study and project can be either the ID or UUID.
* id: Comma separated list sample IDs up to a maximum of 100. Also admits basic regular expressions using the operator '~', i.e.
* '~{perl-regex}' e.g. '~value' for case sensitive, '~/value/i' for case insensitive search.
* uuid: Comma separated list sample UUIDs up to a maximum of 100.
* somatic: Somatic sample.
* individualId: Individual ID or UUID.
* fileIds: Comma separated list of file IDs, paths or UUIDs.
* cohortIds: Comma separated list of cohort IDs.
* creationDate: Creation date. Format: yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805.
* modificationDate: Modification date. Format: yyyyMMddHHmmss. Examples: >2018, 2017-2018, <201805.
* internalStatus: Filter by internal status.
* status: Filter by status.
* processingProduct: Processing product.
* processingPreparationMethod: Processing preparation method.
* processingExtractionMethod: Processing extraction method.
* processingLabSampleId: Processing lab sample id.
* collectionFrom: Collection from.
* collectionType: Collection type.
* collectionMethod: Collection method.
* phenotypes: Comma separated list of phenotype ids or names. Also admits basic regular expressions using the operator '~', i.e.
* '~{perl-regex}' e.g. '~value' for case sensitive, '~/value/i' for case insensitive search.
* annotation: Annotation filters. Example: age>30;gender=FEMALE. For more information, please visit
* http://docs.opencb.org/display/opencga/AnnotationSets+1.4.0.
* acl: Filter entries for which a user has the provided permissions. Format: acl={user}:{permissions}. Example:
* acl=john:WRITE,WRITE_ANNOTATIONS will return all entries for which user john has both WRITE and WRITE_ANNOTATIONS
* permissions. Only study owners or administrators can query by this field. .
* internalRgaStatus: Index status of the sample for the Recessive Gene Analysis.
* release: Release when it was created.
* snapshot: Snapshot value (Latest version of the entry in the specified release).
* deleted: Boolean to retrieve deleted entries.
* statsId: Sample variant stats Id. If this field is not provided and the user filters by other stats fields, it will
* automatically be set to ALL.
* statsVariantCount: Sample variant stats VariantCount.
* statsChromosomeCount: Sample variant stats ChromosomeCount.
* statsTypeCount: Sample variant stats TypeCount.
* statsGenotypeCount: Sample variant stats GenotypeCount.
* statsTiTvRatio: Sample variant stats TiTvRatio.
* statsQualityAvg: Sample variant stats QualityAvg.
* statsQualityStdDev: Sample variant stats QualityStdDev.
* statsHeterozygosityRate: Sample variant stats HeterozygosityRate.
* statsDepthCount: Sample variant stats DepthCount.
* statsBiotypeCount: Sample variant stats BiotypeCount.
* statsClinicalSignificanceCount: Sample variant stats ClinicalSignificanceCount.
* statsConsequenceTypeCount: Sample variant stats ConsequenceTypeCount.
* @return a RestResponse object.
* @throws ClientException ClientException if there is any server error.
*/
public RestResponse