Class DatasetsWebService


  • @Service
    @Path("/datasets")
    public class DatasetsWebService
    extends Object
    RESTful interface for datasets.
    Author:
    tesarst
    • Constructor Detail

      • DatasetsWebService

        public DatasetsWebService()
    • Method Detail

      • getDatasetsByIds

        @GET
        @Path("/{dataset}")
        @Produces("application/json")
        public FilteredAndPaginatedResponseDataObject<ExpressionExperimentValueObject> getDatasetsByIds​(@PathParam("dataset")
                                                                                                        DatasetArrayArg datasetsArg,
                                                                                                        @QueryParam("filter") @DefaultValue("")
                                                                                                        FilterArg<ExpressionExperiment> filter,
                                                                                                        @QueryParam("offset") @DefaultValue("0")
                                                                                                        OffsetArg offset,
                                                                                                        @QueryParam("limit") @DefaultValue("20")
                                                                                                        LimitArg limit,
                                                                                                        @QueryParam("sort") @DefaultValue("+id")
                                                                                                        SortArg<ExpressionExperiment> sort)
        Retrieves all datasets matching the given identifiers.
        Parameters:
        datasetsArg - a list of identifiers, separated by commas (','). Identifiers can either be the ExpressionExperiment ID or its short name (e.g. GSE1234). Retrieval by ID is more efficient.

        Only datasets that user has access to will be available.

        Do not combine different identifiers in one query.

      • getDatasetPlatforms

        @GET
        @Path("/{dataset}/platforms")
        @Produces("application/json")
        public ResponseDataObject<List<ArrayDesignValueObject>> getDatasetPlatforms​(@PathParam("dataset")
                                                                                    DatasetArg<?> datasetArg)
        Retrieves platforms for the given dataset.
        Parameters:
        datasetArg - can either be the ExpressionExperiment ID or its short name (e.g. GSE1234). Retrieval by ID is more efficient. Only datasets that user has access to will be available.
      • getDatasetSamples

        @GET
        @Path("/{dataset}/samples")
        @Produces("application/json")
        public ResponseDataObject<List<BioAssayValueObject>> getDatasetSamples​(@PathParam("dataset")
                                                                               DatasetArg<?> datasetArg)
        Retrieves the samples for the given dataset.
        Parameters:
        datasetArg - can either be the ExpressionExperiment ID or its short name (e.g. GSE1234). Retrieval by ID is more efficient. Only datasets that user has access to will be available.
      • getDatasetDifferentialExpressionAnalyses

        @GET
        @Path("/{dataset}/analyses/differential")
        @Produces("application/json")
        public ResponseDataObject<List<DifferentialExpressionAnalysisValueObject>> getDatasetDifferentialExpressionAnalyses​(@PathParam("dataset")
                                                                                                                            DatasetArg<?> datasetArg,
                                                                                                                            @QueryParam("offset") @DefaultValue("0")
                                                                                                                            OffsetArg offset,
                                                                                                                            @QueryParam("limit") @DefaultValue("20")
                                                                                                                            LimitArg limit)
        Retrieves the differential analysis results for the given dataset.
        Parameters:
        datasetArg - can either be the ExpressionExperiment ID or its short name (e.g. GSE1234). Retrieval by ID is more efficient. Only datasets that user has access to will be available.
      • getDatasetAnnotations

        @GET
        @Path("/{dataset}/annotations")
        @Produces("application/json")
        public ResponseDataObject<Set<AnnotationValueObject>> getDatasetAnnotations​(@PathParam("dataset")
                                                                                    DatasetArg<?> datasetArg)
        Retrieves the annotations for the given dataset.
        Parameters:
        datasetArg - can either be the ExpressionExperiment ID or its short name (e.g. GSE1234). Retrieval by ID is more efficient. Only datasets that user has access to will be available.
      • getDatasetQuantitationTypes

        @GET
        @Path("/{dataset}/quantitationTypes")
        @Produces("application/json")
        public ResponseDataObject<Set<QuantitationTypeValueObject>> getDatasetQuantitationTypes​(@PathParam("dataset")
                                                                                                DatasetArg<?> datasetArg)
        Retrieve all available quantitation types for a dataset.
      • getDatasetExpression

        @GET
        @Path("/{dataset}/data")
        @Produces("text/tab-separated-values; charset=UTF-8")
        public javax.ws.rs.core.Response getDatasetExpression​(@PathParam("dataset")
                                                              DatasetArg<?> datasetArg,
                                                              @QueryParam("filter") @DefaultValue("false")
                                                              Boolean filterData)
        Retrieves the data for the given dataset.

        The returned TSV format contains the following columns:

        • Probe
        • Sequence
        • GeneSymbol (optional)
        • GeneName (optional)
        • GemmaId (optional)
        • NCBIid (optional)
        followed by one column per sample.

        Note: Additional gene information is only available if the corresponding platform's annotations has been dumped on-disk.

        Parameters:
        datasetArg - can either be the ExpressionExperiment ID or its short name (e.g. GSE1234). Retrieval by ID is more efficient. Only datasets that user has access to will be available.
        filterData - return filtered the expression data.
      • getDatasetProcessedExpression

        @GET
        @Path("/{dataset}/data/processed")
        @Produces("text/tab-separated-values; charset=UTF-8")
        public javax.ws.rs.core.Response getDatasetProcessedExpression​(@PathParam("dataset")
                                                                       DatasetArg<?> datasetArg)
        Retrieve processed expression data.

        The payload is transparently compressed via a Content-Encoding header and streamed to avoid dumping the whole payload in memory.

      • getDatasetRawExpression

        @GET
        @Path("/{dataset}/data/raw")
        @Produces("text/tab-separated-values; charset=UTF-8")
        public javax.ws.rs.core.Response getDatasetRawExpression​(@PathParam("dataset")
                                                                 DatasetArg<?> datasetArg,
                                                                 @QueryParam("quantitationType")
                                                                 QuantitationTypeArg<?> quantitationTypeArg)
        Retrieve raw expression data.

        The payload is transparently compressed via a Content-Encoding header and streamed to avoid dumping the whole payload in memory.

      • getDatasetDesign

        @GET
        @Path("/{dataset}/design")
        @Produces("text/tab-separated-values; charset=UTF-8")
        public javax.ws.rs.core.Response getDatasetDesign​(@PathParam("dataset")
                                                          DatasetArg<?> datasetArg)
        Retrieves the design for the given dataset.
        Parameters:
        datasetArg - can either be the ExpressionExperiment ID or its short name (e.g. GSE1234). Retrieval by ID is more efficient. Only datasets that user has access to will be available.
      • getDatasetHasBatchInformation

        @GET
        @Path("/{dataset}/hasbatch")
        @Produces("application/json")
        public ResponseDataObject<Boolean> getDatasetHasBatchInformation​(@PathParam("dataset")
                                                                         DatasetArg<?> datasetArg)
        Returns true if the experiment has had batch information successfully filled in. This will be true even if there is only one batch. It does not reflect the presence or absence of a batch effect.
        Parameters:
        datasetArg - can either be the ExpressionExperiment ID or its short name (e.g. GSE1234). Retrieval by ID is more efficient. Only datasets that user has access to will be available.
      • getDatasetSvd

        @GET
        @Path("/{dataset}/svd")
        @Produces("application/json")
        public ResponseDataObject<ubic.gemma.rest.DatasetsWebService.SimpleSVDValueObject> getDatasetSvd​(@PathParam("dataset")
                                                                                                         DatasetArg<?> datasetArg)
        Retrieves the design for the given dataset.
        Parameters:
        datasetArg - can either be the ExpressionExperiment ID or its short name (e.g. GSE1234). Retrieval by ID is more efficient. Only datasets that user has access to will be available.
      • getDatasetExpressionForGenes

        @GET
        @Path("/{datasets}/expressions/genes/{genes: [^/]+}")
        @Produces("application/json")
        public ResponseDataObject<List<ExperimentExpressionLevelsValueObject>> getDatasetExpressionForGenes​(@PathParam("datasets")
                                                                                                            DatasetArrayArg datasets,
                                                                                                            @PathParam("genes")
                                                                                                            GeneArrayArg genes,
                                                                                                            @QueryParam("keepNonSpecific") @DefaultValue("false")
                                                                                                            Boolean keepNonSpecific,
                                                                                                            @QueryParam("consolidate")
                                                                                                            ExpLevelConsolidationArg consolidate)
        Retrieves the expression levels of given genes on given datasets.
        Parameters:
        datasets - a list of dataset identifiers separated by commas (','). The identifiers can either be the ExpressionExperiment ID or its short name (e.g. GSE1234). Retrieval by ID is more efficient. Only datasets that user has access to will be available.

        You can combine various identifiers in one query, but an invalid identifier will cause the call to yield an error.

        genes - a list of gene identifiers, separated by commas (','). Identifiers can be one of NCBI ID, Ensembl ID or official symbol. NCBI ID is the most efficient (and guaranteed to be unique) identifier. Official symbol will return a random homologue. Use one of the IDs to specify the correct taxon - if the gene taxon does not match the taxon of the given datasets, expression levels for that gene will be missing from the response.

        You can combine various identifiers in one query, but an invalid identifier will cause the call to yield an error.

        keepNonSpecific - whether to keep elements that are mapped to multiple genes.
        consolidate - whether genes with multiple elements should consolidate the information. The options are:
        • pickmax: only return the vector that has the highest expression (mean over all its bioAssays)
        • pickvar: only return the vector with highest variance of expression across its bioAssays
        • average: create a new vector that will average the bioAssay values from all vectors
      • getDatasetExpressionPca

        @GET
        @Path("/{datasets}/expressions/pca")
        @Produces("application/json")
        public ResponseDataObject<List<ExperimentExpressionLevelsValueObject>> getDatasetExpressionPca​(@PathParam("datasets")
                                                                                                       DatasetArrayArg datasets,
                                                                                                       @QueryParam("component") @DefaultValue("1")
                                                                                                       Integer component,
                                                                                                       @QueryParam("limit") @DefaultValue("100")
                                                                                                       LimitArg limit,
                                                                                                       @QueryParam("keepNonSpecific") @DefaultValue("false")
                                                                                                       Boolean keepNonSpecific,
                                                                                                       @QueryParam("consolidate")
                                                                                                       ExpLevelConsolidationArg consolidate)
        Retrieves the expression levels of genes highly expressed in the given component on given datasets.
        Parameters:
        datasets - a list of dataset identifiers separated by commas (','). The identifiers can either be the ExpressionExperiment ID or its short name (e.g. GSE1234). Retrieval by ID is more efficient. Only datasets that user has access to will be available.

        You can combine various identifiers in one query, but an invalid identifier will cause the call to yield an error.

        limit - maximum amount of returned gene-probe expression level pairs.
        component - the pca component to limit the results to.
        keepNonSpecific - whether to keep elements that are mapped to multiple genes.
        consolidate - whether genes with multiple elements should consolidate the information. The options are:
        • pickmax: only return the vector that has the highest expression (mean over all its bioAssays)
        • pickvar: only return the vector with highest variance of expression across its bioAssays
        • average: create a new vector that will average the bioAssay values from all vectors
      • getDatasetDifferentialExpression

        @GET
        @Path("/{datasets}/expressions/differential")
        @Produces("application/json")
        public ResponseDataObject<List<ExperimentExpressionLevelsValueObject>> getDatasetDifferentialExpression​(@PathParam("datasets")
                                                                                                                DatasetArrayArg datasets,
                                                                                                                @QueryParam("diffExSet")
                                                                                                                Long diffExSet,
                                                                                                                @QueryParam("threshold") @DefaultValue("1.0")
                                                                                                                Double threshold,
                                                                                                                @QueryParam("limit") @DefaultValue("100")
                                                                                                                LimitArg limit,
                                                                                                                @QueryParam("keepNonSpecific") @DefaultValue("false")
                                                                                                                Boolean keepNonSpecific,
                                                                                                                @QueryParam("consolidate")
                                                                                                                ExpLevelConsolidationArg consolidate)
        Retrieves the expression levels of genes highly expressed in the given component on given datasets.
        Parameters:
        datasets - a list of dataset identifiers separated by commas (','). The identifiers can either be the ExpressionExperiment ID or its short name (e.g. GSE1234). Retrieval by ID is more efficient. Only datasets that user has access to will be available.

        You can combine various identifiers in one query, but an invalid identifier will cause the call to yield an error.

        diffExSet - the ID of the differential expression set to retrieve the data from.
        threshold - the FDR threshold that the differential expression has to meet to be included in the response.
        limit - maximum amount of returned gene-probe expression level pairs.
        keepNonSpecific - whether to keep elements that are mapped to multiple genes.
        consolidate - whether genes with multiple elements should consolidate the information. The options are:
        • pickmax: only return the vector that has the highest expression (mean over all its bioAssays)
        • pickvar: only return the vector with highest variance of expression across its bioAssays
        • average: create a new vector that will average the bioAssay values from all vectors