Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TASK-5668 - Linked file not shown under sample when retrieving an Individual #2409

Merged
merged 5 commits into from
Mar 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,16 @@ OpenCGAResult update(Query query, ObjectMap parameters, List<VariableSet> variab
/**
* Add the variable to all the possible annotations from the variableSetId using the default value.
*
* @param studyUid Study uid.
* @param variableSetId variable set id to identify the annotations that will add a new annotation.
* @param variable new variable that will be added.
* @param variable new variable that will be added.
* @return a OpenCGAResult object.
* @throws CatalogDBException if the variable could not be added to an existing annotationSet.
* @throws CatalogParameterException if there is any unexpected parameter.
* @throws CatalogAuthorizationException if the operation is not authorized.
*/
OpenCGAResult addVariableToAnnotations(long variableSetId, Variable variable) throws CatalogDBException;
OpenCGAResult addVariableToAnnotations(long studyUid, long variableSetId, Variable variable)
throws CatalogDBException, CatalogParameterException, CatalogAuthorizationException;

// /**
// * This method will rename the id of all the annotations corresponding to the variableSetId changing oldName per newName.
Expand All @@ -80,21 +84,25 @@ OpenCGAResult update(Query query, ObjectMap parameters, List<VariableSet> variab
/**
* Remove the annotation with annotationName from the annotation set.
*
* @param variableSetId variable set id for which the annotationSets have to delete the annotation.
* @param studyUid Study uid.
* @param variableSetId variable set id for which the annotationSets have to delete the annotation.
* @param annotationName Annotation name.
* @return a OpenCGAResult object.
* @throws CatalogDBException when there is an error in the database.
* @throws CatalogParameterException if there is any unexpected parameter.
* @throws CatalogAuthorizationException if the operation is not authorized.
*/
OpenCGAResult removeAnnotationField(long variableSetId, String annotationName) throws CatalogDBException;
OpenCGAResult removeAnnotationField(long studyUid, long variableSetId, String annotationName)
throws CatalogDBException, CatalogParameterException, CatalogAuthorizationException;

/**
* Makes a groupBy to obtain the different values that every annotation has and the total number of each.
*
*
* @param studyId study id.
* @param studyUid study uid.
* @param variableSetId variable set id for which the group by will be done.
* @return a list of Feature count with every different value.
* @throws CatalogDBException when there is an error in the database.
*/
OpenCGAResult<VariableSummary> getAnnotationSummary(long studyId, long variableSetId) throws CatalogDBException;
OpenCGAResult<VariableSummary> getAnnotationSummary(long studyUid, long variableSetId) throws CatalogDBException;
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@
import org.opencb.opencga.catalog.exceptions.CatalogParameterException;
import org.opencb.opencga.core.response.OpenCGAResult;

import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.function.Consumer;

/**
Expand Down Expand Up @@ -61,19 +59,6 @@ default OpenCGAResult<T> stats() {
OpenCGAResult<T> get(Query query, QueryOptions options)
throws CatalogDBException, CatalogParameterException, CatalogAuthorizationException;

OpenCGAResult nativeGet(Query query, QueryOptions options)
throws CatalogDBException, CatalogParameterException, CatalogAuthorizationException;

default List<OpenCGAResult> nativeGet(List<Query> queries, QueryOptions options)
throws CatalogDBException, CatalogParameterException, CatalogAuthorizationException {
Objects.requireNonNull(queries);
List<OpenCGAResult> queryResults = new ArrayList<>(queries.size());
for (Query query : queries) {
queryResults.add(nativeGet(query, options));
}
return queryResults;
}

OpenCGAResult<T> update(long id, ObjectMap parameters, QueryOptions queryOptions)
throws CatalogDBException, CatalogParameterException, CatalogAuthorizationException;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,20 +186,9 @@ default List<OpenCGAResult<Project>> get(List<Query> queries, QueryOptions optio
return queryResults;
}

OpenCGAResult nativeGet(Query query, QueryOptions options) throws CatalogDBException;

OpenCGAResult nativeGet(Query query, QueryOptions options, String user)
throws CatalogDBException, CatalogAuthorizationException;

default List<OpenCGAResult> nativeGet(List<Query> queries, QueryOptions options) throws CatalogDBException {
Objects.requireNonNull(queries);
List<OpenCGAResult> queryResults = new ArrayList<>(queries.size());
for (Query query : queries) {
queryResults.add(nativeGet(query, options));
}
return queryResults;
}

OpenCGAResult<Project> update(long id, ObjectMap parameters, QueryOptions queryOptions)
throws CatalogDBException, CatalogParameterException, CatalogAuthorizationException;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,20 +82,9 @@ default List<OpenCGAResult<Study>> get(List<Query> queries, QueryOptions options
return queryResults;
}

OpenCGAResult nativeGet(Query query, QueryOptions options) throws CatalogDBException;

OpenCGAResult nativeGet(Query query, QueryOptions options, String user)
throws CatalogDBException, CatalogAuthorizationException;

default List<OpenCGAResult> nativeGet(List<Query> queries, QueryOptions options) throws CatalogDBException {
Objects.requireNonNull(queries);
List<OpenCGAResult> queryResults = new ArrayList<>(queries.size());
for (Query query : queries) {
queryResults.add(nativeGet(query, options));
}
return queryResults;
}

OpenCGAResult<Study> update(long id, ObjectMap parameters, QueryOptions queryOptions)
throws CatalogDBException, CatalogParameterException, CatalogAuthorizationException;

Expand Down Expand Up @@ -395,14 +384,14 @@ default void checkVariableSetExists(String variableSetId, long studyId) throws C

OpenCGAResult<VariableSet> createVariableSet(long studyId, VariableSet variableSet) throws CatalogDBException;

OpenCGAResult<VariableSet> addFieldToVariableSet(long variableSetId, Variable variable, String user)
throws CatalogDBException, CatalogAuthorizationException;
OpenCGAResult<VariableSet> addFieldToVariableSet(long studyUid, long variableSetId, Variable variable, String user)
throws CatalogDBException, CatalogAuthorizationException, CatalogParameterException;

OpenCGAResult<VariableSet> renameFieldVariableSet(long variableSetId, String oldName, String newName, String user)
throws CatalogDBException, CatalogAuthorizationException;

OpenCGAResult<VariableSet> removeFieldFromVariableSet(long variableSetId, String name, String user)
throws CatalogDBException, CatalogAuthorizationException;
OpenCGAResult<VariableSet> removeFieldFromVariableSet(long studyUid, long variableSetId, String name, String user)
throws CatalogDBException, CatalogAuthorizationException, CatalogParameterException;

OpenCGAResult<VariableSet> getVariableSet(long variableSetUid, QueryOptions options) throws CatalogDBException;

Expand Down
Loading
Loading